grm-shared-library 1.0.3 → 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.
@@ -0,0 +1,6 @@
1
+ export declare class ContactPersonDto {
2
+ name: string;
3
+ phoneNumber: string;
4
+ email: string;
5
+ designation: string;
6
+ }
@@ -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
- declare class ContactPerson {
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: 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
- class ContactPerson {
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;
@@ -58,10 +35,8 @@ __decorate([
58
35
  ], CreateOrganizationDto.prototype, "email", void 0);
59
36
  __decorate([
60
37
  (0, class_validator_1.ValidateNested)(),
61
- (0, class_transformer_1.Type)(() => map_address_dto_1.MapAddressDto)
62
- //@IsNotEmpty()
63
- ,
64
- (0, class_validator_1.IsOptional)(),
38
+ (0, class_transformer_1.Type)(() => map_address_dto_1.MapAddressDto),
39
+ (0, class_validator_1.IsNotEmpty)(),
65
40
  __metadata("design:type", map_address_dto_1.MapAddressDto)
66
41
  ], CreateOrganizationDto.prototype, "physicalAddress", void 0);
67
42
  __decorate([
@@ -90,8 +65,8 @@ __decorate([
90
65
  __metadata("design:type", String)
91
66
  ], CreateOrganizationDto.prototype, "logo", void 0);
92
67
  __decorate([
93
- (0, class_validator_1.IsOptional)(),
68
+ (0, class_validator_1.IsNotEmpty)(),
94
69
  (0, class_validator_1.ValidateNested)(),
95
- (0, class_transformer_1.Type)(() => ContactPerson),
96
- __metadata("design:type", ContactPerson)
70
+ (0, class_transformer_1.Type)(() => contact_person_dto_1.ContactPersonDto),
71
+ __metadata("design:type", contact_person_dto_1.ContactPersonDto)
97
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export interface User {
2
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [