@grapadigital/shared-schemas 1.0.108 → 1.0.110
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.
|
@@ -39,8 +39,23 @@ export declare const ClusterSchema: import("mongoose").Schema<Cluster, import("m
|
|
|
39
39
|
} & {
|
|
40
40
|
__v: number;
|
|
41
41
|
}>;
|
|
42
|
+
export declare class Company {
|
|
43
|
+
legalName: string;
|
|
44
|
+
document: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const CompanySchema: import("mongoose").Schema<Company, import("mongoose").Model<Company, any, any, any, import("mongoose").Document<unknown, any, Company, any, {}> & Company & {
|
|
47
|
+
_id: import("mongoose").Types.ObjectId;
|
|
48
|
+
} & {
|
|
49
|
+
__v: number;
|
|
50
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Company, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Company>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Company> & {
|
|
51
|
+
_id: import("mongoose").Types.ObjectId;
|
|
52
|
+
} & {
|
|
53
|
+
__v: number;
|
|
54
|
+
}>;
|
|
42
55
|
export declare class Client extends User {
|
|
43
56
|
clusters: Cluster[];
|
|
57
|
+
companies: Company[];
|
|
58
|
+
categories: string[];
|
|
44
59
|
}
|
|
45
60
|
export declare const ClientSchema: import("mongoose").Schema<Client, import("mongoose").Model<Client, any, any, any, import("mongoose").Document<unknown, any, Client, any, {}> & Client & Required<{
|
|
46
61
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -9,7 +9,7 @@ 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.ClusterSchema = exports.Cluster = void 0;
|
|
12
|
+
exports.ClientModel = exports.ClientSchema = exports.Client = exports.CompanySchema = exports.Company = exports.ClusterSchema = exports.Cluster = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
const user_schema_1 = require("./user.schema");
|
|
@@ -28,12 +28,35 @@ Cluster = __decorate([
|
|
|
28
28
|
], Cluster);
|
|
29
29
|
exports.Cluster = Cluster;
|
|
30
30
|
exports.ClusterSchema = mongoose_1.SchemaFactory.createForClass(Cluster);
|
|
31
|
+
let Company = class Company {
|
|
32
|
+
};
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, mongoose_1.Prop)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], Company.prototype, "legalName", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Company.prototype, "document", void 0);
|
|
41
|
+
Company = __decorate([
|
|
42
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
43
|
+
], Company);
|
|
44
|
+
exports.Company = Company;
|
|
45
|
+
exports.CompanySchema = mongoose_1.SchemaFactory.createForClass(Company);
|
|
31
46
|
let Client = class Client extends user_schema_1.User {
|
|
32
47
|
};
|
|
33
48
|
__decorate([
|
|
34
49
|
(0, mongoose_1.Prop)({ type: [exports.ClusterSchema], default: [] }),
|
|
35
50
|
__metadata("design:type", Array)
|
|
36
51
|
], Client.prototype, "clusters", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ type: [exports.CompanySchema], default: [] }),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], Client.prototype, "companies", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], Client.prototype, "categories", void 0);
|
|
37
60
|
Client = __decorate([
|
|
38
61
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
39
62
|
], Client);
|
|
@@ -30,6 +30,11 @@ Recipient = __decorate([
|
|
|
30
30
|
], Recipient);
|
|
31
31
|
let Inbox = class Inbox {
|
|
32
32
|
};
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, swagger_1.ApiProperty)({ example: 'CNPJ da Marca que foi selecionado para o faturamento' }),
|
|
35
|
+
(0, mongoose_1.Prop)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], Inbox.prototype, "document", void 0);
|
|
33
38
|
__decorate([
|
|
34
39
|
(0, swagger_1.ApiProperty)({ example: 'Descrição que deve contar na nota fiscal referente à prestação de serviços' }),
|
|
35
40
|
(0, mongoose_1.Prop)(),
|
package/package.json
CHANGED
|
@@ -15,10 +15,27 @@ export class Cluster {
|
|
|
15
15
|
|
|
16
16
|
export const ClusterSchema = SchemaFactory.createForClass(Cluster);
|
|
17
17
|
|
|
18
|
+
@Schema({ _id: false })
|
|
19
|
+
export class Company {
|
|
20
|
+
@Prop()
|
|
21
|
+
legalName: string;
|
|
22
|
+
|
|
23
|
+
@Prop()
|
|
24
|
+
document: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const CompanySchema = SchemaFactory.createForClass(Company);
|
|
28
|
+
|
|
18
29
|
@Schema({ timestamps: true })
|
|
19
30
|
export class Client extends User {
|
|
20
31
|
@Prop({ type: [ClusterSchema], default: [] })
|
|
21
32
|
clusters: Cluster[];
|
|
33
|
+
|
|
34
|
+
@Prop({ type: [CompanySchema], default: [] })
|
|
35
|
+
companies: Company[];
|
|
36
|
+
|
|
37
|
+
@Prop({ type: [String], default: [] })
|
|
38
|
+
categories: string[];
|
|
22
39
|
}
|
|
23
40
|
|
|
24
41
|
export const ClientSchema = SchemaFactory.createForClass(Client);
|
|
@@ -22,6 +22,9 @@ class Recipient {
|
|
|
22
22
|
|
|
23
23
|
@Schema({ _id: false })
|
|
24
24
|
class Inbox {
|
|
25
|
+
@ApiProperty({ example: 'CNPJ da Marca que foi selecionado para o faturamento' })
|
|
26
|
+
@Prop() document?: string;
|
|
27
|
+
|
|
25
28
|
@ApiProperty({ example: 'Descrição que deve contar na nota fiscal referente à prestação de serviços' })
|
|
26
29
|
@Prop() invoiceDescription?: string;
|
|
27
30
|
|