@grapadigital/shared-schemas 1.0.154 → 1.0.156
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.
|
@@ -83,6 +83,26 @@ export declare const RequestedSchema: MongooseSchema<Requested, import("mongoose
|
|
|
83
83
|
} & {
|
|
84
84
|
__v: number;
|
|
85
85
|
}>;
|
|
86
|
+
declare class ReceivedNote {
|
|
87
|
+
text: string;
|
|
88
|
+
email: string;
|
|
89
|
+
}
|
|
90
|
+
export declare class Received {
|
|
91
|
+
takerConfirmed: boolean;
|
|
92
|
+
descriptionConfirmed: boolean;
|
|
93
|
+
bankDataConfirmed: boolean;
|
|
94
|
+
valueConfirmed: boolean;
|
|
95
|
+
resendNotes: ReceivedNote[];
|
|
96
|
+
}
|
|
97
|
+
export declare const ReceivedSchema: MongooseSchema<Received, import("mongoose").Model<Received, any, any, any, import("mongoose").Document<unknown, any, Received, any, {}> & Received & {
|
|
98
|
+
_id: Types.ObjectId;
|
|
99
|
+
} & {
|
|
100
|
+
__v: number;
|
|
101
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Received, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Received>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Received> & {
|
|
102
|
+
_id: Types.ObjectId;
|
|
103
|
+
} & {
|
|
104
|
+
__v: number;
|
|
105
|
+
}>;
|
|
86
106
|
export declare class Queued {
|
|
87
107
|
issueDate: Date;
|
|
88
108
|
dueDate: Date;
|
|
@@ -149,6 +169,7 @@ export declare class Payment {
|
|
|
149
169
|
pending?: Pending;
|
|
150
170
|
review?: Review;
|
|
151
171
|
requested?: Requested;
|
|
172
|
+
received?: Received;
|
|
152
173
|
queued?: Queued;
|
|
153
174
|
paid?: Paid;
|
|
154
175
|
canceled?: Canceled;
|
|
@@ -9,7 +9,7 @@ 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.PaymentModel = exports.PaymentSchema = exports.Payment = exports.AttachmentSchema = exports.Attachment = exports.CanceledSchema = exports.Canceled = exports.PaidSchema = exports.Paid = exports.QueuedSchema = exports.Queued = exports.RequestedSchema = exports.Requested = exports.PendingSchema = exports.Pending = exports.ReviewSchema = exports.Review = void 0;
|
|
12
|
+
exports.PaymentModel = exports.PaymentSchema = exports.Payment = exports.AttachmentSchema = exports.Attachment = exports.CanceledSchema = exports.Canceled = exports.PaidSchema = exports.Paid = exports.QueuedSchema = exports.Queued = exports.ReceivedSchema = exports.Received = exports.RequestedSchema = exports.Requested = exports.PendingSchema = exports.Pending = exports.ReviewSchema = exports.Review = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Requester = class Requester {
|
|
@@ -151,6 +151,47 @@ Requested = __decorate([
|
|
|
151
151
|
], Requested);
|
|
152
152
|
exports.Requested = Requested;
|
|
153
153
|
exports.RequestedSchema = mongoose_1.SchemaFactory.createForClass(Requested);
|
|
154
|
+
let ReceivedNote = class ReceivedNote {
|
|
155
|
+
};
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, mongoose_1.Prop)(),
|
|
158
|
+
__metadata("design:type", String)
|
|
159
|
+
], ReceivedNote.prototype, "text", void 0);
|
|
160
|
+
__decorate([
|
|
161
|
+
(0, mongoose_1.Prop)(),
|
|
162
|
+
__metadata("design:type", String)
|
|
163
|
+
], ReceivedNote.prototype, "email", void 0);
|
|
164
|
+
ReceivedNote = __decorate([
|
|
165
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
166
|
+
], ReceivedNote);
|
|
167
|
+
const ReceivedNoteSchema = mongoose_1.SchemaFactory.createForClass(ReceivedNote);
|
|
168
|
+
let Received = class Received {
|
|
169
|
+
};
|
|
170
|
+
__decorate([
|
|
171
|
+
(0, mongoose_1.Prop)(),
|
|
172
|
+
__metadata("design:type", Boolean)
|
|
173
|
+
], Received.prototype, "takerConfirmed", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, mongoose_1.Prop)(),
|
|
176
|
+
__metadata("design:type", Boolean)
|
|
177
|
+
], Received.prototype, "descriptionConfirmed", void 0);
|
|
178
|
+
__decorate([
|
|
179
|
+
(0, mongoose_1.Prop)(),
|
|
180
|
+
__metadata("design:type", Boolean)
|
|
181
|
+
], Received.prototype, "bankDataConfirmed", void 0);
|
|
182
|
+
__decorate([
|
|
183
|
+
(0, mongoose_1.Prop)(),
|
|
184
|
+
__metadata("design:type", Boolean)
|
|
185
|
+
], Received.prototype, "valueConfirmed", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, mongoose_1.Prop)({ type: [ReceivedNoteSchema], default: [] }),
|
|
188
|
+
__metadata("design:type", Array)
|
|
189
|
+
], Received.prototype, "resendNotes", void 0);
|
|
190
|
+
Received = __decorate([
|
|
191
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
192
|
+
], Received);
|
|
193
|
+
exports.Received = Received;
|
|
194
|
+
exports.ReceivedSchema = mongoose_1.SchemaFactory.createForClass(Received);
|
|
154
195
|
let Queued = class Queued {
|
|
155
196
|
};
|
|
156
197
|
__decorate([
|
|
@@ -269,6 +310,10 @@ __decorate([
|
|
|
269
310
|
(0, mongoose_1.Prop)({ type: exports.RequestedSchema, required: false }),
|
|
270
311
|
__metadata("design:type", Requested)
|
|
271
312
|
], Payment.prototype, "requested", void 0);
|
|
313
|
+
__decorate([
|
|
314
|
+
(0, mongoose_1.Prop)({ type: exports.ReceivedSchema, required: false }),
|
|
315
|
+
__metadata("design:type", Received)
|
|
316
|
+
], Payment.prototype, "received", void 0);
|
|
272
317
|
__decorate([
|
|
273
318
|
(0, mongoose_1.Prop)({ type: exports.QueuedSchema, required: false }),
|
|
274
319
|
__metadata("design:type", Queued)
|
|
@@ -126,7 +126,7 @@ export declare class Sale {
|
|
|
126
126
|
_id?: Types.ObjectId;
|
|
127
127
|
title: string;
|
|
128
128
|
phase: 'inbox' | 'screening' | 'proposal' | 'negotiation' | 'commission' | 'formalization' | 'closed' | 'lost';
|
|
129
|
-
type:
|
|
129
|
+
type: 'new' | 'organic_expansion' | 'strategic_expansion' | 'renewal' | 'comercial_winback' | 'organic_winback';
|
|
130
130
|
screening?: Screening;
|
|
131
131
|
proposal?: Proposal;
|
|
132
132
|
negotiation?: Negotiation;
|
|
@@ -142,6 +142,7 @@ export declare class Sale {
|
|
|
142
142
|
closedAt?: Date;
|
|
143
143
|
createdAt?: Date;
|
|
144
144
|
updatedAt?: Date;
|
|
145
|
+
omieId?: string;
|
|
145
146
|
}
|
|
146
147
|
export declare const SaleSchema: MongooseSchema<Sale, import("mongoose").Model<Sale, any, any, any, import("mongoose").Document<unknown, any, Sale, any, {}> & Sale & Required<{
|
|
147
148
|
_id: Types.ObjectId;
|
|
@@ -400,7 +400,14 @@ __decorate([
|
|
|
400
400
|
__decorate([
|
|
401
401
|
(0, mongoose_1.Prop)({
|
|
402
402
|
type: String,
|
|
403
|
-
enum: [
|
|
403
|
+
enum: [
|
|
404
|
+
'new',
|
|
405
|
+
'organic_expansion',
|
|
406
|
+
'strategic_expansion',
|
|
407
|
+
'renewal',
|
|
408
|
+
'comercial_winback',
|
|
409
|
+
'organic_winback',
|
|
410
|
+
],
|
|
404
411
|
default: 'new',
|
|
405
412
|
}),
|
|
406
413
|
__metadata("design:type", String)
|
|
@@ -471,6 +478,10 @@ __decorate([
|
|
|
471
478
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
472
479
|
__metadata("design:type", Date)
|
|
473
480
|
], Sale.prototype, "updatedAt", void 0);
|
|
481
|
+
__decorate([
|
|
482
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
483
|
+
__metadata("design:type", String)
|
|
484
|
+
], Sale.prototype, "omieId", void 0);
|
|
474
485
|
Sale = __decorate([
|
|
475
486
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
476
487
|
], Sale);
|
package/package.json
CHANGED
|
@@ -136,6 +136,29 @@ export class Requested {
|
|
|
136
136
|
}
|
|
137
137
|
export const RequestedSchema = SchemaFactory.createForClass(Requested);
|
|
138
138
|
|
|
139
|
+
@Schema({ _id: false })
|
|
140
|
+
class ReceivedNote {
|
|
141
|
+
@Prop() text: string;
|
|
142
|
+
|
|
143
|
+
@Prop() email: string;
|
|
144
|
+
}
|
|
145
|
+
const ReceivedNoteSchema = SchemaFactory.createForClass(ReceivedNote);
|
|
146
|
+
|
|
147
|
+
@Schema({ _id: false })
|
|
148
|
+
export class Received {
|
|
149
|
+
@Prop() takerConfirmed: boolean;
|
|
150
|
+
|
|
151
|
+
@Prop() descriptionConfirmed: boolean;
|
|
152
|
+
|
|
153
|
+
@Prop() bankDataConfirmed: boolean;
|
|
154
|
+
|
|
155
|
+
@Prop() valueConfirmed: boolean;
|
|
156
|
+
|
|
157
|
+
@Prop({ type: [ReceivedNoteSchema], default: [] })
|
|
158
|
+
resendNotes: ReceivedNote[];
|
|
159
|
+
}
|
|
160
|
+
export const ReceivedSchema = SchemaFactory.createForClass(Received);
|
|
161
|
+
|
|
139
162
|
@Schema({ _id: false })
|
|
140
163
|
export class Queued {
|
|
141
164
|
@Prop() issueDate: Date;
|
|
@@ -210,6 +233,9 @@ export class Payment {
|
|
|
210
233
|
@Prop({ type: RequestedSchema, required: false })
|
|
211
234
|
requested?: Requested;
|
|
212
235
|
|
|
236
|
+
@Prop({ type: ReceivedSchema, required: false })
|
|
237
|
+
received?: Received;
|
|
238
|
+
|
|
213
239
|
@Prop({ type: QueuedSchema, required: false })
|
|
214
240
|
queued?: Queued;
|
|
215
241
|
|
|
@@ -206,10 +206,23 @@ export class Sale {
|
|
|
206
206
|
|
|
207
207
|
@Prop({
|
|
208
208
|
type: String,
|
|
209
|
-
enum: [
|
|
209
|
+
enum: [
|
|
210
|
+
'new',
|
|
211
|
+
'organic_expansion',
|
|
212
|
+
'strategic_expansion',
|
|
213
|
+
'renewal',
|
|
214
|
+
'comercial_winback',
|
|
215
|
+
'organic_winback',
|
|
216
|
+
],
|
|
210
217
|
default: 'new',
|
|
211
218
|
})
|
|
212
|
-
type:
|
|
219
|
+
type:
|
|
220
|
+
| 'new'
|
|
221
|
+
| 'organic_expansion'
|
|
222
|
+
| 'strategic_expansion'
|
|
223
|
+
| 'renewal'
|
|
224
|
+
| 'comercial_winback'
|
|
225
|
+
| 'organic_winback';
|
|
213
226
|
|
|
214
227
|
@Prop({ type: Screening }) screening?: Screening;
|
|
215
228
|
@Prop({ type: Proposal }) proposal?: Proposal;
|
|
@@ -250,6 +263,9 @@ export class Sale {
|
|
|
250
263
|
|
|
251
264
|
@Prop({ default: Date.now, required: false })
|
|
252
265
|
updatedAt?: Date;
|
|
266
|
+
|
|
267
|
+
@Prop({ type: String, required: false })
|
|
268
|
+
omieId?: string;
|
|
253
269
|
}
|
|
254
270
|
|
|
255
271
|
export const SaleSchema = SchemaFactory.createForClass(Sale);
|