grm-shared-library 1.0.4 → 1.0.5
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/dtos/contact-person/contact-person.dto.d.ts +6 -0
- package/dist/dtos/contact-person/contact-person.dto.js +38 -0
- package/dist/dtos/organization/create-organization.dto.d.ts +2 -8
- package/dist/dtos/organization/create-organization.dto.js +3 -26
- package/dist/interfaces/organization.d.ts +16 -0
- package/dist/interfaces/organization.js +2 -0
- package/dist/interfaces/user.d.ts +2 -0
- package/dist/interfaces/user.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
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.ContactPersonDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const decorators_1 = require("../../utilities/decorators");
|
|
15
|
+
class ContactPersonDto {
|
|
16
|
+
}
|
|
17
|
+
exports.ContactPersonDto = ContactPersonDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
(0, decorators_1.SentenceCase)(),
|
|
21
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], ContactPersonDto.prototype, "name", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsPhoneNumber)(),
|
|
26
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], ContactPersonDto.prototype, "phoneNumber", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsEmail)(),
|
|
31
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ContactPersonDto.prototype, "email", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], ContactPersonDto.prototype, "designation", void 0);
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { MapAddressDto } from "../location/map-address.dto";
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
phoneNumber: string;
|
|
5
|
-
email: string;
|
|
6
|
-
designation: string;
|
|
7
|
-
}
|
|
2
|
+
import { ContactPersonDto } from "../contact-person/contact-person.dto";
|
|
8
3
|
export declare class CreateOrganizationDto {
|
|
9
4
|
name: string;
|
|
10
5
|
phoneNumber?: string;
|
|
@@ -15,6 +10,5 @@ export declare class CreateOrganizationDto {
|
|
|
15
10
|
description?: string;
|
|
16
11
|
status: string;
|
|
17
12
|
logo?: string;
|
|
18
|
-
contactPerson:
|
|
13
|
+
contactPerson: ContactPersonDto;
|
|
19
14
|
}
|
|
20
|
-
export {};
|
|
@@ -13,31 +13,8 @@ exports.CreateOrganizationDto = void 0;
|
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
const class_transformer_1 = require("class-transformer");
|
|
15
15
|
const map_address_dto_1 = require("../location/map-address.dto");
|
|
16
|
-
const decorators_1 = require("../../utilities/decorators");
|
|
17
16
|
const org_status_enum_1 = require("../../enums/org-status.enum");
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, class_validator_1.IsString)(),
|
|
22
|
-
(0, decorators_1.SentenceCase)(),
|
|
23
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], ContactPerson.prototype, "name", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, class_validator_1.IsPhoneNumber)(),
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], ContactPerson.prototype, "phoneNumber", void 0);
|
|
31
|
-
__decorate([
|
|
32
|
-
(0, class_validator_1.IsEmail)(),
|
|
33
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], ContactPerson.prototype, "email", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, class_validator_1.IsString)(),
|
|
38
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], ContactPerson.prototype, "designation", void 0);
|
|
17
|
+
const contact_person_dto_1 = require("../contact-person/contact-person.dto");
|
|
41
18
|
class CreateOrganizationDto {
|
|
42
19
|
}
|
|
43
20
|
exports.CreateOrganizationDto = CreateOrganizationDto;
|
|
@@ -90,6 +67,6 @@ __decorate([
|
|
|
90
67
|
__decorate([
|
|
91
68
|
(0, class_validator_1.IsNotEmpty)(),
|
|
92
69
|
(0, class_validator_1.ValidateNested)(),
|
|
93
|
-
(0, class_transformer_1.Type)(() =>
|
|
94
|
-
__metadata("design:type",
|
|
70
|
+
(0, class_transformer_1.Type)(() => contact_person_dto_1.ContactPersonDto),
|
|
71
|
+
__metadata("design:type", contact_person_dto_1.ContactPersonDto)
|
|
95
72
|
], CreateOrganizationDto.prototype, "contactPerson", void 0);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ContactPersonDto } from "../dtos/contact-person/contact-person.dto";
|
|
2
|
+
import { MapAddressDto } from "../dtos/location/map-address.dto";
|
|
3
|
+
export interface Organization {
|
|
4
|
+
id: number;
|
|
5
|
+
name: string;
|
|
6
|
+
phoneNumber: string;
|
|
7
|
+
email: string;
|
|
8
|
+
physicalAddress: MapAddressDto;
|
|
9
|
+
website: string;
|
|
10
|
+
type: string;
|
|
11
|
+
description: string;
|
|
12
|
+
status: string;
|
|
13
|
+
logo: string;
|
|
14
|
+
contactPerson: ContactPersonDto;
|
|
15
|
+
partnerIds: number[];
|
|
16
|
+
}
|