grm-shared-library 1.1.185 → 1.1.187
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/cjs/modules/auth/dtos/register.dto.js +11 -0
- package/dist/cjs/modules/auth/dtos/register.dto.js.map +1 -1
- package/dist/cjs/modules/organization/dtos/create-organization.dto.js +7 -0
- package/dist/cjs/modules/organization/dtos/create-organization.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/register.dto.js +12 -1
- package/dist/esm/modules/auth/dtos/register.dto.js.map +1 -1
- package/dist/esm/modules/organization/dtos/create-organization.dto.js +8 -1
- package/dist/esm/modules/organization/dtos/create-organization.dto.js.map +1 -1
- package/dist/types/modules/auth/dtos/register.dto.d.ts +1 -0
- package/dist/types/modules/organization/dtos/create-organization.dto.d.ts +7 -0
- package/dist/types/modules/organization/interfaces/organization.d.ts +7 -0
- package/package.json +1 -1
|
@@ -169,4 +169,15 @@ __decorate([
|
|
|
169
169
|
(0, class_validator_1.IsNotEmpty)(),
|
|
170
170
|
__metadata("design:type", String)
|
|
171
171
|
], RegisterDto.prototype, "orgType", void 0);
|
|
172
|
+
__decorate([
|
|
173
|
+
(0, swagger_1.ApiPropertyOptional)({
|
|
174
|
+
description: "Primary operating country of the organization being registered (ISO 3166-1 alpha-2: KE, UG, TZ). Optional — defaults to KE. This is the organization's operating market and is DISTINCT from the phone/account countryCode above.",
|
|
175
|
+
enum: country_code_enum_1.CountryCode,
|
|
176
|
+
example: country_code_enum_1.CountryCode.KE
|
|
177
|
+
}),
|
|
178
|
+
(0, class_validator_1.IsOptional)(),
|
|
179
|
+
(0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.toUpperCase() : value)),
|
|
180
|
+
(0, class_validator_1.IsEnum)(country_code_enum_1.CountryCode),
|
|
181
|
+
__metadata("design:type", String)
|
|
182
|
+
], RegisterDto.prototype, "orgCountryCode", void 0);
|
|
172
183
|
//# sourceMappingURL=register.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/register.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmJ;AACnJ,6CAAmE;AACnE,yCAA6C;AAC7C,qCAAmC;AACnC,yEAAmE;AACnE,sFAAqG;AACrG,
|
|
1
|
+
{"version":3,"file":"register.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/register.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAmJ;AACnJ,6CAAmE;AACnE,yCAA6C;AAC7C,qCAAmC;AACnC,yEAAmE;AACnE,sFAAqG;AACrG,yDAAoD;AACpD,0EAA0E;AAC1E,6CAA8D;AAC9D,6EAAoE;AACpE,oHAAoG;AAEpG,MAAa,WAAW;CA8IvB;AA9ID,kCA8IC;AAtIG;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,4CAA4C;QACzD,IAAI,EAAE,wBAAa;QACnB,OAAO,EAAE,wBAAa,CAAC,GAAG;KAC7B,CAAC;IACD,IAAA,wBAAM,EAAC,wBAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;0CACS;AAStB;IAPC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,4CAA4C;QACzD,IAAI,EAAE,wBAAa;QACnB,OAAO,EAAE,wBAAa,CAAC,QAAQ;KAClC,CAAC;IACD,IAAA,wBAAM,EAAC,wBAAa,CAAC;IACrB,IAAA,4BAAU,GAAE;;kDACiB;AAa9B;IAXC,IAAA,qBAAW,EAAC;QACT,WAAW,EAAE,uBAAuB;QACpC,OAAO,EAAE,UAAU;QACnB,SAAS,EAAE,CAAC;QACZ,SAAS,EAAE,EAAE;KAChB,CAAC;IACD,IAAA,0BAAQ,GAAE;IACV,IAAA,4BAAU,GAAE;IACZ,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,2BAAS,EAAC,EAAE,CAAC;IACb,IAAA,8BAAY,GAAE;;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AAE,+BAAW;QACjB,OAAO,EAAE,+BAAW,CAAC,EAAE;KAC1B,CAAC;IACD,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnF,IAAA,wBAAM,EAAC,+BAAW,CAAC;;mDACS"}
|
|
@@ -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,
|
|
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,6EAAwE;AACxE,0DAA0D;AAC1D,2CAA4C;AAC5C,6CAA8D;AAC9D,iEAA4D;AAE5D,MAAa,qBAAqB;CAmEjC;AAnED,sDAmEC;AAhEG;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;AAUxB;IAHC,IAAA,4BAAU,GAAE;IACZ,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnF,IAAA,wBAAM,EAAC,qBAAW,CAAC;;0DACM;AAI1B;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"}
|
|
@@ -13,7 +13,7 @@ import { MapAddressDto } from "../../common";
|
|
|
13
13
|
import { Roles } from "../../role";
|
|
14
14
|
import { SentenceCase } from "../../../decorators/case-decorators";
|
|
15
15
|
import { PASSWORD_ERROR_MESSAGE, PASSWORD_REGEX } from "../../common/constants/password-regex.const";
|
|
16
|
-
import { Type } from "class-transformer";
|
|
16
|
+
import { Transform, Type } from "class-transformer";
|
|
17
17
|
import { OrganizationType } from "../../organization/enums/org-type.enum";
|
|
18
18
|
import { IncidentAppId, IncidentClass } from "../../incident";
|
|
19
19
|
import { CountryCode } from "../../country/enums/country-code.enum";
|
|
@@ -165,4 +165,15 @@ __decorate([
|
|
|
165
165
|
IsNotEmpty(),
|
|
166
166
|
__metadata("design:type", String)
|
|
167
167
|
], RegisterDto.prototype, "orgType", void 0);
|
|
168
|
+
__decorate([
|
|
169
|
+
ApiPropertyOptional({
|
|
170
|
+
description: "Primary operating country of the organization being registered (ISO 3166-1 alpha-2: KE, UG, TZ). Optional — defaults to KE. This is the organization's operating market and is DISTINCT from the phone/account countryCode above.",
|
|
171
|
+
enum: CountryCode,
|
|
172
|
+
example: CountryCode.KE
|
|
173
|
+
}),
|
|
174
|
+
IsOptional(),
|
|
175
|
+
Transform(({ value }) => (typeof value === 'string' ? value.toUpperCase() : value)),
|
|
176
|
+
IsEnum(CountryCode),
|
|
177
|
+
__metadata("design:type", String)
|
|
178
|
+
], RegisterDto.prototype, "orgCountryCode", void 0);
|
|
168
179
|
//# sourceMappingURL=register.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/register.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnJ,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"register.dto.js","sourceRoot":"","sources":["../../../../../src/modules/auth/dtos/register.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnJ,OAAO,EAAE,WAAW,EAAE,mBAAmB,EA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eof 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.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,IAAI,EAAE,MAAM,mBAAmB,CAAC;
|
|
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,CAAC,aAAa,CAAC;IACrB,UAAU,EAAE;;4DACiB;AAK9B;IAHC,QAAQ,EAAE;IACV,UAAU,EAAE;IACZ,SAAS,CAAC,EAAE,CAAC;;mDACA;AAKd;IAHC,aAAa,EAAE;IACf,UAAU,EAAE;IACZ,SAAS,CAAC,EAAE,CAAC;;0DACO;AAIrB;IAFC,OAAO,EAAE;IACT,UAAU,EAAE;;oDACE;AAKf;IAHC,cAAc,EAAE;IAChB,IAAI,CAAC,GAAG,EAAE,CAAC,aAAa,CAAC;IACzB,UAAU,EAAE;8BACK,aAAa;8DAAC;AAIhC;IAFC,KAAK,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,kDAAkD,EAAE,CAAC;IAC1E,UAAU,EAAE;;sDACI;AAIjB;IAFC,MAAM,CAAC,gBAAgB,CAAC;IACxB,UAAU,EAAE;;mDACW;AAUxB;IAHC,UAAU,EAAE;IACZ,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACnF,MAAM,CAAC,WAAW,CAAC;;0DACM;AAI1B;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"}
|
|
@@ -2,6 +2,7 @@ import { MapAddressDto } from "../../common/dtos/map-address.dto";
|
|
|
2
2
|
import { OrganizationStatus } 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;
|