@grapadigital/shared-schemas 1.0.10 → 1.0.11

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.
@@ -23,7 +23,9 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
- import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose";
26
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
27
+ import { Recruitment } from './recruitment.schema';
28
+ import { Content } from './content.schema';
27
29
  export type CampaignDocument = HydratedDocument<Campaign>;
28
30
  export declare class ComercialCard {
29
31
  id: string;
@@ -72,16 +74,16 @@ export declare class Campaign {
72
74
  startDate: Date;
73
75
  endDate: Date;
74
76
  nps?: number;
75
- status: "config" | "inProgress" | "finished" | "paused" | "finished" | "archived";
76
- type: "partner" | "exclusive";
77
+ status: 'config' | 'inProgress' | 'finished' | 'paused' | 'finished' | 'archived';
78
+ type: 'partner' | 'exclusive';
77
79
  socialnetworks?: string[];
78
80
  recruitedInfluencers?: number;
79
81
  hiredInfluencers?: number;
80
82
  producedContent?: number;
81
83
  hiredContent?: number;
82
84
  client: Types.ObjectId;
83
- recruitments?: Types.ObjectId[];
84
- contents?: Types.ObjectId[];
85
+ recruitments?: Types.ObjectId[] | Recruitment[];
86
+ contents?: Types.ObjectId[] | Content[];
85
87
  cluster: string;
86
88
  shopping?: string;
87
89
  project?: string;
@@ -90,13 +90,13 @@ __decorate([
90
90
  __decorate([
91
91
  (0, mongoose_1.Prop)({
92
92
  type: String,
93
- enum: ["config", "inProgress", "paused", "finished", "archived"],
94
- default: "config",
93
+ enum: ['config', 'inProgress', 'paused', 'finished', 'archived'],
94
+ default: 'config',
95
95
  }),
96
96
  __metadata("design:type", String)
97
97
  ], Campaign.prototype, "status", void 0);
98
98
  __decorate([
99
- (0, mongoose_1.Prop)({ type: String, enum: ["partner", "exclusive"] }),
99
+ (0, mongoose_1.Prop)({ type: String, enum: ['partner', 'exclusive'] }),
100
100
  __metadata("design:type", String)
101
101
  ], Campaign.prototype, "type", void 0);
102
102
  __decorate([
@@ -120,14 +120,14 @@ __decorate([
120
120
  __metadata("design:type", Number)
121
121
  ], Campaign.prototype, "hiredContent", void 0);
122
122
  __decorate([
123
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: "Client" }),
123
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Client' }),
124
124
  __metadata("design:type", mongoose_2.Types.ObjectId)
125
125
  ], Campaign.prototype, "client", void 0);
126
126
  __decorate([
127
127
  (0, mongoose_1.Prop)([
128
128
  {
129
129
  type: mongoose_2.Schema.Types.ObjectId,
130
- ref: "Recruitment",
130
+ ref: 'Recruitment',
131
131
  required: false,
132
132
  },
133
133
  ]),
@@ -135,7 +135,7 @@ __decorate([
135
135
  ], Campaign.prototype, "recruitments", void 0);
136
136
  __decorate([
137
137
  (0, mongoose_1.Prop)([
138
- { type: mongoose_2.Schema.Types.ObjectId, ref: "Content", required: false },
138
+ { type: mongoose_2.Schema.Types.ObjectId, ref: 'Content', required: false },
139
139
  ]),
140
140
  __metadata("design:type", Array)
141
141
  ], Campaign.prototype, "contents", void 0);
@@ -23,7 +23,9 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
26
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
27
+ import { Profile } from './profile.schema';
28
+ import { Campaign } from './campaign.schema';
27
29
  export type ContentDocument = HydratedDocument<Content>;
28
30
  export declare class Metrics {
29
31
  impressionCount?: number;
@@ -41,11 +43,11 @@ export declare class Metrics {
41
43
  engagementRate?: number;
42
44
  }
43
45
  export declare const MetricsSchema: MongooseSchema<Metrics, import("mongoose").Model<Metrics, any, any, any, import("mongoose").Document<unknown, any, Metrics> & Metrics & {
44
- _id: import("mongoose").Types.ObjectId;
46
+ _id: Types.ObjectId;
45
47
  } & {
46
48
  __v: number;
47
49
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Metrics, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Metrics>> & import("mongoose").FlatRecord<Metrics> & {
48
- _id: import("mongoose").Types.ObjectId;
50
+ _id: Types.ObjectId;
49
51
  } & {
50
52
  __v: number;
51
53
  }>;
@@ -56,11 +58,11 @@ export declare class Estimates {
56
58
  engagementRate?: number;
57
59
  }
58
60
  export declare const EstimatesSchema: MongooseSchema<Estimates, import("mongoose").Model<Estimates, any, any, any, import("mongoose").Document<unknown, any, Estimates> & Estimates & {
59
- _id: import("mongoose").Types.ObjectId;
61
+ _id: Types.ObjectId;
60
62
  } & {
61
63
  __v: number;
62
64
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Estimates, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Estimates>> & import("mongoose").FlatRecord<Estimates> & {
63
- _id: import("mongoose").Types.ObjectId;
65
+ _id: Types.ObjectId;
64
66
  } & {
65
67
  __v: number;
66
68
  }>;
@@ -74,11 +76,11 @@ export declare class Content {
74
76
  tagType: 'withTag' | 'withoutTag' | 'brandExposure';
75
77
  socialnetwork: 'instagram' | 'tiktok' | 'youtube';
76
78
  status: 'approved' | 'repproved' | 'deleted';
77
- profile: MongooseSchema.Types.ObjectId;
78
- campaign: MongooseSchema.Types.ObjectId;
79
+ profile: Types.ObjectId | Profile;
80
+ campaign: Types.ObjectId | Campaign;
79
81
  postedAt: Date;
80
82
  isCollab: boolean;
81
- collabs: MongooseSchema.Types.ObjectId[];
83
+ collabs: Types.ObjectId[] | Profile[];
82
84
  metrics?: Metrics;
83
85
  estimates: Estimates;
84
86
  partnerActivationPost: Boolean;
@@ -134,11 +134,11 @@ __decorate([
134
134
  ], Content.prototype, "status", void 0);
135
135
  __decorate([
136
136
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Profile' }),
137
- __metadata("design:type", mongoose_2.Schema.Types.ObjectId)
137
+ __metadata("design:type", Object)
138
138
  ], Content.prototype, "profile", void 0);
139
139
  __decorate([
140
140
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Campaign' }),
141
- __metadata("design:type", mongoose_2.Schema.Types.ObjectId)
141
+ __metadata("design:type", Object)
142
142
  ], Content.prototype, "campaign", void 0);
143
143
  __decorate([
144
144
  (0, mongoose_1.Prop)(),
@@ -23,7 +23,8 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
26
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
27
+ import { Profile } from './profile.schema';
27
28
  export type InfluencerDocument = HydratedDocument<Influencer>;
28
29
  export declare class Address {
29
30
  zipcode: string;
@@ -34,11 +35,11 @@ export declare class Address {
34
35
  complement: string;
35
36
  }
36
37
  export declare const AddressSchema: MongooseSchema<Address, import("mongoose").Model<Address, any, any, any, import("mongoose").Document<unknown, any, Address> & Address & {
37
- _id: import("mongoose").Types.ObjectId;
38
+ _id: Types.ObjectId;
38
39
  } & {
39
40
  __v: number;
40
41
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Address, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Address>> & import("mongoose").FlatRecord<Address> & {
41
- _id: import("mongoose").Types.ObjectId;
42
+ _id: Types.ObjectId;
42
43
  } & {
43
44
  __v: number;
44
45
  }>;
@@ -54,11 +55,11 @@ export declare class PaymentInfo {
54
55
  pixType: string;
55
56
  }
56
57
  export declare const PaymentInfoSchema: MongooseSchema<PaymentInfo, import("mongoose").Model<PaymentInfo, any, any, any, import("mongoose").Document<unknown, any, PaymentInfo> & PaymentInfo & {
57
- _id: import("mongoose").Types.ObjectId;
58
+ _id: Types.ObjectId;
58
59
  } & {
59
60
  __v: number;
60
61
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PaymentInfo, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PaymentInfo>> & import("mongoose").FlatRecord<PaymentInfo> & {
61
- _id: import("mongoose").Types.ObjectId;
62
+ _id: Types.ObjectId;
62
63
  } & {
63
64
  __v: number;
64
65
  }>;
@@ -70,11 +71,11 @@ export declare class Advisor {
70
71
  document: string;
71
72
  }
72
73
  export declare const AdvisorSchema: MongooseSchema<Advisor, import("mongoose").Model<Advisor, any, any, any, import("mongoose").Document<unknown, any, Advisor> & Advisor & {
73
- _id: import("mongoose").Types.ObjectId;
74
+ _id: Types.ObjectId;
74
75
  } & {
75
76
  __v: number;
76
77
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Advisor, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Advisor>> & import("mongoose").FlatRecord<Advisor> & {
77
- _id: import("mongoose").Types.ObjectId;
78
+ _id: Types.ObjectId;
78
79
  } & {
79
80
  __v: number;
80
81
  }>;
@@ -95,7 +96,7 @@ export declare class Influencer {
95
96
  address: Address;
96
97
  payment: PaymentInfo;
97
98
  advisor: Advisor;
98
- profiles: MongooseSchema.Types.ObjectId[];
99
+ profiles: Types.ObjectId[] | Profile[];
99
100
  createdAt: Date;
100
101
  updatedAt: Date;
101
102
  }
@@ -23,7 +23,7 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
26
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
27
27
  import { Influencer } from './influencer.schema';
28
28
  import { Campaign } from './campaign.schema';
29
29
  import { Recruitment } from './recruitment.schema';
@@ -34,11 +34,11 @@ export declare class Requester {
34
34
  team: string;
35
35
  }
36
36
  export declare const RequesterSchema: MongooseSchema<Requester, import("mongoose").Model<Requester, any, any, any, import("mongoose").Document<unknown, any, Requester> & Requester & {
37
- _id: import("mongoose").Types.ObjectId;
37
+ _id: Types.ObjectId;
38
38
  } & {
39
39
  __v: number;
40
40
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Requester, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Requester>> & import("mongoose").FlatRecord<Requester> & {
41
- _id: import("mongoose").Types.ObjectId;
41
+ _id: Types.ObjectId;
42
42
  } & {
43
43
  __v: number;
44
44
  }>;
@@ -47,11 +47,11 @@ export declare class PipefyCard {
47
47
  title: string;
48
48
  }
49
49
  export declare const PipefyCardSchema: MongooseSchema<PipefyCard, import("mongoose").Model<PipefyCard, any, any, any, import("mongoose").Document<unknown, any, PipefyCard> & PipefyCard & {
50
- _id: import("mongoose").Types.ObjectId;
50
+ _id: Types.ObjectId;
51
51
  } & {
52
52
  __v: number;
53
53
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PipefyCard, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PipefyCard>> & import("mongoose").FlatRecord<PipefyCard> & {
54
- _id: import("mongoose").Types.ObjectId;
54
+ _id: Types.ObjectId;
55
55
  } & {
56
56
  __v: number;
57
57
  }>;
@@ -61,16 +61,16 @@ export declare class PendingChanges {
61
61
  reason: string;
62
62
  }
63
63
  export declare const PendingChangesSchema: MongooseSchema<PendingChanges, import("mongoose").Model<PendingChanges, any, any, any, import("mongoose").Document<unknown, any, PendingChanges> & PendingChanges & {
64
- _id: import("mongoose").Types.ObjectId;
64
+ _id: Types.ObjectId;
65
65
  } & {
66
66
  __v: number;
67
67
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, PendingChanges, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<PendingChanges>> & import("mongoose").FlatRecord<PendingChanges> & {
68
- _id: import("mongoose").Types.ObjectId;
68
+ _id: Types.ObjectId;
69
69
  } & {
70
70
  __v: number;
71
71
  }>;
72
72
  export declare class Payment {
73
- _id: MongooseSchema.Types.ObjectId;
73
+ _id: Types.ObjectId;
74
74
  requester: Requester;
75
75
  value: number;
76
76
  dueDate: Date;
@@ -80,16 +80,16 @@ export declare class Payment {
80
80
  additionalComments: string;
81
81
  status: 'pending' | 'review' | 'processing' | 'failed' | 'completed';
82
82
  type: 'influencer' | 'advisor';
83
- influencer: MongooseSchema.Types.ObjectId | Influencer;
84
- campaign: MongooseSchema.Types.ObjectId | Campaign;
85
- recruitment: MongooseSchema.Types.ObjectId | Recruitment;
83
+ influencer: Types.ObjectId | Influencer;
84
+ campaign: Types.ObjectId | Campaign;
85
+ recruitment: Types.ObjectId | Recruitment;
86
86
  }
87
87
  export declare const PaymentSchema: MongooseSchema<Payment, import("mongoose").Model<Payment, any, any, any, import("mongoose").Document<unknown, any, Payment> & Payment & Required<{
88
- _id: MongooseSchema.Types.ObjectId;
88
+ _id: Types.ObjectId;
89
89
  }> & {
90
90
  __v: number;
91
91
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Payment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Payment>> & import("mongoose").FlatRecord<Payment> & Required<{
92
- _id: MongooseSchema.Types.ObjectId;
92
+ _id: Types.ObjectId;
93
93
  }> & {
94
94
  __v: number;
95
95
  }>;
@@ -69,7 +69,7 @@ let Payment = class Payment {
69
69
  };
70
70
  __decorate([
71
71
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true }),
72
- __metadata("design:type", mongoose_2.Schema.Types.ObjectId)
72
+ __metadata("design:type", mongoose_2.Types.ObjectId)
73
73
  ], Payment.prototype, "_id", void 0);
74
74
  __decorate([
75
75
  (0, mongoose_1.Prop)({ type: exports.RequesterSchema }),
@@ -23,7 +23,8 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
26
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
27
+ import { Influencer } from './influencer.schema';
27
28
  export type ProfileDocument = HydratedDocument<Profile>;
28
29
  export declare class Profile {
29
30
  username: string;
@@ -31,16 +32,16 @@ export declare class Profile {
31
32
  picture: string;
32
33
  socialnetwork: string;
33
34
  type: string;
34
- influencer: MongooseSchema.Types.ObjectId;
35
+ influencer: Types.ObjectId | Influencer;
35
36
  createdAt: Date;
36
37
  updatedAt: Date;
37
38
  }
38
39
  export declare const ProfileSchema: MongooseSchema<Profile, import("mongoose").Model<Profile, any, any, any, import("mongoose").Document<unknown, any, Profile> & Profile & {
39
- _id: import("mongoose").Types.ObjectId;
40
+ _id: Types.ObjectId;
40
41
  } & {
41
42
  __v: number;
42
43
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Profile, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Profile>> & import("mongoose").FlatRecord<Profile> & {
43
- _id: import("mongoose").Types.ObjectId;
44
+ _id: Types.ObjectId;
44
45
  } & {
45
46
  __v: number;
46
47
  }>;
@@ -36,7 +36,7 @@ __decorate([
36
36
  ], Profile.prototype, "type", void 0);
37
37
  __decorate([
38
38
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Influencer' }),
39
- __metadata("design:type", mongoose_2.Schema.Types.ObjectId)
39
+ __metadata("design:type", Object)
40
40
  ], Profile.prototype, "influencer", void 0);
41
41
  __decorate([
42
42
  (0, mongoose_1.Prop)({ default: Date.now }),
@@ -23,7 +23,10 @@
23
23
  /// <reference types="mongoose/types/virtuals" />
24
24
  /// <reference types="mongoose/types/inferschematype" />
25
25
  /// <reference types="mongoose/types/inferrawdoctype" />
26
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
26
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
27
+ import { Campaign } from './campaign.schema';
28
+ import { Profile } from './profile.schema';
29
+ import { Content } from './content.schema';
27
30
  export type RecruitmentDocument = HydratedDocument<Recruitment>;
28
31
  export declare class Delivery {
29
32
  reels: number;
@@ -35,11 +38,11 @@ export declare class Delivery {
35
38
  dayAllocation: number;
36
39
  }
37
40
  export declare const DeliverySchema: MongooseSchema<Delivery, import("mongoose").Model<Delivery, any, any, any, import("mongoose").Document<unknown, any, Delivery> & Delivery & {
38
- _id: import("mongoose").Types.ObjectId;
41
+ _id: Types.ObjectId;
39
42
  } & {
40
43
  __v: number;
41
44
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Delivery, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Delivery>> & import("mongoose").FlatRecord<Delivery> & {
42
- _id: import("mongoose").Types.ObjectId;
45
+ _id: Types.ObjectId;
43
46
  } & {
44
47
  __v: number;
45
48
  }>;
@@ -48,11 +51,11 @@ export declare class Right {
48
51
  period: string;
49
52
  }
50
53
  export declare const RightSchema: MongooseSchema<Right, import("mongoose").Model<Right, any, any, any, import("mongoose").Document<unknown, any, Right> & Right & {
51
- _id: import("mongoose").Types.ObjectId;
54
+ _id: Types.ObjectId;
52
55
  } & {
53
56
  __v: number;
54
57
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Right, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Right>> & import("mongoose").FlatRecord<Right> & {
55
- _id: import("mongoose").Types.ObjectId;
58
+ _id: Types.ObjectId;
56
59
  } & {
57
60
  __v: number;
58
61
  }>;
@@ -62,11 +65,11 @@ export declare class Rights {
62
65
  imageUsage: Right;
63
66
  }
64
67
  export declare const RightsSchema: MongooseSchema<Rights, import("mongoose").Model<Rights, any, any, any, import("mongoose").Document<unknown, any, Rights> & Rights & {
65
- _id: import("mongoose").Types.ObjectId;
68
+ _id: Types.ObjectId;
66
69
  } & {
67
70
  __v: number;
68
71
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Rights, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Rights>> & import("mongoose").FlatRecord<Rights> & {
69
- _id: import("mongoose").Types.ObjectId;
72
+ _id: Types.ObjectId;
70
73
  } & {
71
74
  __v: number;
72
75
  }>;
@@ -75,11 +78,11 @@ export declare class InstallmentInfo {
75
78
  value: number;
76
79
  }
77
80
  export declare const InstallmentInfoSchema: MongooseSchema<InstallmentInfo, import("mongoose").Model<InstallmentInfo, any, any, any, import("mongoose").Document<unknown, any, InstallmentInfo> & InstallmentInfo & {
78
- _id: import("mongoose").Types.ObjectId;
81
+ _id: Types.ObjectId;
79
82
  } & {
80
83
  __v: number;
81
84
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, InstallmentInfo, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<InstallmentInfo>> & import("mongoose").FlatRecord<InstallmentInfo> & {
82
- _id: import("mongoose").Types.ObjectId;
85
+ _id: Types.ObjectId;
83
86
  } & {
84
87
  __v: number;
85
88
  }>;
@@ -92,11 +95,11 @@ export declare class InfluencerPayment {
92
95
  passThrough: boolean;
93
96
  }
94
97
  export declare const InfluencerPaymentSchema: MongooseSchema<InfluencerPayment, import("mongoose").Model<InfluencerPayment, any, any, any, import("mongoose").Document<unknown, any, InfluencerPayment> & InfluencerPayment & {
95
- _id: import("mongoose").Types.ObjectId;
98
+ _id: Types.ObjectId;
96
99
  } & {
97
100
  __v: number;
98
101
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, InfluencerPayment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<InfluencerPayment>> & import("mongoose").FlatRecord<InfluencerPayment> & {
99
- _id: import("mongoose").Types.ObjectId;
102
+ _id: Types.ObjectId;
100
103
  } & {
101
104
  __v: number;
102
105
  }>;
@@ -109,11 +112,11 @@ export declare class AdvisorPayment {
109
112
  passThrough: boolean;
110
113
  }
111
114
  export declare const AdvisorPaymentSchema: MongooseSchema<AdvisorPayment, import("mongoose").Model<AdvisorPayment, any, any, any, import("mongoose").Document<unknown, any, AdvisorPayment> & AdvisorPayment & {
112
- _id: import("mongoose").Types.ObjectId;
115
+ _id: Types.ObjectId;
113
116
  } & {
114
117
  __v: number;
115
118
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, AdvisorPayment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<AdvisorPayment>> & import("mongoose").FlatRecord<AdvisorPayment> & {
116
- _id: import("mongoose").Types.ObjectId;
119
+ _id: Types.ObjectId;
117
120
  } & {
118
121
  __v: number;
119
122
  }>;
@@ -122,11 +125,11 @@ export declare class Exchange {
122
125
  valueInProduct: number;
123
126
  }
124
127
  export declare const ExchangeSchema: MongooseSchema<Exchange, import("mongoose").Model<Exchange, any, any, any, import("mongoose").Document<unknown, any, Exchange> & Exchange & {
125
- _id: import("mongoose").Types.ObjectId;
128
+ _id: Types.ObjectId;
126
129
  } & {
127
130
  __v: number;
128
131
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Exchange, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Exchange>> & import("mongoose").FlatRecord<Exchange> & {
129
- _id: import("mongoose").Types.ObjectId;
132
+ _id: Types.ObjectId;
130
133
  } & {
131
134
  __v: number;
132
135
  }>;
@@ -135,11 +138,11 @@ export declare class Collab {
135
138
  description: string;
136
139
  }
137
140
  export declare const CollabSchema: MongooseSchema<Collab, import("mongoose").Model<Collab, any, any, any, import("mongoose").Document<unknown, any, Collab> & Collab & {
138
- _id: import("mongoose").Types.ObjectId;
141
+ _id: Types.ObjectId;
139
142
  } & {
140
143
  __v: number;
141
144
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Collab, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Collab>> & import("mongoose").FlatRecord<Collab> & {
142
- _id: import("mongoose").Types.ObjectId;
145
+ _id: Types.ObjectId;
143
146
  } & {
144
147
  __v: number;
145
148
  }>;
@@ -158,37 +161,37 @@ export declare class Scope {
158
161
  childPermit: boolean;
159
162
  }
160
163
  export declare const ScopeSchema: MongooseSchema<Scope, import("mongoose").Model<Scope, any, any, any, import("mongoose").Document<unknown, any, Scope> & Scope & {
161
- _id: import("mongoose").Types.ObjectId;
164
+ _id: Types.ObjectId;
162
165
  } & {
163
166
  __v: number;
164
167
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Scope, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Scope>> & import("mongoose").FlatRecord<Scope> & {
165
- _id: import("mongoose").Types.ObjectId;
168
+ _id: Types.ObjectId;
166
169
  } & {
167
170
  __v: number;
168
171
  }>;
169
172
  export declare class Recruitment {
170
- _id: MongooseSchema.Types.ObjectId;
173
+ _id: Types.ObjectId;
171
174
  username: string;
172
175
  picture: string;
173
176
  status: 'selected' | 'inContact' | 'inApproval' | 'recruited' | 'removed';
174
- campaign: MongooseSchema.Types.ObjectId;
175
- profile: MongooseSchema.Types.ObjectId;
176
- reel: MongooseSchema.Types.ObjectId[];
177
- image: MongooseSchema.Types.ObjectId[];
178
- carousel: MongooseSchema.Types.ObjectId[];
179
- story: MongooseSchema.Types.ObjectId[];
180
- tiktok: MongooseSchema.Types.ObjectId[];
181
- youtube: MongooseSchema.Types.ObjectId[];
177
+ campaign: Types.ObjectId | Campaign;
178
+ profile: Types.ObjectId | Profile;
179
+ reel: Types.ObjectId[] | Content[];
180
+ image: Types.ObjectId[] | Content[];
181
+ carousel: Types.ObjectId[] | Content[];
182
+ story: Types.ObjectId[] | Content[];
183
+ tiktok: Types.ObjectId[] | Content[];
184
+ youtube: Types.ObjectId[] | Content[];
182
185
  scope: Scope;
183
186
  createdAt: Date;
184
187
  updatedAt: Date;
185
188
  }
186
189
  export declare const RecruitmentSchema: MongooseSchema<Recruitment, import("mongoose").Model<Recruitment, any, any, any, import("mongoose").Document<unknown, any, Recruitment> & Recruitment & Required<{
187
- _id: MongooseSchema.Types.ObjectId;
190
+ _id: Types.ObjectId;
188
191
  }> & {
189
192
  __v: number;
190
193
  }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Recruitment, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Recruitment>> & import("mongoose").FlatRecord<Recruitment> & Required<{
191
- _id: MongooseSchema.Types.ObjectId;
194
+ _id: Types.ObjectId;
192
195
  }> & {
193
196
  __v: number;
194
197
  }>;
@@ -247,7 +247,7 @@ let Recruitment = class Recruitment {
247
247
  };
248
248
  __decorate([
249
249
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, auto: true }),
250
- __metadata("design:type", mongoose_2.Schema.Types.ObjectId)
250
+ __metadata("design:type", mongoose_2.Types.ObjectId)
251
251
  ], Recruitment.prototype, "_id", void 0);
252
252
  __decorate([
253
253
  (0, mongoose_1.Prop)(),
@@ -267,11 +267,11 @@ __decorate([
267
267
  ], Recruitment.prototype, "status", void 0);
268
268
  __decorate([
269
269
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Campaign' }),
270
- __metadata("design:type", mongoose_2.Schema.Types.ObjectId)
270
+ __metadata("design:type", Object)
271
271
  ], Recruitment.prototype, "campaign", void 0);
272
272
  __decorate([
273
273
  (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Profile' }),
274
- __metadata("design:type", mongoose_2.Schema.Types.ObjectId)
274
+ __metadata("design:type", Object)
275
275
  ], Recruitment.prototype, "profile", void 0);
276
276
  __decorate([
277
277
  (0, mongoose_1.Prop)([{ type: mongoose_2.Schema.Types.ObjectId, ref: 'Content' }]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grapadigital/shared-schemas",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "Shared Mongoose Schemas",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,145 +1,147 @@
1
- import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"
1
+ import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
2
 
3
- import { HydratedDocument, Schema as MongooseSchema, Types } from "mongoose"
3
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
4
+ import { Recruitment } from './recruitment.schema';
5
+ import { Content } from './content.schema';
4
6
 
5
- export type CampaignDocument = HydratedDocument<Campaign>
7
+ export type CampaignDocument = HydratedDocument<Campaign>;
6
8
 
7
9
  @Schema({ _id: false })
8
10
  export class ComercialCard {
9
11
  @Prop()
10
- id: string
12
+ id: string;
11
13
 
12
14
  @Prop()
13
- title: string
15
+ title: string;
14
16
  }
15
17
 
16
- export const ComercialCardSchema = SchemaFactory.createForClass(ComercialCard)
18
+ export const ComercialCardSchema = SchemaFactory.createForClass(ComercialCard);
17
19
 
18
20
  @Schema({ _id: false })
19
21
  export class Responsible {
20
22
  @Prop()
21
- name: string
23
+ name: string;
22
24
 
23
25
  @Prop()
24
- team: string
26
+ team: string;
25
27
 
26
28
  @Prop()
27
- email: string
29
+ email: string;
28
30
  }
29
31
 
30
- export const ResponsibleSchema = SchemaFactory.createForClass(Responsible)
32
+ export const ResponsibleSchema = SchemaFactory.createForClass(Responsible);
31
33
 
32
34
  @Schema({ _id: false })
33
35
  export class Responsibles {
34
36
  @Prop({ type: ResponsibleSchema })
35
- service: Responsible
37
+ service: Responsible;
36
38
 
37
39
  @Prop({ type: ResponsibleSchema, required: false })
38
- comercial?: Responsible
40
+ comercial?: Responsible;
39
41
  }
40
42
 
41
- export const ResponsiblesSchema = SchemaFactory.createForClass(Responsibles)
43
+ export const ResponsiblesSchema = SchemaFactory.createForClass(Responsibles);
42
44
 
43
45
  @Schema({ timestamps: true })
44
46
  export class Campaign {
45
47
  @Prop({ type: MongooseSchema.Types.ObjectId, auto: true, required: false })
46
- _id?: Types.ObjectId
48
+ _id?: Types.ObjectId;
47
49
 
48
50
  @Prop()
49
- title: string
51
+ title: string;
50
52
 
51
53
  @Prop({ required: false })
52
- thumbnail?: string
54
+ thumbnail?: string;
53
55
 
54
56
  @Prop()
55
- startDate: Date
57
+ startDate: Date;
56
58
 
57
59
  @Prop()
58
- endDate: Date
60
+ endDate: Date;
59
61
 
60
62
  @Prop({ required: false })
61
- nps?: number
63
+ nps?: number;
62
64
 
63
65
  @Prop({
64
66
  type: String,
65
- enum: ["config", "inProgress", "paused", "finished", "archived"],
66
- default: "config",
67
+ enum: ['config', 'inProgress', 'paused', 'finished', 'archived'],
68
+ default: 'config',
67
69
  })
68
70
  status:
69
- | "config"
70
- | "inProgress"
71
- | "finished"
72
- | "paused"
73
- | "finished"
74
- | "archived"
71
+ | 'config'
72
+ | 'inProgress'
73
+ | 'finished'
74
+ | 'paused'
75
+ | 'finished'
76
+ | 'archived';
75
77
 
76
- @Prop({ type: String, enum: ["partner", "exclusive"] })
77
- type: "partner" | "exclusive"
78
+ @Prop({ type: String, enum: ['partner', 'exclusive'] })
79
+ type: 'partner' | 'exclusive';
78
80
 
79
81
  @Prop({ required: false })
80
- socialnetworks?: string[]
82
+ socialnetworks?: string[];
81
83
 
82
84
  @Prop({ default: 0, required: false })
83
- recruitedInfluencers?: number
85
+ recruitedInfluencers?: number;
84
86
 
85
87
  @Prop({ default: 0, required: false })
86
- hiredInfluencers?: number
88
+ hiredInfluencers?: number;
87
89
 
88
90
  @Prop({ default: 0, required: false })
89
- producedContent?: number
91
+ producedContent?: number;
90
92
 
91
93
  @Prop({ default: 0, required: false })
92
- hiredContent?: number
94
+ hiredContent?: number;
93
95
 
94
- @Prop({ type: MongooseSchema.Types.ObjectId, ref: "Client" })
95
- client: Types.ObjectId
96
+ @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Client' })
97
+ client: Types.ObjectId;
96
98
 
97
99
  @Prop([
98
100
  {
99
101
  type: MongooseSchema.Types.ObjectId,
100
- ref: "Recruitment",
102
+ ref: 'Recruitment',
101
103
  required: false,
102
104
  },
103
105
  ])
104
- recruitments?: Types.ObjectId[]
106
+ recruitments?: Types.ObjectId[] | Recruitment[];
105
107
 
106
108
  @Prop([
107
- { type: MongooseSchema.Types.ObjectId, ref: "Content", required: false },
109
+ { type: MongooseSchema.Types.ObjectId, ref: 'Content', required: false },
108
110
  ])
109
- contents?: Types.ObjectId[]
111
+ contents?: Types.ObjectId[] | Content[];
110
112
 
111
113
  @Prop()
112
- cluster: string
114
+ cluster: string;
113
115
 
114
116
  @Prop({ required: false })
115
- shopping?: string
117
+ shopping?: string;
116
118
 
117
119
  @Prop({ required: false })
118
- project?: string
120
+ project?: string;
119
121
 
120
122
  @Prop({ type: ComercialCardSchema, required: false })
121
- comercialCard?: ComercialCard
123
+ comercialCard?: ComercialCard;
122
124
 
123
125
  @Prop({ type: ResponsiblesSchema })
124
- responsibles: Responsibles
126
+ responsibles: Responsibles;
125
127
 
126
128
  @Prop({ required: false })
127
- brandUsername?: string
129
+ brandUsername?: string;
128
130
 
129
131
  @Prop({ required: false })
130
- hashtag?: string
132
+ hashtag?: string;
131
133
 
132
134
  @Prop({ required: false })
133
- BILink?: string
135
+ BILink?: string;
134
136
 
135
137
  @Prop({ required: false })
136
- BISheets?: string
138
+ BISheets?: string;
137
139
 
138
140
  @Prop({ default: Date.now })
139
- createdAt?: Date
141
+ createdAt?: Date;
140
142
 
141
143
  @Prop({ default: Date.now })
142
- updatedAt?: Date
144
+ updatedAt?: Date;
143
145
  }
144
146
 
145
- export const CampaignSchema = SchemaFactory.createForClass(Campaign)
147
+ export const CampaignSchema = SchemaFactory.createForClass(Campaign);
@@ -1,5 +1,7 @@
1
1
  import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
2
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
3
+ import { Profile } from './profile.schema';
4
+ import { Campaign } from './campaign.schema';
3
5
 
4
6
  export type ContentDocument = HydratedDocument<Content>;
5
7
 
@@ -94,10 +96,10 @@ export class Content {
94
96
  status: 'approved' | 'repproved' | 'deleted';
95
97
 
96
98
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Profile' })
97
- profile: MongooseSchema.Types.ObjectId;
99
+ profile: Types.ObjectId | Profile;
98
100
 
99
101
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Campaign' })
100
- campaign: MongooseSchema.Types.ObjectId;
102
+ campaign: Types.ObjectId | Campaign;
101
103
 
102
104
  @Prop()
103
105
  postedAt: Date;
@@ -106,7 +108,7 @@ export class Content {
106
108
  isCollab: boolean;
107
109
 
108
110
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Profile' }])
109
- collabs: MongooseSchema.Types.ObjectId[];
111
+ collabs: Types.ObjectId[] | Profile[];
110
112
 
111
113
  @Prop({ type: MetricsSchema, required: false })
112
114
  metrics?: Metrics;
@@ -1,5 +1,6 @@
1
1
  import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
2
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
3
+ import { Profile } from './profile.schema';
3
4
 
4
5
  export type InfluencerDocument = HydratedDocument<Influencer>;
5
6
 
@@ -129,7 +130,7 @@ export class Influencer {
129
130
  advisor: Advisor;
130
131
 
131
132
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Profile' }])
132
- profiles: MongooseSchema.Types.ObjectId[];
133
+ profiles: Types.ObjectId[] | Profile[];
133
134
 
134
135
  @Prop({ default: Date.now })
135
136
  createdAt: Date;
@@ -1,5 +1,5 @@
1
1
  import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
2
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
3
3
  import { Influencer } from './influencer.schema';
4
4
  import { Campaign } from './campaign.schema';
5
5
  import { Recruitment } from './recruitment.schema';
@@ -49,7 +49,7 @@ export const PendingChangesSchema =
49
49
  @Schema({ timestamps: true })
50
50
  export class Payment {
51
51
  @Prop({ type: MongooseSchema.Types.ObjectId, auto: true })
52
- _id: MongooseSchema.Types.ObjectId;
52
+ _id: Types.ObjectId;
53
53
 
54
54
  @Prop({ type: RequesterSchema })
55
55
  requester: Requester;
@@ -82,13 +82,13 @@ export class Payment {
82
82
  type: 'influencer' | 'advisor';
83
83
 
84
84
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Influencer' })
85
- influencer: MongooseSchema.Types.ObjectId | Influencer;
85
+ influencer: Types.ObjectId | Influencer;
86
86
 
87
87
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Campaign' })
88
- campaign: MongooseSchema.Types.ObjectId | Campaign;
88
+ campaign: Types.ObjectId | Campaign;
89
89
 
90
90
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Recruitment' })
91
- recruitment: MongooseSchema.Types.ObjectId | Recruitment;
91
+ recruitment: Types.ObjectId | Recruitment;
92
92
  }
93
93
 
94
94
  export const PaymentSchema = SchemaFactory.createForClass(Payment);
@@ -1,5 +1,6 @@
1
1
  import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
2
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
3
+ import { Influencer } from './influencer.schema';
3
4
 
4
5
  export type ProfileDocument = HydratedDocument<Profile>;
5
6
 
@@ -21,7 +22,7 @@ export class Profile {
21
22
  type: string;
22
23
 
23
24
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Influencer' })
24
- influencer: MongooseSchema.Types.ObjectId;
25
+ influencer: Types.ObjectId | Influencer;
25
26
 
26
27
  @Prop({ default: Date.now })
27
28
  createdAt: Date;
@@ -1,5 +1,8 @@
1
1
  import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
2
- import { HydratedDocument, Schema as MongooseSchema } from 'mongoose';
2
+ import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
3
+ import { Campaign } from './campaign.schema';
4
+ import { Profile } from './profile.schema';
5
+ import { Content } from './content.schema';
3
6
 
4
7
  export type RecruitmentDocument = HydratedDocument<Recruitment>;
5
8
 
@@ -179,7 +182,7 @@ export const ScopeSchema = SchemaFactory.createForClass(Scope);
179
182
  @Schema({ timestamps: true })
180
183
  export class Recruitment {
181
184
  @Prop({ type: MongooseSchema.Types.ObjectId, auto: true })
182
- _id: MongooseSchema.Types.ObjectId;
185
+ _id: Types.ObjectId;
183
186
 
184
187
  @Prop()
185
188
  username: string;
@@ -195,28 +198,28 @@ export class Recruitment {
195
198
  status: 'selected' | 'inContact' | 'inApproval' | 'recruited' | 'removed';
196
199
 
197
200
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Campaign' })
198
- campaign: MongooseSchema.Types.ObjectId;
201
+ campaign: Types.ObjectId | Campaign;
199
202
 
200
203
  @Prop({ type: MongooseSchema.Types.ObjectId, ref: 'Profile' })
201
- profile: MongooseSchema.Types.ObjectId;
204
+ profile: Types.ObjectId | Profile;
202
205
 
203
206
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
204
- reel: MongooseSchema.Types.ObjectId[];
207
+ reel: Types.ObjectId[] | Content[];
205
208
 
206
209
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
207
- image: MongooseSchema.Types.ObjectId[];
210
+ image: Types.ObjectId[] | Content[];
208
211
 
209
212
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
210
- carousel: MongooseSchema.Types.ObjectId[];
213
+ carousel: Types.ObjectId[] | Content[];
211
214
 
212
215
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
213
- story: MongooseSchema.Types.ObjectId[];
216
+ story: Types.ObjectId[] | Content[];
214
217
 
215
218
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
216
- tiktok: MongooseSchema.Types.ObjectId[];
219
+ tiktok: Types.ObjectId[] | Content[];
217
220
 
218
221
  @Prop([{ type: MongooseSchema.Types.ObjectId, ref: 'Content' }])
219
- youtube: MongooseSchema.Types.ObjectId[];
222
+ youtube: Types.ObjectId[] | Content[];
220
223
 
221
224
  @Prop({ type: ScopeSchema })
222
225
  scope: Scope;