grm-shared-library 1.1.185 → 1.1.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.
@@ -16,6 +16,7 @@ const map_address_dto_1 = require("../../common/dtos/map-address.dto");
16
16
  const org_status_enum_1 = require("../enums/org-status.enum");
17
17
  const contact_person_dto_1 = require("../../common/dtos/contact-person.dto");
18
18
  const org_type_enum_1 = require("../enums/org-type.enum");
19
+ const country_1 = require("../../country");
19
20
  const incident_1 = require("../../incident");
20
21
  const organization_sla_dto_1 = require("./organization-sla.dto");
21
22
  class CreateOrganizationDto {
@@ -64,6 +65,12 @@ __decorate([
64
65
  (0, class_validator_1.IsNotEmpty)(),
65
66
  __metadata("design:type", String)
66
67
  ], CreateOrganizationDto.prototype, "type", void 0);
68
+ __decorate([
69
+ (0, class_validator_1.IsOptional)(),
70
+ (0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.toUpperCase() : value)),
71
+ (0, class_validator_1.IsEnum)(country_1.CountryCode),
72
+ __metadata("design:type", String)
73
+ ], CreateOrganizationDto.prototype, "countryCode", void 0);
67
74
  __decorate([
68
75
  (0, class_validator_1.IsString)(),
69
76
  (0, class_validator_1.IsOptional)(),
@@ -1 +1 @@
1
- {"version":3,"file":"create-organization.dto.js","sourceRoot":"","sources":["../../../../../src/modules/organization/dtos/create-organization.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqI;AACrI,yDAAyC;AACzC,uEAAkE;AAClE,8DAA8D;AAC9D,6EAAwE;AACxE,0DAA0D;AAC1D,6CAA8D;AAC9D,iEAA4D;AAE5D,MAAa,qBAAqB;CAyDjC;AAzDD,sDAyDC;AAtDG;IAFC,IAAA,wBAAM,EAAC,wBAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;oDACS;AAItB;IAFC,IAAA,wBAAM,EAAC,wBAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;4DACiB;AAK9B;IAHC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,CAAC;;mDACA;AAKd;IAHC,IAAA,+BAAa,GAAE;IACf,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,EAAE,CAAC;;0DACO;AAIrB;IAFC,IAAA,yBAAO,GAAE;IACT,IAAA,4BAAU,GAAE;;oDACE;AAKf;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,+BAAa,CAAC;IACzB,IAAA,4BAAU,GAAE;8BACK,+BAAa;8DAAC;AAIhC;IAFC,IAAA,uBAAK,EAAC,EAAE,EAAE,EAAE,OAAO,EAAE,kDAAkD,EAAE,CAAC;IAC1E,IAAA,4BAAU,GAAE;;sDACI;AAIjB;IAFC,IAAA,wBAAM,EAAC,gCAAgB,CAAC;IACxB,IAAA,4BAAU,GAAE;;mDACW;AAIxB;IAFC,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;;0DACQ;AAIrB;IAFC,IAAA,wBAAM,EAAC,oCAAkB,CAAC;IAC1B,IAAA,4BAAU,GAAE;;qDACc;AAI3B;IAFC,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;mDACC;AAKd;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qCAAgB,CAAC;IAC5B,IAAA,4BAAU,GAAE;8BACG,qCAAgB;4DAAC;AAKjC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yCAAkB,CAAC;8BACzB,yCAAkB;kDAAC"}
1
+ {"version":3,"file":"create-organization.dto.js","sourceRoot":"","sources":["../../../../../src/modules/organization/dtos/create-organization.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAqI;AACrI,yDAAoD;AACpD,uEAAkE;AAClE,8DAA8D;AAC9D,6EA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AC1B,IAAA,4BAAU,GAAE;;qDACc;AAI3B;IAFC,IAAA,uBAAK,GAAE;IACP,IAAA,4BAAU,GAAE;;mDACC;AAKd;IAHC,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,qCAAgB,CAAC;IAC5B,IAAA,4BAAU,GAAE;8BACG,qCAAgB;4DAAC;AAKjC;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,gCAAc,GAAE;IAChB,IAAA,wBAAI,EAAC,GAAG,EAAE,CAAC,yCAAkB,CAAC;8BACzB,yCAAkB;kDAAC"}
@@ -8,11 +8,12 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import { IsEmail, IsEnum, IsNotEmpty, IsOptional, IsPhoneNumber, IsString, IsUrl, MaxLength, ValidateNested } from "class-validator";
11
- import { Type } from "class-transformer";
11
+ import { Transform, Type } from "class-transformer";
12
12
  import { MapAddressDto } from "../../common/dtos/map-address.dto";
13
13
  import { OrganizationStatus } from "../enums/org-status.enum";
14
14
  import { ContactPersonDto } from "../../common/dtos/contact-person.dto";
15
15
  import { OrganizationType } from "../enums/org-type.enum";
16
+ import { CountryCode } from "../../country";
16
17
  import { IncidentAppId, IncidentClass } from "../../incident";
17
18
  import { OrganizationSLADto } from "./organization-sla.dto";
18
19
  export class CreateOrganizationDto {
@@ -60,6 +61,12 @@ __decorate([
60
61
  IsNotEmpty(),
61
62
  __metadata("design:type", String)
62
63
  ], CreateOrganizationDto.prototype, "type", void 0);
64
+ __decorate([
65
+ IsOptional(),
66
+ Transform(({ value }) => (typeof value === 'string' ? value.toUpperCase() : value)),
67
+ IsEnum(CountryCode),
68
+ __metadata("design:type", String)
69
+ ], CreateOrganizationDto.prototype, "countryCode", void 0);
63
70
  __decorate([
64
71
  IsString(),
65
72
  IsOptional(),
@@ -1 +1 @@
1
- {"version":3,"file":"create-organization.d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UAAU,EAAE;;mDACW;AAIxB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;0DACQ;AAIrB;IAFC,MAAM,CAAC,kBAAkB,CAAC;IAC1B,UAAU,EAAE;;qDACc;AAI3B;IAFC,KAAK,EAAE;IACP,UAAU,EAAE;;mDACC;AAKd;IAHC,cAAc,EAAE;IAChB,IAAI,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC;IAC5B,UAAU,EAAE;8BACG,gBAAgB;4DAAC;AAKjC;IAHC,UAAU,EAAE;IACZ,cAAc,EAAE;IAChB,IAAI,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC;8BACzB,kBAAkB;kDAAC"}
1
+ {"version":3,"file":"create-organization.dto.js","sourceRoot":"","sources":["../../../../../src/modules/organization/dtos/create-organization.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACrI,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,OAAO,qBAAqB;CAmEjC;AAhEG;IAFC,MAAM,CAAC,aAAa,CAAC;IACrB,UAAU,EAAE;;oDACS;AAItB;IAFC,MAAM,CAA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from "../enums/org-status.enum";
3
3
  import { ContactPersonDto } from "../../common/dtos/contact-person.dto";
4
4
  import { OrganizationType } from "../enums/org-type.enum";
5
+ import { CountryCode } from "../../country";
5
6
  import { IncidentAppId, IncidentClass } from "../../incident";
6
7
  import { OrganizationSLADto } from "./organization-sla.dto";
7
8
  export declare class CreateOrganizationDto {
@@ -13,6 +14,12 @@ export declare class CreateOrganizationDto {
13
14
  physicalAddress: MapAddressDto;
14
15
  website: string;
15
16
  type: OrganizationType;
17
+ /**
18
+ * Primary operating country (KE/UG/TZ). Optional — the organization service
19
+ * defaults a missing value to KE. Case-insensitive input is upper-cased
20
+ * before validation so 'ke'/'Ke' are accepted.
21
+ */
22
+ countryCode?: CountryCode;
16
23
  description?: string;
17
24
  status?: OrganizationStatus;
18
25
  logo?: string;
@@ -1,5 +1,6 @@
1
1
  import { ContactPerson, MapAddress } from "../../common";
2
2
  import { ControlCentre } from "../../control-centre";
3
+ import { CountryCode } from "../../country";
3
4
  import { IncidentAppId, IncidentClass } from "../../incident";
4
5
  import { OrganizationType } from "../enums/org-type.enum";
5
6
  import { OrganizationSLA } from "./organization-sla";
@@ -13,6 +14,12 @@ export interface Organization {
13
14
  physicalAddress: MapAddress;
14
15
  website: string;
15
16
  type: OrganizationType;
17
+ /**
18
+ * Primary operating country/market of the organization (ISO 3166-1 alpha-2:
19
+ * KE/UG/TZ). Optional here for backward compatibility, but the backend
20
+ * backfills/defaults it to KE, so persisted organizations always carry one.
21
+ */
22
+ countryCode?: CountryCode;
16
23
  description?: string;
17
24
  status?: string;
18
25
  logo?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.1.185",
3
+ "version": "1.1.186",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",