@grapadigital/shared-schemas 1.0.185 → 1.0.186
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/client.schema.d.ts +16 -0
- package/dist/schemas/client.schema.js +32 -1
- package/dist/schemas/influencer.schema.d.ts +4 -0
- package/dist/schemas/influencer.schema.js +16 -0
- package/package.json +1 -1
- package/src/schemas/client.schema.ts +24 -0
- package/src/schemas/influencer.schema.ts +12 -0
|
@@ -94,6 +94,20 @@ export declare const NicheItemSchema: import("mongoose").Schema<NicheItem, impor
|
|
|
94
94
|
} & {
|
|
95
95
|
__v: number;
|
|
96
96
|
}>;
|
|
97
|
+
export declare class Responsable {
|
|
98
|
+
name: string;
|
|
99
|
+
team: string;
|
|
100
|
+
email: string;
|
|
101
|
+
}
|
|
102
|
+
export declare const ResponsableSchema: import("mongoose").Schema<Responsable, import("mongoose").Model<Responsable, any, any, any, import("mongoose").Document<unknown, any, Responsable, any, {}> & Responsable & {
|
|
103
|
+
_id: import("mongoose").Types.ObjectId;
|
|
104
|
+
} & {
|
|
105
|
+
__v: number;
|
|
106
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Responsable, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Responsable>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Responsable> & {
|
|
107
|
+
_id: import("mongoose").Types.ObjectId;
|
|
108
|
+
} & {
|
|
109
|
+
__v: number;
|
|
110
|
+
}>;
|
|
97
111
|
export declare class Client extends Party {
|
|
98
112
|
clusters: Cluster[];
|
|
99
113
|
companies: Company[];
|
|
@@ -108,6 +122,8 @@ export declare class Client extends Party {
|
|
|
108
122
|
* time já resolve (padrão da maioria dos clientes). Ver GD-532/GD-535.
|
|
109
123
|
*/
|
|
110
124
|
requiredTeams: string[];
|
|
125
|
+
hasReport: boolean;
|
|
126
|
+
reportResponsable?: Responsable;
|
|
111
127
|
}
|
|
112
128
|
export declare const ClientSchema: import("mongoose").Schema<Client, import("mongoose").Model<Client, any, any, any, import("mongoose").Document<unknown, any, Client, any, {}> & Client & Required<{
|
|
113
129
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -9,8 +9,9 @@ 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.ClientModel = exports.ClientSchema = exports.Client = exports.NicheItemSchema = exports.NicheItem = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
|
|
12
|
+
exports.ClientModel = exports.ClientSchema = exports.Client = exports.ResponsableSchema = exports.Responsable = exports.NicheItemSchema = exports.NicheItem = exports.AgencyCommissionPeriodSchema = exports.AgencyCommissionPeriod = exports.CommissionRangeSchema = exports.CommissionRange = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
14
15
|
const mongoose_2 = require("mongoose");
|
|
15
16
|
const party_schema_1 = require("./party.schema");
|
|
16
17
|
let Cluster = class Cluster {
|
|
@@ -100,6 +101,28 @@ NicheItem = __decorate([
|
|
|
100
101
|
], NicheItem);
|
|
101
102
|
exports.NicheItem = NicheItem;
|
|
102
103
|
exports.NicheItemSchema = mongoose_1.SchemaFactory.createForClass(NicheItem);
|
|
104
|
+
let Responsable = class Responsable {
|
|
105
|
+
};
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, swagger_1.ApiProperty)({ example: 'Maria Oliveira' }),
|
|
108
|
+
(0, mongoose_1.Prop)(),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], Responsable.prototype, "name", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, swagger_1.ApiProperty)({ example: 'Comercial' }),
|
|
113
|
+
(0, mongoose_1.Prop)(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], Responsable.prototype, "team", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, swagger_1.ApiProperty)({ example: 'maria@empresa.com' }),
|
|
118
|
+
(0, mongoose_1.Prop)(),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], Responsable.prototype, "email", void 0);
|
|
121
|
+
Responsable = __decorate([
|
|
122
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
123
|
+
], Responsable);
|
|
124
|
+
exports.Responsable = Responsable;
|
|
125
|
+
exports.ResponsableSchema = mongoose_1.SchemaFactory.createForClass(Responsable);
|
|
103
126
|
let Client = class Client extends party_schema_1.Party {
|
|
104
127
|
};
|
|
105
128
|
__decorate([
|
|
@@ -138,6 +161,14 @@ __decorate([
|
|
|
138
161
|
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
139
162
|
__metadata("design:type", Array)
|
|
140
163
|
], Client.prototype, "requiredTeams", void 0);
|
|
164
|
+
__decorate([
|
|
165
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
166
|
+
__metadata("design:type", Boolean)
|
|
167
|
+
], Client.prototype, "hasReport", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
(0, mongoose_1.Prop)({ type: exports.ResponsableSchema, required: false }),
|
|
170
|
+
__metadata("design:type", Responsable)
|
|
171
|
+
], Client.prototype, "reportResponsable", void 0);
|
|
141
172
|
Client = __decorate([
|
|
142
173
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
143
174
|
], Client);
|
|
@@ -32,6 +32,10 @@ export declare class Advisor {
|
|
|
32
32
|
legalName: string;
|
|
33
33
|
document: string;
|
|
34
34
|
phone: string;
|
|
35
|
+
bank: string;
|
|
36
|
+
agency: string;
|
|
37
|
+
account: string;
|
|
38
|
+
digit: string;
|
|
35
39
|
}
|
|
36
40
|
export declare const AdvisorSchema: MongooseSchema<Advisor, import("mongoose").Model<Advisor, any, any, any, import("mongoose").Document<unknown, any, Advisor, any, {}> & Advisor & {
|
|
37
41
|
_id: Types.ObjectId;
|
|
@@ -31,6 +31,22 @@ __decorate([
|
|
|
31
31
|
(0, mongoose_1.Prop)(),
|
|
32
32
|
__metadata("design:type", String)
|
|
33
33
|
], Advisor.prototype, "phone", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, mongoose_1.Prop)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Advisor.prototype, "bank", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, mongoose_1.Prop)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], Advisor.prototype, "agency", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, mongoose_1.Prop)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], Advisor.prototype, "account", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, mongoose_1.Prop)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], Advisor.prototype, "digit", void 0);
|
|
34
50
|
Advisor = __decorate([
|
|
35
51
|
(0, mongoose_1.Schema)({ _id: false })
|
|
36
52
|
], Advisor);
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
|
|
2
|
+
import { ApiProperty } from '@nestjs/swagger';
|
|
2
3
|
import { HydratedDocument, model as MongooseModel } from 'mongoose';
|
|
3
4
|
import { Party } from './party.schema';
|
|
4
5
|
|
|
@@ -68,6 +69,23 @@ export class NicheItem {
|
|
|
68
69
|
|
|
69
70
|
export const NicheItemSchema = SchemaFactory.createForClass(NicheItem);
|
|
70
71
|
|
|
72
|
+
@Schema({ _id: false })
|
|
73
|
+
export class Responsable {
|
|
74
|
+
@ApiProperty({ example: 'Maria Oliveira' })
|
|
75
|
+
@Prop()
|
|
76
|
+
name: string;
|
|
77
|
+
|
|
78
|
+
@ApiProperty({ example: 'Comercial' })
|
|
79
|
+
@Prop()
|
|
80
|
+
team: string;
|
|
81
|
+
|
|
82
|
+
@ApiProperty({ example: 'maria@empresa.com' })
|
|
83
|
+
@Prop()
|
|
84
|
+
email: string;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const ResponsableSchema = SchemaFactory.createForClass(Responsable);
|
|
88
|
+
|
|
71
89
|
@Schema({ timestamps: true })
|
|
72
90
|
export class Client extends Party {
|
|
73
91
|
@Prop({ type: [ClusterSchema], default: [] })
|
|
@@ -102,6 +120,12 @@ export class Client extends Party {
|
|
|
102
120
|
*/
|
|
103
121
|
@Prop({ type: [String], default: [] })
|
|
104
122
|
requiredTeams: string[];
|
|
123
|
+
|
|
124
|
+
@Prop({ type: Boolean, default: false })
|
|
125
|
+
hasReport: boolean;
|
|
126
|
+
|
|
127
|
+
@Prop({ type: ResponsableSchema, required: false })
|
|
128
|
+
reportResponsable?: Responsable;
|
|
105
129
|
}
|
|
106
130
|
|
|
107
131
|
export const ClientSchema = SchemaFactory.createForClass(Client);
|
|
@@ -17,6 +17,18 @@ export class Advisor {
|
|
|
17
17
|
|
|
18
18
|
@Prop()
|
|
19
19
|
phone: string;
|
|
20
|
+
|
|
21
|
+
@Prop()
|
|
22
|
+
bank: string;
|
|
23
|
+
|
|
24
|
+
@Prop()
|
|
25
|
+
agency: string;
|
|
26
|
+
|
|
27
|
+
@Prop()
|
|
28
|
+
account: string;
|
|
29
|
+
|
|
30
|
+
@Prop()
|
|
31
|
+
digit: string;
|
|
20
32
|
}
|
|
21
33
|
|
|
22
34
|
export const AdvisorSchema = SchemaFactory.createForClass(Advisor);
|