@grapadigital/shared-schemas 1.0.69 → 1.0.71
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/action.schema.d.ts +2 -34
- package/dist/schemas/action.schema.js +4 -90
- package/dist/schemas/payment_new.schema.d.ts +2 -3
- package/dist/schemas/payment_new.schema.js +0 -4
- package/package.json +1 -1
- package/src/schemas/action.schema.ts +3 -68
- package/src/schemas/payment_new.schema.ts +2 -3
|
@@ -27,40 +27,8 @@ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
|
27
27
|
import { Recruitment } from './recruitment.schema';
|
|
28
28
|
import { Content } from './content.schema';
|
|
29
29
|
import { Client } from './client.schema';
|
|
30
|
+
import { Sale } from './sale.schema';
|
|
30
31
|
export type ActionDocument = HydratedDocument<Action>;
|
|
31
|
-
export declare class Installment {
|
|
32
|
-
number: number;
|
|
33
|
-
dueDate: Date;
|
|
34
|
-
value: number;
|
|
35
|
-
}
|
|
36
|
-
export declare class ComercialCard {
|
|
37
|
-
id: string;
|
|
38
|
-
title: string;
|
|
39
|
-
status?: string;
|
|
40
|
-
passThrough?: 'yes_client' | 'no_grapa' | 'no_client' | 'no_grapa_debit';
|
|
41
|
-
childPermit?: boolean;
|
|
42
|
-
internalCost?: number;
|
|
43
|
-
influencerValue?: number;
|
|
44
|
-
totalValue?: number;
|
|
45
|
-
expectedInvoiceIssueDate?: Date | null;
|
|
46
|
-
expectedInvoiceDueDate?: Date | null;
|
|
47
|
-
revisedInvoiceIssueDate?: Date | null;
|
|
48
|
-
revisedInvoiceDueDate?: Date | null;
|
|
49
|
-
invoiceIssueDate?: Date | null;
|
|
50
|
-
invoiceDueDate?: Date | null;
|
|
51
|
-
invoicePaymentDate?: Date | null;
|
|
52
|
-
dueDate?: Date | null;
|
|
53
|
-
installments?: Installment[];
|
|
54
|
-
}
|
|
55
|
-
export declare const ComercialCardSchema: MongooseSchema<ComercialCard, import("mongoose").Model<ComercialCard, any, any, any, import("mongoose").Document<unknown, any, ComercialCard> & ComercialCard & {
|
|
56
|
-
_id: Types.ObjectId;
|
|
57
|
-
} & {
|
|
58
|
-
__v: number;
|
|
59
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ComercialCard, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<ComercialCard>> & import("mongoose").FlatRecord<ComercialCard> & {
|
|
60
|
-
_id: Types.ObjectId;
|
|
61
|
-
} & {
|
|
62
|
-
__v: number;
|
|
63
|
-
}>;
|
|
64
32
|
export declare class Responsible {
|
|
65
33
|
name: string;
|
|
66
34
|
team: string;
|
|
@@ -108,7 +76,7 @@ export declare class Action {
|
|
|
108
76
|
cluster: string;
|
|
109
77
|
shopping?: string;
|
|
110
78
|
project?: string;
|
|
111
|
-
|
|
79
|
+
sale: Types.ObjectId | Sale;
|
|
112
80
|
responsibles: Responsibles;
|
|
113
81
|
brandUsername?: string;
|
|
114
82
|
hashtag?: string;
|
|
@@ -9,95 +9,9 @@ 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.ActionModel = exports.ActionSchema = exports.Action = exports.ResponsiblesSchema = exports.Responsibles = exports.ResponsibleSchema = exports.Responsible =
|
|
12
|
+
exports.ActionModel = exports.ActionSchema = exports.Action = exports.ResponsiblesSchema = exports.Responsibles = exports.ResponsibleSchema = exports.Responsible = 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;
|
|
21
|
-
let ComercialCard = class ComercialCard {
|
|
22
|
-
};
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], ComercialCard.prototype, "id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], ComercialCard.prototype, "title", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
33
|
-
__metadata("design:type", String)
|
|
34
|
-
], ComercialCard.prototype, "status", void 0);
|
|
35
|
-
__decorate([
|
|
36
|
-
(0, mongoose_1.Prop)({
|
|
37
|
-
type: String,
|
|
38
|
-
enum: ['yes_client', 'no_grapa', 'no_client', 'no_grapa_debit'],
|
|
39
|
-
default: null,
|
|
40
|
-
required: false
|
|
41
|
-
}),
|
|
42
|
-
__metadata("design:type", String)
|
|
43
|
-
], ComercialCard.prototype, "passThrough", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
46
|
-
__metadata("design:type", Boolean)
|
|
47
|
-
], ComercialCard.prototype, "childPermit", void 0);
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
50
|
-
__metadata("design:type", Number)
|
|
51
|
-
], ComercialCard.prototype, "internalCost", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
54
|
-
__metadata("design:type", Number)
|
|
55
|
-
], ComercialCard.prototype, "influencerValue", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
58
|
-
__metadata("design:type", Number)
|
|
59
|
-
], ComercialCard.prototype, "totalValue", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
62
|
-
__metadata("design:type", Object)
|
|
63
|
-
], ComercialCard.prototype, "expectedInvoiceIssueDate", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
66
|
-
__metadata("design:type", Object)
|
|
67
|
-
], ComercialCard.prototype, "expectedInvoiceDueDate", void 0);
|
|
68
|
-
__decorate([
|
|
69
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
70
|
-
__metadata("design:type", Object)
|
|
71
|
-
], ComercialCard.prototype, "revisedInvoiceIssueDate", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
74
|
-
__metadata("design:type", Object)
|
|
75
|
-
], ComercialCard.prototype, "revisedInvoiceDueDate", void 0);
|
|
76
|
-
__decorate([
|
|
77
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
78
|
-
__metadata("design:type", Object)
|
|
79
|
-
], ComercialCard.prototype, "invoiceIssueDate", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
82
|
-
__metadata("design:type", Object)
|
|
83
|
-
], ComercialCard.prototype, "invoiceDueDate", void 0);
|
|
84
|
-
__decorate([
|
|
85
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
86
|
-
__metadata("design:type", Object)
|
|
87
|
-
], ComercialCard.prototype, "invoicePaymentDate", void 0);
|
|
88
|
-
__decorate([
|
|
89
|
-
(0, mongoose_1.Prop)({ type: Date, default: null, required: false }),
|
|
90
|
-
__metadata("design:type", Object)
|
|
91
|
-
], ComercialCard.prototype, "dueDate", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
(0, mongoose_1.Prop)({ type: [Installment], required: false }),
|
|
94
|
-
__metadata("design:type", Array)
|
|
95
|
-
], ComercialCard.prototype, "installments", void 0);
|
|
96
|
-
ComercialCard = __decorate([
|
|
97
|
-
(0, mongoose_1.Schema)({ _id: false })
|
|
98
|
-
], ComercialCard);
|
|
99
|
-
exports.ComercialCard = ComercialCard;
|
|
100
|
-
exports.ComercialCardSchema = mongoose_1.SchemaFactory.createForClass(ComercialCard);
|
|
101
15
|
let Responsible = class Responsible {
|
|
102
16
|
};
|
|
103
17
|
__decorate([
|
|
@@ -228,9 +142,9 @@ __decorate([
|
|
|
228
142
|
__metadata("design:type", String)
|
|
229
143
|
], Action.prototype, "project", void 0);
|
|
230
144
|
__decorate([
|
|
231
|
-
(0, mongoose_1.Prop)({ type:
|
|
232
|
-
__metadata("design:type",
|
|
233
|
-
], Action.prototype, "
|
|
145
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Sale' }),
|
|
146
|
+
__metadata("design:type", Object)
|
|
147
|
+
], Action.prototype, "sale", void 0);
|
|
234
148
|
__decorate([
|
|
235
149
|
(0, mongoose_1.Prop)({ type: exports.ResponsiblesSchema, required: true }),
|
|
236
150
|
__metadata("design:type", Responsibles)
|
|
@@ -132,11 +132,10 @@ export declare class PaymentNew {
|
|
|
132
132
|
title: string;
|
|
133
133
|
requester: Requester;
|
|
134
134
|
type: 'influencer' | 'advisor' | 'supplier' | 'employee';
|
|
135
|
-
influencer
|
|
136
|
-
supplier
|
|
135
|
+
influencer?: Types.ObjectId | Influencer;
|
|
136
|
+
supplier?: Types.ObjectId | Supplier;
|
|
137
137
|
value: number;
|
|
138
138
|
description: string;
|
|
139
|
-
emissionNotes: string;
|
|
140
139
|
processing?: Processing;
|
|
141
140
|
approval?: Approval;
|
|
142
141
|
requested?: Requested;
|
|
@@ -173,10 +173,6 @@ __decorate([
|
|
|
173
173
|
(0, mongoose_1.Prop)(),
|
|
174
174
|
__metadata("design:type", String)
|
|
175
175
|
], PaymentNew.prototype, "description", void 0);
|
|
176
|
-
__decorate([
|
|
177
|
-
(0, mongoose_1.Prop)(),
|
|
178
|
-
__metadata("design:type", String)
|
|
179
|
-
], PaymentNew.prototype, "emissionNotes", void 0);
|
|
180
176
|
__decorate([
|
|
181
177
|
(0, mongoose_1.Prop)({ type: exports.ProcessingSchema, required: false }),
|
|
182
178
|
__metadata("design:type", Processing)
|
package/package.json
CHANGED
|
@@ -4,75 +4,10 @@ import { HydratedDocument, Schema as MongooseSchema, Types, model as MongooseMod
|
|
|
4
4
|
import { Recruitment } from './recruitment.schema';
|
|
5
5
|
import { Content } from './content.schema';
|
|
6
6
|
import { Client } from './client.schema';
|
|
7
|
+
import { Sale } from './sale.schema';
|
|
7
8
|
|
|
8
9
|
export type ActionDocument = HydratedDocument<Action>;
|
|
9
10
|
|
|
10
|
-
@Schema({ _id: false })
|
|
11
|
-
export class Installment {
|
|
12
|
-
number: number;
|
|
13
|
-
dueDate: Date;
|
|
14
|
-
value: number;
|
|
15
|
-
}
|
|
16
|
-
@Schema({ _id: false })
|
|
17
|
-
export class ComercialCard {
|
|
18
|
-
@Prop({ type: String, required: true })
|
|
19
|
-
id: string;
|
|
20
|
-
|
|
21
|
-
@Prop({ type: String, required: true })
|
|
22
|
-
title: string;
|
|
23
|
-
|
|
24
|
-
@Prop({ type: String, required: false })
|
|
25
|
-
status?: string;
|
|
26
|
-
|
|
27
|
-
@Prop({
|
|
28
|
-
type: String,
|
|
29
|
-
enum: ['yes_client', 'no_grapa', 'no_client', 'no_grapa_debit'],
|
|
30
|
-
default: null,
|
|
31
|
-
required: false
|
|
32
|
-
})
|
|
33
|
-
passThrough?: 'yes_client' | 'no_grapa' | 'no_client' | 'no_grapa_debit';
|
|
34
|
-
|
|
35
|
-
@Prop({ type: String, required: false })
|
|
36
|
-
childPermit?: boolean;
|
|
37
|
-
|
|
38
|
-
@Prop({ type: String, required: false })
|
|
39
|
-
internalCost?: number;
|
|
40
|
-
|
|
41
|
-
@Prop({ type: String, required: false })
|
|
42
|
-
influencerValue?: number;
|
|
43
|
-
|
|
44
|
-
@Prop({ type: String, required: false })
|
|
45
|
-
totalValue?: number;
|
|
46
|
-
|
|
47
|
-
@Prop({ type: Date, default: null, required: false })
|
|
48
|
-
expectedInvoiceIssueDate?: Date | null;
|
|
49
|
-
|
|
50
|
-
@Prop({ type: Date, default: null, required: false })
|
|
51
|
-
expectedInvoiceDueDate?: Date | null;
|
|
52
|
-
|
|
53
|
-
@Prop({ type: Date, default: null, required: false })
|
|
54
|
-
revisedInvoiceIssueDate?: Date | null;
|
|
55
|
-
|
|
56
|
-
@Prop({ type: Date, default: null, required: false })
|
|
57
|
-
revisedInvoiceDueDate?: Date | null;
|
|
58
|
-
|
|
59
|
-
@Prop({ type: Date, default: null, required: false })
|
|
60
|
-
invoiceIssueDate?: Date | null;
|
|
61
|
-
|
|
62
|
-
@Prop({ type: Date, default: null, required: false })
|
|
63
|
-
invoiceDueDate?: Date | null;
|
|
64
|
-
|
|
65
|
-
@Prop({ type: Date, default: null, required: false })
|
|
66
|
-
invoicePaymentDate?: Date | null;
|
|
67
|
-
|
|
68
|
-
@Prop({ type: Date, default: null, required: false })
|
|
69
|
-
dueDate?: Date | null;
|
|
70
|
-
|
|
71
|
-
@Prop({ type: [Installment], required: false })
|
|
72
|
-
installments?: Installment[];
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export const ComercialCardSchema = SchemaFactory.createForClass(ComercialCard);
|
|
76
11
|
@Schema({ _id: false })
|
|
77
12
|
export class Responsible {
|
|
78
13
|
@Prop()
|
|
@@ -180,8 +115,8 @@ export class Action {
|
|
|
180
115
|
@Prop({ type: String, required: false })
|
|
181
116
|
project?: string;
|
|
182
117
|
|
|
183
|
-
@Prop({ type:
|
|
184
|
-
|
|
118
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Sale' })
|
|
119
|
+
sale: Types.ObjectId | Sale;
|
|
185
120
|
|
|
186
121
|
@Prop({ type: ResponsiblesSchema, required: true})
|
|
187
122
|
responsibles: Responsibles;
|
|
@@ -76,14 +76,13 @@ export class PaymentNew {
|
|
|
76
76
|
type: 'influencer' | 'advisor' | 'supplier' | 'employee';
|
|
77
77
|
|
|
78
78
|
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
79
|
-
influencer
|
|
79
|
+
influencer?: Types.ObjectId | Influencer;
|
|
80
80
|
|
|
81
81
|
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
82
|
-
supplier
|
|
82
|
+
supplier?: Types.ObjectId | Supplier;
|
|
83
83
|
|
|
84
84
|
@Prop() value: number;
|
|
85
85
|
@Prop() description: string;
|
|
86
|
-
@Prop() emissionNotes: string;
|
|
87
86
|
|
|
88
87
|
@Prop({ type: ProcessingSchema, required: false })
|
|
89
88
|
processing?: Processing;
|