@grapadigital/shared-schemas 2.3.0 → 2.4.0
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.
|
@@ -24,6 +24,8 @@ declare class Inbox {
|
|
|
24
24
|
declare class Review {
|
|
25
25
|
revisedIssueDate: Date;
|
|
26
26
|
revisedDueDate: Date;
|
|
27
|
+
po?: string;
|
|
28
|
+
invoiceEmails?: string[];
|
|
27
29
|
}
|
|
28
30
|
declare class Invoiced {
|
|
29
31
|
code: string;
|
|
@@ -48,6 +50,9 @@ export declare class Invoice {
|
|
|
48
50
|
review?: Review;
|
|
49
51
|
invoiced?: Invoiced;
|
|
50
52
|
received?: Received;
|
|
53
|
+
omieServiceOrderId?: number;
|
|
54
|
+
omieServiceOrderNumber?: string;
|
|
55
|
+
omieReceivableId?: number;
|
|
51
56
|
canceled?: Canceled;
|
|
52
57
|
notes?: Note[];
|
|
53
58
|
tags?: Types.ObjectId[];
|
|
@@ -113,6 +113,24 @@ __decorate([
|
|
|
113
113
|
(0, mongoose_1.Prop)({ required: true }),
|
|
114
114
|
__metadata("design:type", Date)
|
|
115
115
|
], Review.prototype, "revisedDueDate", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, swagger_1.ApiProperty)({
|
|
118
|
+
example: "4507152009",
|
|
119
|
+
required: false,
|
|
120
|
+
description: "PO do cliente, vai na descrição da OS",
|
|
121
|
+
}),
|
|
122
|
+
(0, mongoose_1.Prop)(),
|
|
123
|
+
__metadata("design:type", String)
|
|
124
|
+
], Review.prototype, "po", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
(0, swagger_1.ApiProperty)({
|
|
127
|
+
example: ["nfe@cliente.com.br", "faturamento@grapac.com.br"],
|
|
128
|
+
required: false,
|
|
129
|
+
description: "E-mails que recebem a nota e o link de pagamento da OS na Omie",
|
|
130
|
+
}),
|
|
131
|
+
(0, mongoose_1.Prop)({ type: [String], default: undefined }),
|
|
132
|
+
__metadata("design:type", Array)
|
|
133
|
+
], Review.prototype, "invoiceEmails", void 0);
|
|
116
134
|
Review = __decorate([
|
|
117
135
|
(0, mongoose_1.Schema)({ _id: false })
|
|
118
136
|
], Review);
|
|
@@ -219,6 +237,33 @@ __decorate([
|
|
|
219
237
|
(0, mongoose_1.Prop)({ type: Received }),
|
|
220
238
|
__metadata("design:type", Received)
|
|
221
239
|
], Invoice.prototype, "received", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
(0, swagger_1.ApiProperty)({
|
|
242
|
+
example: 10089607219,
|
|
243
|
+
required: false,
|
|
244
|
+
description: "nCodOS da Ordem de Serviço na Omie",
|
|
245
|
+
}),
|
|
246
|
+
(0, mongoose_1.Prop)(),
|
|
247
|
+
__metadata("design:type", Number)
|
|
248
|
+
], Invoice.prototype, "omieServiceOrderId", void 0);
|
|
249
|
+
__decorate([
|
|
250
|
+
(0, swagger_1.ApiProperty)({
|
|
251
|
+
example: "000123",
|
|
252
|
+
required: false,
|
|
253
|
+
description: "cNumOS, número da OS exibido na Omie",
|
|
254
|
+
}),
|
|
255
|
+
(0, mongoose_1.Prop)(),
|
|
256
|
+
__metadata("design:type", String)
|
|
257
|
+
], Invoice.prototype, "omieServiceOrderNumber", void 0);
|
|
258
|
+
__decorate([
|
|
259
|
+
(0, swagger_1.ApiProperty)({
|
|
260
|
+
example: 10089613082,
|
|
261
|
+
required: false,
|
|
262
|
+
description: "codigo_lancamento_omie da conta a receber gerada pela OS",
|
|
263
|
+
}),
|
|
264
|
+
(0, mongoose_1.Prop)(),
|
|
265
|
+
__metadata("design:type", Number)
|
|
266
|
+
], Invoice.prototype, "omieReceivableId", void 0);
|
|
222
267
|
__decorate([
|
|
223
268
|
(0, swagger_1.ApiProperty)({ type: () => Canceled }),
|
|
224
269
|
(0, mongoose_1.Prop)({ type: Canceled }),
|
|
@@ -258,4 +303,6 @@ exports.InvoiceSchema.index({ organization: 1, "invoiced.issueDate": 1 });
|
|
|
258
303
|
exports.InvoiceSchema.index({ sale: 1, installmentNumber: 1 });
|
|
259
304
|
exports.InvoiceSchema.index({ sale: 1, phase: 1 });
|
|
260
305
|
exports.InvoiceSchema.index({ tags: 1 });
|
|
306
|
+
exports.InvoiceSchema.index({ organization: 1, omieServiceOrderId: 1 }, { sparse: true });
|
|
307
|
+
exports.InvoiceSchema.index({ organization: 1, omieReceivableId: 1 }, { sparse: true });
|
|
261
308
|
exports.InvoiceModel = (0, mongoose_2.model)("Invoice", exports.InvoiceSchema);
|
|
@@ -123,7 +123,7 @@ export declare class Sale {
|
|
|
123
123
|
_id?: Types.ObjectId;
|
|
124
124
|
title: string;
|
|
125
125
|
phase: "inbox" | "strategy" | "proposal" | "negotiation" | "commission" | "formalization" | "closed" | "lost";
|
|
126
|
-
type: "campaign" | "fee" | "production" | "press_kit" | "renewal"
|
|
126
|
+
type: "campaign" | "fee" | "production" | "press_kit" | "renewal";
|
|
127
127
|
proposal?: Proposal;
|
|
128
128
|
negotiation?: Negotiation;
|
|
129
129
|
formalization?: Formalization;
|
|
@@ -409,19 +409,7 @@ __decorate([
|
|
|
409
409
|
__decorate([
|
|
410
410
|
(0, mongoose_1.Prop)({
|
|
411
411
|
type: String,
|
|
412
|
-
enum: [
|
|
413
|
-
"campaign",
|
|
414
|
-
"fee",
|
|
415
|
-
"production",
|
|
416
|
-
"press_kit",
|
|
417
|
-
"renewal",
|
|
418
|
-
// legado, sai depois da GD-826
|
|
419
|
-
"new",
|
|
420
|
-
"organic_expansion",
|
|
421
|
-
"strategic_expansion",
|
|
422
|
-
"comercial_winback",
|
|
423
|
-
"organic_winback",
|
|
424
|
-
],
|
|
412
|
+
enum: ["campaign", "fee", "production", "press_kit", "renewal"],
|
|
425
413
|
default: "campaign",
|
|
426
414
|
}),
|
|
427
415
|
__metadata("design:type", String)
|