@grapadigital/shared-schemas 1.0.157 → 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.
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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