@grapadigital/shared-schemas 1.0.156 → 1.0.158
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 -1
- package/dist/schemas/action.schema.js +5 -0
- package/dist/schemas/commission.schema.d.ts +1 -0
- package/dist/schemas/commission.schema.js +4 -0
- package/dist/schemas/payment.schema.d.ts +2 -1
- package/dist/schemas/payment.schema.js +6 -1
- package/dist/schemas/sale.schema.d.ts +1 -1
- package/package.json +1 -1
- package/src/schemas/action.schema.ts +5 -1
- package/src/schemas/commission.schema.ts +3 -0
- package/src/schemas/payment.schema.ts +9 -4
- package/src/schemas/sale.schema.ts +1 -1
|
@@ -69,7 +69,8 @@ export declare class Action {
|
|
|
69
69
|
endDate: Date;
|
|
70
70
|
nps?: number;
|
|
71
71
|
status: 'config' | 'inProgress' | 'onHold' | 'finished' | 'archived';
|
|
72
|
-
|
|
72
|
+
partnership: 'partner' | 'exclusive';
|
|
73
|
+
type: 'seeding' | 'ugc' | 'creator';
|
|
73
74
|
socialnetworks?: string[];
|
|
74
75
|
recruitedInfluencers?: number;
|
|
75
76
|
hiredInfluencers?: number;
|
|
@@ -120,6 +120,11 @@ __decorate([
|
|
|
120
120
|
(0, swagger_1.ApiProperty)({ enum: ['partner', 'exclusive'], example: 'partner' }),
|
|
121
121
|
(0, mongoose_1.Prop)({ type: String, enum: ['partner', 'exclusive'], required: true }),
|
|
122
122
|
__metadata("design:type", String)
|
|
123
|
+
], Action.prototype, "partnership", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
(0, swagger_1.ApiProperty)({ enum: ['seeding', 'ugc', 'creator'], example: 'seeding' }),
|
|
126
|
+
(0, mongoose_1.Prop)({ type: String, enum: ['seeding', 'ugc', 'creator'], required: true }),
|
|
127
|
+
__metadata("design:type", String)
|
|
123
128
|
], Action.prototype, "type", void 0);
|
|
124
129
|
__decorate([
|
|
125
130
|
(0, swagger_1.ApiProperty)({ example: ['instagram', 'tiktok'], required: false }),
|
|
@@ -46,6 +46,7 @@ export declare class Commission {
|
|
|
46
46
|
createdAt?: Date;
|
|
47
47
|
updatedAt?: Date;
|
|
48
48
|
organization?: Types.ObjectId;
|
|
49
|
+
payment?: Types.ObjectId;
|
|
49
50
|
}
|
|
50
51
|
export declare const CommissionSchema: MongooseSchema<Commission, import("mongoose").Model<Commission, any, any, any, import("mongoose").Document<unknown, any, Commission, any, {}> & Commission & Required<{
|
|
51
52
|
_id: Types.ObjectId;
|
|
@@ -104,6 +104,10 @@ __decorate([
|
|
|
104
104
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, required: false }),
|
|
105
105
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
106
106
|
], Commission.prototype, "organization", void 0);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Payment', required: false }),
|
|
109
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
110
|
+
], Commission.prototype, "payment", void 0);
|
|
107
111
|
Commission = __decorate([
|
|
108
112
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
109
113
|
], Commission);
|
|
@@ -50,7 +50,7 @@ export declare const ReviewSchema: MongooseSchema<Review, import("mongoose").Mod
|
|
|
50
50
|
}>;
|
|
51
51
|
export declare class Pending {
|
|
52
52
|
requester: Requester;
|
|
53
|
-
type: "influencer" | "advisor" | "employee_refund" | "influencer_extra" | "influencer_refund" | "partlog" | "airplane_ticket" | "hotel_ticket" | "supplier" | "rumo_certo" | "correios" | "conta_simples" | "motoboy_bruno" | "motoboy_others";
|
|
53
|
+
type: "influencer" | "advisor" | "employee_refund" | "influencer_extra" | "influencer_refund" | "partlog" | "airplane_ticket" | "hotel_ticket" | "supplier" | "rumo_certo" | "correios" | "conta_simples" | "motoboy_bruno" | "motoboy_others" | "commission";
|
|
54
54
|
purpose?: 'Envio SP' | 'Envio Outros' | 'Passagem' | 'Hospedagem' | 'Compras' | 'Logistica Time' | 'Outros';
|
|
55
55
|
adidasCategory?: 'Originals' | 'Running' | 'Football' | 'Training' | 'Omni';
|
|
56
56
|
influencer?: Types.ObjectId | Influencer;
|
|
@@ -61,6 +61,7 @@ export declare class Pending {
|
|
|
61
61
|
installmentNumber: number;
|
|
62
62
|
sale: Types.ObjectId | Sale;
|
|
63
63
|
action?: Types.ObjectId | Action;
|
|
64
|
+
commissions?: Types.ObjectId[];
|
|
64
65
|
}
|
|
65
66
|
export declare const PendingSchema: MongooseSchema<Pending, import("mongoose").Model<Pending, any, any, any, import("mongoose").Document<unknown, any, Pending, any, {}> & Pending & {
|
|
66
67
|
_id: Types.ObjectId;
|
|
@@ -68,7 +68,8 @@ __decorate([
|
|
|
68
68
|
"correios",
|
|
69
69
|
"conta_simples",
|
|
70
70
|
"motoboy_bruno",
|
|
71
|
-
"motoboy_others"
|
|
71
|
+
"motoboy_others",
|
|
72
|
+
"commission"
|
|
72
73
|
]
|
|
73
74
|
}),
|
|
74
75
|
__metadata("design:type", String)
|
|
@@ -135,6 +136,10 @@ __decorate([
|
|
|
135
136
|
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Action' }),
|
|
136
137
|
__metadata("design:type", Object)
|
|
137
138
|
], Pending.prototype, "action", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, mongoose_1.Prop)({ type: [mongoose_2.Schema.Types.ObjectId], ref: 'Commission', required: false, default: [] }),
|
|
141
|
+
__metadata("design:type", Array)
|
|
142
|
+
], Pending.prototype, "commissions", void 0);
|
|
138
143
|
Pending = __decorate([
|
|
139
144
|
(0, mongoose_1.Schema)({ _id: false })
|
|
140
145
|
], Pending);
|
package/package.json
CHANGED
|
@@ -91,7 +91,11 @@ export class Action {
|
|
|
91
91
|
|
|
92
92
|
@ApiProperty({ enum: ['partner', 'exclusive'], example: 'partner' })
|
|
93
93
|
@Prop({ type: String, enum: ['partner', 'exclusive'], required: true })
|
|
94
|
-
|
|
94
|
+
partnership: 'partner' | 'exclusive';
|
|
95
|
+
|
|
96
|
+
@ApiProperty({ enum: ['seeding', 'ugc', 'creator'], example: 'seeding' })
|
|
97
|
+
@Prop({ type: String, enum: ['seeding', 'ugc', 'creator'], required: true })
|
|
98
|
+
type: 'seeding' | 'ugc' | 'creator';
|
|
95
99
|
|
|
96
100
|
@ApiProperty({ example: ['instagram', 'tiktok'], required: false })
|
|
97
101
|
@Prop({ type: [String], required: false })
|
|
@@ -83,6 +83,9 @@ export class Commission {
|
|
|
83
83
|
|
|
84
84
|
@Prop({ type: MongooseSchema.Types.ObjectId, required: false })
|
|
85
85
|
organization?: Types.ObjectId;
|
|
86
|
+
|
|
87
|
+
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Payment', required: false })
|
|
88
|
+
payment?: Types.ObjectId;
|
|
86
89
|
}
|
|
87
90
|
|
|
88
91
|
export const CommissionSchema = SchemaFactory.createForClass(Commission);
|
|
@@ -48,7 +48,7 @@ export class Pending {
|
|
|
48
48
|
enum: [
|
|
49
49
|
"influencer",
|
|
50
50
|
"advisor",
|
|
51
|
-
"employee_refund",
|
|
51
|
+
"employee_refund",
|
|
52
52
|
"influencer_extra",
|
|
53
53
|
"influencer_refund",
|
|
54
54
|
"partlog",
|
|
@@ -59,7 +59,8 @@ export class Pending {
|
|
|
59
59
|
"correios",
|
|
60
60
|
"conta_simples",
|
|
61
61
|
"motoboy_bruno",
|
|
62
|
-
"motoboy_others"
|
|
62
|
+
"motoboy_others",
|
|
63
|
+
"commission"
|
|
63
64
|
]
|
|
64
65
|
})
|
|
65
66
|
type:
|
|
@@ -69,14 +70,15 @@ export class Pending {
|
|
|
69
70
|
"influencer_extra" |
|
|
70
71
|
"influencer_refund" |
|
|
71
72
|
"partlog" |
|
|
72
|
-
"airplane_ticket" |
|
|
73
|
+
"airplane_ticket" |
|
|
73
74
|
"hotel_ticket" |
|
|
74
75
|
"supplier" |
|
|
75
76
|
"rumo_certo" |
|
|
76
77
|
"correios" |
|
|
77
78
|
"conta_simples" |
|
|
78
79
|
"motoboy_bruno" |
|
|
79
|
-
"motoboy_others"
|
|
80
|
+
"motoboy_others" |
|
|
81
|
+
"commission";
|
|
80
82
|
|
|
81
83
|
@Prop({
|
|
82
84
|
type: String,
|
|
@@ -126,6 +128,9 @@ export class Pending {
|
|
|
126
128
|
|
|
127
129
|
@Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Action' })
|
|
128
130
|
action?: Types.ObjectId | Action;
|
|
131
|
+
|
|
132
|
+
@Prop({ type: [MongooseSchema.Types.ObjectId], ref: 'Commission', required: false, default: [] })
|
|
133
|
+
commissions?: Types.ObjectId[];
|
|
129
134
|
}
|
|
130
135
|
export const PendingSchema = SchemaFactory.createForClass(Pending);
|
|
131
136
|
|
|
@@ -22,7 +22,7 @@ export class Screening {
|
|
|
22
22
|
|
|
23
23
|
@Schema({ _id: false })
|
|
24
24
|
export class Proposal {
|
|
25
|
-
@Prop({ required: true }) businessUnit: '
|
|
25
|
+
@Prop({ required: true }) businessUnit: 'service' | 'comercial';
|
|
26
26
|
@Prop({ required: true }) contact: string;
|
|
27
27
|
@Prop({ required: true }) initialScope: string;
|
|
28
28
|
|