@grapadigital/shared-schemas 1.0.136 → 1.0.137

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.
@@ -77,6 +77,7 @@ export declare class Action {
77
77
  shopping?: string;
78
78
  project?: string;
79
79
  sale: Types.ObjectId | Sale;
80
+ organization: Types.ObjectId;
80
81
  responsibles: Responsibles;
81
82
  brandUsername?: string;
82
83
  hashtag?: string;
@@ -175,6 +175,10 @@ __decorate([
175
175
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Sale' }),
176
176
  __metadata("design:type", Object)
177
177
  ], Action.prototype, "sale", void 0);
178
+ __decorate([
179
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
180
+ __metadata("design:type", mongoose_2.Types.ObjectId)
181
+ ], Action.prototype, "organization", void 0);
178
182
  __decorate([
179
183
  (0, swagger_1.ApiProperty)({ type: () => Responsibles }),
180
184
  (0, mongoose_1.Prop)({ type: exports.ResponsiblesSchema, required: true }),
@@ -72,6 +72,7 @@ export declare class Invoice {
72
72
  installmentNumber: number;
73
73
  phase: 'inbox' | 'review' | 'awaiting' | 'invoiced' | 'received' | 'canceled';
74
74
  sale: Types.ObjectId | Sale;
75
+ organization: Types.ObjectId;
75
76
  inbox?: Inbox;
76
77
  review?: Review;
77
78
  invoiced?: Invoiced;
@@ -208,6 +208,10 @@ __decorate([
208
208
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Sale', required: true }),
209
209
  __metadata("design:type", Object)
210
210
  ], Invoice.prototype, "sale", void 0);
211
+ __decorate([
212
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
213
+ __metadata("design:type", mongoose_2.Types.ObjectId)
214
+ ], Invoice.prototype, "organization", void 0);
211
215
  __decorate([
212
216
  (0, swagger_1.ApiProperty)({ type: () => Inbox }),
213
217
  (0, mongoose_1.Prop)({ type: Inbox }),
@@ -154,6 +154,7 @@ export declare class Payment {
154
154
  title: string;
155
155
  phase: 'pending' | 'review' | 'approval' | 'awaiting' | 'requested' | 'received' | 'queued' | 'paid' | 'client' | 'canceled';
156
156
  attachments?: Attachment[];
157
+ organization: Types.ObjectId;
157
158
  pending?: Pending;
158
159
  review?: Review;
159
160
  requested?: Requested;
@@ -254,6 +254,10 @@ __decorate([
254
254
  }),
255
255
  __metadata("design:type", Array)
256
256
  ], Payment.prototype, "attachments", void 0);
257
+ __decorate([
258
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
259
+ __metadata("design:type", mongoose_2.Types.ObjectId)
260
+ ], Payment.prototype, "organization", void 0);
257
261
  __decorate([
258
262
  (0, mongoose_1.Prop)({ type: exports.PendingSchema, required: false }),
259
263
  __metadata("design:type", Pending)
@@ -120,6 +120,7 @@ export declare class Sale {
120
120
  lost?: Lost;
121
121
  notes?: Note[];
122
122
  commission?: CommissionInfo;
123
+ organization: Types.ObjectId;
123
124
  tags?: string[];
124
125
  timeline?: TimelineEntry[];
125
126
  profiles?: Types.ObjectId[] | Profile[];
@@ -378,6 +378,10 @@ __decorate([
378
378
  (0, mongoose_1.Prop)({ type: CommissionInfo, required: false }),
379
379
  __metadata("design:type", CommissionInfo)
380
380
  ], Sale.prototype, "commission", void 0);
381
+ __decorate([
382
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
383
+ __metadata("design:type", mongoose_2.Types.ObjectId)
384
+ ], Sale.prototype, "organization", void 0);
381
385
  __decorate([
382
386
  (0, mongoose_1.Prop)({ type: [String], required: false, default: [] }),
383
387
  __metadata("design:type", Array)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.136",
3
+ "version": "1.0.137",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -144,6 +144,9 @@ export class Action {
144
144
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Sale' })
145
145
  sale: Types.ObjectId | Sale;
146
146
 
147
+ @Prop({ type: MongooseSchema.Types.ObjectId })
148
+ organization: Types.ObjectId ;
149
+
147
150
  @ApiProperty({ type: () => Responsibles })
148
151
  @Prop({ type: ResponsiblesSchema, required: true })
149
152
  responsibles: Responsibles;
@@ -133,6 +133,9 @@ export class Invoice {
133
133
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Sale', required: true })
134
134
  sale: Types.ObjectId | Sale;
135
135
 
136
+ @Prop({ type: MongooseSchema.Types.ObjectId })
137
+ organization: Types.ObjectId ;
138
+
136
139
  @ApiProperty({ type: () => Inbox })
137
140
  @Prop({ type: Inbox }) inbox?: Inbox;
138
141
 
@@ -198,6 +198,9 @@ export class Payment {
198
198
  default: []
199
199
  })
200
200
  attachments?: Attachment[];
201
+
202
+ @Prop({ type: MongooseSchema.Types.ObjectId })
203
+ organization: Types.ObjectId ;
201
204
 
202
205
  @Prop({ type: PendingSchema, required: false })
203
206
  pending?: Pending;
@@ -199,6 +199,9 @@ export class Sale {
199
199
  @Prop({ type: CommissionInfo, required: false })
200
200
  commission?: CommissionInfo;
201
201
 
202
+ @Prop({ type: MongooseSchema.Types.ObjectId })
203
+ organization: Types.ObjectId ;
204
+
202
205
  @Prop({ type: [String], required: false, default: [] })
203
206
  tags?: string[];
204
207