grm-shared-library 1.1.183 → 1.1.185
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/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/modules/auth/dtos/login-mobile-user.dto.js +15 -3
- package/dist/cjs/modules/auth/dtos/login-mobile-user.dto.js.map +1 -1
- package/dist/cjs/modules/auth/dtos/register-mobile-user.dto.js +15 -3
- package/dist/cjs/modules/auth/dtos/register-mobile-user.dto.js.map +1 -1
- package/dist/cjs/modules/auth/dtos/register.dto.js +15 -3
- package/dist/cjs/modules/auth/dtos/register.dto.js.map +1 -1
- package/dist/cjs/modules/auth/dtos/resend-otp.dto.js +15 -3
- package/dist/cjs/modules/auth/dtos/resend-otp.dto.js.map +1 -1
- package/dist/cjs/modules/auth/dtos/send-otp.dto.js +15 -3
- package/dist/cjs/modules/auth/dtos/send-otp.dto.js.map +1 -1
- package/dist/cjs/modules/phone/index.js +23 -0
- package/dist/cjs/modules/phone/index.js.map +1 -0
- package/dist/cjs/modules/phone/interfaces/normalized-phone.js +3 -0
- package/dist/cjs/modules/phone/interfaces/normalized-phone.js.map +1 -0
- package/dist/cjs/modules/phone/phone.util.js +92 -0
- package/dist/cjs/modules/phone/phone.util.js.map +1 -0
- package/dist/cjs/modules/phone/validators/is-supported-phone-number.decorator.js +39 -0
- package/dist/cjs/modules/phone/validators/is-supported-phone-number.decorator.js.map +1 -0
- package/dist/cjs/modules/user/dtos/create-user.dto.js +15 -3
- package/dist/cjs/modules/user/dtos/create-user.dto.js.map +1 -1
- package/dist/cjs/modules/user/dtos/guardian.dto.js +15 -3
- package/dist/cjs/modules/user/dtos/guardian.dto.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/modules/auth/dtos/login-mobile-user.dto.js +17 -5
- package/dist/esm/modules/auth/dtos/login-mobile-user.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/register-mobile-user.dto.js +17 -5
- package/dist/esm/modules/auth/dtos/register-mobile-user.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/register.dto.js +16 -4
- package/dist/esm/modules/auth/dtos/register.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/resend-otp.dto.js +16 -4
- package/dist/esm/modules/auth/dtos/resend-otp.dto.js.map +1 -1
- package/dist/esm/modules/auth/dtos/send-otp.dto.js +16 -4
- package/dist/esm/modules/auth/dtos/send-otp.dto.js.map +1 -1
- package/dist/esm/modules/phone/index.js +7 -0
- package/dist/esm/modules/phone/index.js.map +1 -0
- package/dist/esm/modules/phone/interfaces/normalized-phone.js +2 -0
- package/dist/esm/modules/phone/interfaces/normalized-phone.js.map +1 -0
- package/dist/esm/modules/phone/phone.util.js +86 -0
- package/dist/esm/modules/phone/phone.util.js.map +1 -0
- package/dist/esm/modules/phone/validators/is-supported-phone-number.decorator.js +36 -0
- package/dist/esm/modules/phone/validators/is-supported-phone-number.decorator.js.map +1 -0
- package/dist/esm/modules/user/dtos/create-user.dto.js +16 -4
- package/dist/esm/modules/user/dtos/create-user.dto.js.map +1 -1
- package/dist/esm/modules/user/dtos/guardian.dto.js +16 -4
- package/dist/esm/modules/user/dtos/guardian.dto.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/modules/auth/dtos/login-mobile-user.dto.d.ts +2 -0
- package/dist/types/modules/auth/dtos/register-mobile-user.dto.d.ts +2 -0
- package/dist/types/modules/auth/dtos/register.dto.d.ts +2 -0
- package/dist/types/modules/auth/dtos/resend-otp.dto.d.ts +2 -0
- package/dist/types/modules/auth/dtos/send-otp.dto.d.ts +2 -0
- package/dist/types/modules/phone/index.d.ts +3 -0
- package/dist/types/modules/phone/interfaces/normalized-phone.d.ts +22 -0
- package/dist/types/modules/phone/phone.util.d.ts +20 -0
- package/dist/types/modules/phone/validators/is-supported-phone-number.decorator.d.ts +12 -0
- package/dist/types/modules/user/dtos/create-user.dto.d.ts +2 -0
- package/dist/types/modules/user/dtos/guardian.dto.d.ts +2 -0
- package/dist/types/modules/user/interfaces/user.d.ts +6 -0
- package/package.json +3 -2
|
@@ -2,11 +2,13 @@ import { UserStatus } from '../enums/user-status.enum';
|
|
|
2
2
|
import { Roles } from '../../role';
|
|
3
3
|
import { GuardianDto } from './guardian.dto';
|
|
4
4
|
import { IncidentAppId } from '../../incident';
|
|
5
|
+
import { CountryCode } from '../../country/enums/country-code.enum';
|
|
5
6
|
export declare class CreateUserDto {
|
|
6
7
|
appId: IncidentAppId;
|
|
7
8
|
name: string;
|
|
8
9
|
email: string;
|
|
9
10
|
phoneNumber?: string;
|
|
11
|
+
countryCode?: CountryCode;
|
|
10
12
|
roles: Roles[];
|
|
11
13
|
password?: string;
|
|
12
14
|
avatar?: string;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { GuardianRelationship } from "../enums/guardian-relationship.enum";
|
|
2
|
+
import { CountryCode } from "../../country/enums/country-code.enum";
|
|
2
3
|
export declare class GuardianDto {
|
|
3
4
|
userId?: number;
|
|
4
5
|
name: string;
|
|
5
6
|
phoneNumber: string;
|
|
7
|
+
countryCode?: CountryCode;
|
|
6
8
|
isPrimary?: boolean;
|
|
7
9
|
relationship?: GuardianRelationship;
|
|
8
10
|
email?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { CountryCode } from "../../country";
|
|
1
2
|
import { IncidentAppId } from "../../incident";
|
|
2
3
|
import { Roles } from "../../role";
|
|
3
4
|
import { UserStatus } from "../enums/user-status.enum";
|
|
@@ -9,6 +10,11 @@ export interface User {
|
|
|
9
10
|
name: string;
|
|
10
11
|
email: string;
|
|
11
12
|
phoneNumber?: string;
|
|
13
|
+
/**
|
|
14
|
+
* ISO 3166-1 alpha-2 country the user's account belongs to (their selected
|
|
15
|
+
* market). Optional for backward compatibility; defaults to KE server-side.
|
|
16
|
+
*/
|
|
17
|
+
countryCode?: CountryCode;
|
|
12
18
|
roles: Roles[];
|
|
13
19
|
password?: string;
|
|
14
20
|
avatar?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "grm-shared-library",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.185",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"build": "npm run clean && npm run build:types && npm run build:cjs && npm run build:esm",
|
|
28
28
|
"prepublishOnly": "npm run build",
|
|
29
29
|
"pretest": "rimraf dist-test",
|
|
30
|
-
"test": "tsc -p tsconfig.spec.json && node dist-test
|
|
30
|
+
"test": "tsc -p tsconfig.spec.json && node --test \"dist-test/**/*.spec.js\""
|
|
31
31
|
},
|
|
32
32
|
"keywords": [],
|
|
33
33
|
"author": "",
|
|
@@ -55,6 +55,7 @@
|
|
|
55
55
|
"express": "^5.1.0",
|
|
56
56
|
"geojson": "^0.5.0",
|
|
57
57
|
"grm-shared-library": "^1.1.101",
|
|
58
|
+
"libphonenumber-js": "^1.13.8",
|
|
58
59
|
"rxjs": "^7.8.2",
|
|
59
60
|
"swagger-ui-express": "^5.0.1"
|
|
60
61
|
},
|