@grapadigital/shared-schemas 1.0.172 → 1.0.174
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/index.d.ts +4 -0
- package/dist/index.js +4 -0
- package/dist/schemas/action.schema.d.ts +2 -0
- package/dist/schemas/action.schema.js +6 -0
- package/dist/schemas/campaign.schema.d.ts +3 -0
- package/dist/schemas/campaign.schema.js +12 -0
- package/dist/schemas/client.schema.d.ts +2 -2
- package/dist/schemas/client.schema.js +2 -2
- package/dist/schemas/group.schema.d.ts +43 -0
- package/dist/schemas/group.schema.js +34 -0
- package/dist/schemas/influencer.schema.d.ts +2 -2
- package/dist/schemas/influencer.schema.js +2 -2
- package/dist/schemas/notifications.schema.d.ts +69 -0
- package/dist/schemas/notifications.schema.js +90 -0
- package/dist/schemas/organization.schema.d.ts +45 -0
- package/dist/schemas/organization.schema.js +41 -0
- package/dist/schemas/party.schema.d.ts +116 -0
- package/dist/schemas/party.schema.js +175 -0
- package/dist/schemas/supplier.schema.d.ts +2 -2
- package/dist/schemas/supplier.schema.js +2 -2
- package/dist/schemas/task.schema.d.ts +2 -3
- package/dist/schemas/task.schema.js +12 -12
- package/dist/schemas/user.schema.d.ts +23 -78
- package/dist/schemas/user.schema.js +38 -143
- package/package.json +1 -1
- package/src/index.ts +4 -0
- package/src/schemas/action.schema.ts +4 -0
- package/src/schemas/campaign.schema.ts +8 -1
- package/src/schemas/client.schema.ts +2 -2
- package/src/schemas/group.schema.ts +23 -0
- package/src/schemas/influencer.schema.ts +2 -2
- package/src/schemas/notifications.schema.ts +61 -0
- package/src/schemas/organization.schema.ts +29 -0
- package/src/schemas/party.schema.ts +65 -0
- package/src/schemas/supplier.schema.ts +2 -2
- package/src/schemas/task.schema.ts +13 -13
- package/src/schemas/user.schema.ts +31 -107
package/dist/index.d.ts
CHANGED
|
@@ -17,3 +17,7 @@ export * from './schemas/project.schema';
|
|
|
17
17
|
export * from './schemas/commission.schema';
|
|
18
18
|
export * from './schemas/contract.schema';
|
|
19
19
|
export * from './schemas/benchmark.schema';
|
|
20
|
+
export * from './schemas/notifications.schema';
|
|
21
|
+
export * from './schemas/organization.schema';
|
|
22
|
+
export * from './schemas/user.schema';
|
|
23
|
+
export * from './schemas/group.schema';
|
package/dist/index.js
CHANGED
|
@@ -33,3 +33,7 @@ __exportStar(require("./schemas/project.schema"), exports);
|
|
|
33
33
|
__exportStar(require("./schemas/commission.schema"), exports);
|
|
34
34
|
__exportStar(require("./schemas/contract.schema"), exports);
|
|
35
35
|
__exportStar(require("./schemas/benchmark.schema"), exports);
|
|
36
|
+
__exportStar(require("./schemas/notifications.schema"), exports);
|
|
37
|
+
__exportStar(require("./schemas/organization.schema"), exports);
|
|
38
|
+
__exportStar(require("./schemas/user.schema"), exports);
|
|
39
|
+
__exportStar(require("./schemas/group.schema"), exports);
|
|
@@ -28,6 +28,7 @@ import { Recruitment } from './recruitment.schema';
|
|
|
28
28
|
import { Content } from './content.schema';
|
|
29
29
|
import { Client } from './client.schema';
|
|
30
30
|
import { Sale } from './sale.schema';
|
|
31
|
+
import { Campaign } from './campaign.schema';
|
|
31
32
|
export type ActionDocument = HydratedDocument<Action>;
|
|
32
33
|
export declare class Responsible {
|
|
33
34
|
name: string;
|
|
@@ -104,6 +105,7 @@ export declare class Action {
|
|
|
104
105
|
description?: string;
|
|
105
106
|
tags?: string[];
|
|
106
107
|
businessUnit?: ActionBusinessUnit;
|
|
108
|
+
campaign?: Types.ObjectId | Campaign;
|
|
107
109
|
}
|
|
108
110
|
export declare const ActionSchema: MongooseSchema<Action, import("mongoose").Model<Action, any, any, any, import("mongoose").Document<unknown, any, Action, any, {}> & Action & Required<{
|
|
109
111
|
_id: Types.ObjectId;
|
|
@@ -17,6 +17,7 @@ const recruitment_schema_1 = require("./recruitment.schema");
|
|
|
17
17
|
const content_schema_1 = require("./content.schema");
|
|
18
18
|
const client_schema_1 = require("./client.schema");
|
|
19
19
|
const sale_schema_1 = require("./sale.schema");
|
|
20
|
+
const campaign_schema_1 = require("./campaign.schema");
|
|
20
21
|
let Responsible = class Responsible {
|
|
21
22
|
};
|
|
22
23
|
__decorate([
|
|
@@ -299,6 +300,11 @@ __decorate([
|
|
|
299
300
|
(0, mongoose_1.Prop)({ type: String, enum: exports.ACTION_BUSINESS_UNIT_VALUES, required: false }),
|
|
300
301
|
__metadata("design:type", String)
|
|
301
302
|
], Action.prototype, "businessUnit", void 0);
|
|
303
|
+
__decorate([
|
|
304
|
+
(0, swagger_1.ApiProperty)({ type: () => campaign_schema_1.Campaign, required: false }),
|
|
305
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, ref: 'Campaign', required: false }),
|
|
306
|
+
__metadata("design:type", Object)
|
|
307
|
+
], Action.prototype, "campaign", void 0);
|
|
302
308
|
Action = __decorate([
|
|
303
309
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
304
310
|
], Action);
|
|
@@ -32,6 +32,9 @@ export declare class Campaign {
|
|
|
32
32
|
client: Types.ObjectId | Client;
|
|
33
33
|
createdAt?: Date;
|
|
34
34
|
updatedAt?: Date;
|
|
35
|
+
description?: string;
|
|
36
|
+
startDate?: Date;
|
|
37
|
+
endDate?: Date;
|
|
35
38
|
}
|
|
36
39
|
export declare const CampaignSchema: MongooseSchema<Campaign, import("mongoose").Model<Campaign, any, any, any, import("mongoose").Document<unknown, any, Campaign, any, {}> & Campaign & Required<{
|
|
37
40
|
_id: Types.ObjectId;
|
|
@@ -34,6 +34,18 @@ __decorate([
|
|
|
34
34
|
(0, mongoose_1.Prop)({ default: Date.now, required: false }),
|
|
35
35
|
__metadata("design:type", Date)
|
|
36
36
|
], Campaign.prototype, "updatedAt", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], Campaign.prototype, "description", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], Campaign.prototype, "startDate", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], Campaign.prototype, "endDate", void 0);
|
|
37
49
|
Campaign = __decorate([
|
|
38
50
|
(0, mongoose_1.Schema)({ timestamps: true })
|
|
39
51
|
], Campaign);
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
/// <reference types="mongoose/types/inferschematype" />
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
26
|
import { HydratedDocument } from 'mongoose';
|
|
27
|
-
import {
|
|
27
|
+
import { Party } from './party.schema';
|
|
28
28
|
export type ClientDocument = HydratedDocument<Client>;
|
|
29
29
|
export declare class Cluster {
|
|
30
30
|
key: string;
|
|
@@ -94,7 +94,7 @@ export declare const NicheItemSchema: import("mongoose").Schema<NicheItem, impor
|
|
|
94
94
|
} & {
|
|
95
95
|
__v: number;
|
|
96
96
|
}>;
|
|
97
|
-
export declare class Client extends
|
|
97
|
+
export declare class Client extends Party {
|
|
98
98
|
clusters: Cluster[];
|
|
99
99
|
companies: Company[];
|
|
100
100
|
type: string;
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
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;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
|
-
const
|
|
15
|
+
const party_schema_1 = require("./party.schema");
|
|
16
16
|
let Cluster = class Cluster {
|
|
17
17
|
};
|
|
18
18
|
__decorate([
|
|
@@ -100,7 +100,7 @@ NicheItem = __decorate([
|
|
|
100
100
|
], NicheItem);
|
|
101
101
|
exports.NicheItem = NicheItem;
|
|
102
102
|
exports.NicheItemSchema = mongoose_1.SchemaFactory.createForClass(NicheItem);
|
|
103
|
-
let Client = class Client extends
|
|
103
|
+
let Client = class Client extends party_schema_1.Party {
|
|
104
104
|
};
|
|
105
105
|
__decorate([
|
|
106
106
|
(0, mongoose_1.Prop)({ type: [exports.ClusterSchema], default: [] }),
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/session" />
|
|
19
|
+
/// <reference types="mongoose/types/types" />
|
|
20
|
+
/// <reference types="mongoose/types/utility" />
|
|
21
|
+
/// <reference types="mongoose/types/validation" />
|
|
22
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import { HydratedDocument, Types } from 'mongoose';
|
|
27
|
+
export type GroupDocument = HydratedDocument<Group>;
|
|
28
|
+
export declare class Group {
|
|
29
|
+
organization: Types.ObjectId;
|
|
30
|
+
name: string;
|
|
31
|
+
memberIds: Types.ObjectId[];
|
|
32
|
+
createdAt?: Date;
|
|
33
|
+
updatedAt?: Date;
|
|
34
|
+
}
|
|
35
|
+
export declare const GroupSchema: import("mongoose").Schema<Group, import("mongoose").Model<Group, any, any, any, import("mongoose").Document<unknown, any, Group, any, {}> & Group & {
|
|
36
|
+
_id: Types.ObjectId;
|
|
37
|
+
} & {
|
|
38
|
+
__v: number;
|
|
39
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Group, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Group>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Group> & {
|
|
40
|
+
_id: Types.ObjectId;
|
|
41
|
+
} & {
|
|
42
|
+
__v: number;
|
|
43
|
+
}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GroupSchema = exports.Group = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
let Group = class Group {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: 'Organization', required: true, index: true }),
|
|
19
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
20
|
+
], Group.prototype, "organization", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, mongoose_1.Prop)({ required: true, trim: true }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Group.prototype, "name", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, mongoose_1.Prop)({ type: [mongoose_2.Types.ObjectId], ref: 'User', default: [] }),
|
|
27
|
+
__metadata("design:type", Array)
|
|
28
|
+
], Group.prototype, "memberIds", void 0);
|
|
29
|
+
Group = __decorate([
|
|
30
|
+
(0, mongoose_1.Schema)({ timestamps: true, collection: 'group' })
|
|
31
|
+
], Group);
|
|
32
|
+
exports.Group = Group;
|
|
33
|
+
exports.GroupSchema = mongoose_1.SchemaFactory.createForClass(Group);
|
|
34
|
+
exports.GroupSchema.index({ organization: 1, name: 1 }, { unique: true });
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
26
|
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
27
|
import { Profile } from './profile.schema';
|
|
28
|
-
import {
|
|
28
|
+
import { Party } from './party.schema';
|
|
29
29
|
export type InfluencerDocument = HydratedDocument<Influencer>;
|
|
30
30
|
export declare class Advisor {
|
|
31
31
|
email: string;
|
|
@@ -56,7 +56,7 @@ export declare const NoteSchema: MongooseSchema<Note, import("mongoose").Model<N
|
|
|
56
56
|
} & {
|
|
57
57
|
__v: number;
|
|
58
58
|
}>;
|
|
59
|
-
export declare class Influencer extends
|
|
59
|
+
export declare class Influencer extends Party {
|
|
60
60
|
financialManagementSheet?: string;
|
|
61
61
|
isExclusive: boolean;
|
|
62
62
|
advisor?: Advisor;
|
|
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.InfluencerModel = exports.InfluencerSchema = exports.Influencer = exports.NoteSchema = exports.Note = exports.AdvisorSchema = exports.Advisor = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
|
-
const
|
|
15
|
+
const party_schema_1 = require("./party.schema");
|
|
16
16
|
let Advisor = class Advisor {
|
|
17
17
|
};
|
|
18
18
|
__decorate([
|
|
@@ -55,7 +55,7 @@ Note = __decorate([
|
|
|
55
55
|
], Note);
|
|
56
56
|
exports.Note = Note;
|
|
57
57
|
exports.NoteSchema = mongoose_1.SchemaFactory.createForClass(Note);
|
|
58
|
-
let Influencer = class Influencer extends
|
|
58
|
+
let Influencer = class Influencer extends party_schema_1.Party {
|
|
59
59
|
};
|
|
60
60
|
__decorate([
|
|
61
61
|
(0, mongoose_1.Prop)({ required: false }),
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/session" />
|
|
19
|
+
/// <reference types="mongoose/types/types" />
|
|
20
|
+
/// <reference types="mongoose/types/utility" />
|
|
21
|
+
/// <reference types="mongoose/types/validation" />
|
|
22
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import { HydratedDocument } from 'mongoose';
|
|
27
|
+
export type NotificationDocument = HydratedDocument<Notification>;
|
|
28
|
+
export declare class NotificationRecipient {
|
|
29
|
+
name?: string;
|
|
30
|
+
username?: string;
|
|
31
|
+
email?: string;
|
|
32
|
+
}
|
|
33
|
+
export declare class NotificationEntity {
|
|
34
|
+
name?: string;
|
|
35
|
+
title?: string;
|
|
36
|
+
_id?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare class Notification {
|
|
39
|
+
recipient: NotificationRecipient;
|
|
40
|
+
event: string;
|
|
41
|
+
channels: string[];
|
|
42
|
+
title?: string;
|
|
43
|
+
body?: string;
|
|
44
|
+
entity?: NotificationEntity;
|
|
45
|
+
read: boolean;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
}
|
|
48
|
+
export declare const NotificationSchema: import("mongoose").Schema<Notification, import("mongoose").Model<Notification, any, any, any, import("mongoose").Document<unknown, any, Notification, any, {}> & Notification & {
|
|
49
|
+
_id: import("mongoose").Types.ObjectId;
|
|
50
|
+
} & {
|
|
51
|
+
__v: number;
|
|
52
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Notification, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Notification>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Notification> & {
|
|
53
|
+
_id: import("mongoose").Types.ObjectId;
|
|
54
|
+
} & {
|
|
55
|
+
__v: number;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const NotificationModel: import("mongoose").Model<Notification, {}, {}, {}, import("mongoose").Document<unknown, {}, Notification, {}, import("mongoose").DefaultSchemaOptions> & Notification & {
|
|
58
|
+
_id: import("mongoose").Types.ObjectId;
|
|
59
|
+
} & {
|
|
60
|
+
__v: number;
|
|
61
|
+
}, import("mongoose").Schema<Notification, import("mongoose").Model<Notification, any, any, any, import("mongoose").Document<unknown, any, Notification, any, {}> & Notification & {
|
|
62
|
+
_id: import("mongoose").Types.ObjectId;
|
|
63
|
+
} & {
|
|
64
|
+
__v: number;
|
|
65
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Notification, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Notification>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Notification> & {
|
|
66
|
+
_id: import("mongoose").Types.ObjectId;
|
|
67
|
+
} & {
|
|
68
|
+
__v: number;
|
|
69
|
+
}>>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NotificationModel = exports.NotificationSchema = exports.Notification = exports.NotificationEntity = exports.NotificationRecipient = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
let NotificationRecipient = class NotificationRecipient {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], NotificationRecipient.prototype, "name", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], NotificationRecipient.prototype, "username", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], NotificationRecipient.prototype, "email", void 0);
|
|
29
|
+
NotificationRecipient = __decorate([
|
|
30
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
31
|
+
], NotificationRecipient);
|
|
32
|
+
exports.NotificationRecipient = NotificationRecipient;
|
|
33
|
+
let NotificationEntity = class NotificationEntity {
|
|
34
|
+
};
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], NotificationEntity.prototype, "name", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], NotificationEntity.prototype, "title", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], NotificationEntity.prototype, "_id", void 0);
|
|
47
|
+
NotificationEntity = __decorate([
|
|
48
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
49
|
+
], NotificationEntity);
|
|
50
|
+
exports.NotificationEntity = NotificationEntity;
|
|
51
|
+
let Notification = class Notification {
|
|
52
|
+
};
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, mongoose_1.Prop)({ type: NotificationRecipient, required: true }),
|
|
55
|
+
__metadata("design:type", NotificationRecipient)
|
|
56
|
+
], Notification.prototype, "recipient", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, mongoose_1.Prop)({ required: true, type: String }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], Notification.prototype, "event", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, mongoose_1.Prop)({ type: [String], default: [] }),
|
|
63
|
+
__metadata("design:type", Array)
|
|
64
|
+
], Notification.prototype, "channels", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], Notification.prototype, "title", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, mongoose_1.Prop)({ type: String }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], Notification.prototype, "body", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, mongoose_1.Prop)({ type: NotificationEntity }),
|
|
75
|
+
__metadata("design:type", NotificationEntity)
|
|
76
|
+
], Notification.prototype, "entity", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, mongoose_1.Prop)({ type: Boolean, default: false }),
|
|
79
|
+
__metadata("design:type", Boolean)
|
|
80
|
+
], Notification.prototype, "read", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, mongoose_1.Prop)({ type: Date, default: Date.now }),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], Notification.prototype, "createdAt", void 0);
|
|
85
|
+
Notification = __decorate([
|
|
86
|
+
(0, mongoose_1.Schema)({ timestamps: true, collection: 'notifications' })
|
|
87
|
+
], Notification);
|
|
88
|
+
exports.Notification = Notification;
|
|
89
|
+
exports.NotificationSchema = mongoose_1.SchemaFactory.createForClass(Notification);
|
|
90
|
+
exports.NotificationModel = (0, mongoose_2.model)('Notification', exports.NotificationSchema);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/session" />
|
|
19
|
+
/// <reference types="mongoose/types/types" />
|
|
20
|
+
/// <reference types="mongoose/types/utility" />
|
|
21
|
+
/// <reference types="mongoose/types/validation" />
|
|
22
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import { HydratedDocument } from 'mongoose';
|
|
27
|
+
export type OrganizationDocument = HydratedDocument<Organization>;
|
|
28
|
+
export declare class Organization {
|
|
29
|
+
corporateName: string;
|
|
30
|
+
fantasyName: string;
|
|
31
|
+
cnpj: string;
|
|
32
|
+
logo?: string;
|
|
33
|
+
logoSmall?: string;
|
|
34
|
+
createdAt?: Date;
|
|
35
|
+
updatedAt?: Date;
|
|
36
|
+
}
|
|
37
|
+
export declare const OrganizationSchema: import("mongoose").Schema<Organization, import("mongoose").Model<Organization, any, any, any, import("mongoose").Document<unknown, any, Organization, any, {}> & Organization & {
|
|
38
|
+
_id: import("mongoose").Types.ObjectId;
|
|
39
|
+
} & {
|
|
40
|
+
__v: number;
|
|
41
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Organization, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Organization>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Organization> & {
|
|
42
|
+
_id: import("mongoose").Types.ObjectId;
|
|
43
|
+
} & {
|
|
44
|
+
__v: number;
|
|
45
|
+
}>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OrganizationSchema = exports.Organization = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
let Organization = class Organization {
|
|
15
|
+
};
|
|
16
|
+
__decorate([
|
|
17
|
+
(0, mongoose_1.Prop)({ required: true, trim: true }),
|
|
18
|
+
__metadata("design:type", String)
|
|
19
|
+
], Organization.prototype, "corporateName", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, mongoose_1.Prop)({ required: true, trim: true }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], Organization.prototype, "fantasyName", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ required: true, unique: true, index: true }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], Organization.prototype, "cnpj", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Organization.prototype, "logo", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, mongoose_1.Prop)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], Organization.prototype, "logoSmall", void 0);
|
|
36
|
+
Organization = __decorate([
|
|
37
|
+
(0, mongoose_1.Schema)({ timestamps: true, collection: 'organizations', strict: true })
|
|
38
|
+
], Organization);
|
|
39
|
+
exports.Organization = Organization;
|
|
40
|
+
exports.OrganizationSchema = mongoose_1.SchemaFactory.createForClass(Organization);
|
|
41
|
+
exports.OrganizationSchema.index({ fantasyName: 'text', corporateName: 'text' });
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/session" />
|
|
19
|
+
/// <reference types="mongoose/types/types" />
|
|
20
|
+
/// <reference types="mongoose/types/utility" />
|
|
21
|
+
/// <reference types="mongoose/types/validation" />
|
|
22
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
23
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
/// <reference types="mongoose/types/inferrawdoctype" />
|
|
26
|
+
import { HydratedDocument, Schema as MongooseSchema, Types } from 'mongoose';
|
|
27
|
+
export type PartyDocument = HydratedDocument<Party>;
|
|
28
|
+
export declare class Address {
|
|
29
|
+
zipcode: string;
|
|
30
|
+
city: string;
|
|
31
|
+
state: string;
|
|
32
|
+
street: string;
|
|
33
|
+
number: string;
|
|
34
|
+
complement: string;
|
|
35
|
+
}
|
|
36
|
+
export declare const AddressSchema: MongooseSchema<Address, import("mongoose").Model<Address, any, any, any, import("mongoose").Document<unknown, any, Address, any, {}> & Address & {
|
|
37
|
+
_id: Types.ObjectId;
|
|
38
|
+
} & {
|
|
39
|
+
__v: number;
|
|
40
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Address, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Address>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Address> & {
|
|
41
|
+
_id: Types.ObjectId;
|
|
42
|
+
} & {
|
|
43
|
+
__v: number;
|
|
44
|
+
}>;
|
|
45
|
+
export declare class Company {
|
|
46
|
+
legalName: string;
|
|
47
|
+
document: string;
|
|
48
|
+
bank: string;
|
|
49
|
+
agency: string;
|
|
50
|
+
account: string;
|
|
51
|
+
digit: string;
|
|
52
|
+
pix: string;
|
|
53
|
+
email: string;
|
|
54
|
+
omieGrapaId?: string;
|
|
55
|
+
omieOmaId?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare const CompanySchema: MongooseSchema<Company, import("mongoose").Model<Company, any, any, any, import("mongoose").Document<unknown, any, Company, any, {}> & Company & {
|
|
58
|
+
_id: Types.ObjectId;
|
|
59
|
+
} & {
|
|
60
|
+
__v: number;
|
|
61
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Company, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Company>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Company> & {
|
|
62
|
+
_id: Types.ObjectId;
|
|
63
|
+
} & {
|
|
64
|
+
__v: number;
|
|
65
|
+
}>;
|
|
66
|
+
export declare class Individual {
|
|
67
|
+
rg: string;
|
|
68
|
+
cpf: string;
|
|
69
|
+
birthday: Date;
|
|
70
|
+
maritalStatus: string;
|
|
71
|
+
nationality: string;
|
|
72
|
+
profession: string;
|
|
73
|
+
}
|
|
74
|
+
export declare const IndividualSchema: MongooseSchema<Individual, import("mongoose").Model<Individual, any, any, any, import("mongoose").Document<unknown, any, Individual, any, {}> & Individual & {
|
|
75
|
+
_id: Types.ObjectId;
|
|
76
|
+
} & {
|
|
77
|
+
__v: number;
|
|
78
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Individual, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Individual>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Individual> & {
|
|
79
|
+
_id: Types.ObjectId;
|
|
80
|
+
} & {
|
|
81
|
+
__v: number;
|
|
82
|
+
}>;
|
|
83
|
+
export declare class Party {
|
|
84
|
+
_id?: Types.ObjectId;
|
|
85
|
+
name: string;
|
|
86
|
+
email?: string;
|
|
87
|
+
phone?: string;
|
|
88
|
+
picture?: string;
|
|
89
|
+
address?: Address;
|
|
90
|
+
company?: Company;
|
|
91
|
+
individual?: Individual;
|
|
92
|
+
createdAt?: Date;
|
|
93
|
+
updatedAt?: Date;
|
|
94
|
+
}
|
|
95
|
+
export declare const PartySchema: MongooseSchema<Party, import("mongoose").Model<Party, any, any, any, import("mongoose").Document<unknown, any, Party, any, {}> & Party & Required<{
|
|
96
|
+
_id: Types.ObjectId;
|
|
97
|
+
}> & {
|
|
98
|
+
__v: number;
|
|
99
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Party, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Party>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Party> & Required<{
|
|
100
|
+
_id: Types.ObjectId;
|
|
101
|
+
}> & {
|
|
102
|
+
__v: number;
|
|
103
|
+
}>;
|
|
104
|
+
export declare const PartyModel: import("mongoose").Model<Party, {}, {}, {}, import("mongoose").Document<unknown, {}, Party, {}, import("mongoose").DefaultSchemaOptions> & Party & Required<{
|
|
105
|
+
_id: Types.ObjectId;
|
|
106
|
+
}> & {
|
|
107
|
+
__v: number;
|
|
108
|
+
}, MongooseSchema<Party, import("mongoose").Model<Party, any, any, any, import("mongoose").Document<unknown, any, Party, any, {}> & Party & Required<{
|
|
109
|
+
_id: Types.ObjectId;
|
|
110
|
+
}> & {
|
|
111
|
+
__v: number;
|
|
112
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Party, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Party>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Party> & Required<{
|
|
113
|
+
_id: Types.ObjectId;
|
|
114
|
+
}> & {
|
|
115
|
+
__v: number;
|
|
116
|
+
}>>;
|