@grapadigital/shared-schemas 1.0.72 → 1.0.74
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/payment_new.schema.d.ts +23 -12
- package/dist/schemas/payment_new.schema.js +56 -59
- package/dist/schemas/sale.schema.d.ts +5 -5
- package/dist/schemas/sale.schema.js +5 -5
- package/package.json +1 -1
- package/src/schemas/payment_new.schema.ts +37 -52
- package/src/schemas/sale.schema.ts +5 -5
|
@@ -49,6 +49,27 @@ export declare const ProcessingSchema: MongooseSchema<Processing, import("mongoo
|
|
|
49
49
|
} & {
|
|
50
50
|
__v: number;
|
|
51
51
|
}>;
|
|
52
|
+
export declare class Pending {
|
|
53
|
+
requester: Requester;
|
|
54
|
+
type: 'influencer' | 'advisor' | 'supplier' | 'employee' | 'refund';
|
|
55
|
+
influencer?: Types.ObjectId | Influencer;
|
|
56
|
+
supplier?: Types.ObjectId | Supplier;
|
|
57
|
+
recruitment?: Types.ObjectId | Recruitment;
|
|
58
|
+
value: number;
|
|
59
|
+
description: string;
|
|
60
|
+
installmentNumber: number;
|
|
61
|
+
sale: Types.ObjectId | Sale;
|
|
62
|
+
action: Types.ObjectId | Action;
|
|
63
|
+
}
|
|
64
|
+
export declare const PendingSchema: MongooseSchema<Pending, import("mongoose").Model<Pending, any, any, any, import("mongoose").Document<unknown, any, Pending> & Pending & {
|
|
65
|
+
_id: Types.ObjectId;
|
|
66
|
+
} & {
|
|
67
|
+
__v: number;
|
|
68
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Pending, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Pending>> & import("mongoose").FlatRecord<Pending> & {
|
|
69
|
+
_id: Types.ObjectId;
|
|
70
|
+
} & {
|
|
71
|
+
__v: number;
|
|
72
|
+
}>;
|
|
52
73
|
export declare class Approval {
|
|
53
74
|
name: string;
|
|
54
75
|
approvedAt: Date;
|
|
@@ -130,12 +151,8 @@ export declare const NoteSchema: MongooseSchema<Note, import("mongoose").Model<N
|
|
|
130
151
|
export declare class PaymentNew {
|
|
131
152
|
_id?: Types.ObjectId;
|
|
132
153
|
title: string;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
influencer?: Types.ObjectId | Influencer;
|
|
136
|
-
supplier?: Types.ObjectId | Supplier;
|
|
137
|
-
value: number;
|
|
138
|
-
description: string;
|
|
154
|
+
phase: 'pending' | 'review' | 'approval' | 'awaiting' | 'requested' | 'queued' | 'paid' | 'client' | 'canceled';
|
|
155
|
+
pending?: Pending;
|
|
139
156
|
processing?: Processing;
|
|
140
157
|
approval?: Approval;
|
|
141
158
|
requested?: Requested;
|
|
@@ -143,12 +160,6 @@ export declare class PaymentNew {
|
|
|
143
160
|
paid?: Paid;
|
|
144
161
|
canceled?: Canceled;
|
|
145
162
|
notes?: Note[];
|
|
146
|
-
installmentNumber: number;
|
|
147
|
-
additionalComments?: string;
|
|
148
|
-
phase: 'pending' | 'review' | 'approval' | 'awaiting' | 'requested' | 'queued' | 'paid' | 'client' | 'canceled';
|
|
149
|
-
sale: Types.ObjectId | Sale;
|
|
150
|
-
action: Types.ObjectId | Action;
|
|
151
|
-
recruitment: Types.ObjectId | Recruitment;
|
|
152
163
|
}
|
|
153
164
|
export declare const PaymentNewSchema: MongooseSchema<PaymentNew, import("mongoose").Model<PaymentNew, any, any, any, import("mongoose").Document<unknown, any, PaymentNew> & PaymentNew & Required<{
|
|
154
165
|
_id: Types.ObjectId;
|
|
@@ -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.PaymentNewModel = exports.PaymentNewSchema = exports.PaymentNew = exports.NoteSchema = exports.Note = exports.CanceledSchema = exports.Canceled = exports.PaidSchema = exports.Paid = exports.QueuedSchema = exports.Queued = exports.RequestedSchema = exports.Requested = exports.ApprovalSchema = exports.Approval = exports.ProcessingSchema = exports.Processing = void 0;
|
|
12
|
+
exports.PaymentNewModel = exports.PaymentNewSchema = exports.PaymentNew = exports.NoteSchema = exports.Note = exports.CanceledSchema = exports.Canceled = exports.PaidSchema = exports.Paid = exports.QueuedSchema = exports.Queued = exports.RequestedSchema = exports.Requested = exports.ApprovalSchema = exports.Approval = exports.PendingSchema = exports.Pending = exports.ProcessingSchema = exports.Processing = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
let Requester = class Requester {
|
|
@@ -49,6 +49,53 @@ Processing = __decorate([
|
|
|
49
49
|
], Processing);
|
|
50
50
|
exports.Processing = Processing;
|
|
51
51
|
exports.ProcessingSchema = mongoose_1.SchemaFactory.createForClass(Processing);
|
|
52
|
+
let Pending = class Pending {
|
|
53
|
+
};
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, mongoose_1.Prop)({ type: RequesterSchema, required: true }),
|
|
56
|
+
__metadata("design:type", Requester)
|
|
57
|
+
], Pending.prototype, "requester", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, mongoose_1.Prop)({ type: String, enum: ['influencer', 'advisor', 'supplier', 'employee', 'refund'] }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], Pending.prototype, "type", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
64
|
+
__metadata("design:type", Object)
|
|
65
|
+
], Pending.prototype, "influencer", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], Pending.prototype, "supplier", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Recruitment' }),
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
|
+
], Pending.prototype, "recruitment", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, mongoose_1.Prop)(),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], Pending.prototype, "value", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, mongoose_1.Prop)(),
|
|
80
|
+
__metadata("design:type", String)
|
|
81
|
+
], Pending.prototype, "description", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, mongoose_1.Prop)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], Pending.prototype, "installmentNumber", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Sale' }),
|
|
88
|
+
__metadata("design:type", Object)
|
|
89
|
+
], Pending.prototype, "sale", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action' }),
|
|
92
|
+
__metadata("design:type", Object)
|
|
93
|
+
], Pending.prototype, "action", void 0);
|
|
94
|
+
Pending = __decorate([
|
|
95
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
96
|
+
], Pending);
|
|
97
|
+
exports.Pending = Pending;
|
|
98
|
+
exports.PendingSchema = mongoose_1.SchemaFactory.createForClass(Pending);
|
|
52
99
|
let Approval = class Approval {
|
|
53
100
|
};
|
|
54
101
|
__decorate([
|
|
@@ -150,29 +197,16 @@ __decorate([
|
|
|
150
197
|
__metadata("design:type", String)
|
|
151
198
|
], PaymentNew.prototype, "title", void 0);
|
|
152
199
|
__decorate([
|
|
153
|
-
(0, mongoose_1.Prop)({
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
(0, mongoose_1.Prop)({ type: String, enum: ['influencer', 'advisor', 'supplier', 'employee'] }),
|
|
200
|
+
(0, mongoose_1.Prop)({
|
|
201
|
+
type: String,
|
|
202
|
+
enum: ['pending', 'review', 'approval', 'awaiting', 'requested', 'queued', 'paid', 'client', 'canceled'],
|
|
203
|
+
}),
|
|
158
204
|
__metadata("design:type", String)
|
|
159
|
-
], PaymentNew.prototype, "
|
|
160
|
-
__decorate([
|
|
161
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
162
|
-
__metadata("design:type", Object)
|
|
163
|
-
], PaymentNew.prototype, "influencer", void 0);
|
|
164
|
-
__decorate([
|
|
165
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
166
|
-
__metadata("design:type", Object)
|
|
167
|
-
], PaymentNew.prototype, "supplier", void 0);
|
|
168
|
-
__decorate([
|
|
169
|
-
(0, mongoose_1.Prop)(),
|
|
170
|
-
__metadata("design:type", Number)
|
|
171
|
-
], PaymentNew.prototype, "value", void 0);
|
|
205
|
+
], PaymentNew.prototype, "phase", void 0);
|
|
172
206
|
__decorate([
|
|
173
|
-
(0, mongoose_1.Prop)(),
|
|
174
|
-
__metadata("design:type",
|
|
175
|
-
], PaymentNew.prototype, "
|
|
207
|
+
(0, mongoose_1.Prop)({ type: exports.PendingSchema, required: false }),
|
|
208
|
+
__metadata("design:type", Pending)
|
|
209
|
+
], PaymentNew.prototype, "pending", void 0);
|
|
176
210
|
__decorate([
|
|
177
211
|
(0, mongoose_1.Prop)({ type: exports.ProcessingSchema, required: false }),
|
|
178
212
|
__metadata("design:type", Processing)
|
|
@@ -201,43 +235,6 @@ __decorate([
|
|
|
201
235
|
(0, mongoose_1.Prop)({ type: [exports.NoteSchema], default: [] }),
|
|
202
236
|
__metadata("design:type", Array)
|
|
203
237
|
], PaymentNew.prototype, "notes", void 0);
|
|
204
|
-
__decorate([
|
|
205
|
-
(0, mongoose_1.Prop)(),
|
|
206
|
-
__metadata("design:type", Number)
|
|
207
|
-
], PaymentNew.prototype, "installmentNumber", void 0);
|
|
208
|
-
__decorate([
|
|
209
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
210
|
-
__metadata("design:type", String)
|
|
211
|
-
], PaymentNew.prototype, "additionalComments", void 0);
|
|
212
|
-
__decorate([
|
|
213
|
-
(0, mongoose_1.Prop)({
|
|
214
|
-
type: String,
|
|
215
|
-
enum: [
|
|
216
|
-
'pending',
|
|
217
|
-
'review',
|
|
218
|
-
'approval',
|
|
219
|
-
'awaiting',
|
|
220
|
-
'requested',
|
|
221
|
-
'queued',
|
|
222
|
-
'paid',
|
|
223
|
-
'client',
|
|
224
|
-
'canceled',
|
|
225
|
-
],
|
|
226
|
-
}),
|
|
227
|
-
__metadata("design:type", String)
|
|
228
|
-
], PaymentNew.prototype, "phase", void 0);
|
|
229
|
-
__decorate([
|
|
230
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Sale' }),
|
|
231
|
-
__metadata("design:type", Object)
|
|
232
|
-
], PaymentNew.prototype, "sale", void 0);
|
|
233
|
-
__decorate([
|
|
234
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action' }),
|
|
235
|
-
__metadata("design:type", Object)
|
|
236
|
-
], PaymentNew.prototype, "action", void 0);
|
|
237
|
-
__decorate([
|
|
238
|
-
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Recruitment' }),
|
|
239
|
-
__metadata("design:type", Object)
|
|
240
|
-
], PaymentNew.prototype, "recruitment", void 0);
|
|
241
238
|
PaymentNew = __decorate([
|
|
242
239
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
243
240
|
], PaymentNew);
|
|
@@ -31,11 +31,11 @@ import { Payment } from './payment.schema';
|
|
|
31
31
|
import { Invoice } from './invoice.schema';
|
|
32
32
|
export type SaleDocument = HydratedDocument<Sale>;
|
|
33
33
|
export declare class Screening {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
subject: string;
|
|
35
|
+
fromName: string;
|
|
36
|
+
fromAddress: string;
|
|
37
|
+
toAddress: string;
|
|
38
|
+
text: string;
|
|
39
39
|
}
|
|
40
40
|
export declare class Proposal {
|
|
41
41
|
businessUnit: 'enterprise' | 'artistic';
|
|
@@ -17,23 +17,23 @@ let Screening = class Screening {
|
|
|
17
17
|
__decorate([
|
|
18
18
|
(0, mongoose_1.Prop)({ required: true }),
|
|
19
19
|
__metadata("design:type", String)
|
|
20
|
-
], Screening.prototype, "
|
|
20
|
+
], Screening.prototype, "subject", void 0);
|
|
21
21
|
__decorate([
|
|
22
22
|
(0, mongoose_1.Prop)({ required: true }),
|
|
23
23
|
__metadata("design:type", String)
|
|
24
|
-
], Screening.prototype, "
|
|
24
|
+
], Screening.prototype, "fromName", void 0);
|
|
25
25
|
__decorate([
|
|
26
26
|
(0, mongoose_1.Prop)({ required: true }),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
], Screening.prototype, "
|
|
28
|
+
], Screening.prototype, "fromAddress", void 0);
|
|
29
29
|
__decorate([
|
|
30
30
|
(0, mongoose_1.Prop)({ required: true }),
|
|
31
31
|
__metadata("design:type", String)
|
|
32
|
-
], Screening.prototype, "
|
|
32
|
+
], Screening.prototype, "toAddress", void 0);
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, mongoose_1.Prop)({ required: true }),
|
|
35
35
|
__metadata("design:type", String)
|
|
36
|
-
], Screening.prototype, "
|
|
36
|
+
], Screening.prototype, "text", void 0);
|
|
37
37
|
Screening = __decorate([
|
|
38
38
|
(0, mongoose_1.Schema)({ _id: false })
|
|
39
39
|
], Screening);
|
package/package.json
CHANGED
|
@@ -24,6 +24,36 @@ export class Processing {
|
|
|
24
24
|
}
|
|
25
25
|
export const ProcessingSchema = SchemaFactory.createForClass(Processing);
|
|
26
26
|
|
|
27
|
+
@Schema({ _id: false })
|
|
28
|
+
export class Pending {
|
|
29
|
+
@Prop({ type: RequesterSchema, required: true })
|
|
30
|
+
requester: Requester;
|
|
31
|
+
|
|
32
|
+
@Prop({ type: String, enum: ['influencer', 'advisor', 'supplier', 'employee', 'refund'] })
|
|
33
|
+
type: 'influencer' | 'advisor' | 'supplier' | 'employee' | 'refund';
|
|
34
|
+
|
|
35
|
+
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
36
|
+
influencer?: Types.ObjectId | Influencer;
|
|
37
|
+
|
|
38
|
+
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
39
|
+
supplier?: Types.ObjectId | Supplier;
|
|
40
|
+
|
|
41
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Recruitment' })
|
|
42
|
+
recruitment?: Types.ObjectId | Recruitment;
|
|
43
|
+
|
|
44
|
+
@Prop() value: number;
|
|
45
|
+
@Prop() description: string;
|
|
46
|
+
|
|
47
|
+
@Prop() installmentNumber: number;
|
|
48
|
+
|
|
49
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Sale' })
|
|
50
|
+
sale: Types.ObjectId | Sale;
|
|
51
|
+
|
|
52
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Action' })
|
|
53
|
+
action: Types.ObjectId | Action;
|
|
54
|
+
}
|
|
55
|
+
export const PendingSchema = SchemaFactory.createForClass(Pending);
|
|
56
|
+
|
|
27
57
|
@Schema({ _id: false })
|
|
28
58
|
export class Approval {
|
|
29
59
|
@Prop() name: string;
|
|
@@ -69,20 +99,14 @@ export class PaymentNew {
|
|
|
69
99
|
|
|
70
100
|
@Prop() title: string;
|
|
71
101
|
|
|
72
|
-
@Prop({
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
79
|
-
influencer?: Types.ObjectId | Influencer;
|
|
80
|
-
|
|
81
|
-
@Prop({ type: MongooseSchema.Types.ObjectId })
|
|
82
|
-
supplier?: Types.ObjectId | Supplier;
|
|
102
|
+
@Prop({
|
|
103
|
+
type: String,
|
|
104
|
+
enum: [ 'pending', 'review', 'approval', 'awaiting', 'requested', 'queued', 'paid', 'client', 'canceled'],
|
|
105
|
+
})
|
|
106
|
+
phase: 'pending' | 'review' | 'approval' | 'awaiting' | 'requested' | 'queued' | 'paid' | 'client' | 'canceled';
|
|
83
107
|
|
|
84
|
-
@Prop(
|
|
85
|
-
|
|
108
|
+
@Prop({ type: PendingSchema, required: false })
|
|
109
|
+
pending?: Pending;
|
|
86
110
|
|
|
87
111
|
@Prop({ type: ProcessingSchema, required: false })
|
|
88
112
|
processing?: Processing;
|
|
@@ -104,45 +128,6 @@ export class PaymentNew {
|
|
|
104
128
|
|
|
105
129
|
@Prop({ type: [NoteSchema], default: [] })
|
|
106
130
|
notes?: Note[];
|
|
107
|
-
|
|
108
|
-
@Prop() installmentNumber: number;
|
|
109
|
-
|
|
110
|
-
@Prop({ required: false })
|
|
111
|
-
additionalComments?: string;
|
|
112
|
-
|
|
113
|
-
@Prop({
|
|
114
|
-
type: String,
|
|
115
|
-
enum: [
|
|
116
|
-
'pending',
|
|
117
|
-
'review',
|
|
118
|
-
'approval',
|
|
119
|
-
'awaiting',
|
|
120
|
-
'requested',
|
|
121
|
-
'queued',
|
|
122
|
-
'paid',
|
|
123
|
-
'client',
|
|
124
|
-
'canceled',
|
|
125
|
-
],
|
|
126
|
-
})
|
|
127
|
-
phase:
|
|
128
|
-
| 'pending'
|
|
129
|
-
| 'review'
|
|
130
|
-
| 'approval'
|
|
131
|
-
| 'awaiting'
|
|
132
|
-
| 'requested'
|
|
133
|
-
| 'queued'
|
|
134
|
-
| 'paid'
|
|
135
|
-
| 'client'
|
|
136
|
-
| 'canceled';
|
|
137
|
-
|
|
138
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Sale' })
|
|
139
|
-
sale: Types.ObjectId | Sale;
|
|
140
|
-
|
|
141
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Action' })
|
|
142
|
-
action: Types.ObjectId | Action;
|
|
143
|
-
|
|
144
|
-
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Recruitment' })
|
|
145
|
-
recruitment: Types.ObjectId | Recruitment;
|
|
146
131
|
}
|
|
147
132
|
|
|
148
133
|
export const PaymentNewSchema = SchemaFactory.createForClass(PaymentNew);
|
|
@@ -10,11 +10,11 @@ export type SaleDocument = HydratedDocument<Sale>;
|
|
|
10
10
|
|
|
11
11
|
@Schema({ _id: false })
|
|
12
12
|
export class Screening {
|
|
13
|
-
@Prop({ required: true })
|
|
14
|
-
@Prop({ required: true })
|
|
15
|
-
@Prop({ required: true })
|
|
16
|
-
@Prop({ required: true })
|
|
17
|
-
@Prop({ required: true })
|
|
13
|
+
@Prop({ required: true }) subject: string;
|
|
14
|
+
@Prop({ required: true }) fromName: string;
|
|
15
|
+
@Prop({ required: true }) fromAddress: string;
|
|
16
|
+
@Prop({ required: true }) toAddress: string;
|
|
17
|
+
@Prop({ required: true }) text: string;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
@Schema({ _id: false })
|