grm-shared-library 1.1.204 → 1.1.206
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/exceptions/filters/http-exceptions.filter.js +19 -2
- package/dist/cjs/exceptions/filters/http-exceptions.filter.js.map +1 -1
- package/dist/cjs/modules/common/decorators/calendar-date.decorator.js +59 -0
- package/dist/cjs/modules/common/decorators/calendar-date.decorator.js.map +1 -0
- package/dist/cjs/modules/common/index.js +2 -0
- package/dist/cjs/modules/common/index.js.map +1 -1
- package/dist/cjs/modules/common/utils/calendar-date.util.js +148 -0
- package/dist/cjs/modules/common/utils/calendar-date.util.js.map +1 -0
- package/dist/cjs/modules/partner/dtos/partner-member-profile.dto.js +2 -3
- package/dist/cjs/modules/partner/dtos/partner-member-profile.dto.js.map +1 -1
- package/dist/cjs/modules/partner/index.js +1 -0
- package/dist/cjs/modules/partner/index.js.map +1 -1
- package/dist/cjs/modules/partner/interfaces/partner-member-readiness.js +3 -0
- package/dist/cjs/modules/partner/interfaces/partner-member-readiness.js.map +1 -0
- package/dist/cjs/modules/partner/utils/partner-membership.util.js +23 -31
- package/dist/cjs/modules/partner/utils/partner-membership.util.js.map +1 -1
- package/dist/cjs/modules/partner/utils/partner-payload.util.js +25 -8
- package/dist/cjs/modules/partner/utils/partner-payload.util.js.map +1 -1
- package/dist/cjs/modules/role/data/roles.data.js +42 -4
- package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
- package/dist/cjs/modules/user/dtos/create-user.dto.js +10 -0
- package/dist/cjs/modules/user/dtos/create-user.dto.js.map +1 -1
- package/dist/esm/exceptions/filters/http-exceptions.filter.js +19 -2
- package/dist/esm/exceptions/filters/http-exceptions.filter.js.map +1 -1
- package/dist/esm/modules/common/decorators/calendar-date.decorator.js +55 -0
- package/dist/esm/modules/common/decorators/calendar-date.decorator.js.map +1 -0
- package/dist/esm/modules/common/index.js +2 -0
- package/dist/esm/modules/common/index.js.map +1 -1
- package/dist/esm/modules/common/utils/calendar-date.util.js +140 -0
- package/dist/esm/modules/common/utils/calendar-date.util.js.map +1 -0
- package/dist/esm/modules/partner/dtos/partner-member-profile.dto.js +2 -3
- package/dist/esm/modules/partner/dtos/partner-member-profile.dto.js.map +1 -1
- package/dist/esm/modules/partner/index.js +1 -0
- package/dist/esm/modules/partner/index.js.map +1 -1
- package/dist/esm/modules/partner/interfaces/partner-member-readiness.js +2 -0
- package/dist/esm/modules/partner/interfaces/partner-member-readiness.js.map +1 -0
- package/dist/esm/modules/partner/utils/partner-membership.util.js +25 -28
- package/dist/esm/modules/partner/utils/partner-membership.util.js.map +1 -1
- package/dist/esm/modules/partner/utils/partner-payload.util.js +25 -9
- package/dist/esm/modules/partner/utils/partner-payload.util.js.map +1 -1
- package/dist/esm/modules/role/data/roles.data.js +42 -4
- package/dist/esm/modules/role/data/roles.data.js.map +1 -1
- package/dist/esm/modules/user/dtos/create-user.dto.js +10 -0
- package/dist/esm/modules/user/dtos/create-user.dto.js.map +1 -1
- package/dist/types/modules/common/decorators/calendar-date.decorator.d.ts +26 -0
- package/dist/types/modules/common/index.d.ts +2 -0
- package/dist/types/modules/common/utils/calendar-date.util.d.ts +80 -0
- package/dist/types/modules/partner/dtos/partner-member-profile.dto.d.ts +8 -1
- package/dist/types/modules/partner/index.d.ts +1 -0
- package/dist/types/modules/partner/interfaces/partner-member-readiness.d.ts +60 -0
- package/dist/types/modules/partner/utils/partner-membership.util.d.ts +17 -6
- package/dist/types/modules/partner/utils/partner-payload.util.d.ts +11 -10
- package/dist/types/modules/user/dtos/create-user.dto.d.ts +1 -0
- package/dist/types/modules/user/interfaces/user.d.ts +10 -0
- package/package.json +1 -1
|
@@ -303,7 +303,7 @@ export const ROLES_DATA = [
|
|
|
303
303
|
},
|
|
304
304
|
{
|
|
305
305
|
name: Roles.RESPONDER,
|
|
306
|
-
description: 'Responder: Respond to Incidents',
|
|
306
|
+
description: 'Responder: Respond to Incidents, raise support tickets',
|
|
307
307
|
permissions: [
|
|
308
308
|
//Organization
|
|
309
309
|
PermissionActions.READ_ORGANIZATION,
|
|
@@ -324,12 +324,31 @@ export const ROLES_DATA = [
|
|
|
324
324
|
//Incident Category Type
|
|
325
325
|
PermissionActions.READ_INCIDENT_CATEGORY_TYPE,
|
|
326
326
|
//Response Unit
|
|
327
|
-
PermissionActions.READ_RESPONSE_UNIT
|
|
327
|
+
PermissionActions.READ_RESPONSE_UNIT,
|
|
328
|
+
//Support - the CUSTOMER surface only.
|
|
329
|
+
//
|
|
330
|
+
//These five are what the gateway's customer support controller
|
|
331
|
+
//guards, and nothing more: raise a ticket, read your own, reply to
|
|
332
|
+
//it, close it, reopen it. CREATE_SUPPORT_TICKET also covers rating
|
|
333
|
+
//and the customer's own feedback thread.
|
|
334
|
+
//
|
|
335
|
+
//They are NOT an agent grant. The same permission names appear on
|
|
336
|
+
//the admin controller, but clarion-support scopes a caller whose
|
|
337
|
+
//context says isMobileUser to their own records and never shows
|
|
338
|
+
//them an internal note - see TenantContextService.getEffectiveScope
|
|
339
|
+
//and mayReadInternalNotes. Deliberately absent: NOTE (internal
|
|
340
|
+
//notes), ASSIGN, CHANGE_STATUS and CHANGE_PRIORITY, which the
|
|
341
|
+
//service refuses to a non-staff caller anyway.
|
|
342
|
+
PermissionActions.CREATE_SUPPORT_TICKET,
|
|
343
|
+
PermissionActions.READ_SUPPORT_TICKET,
|
|
344
|
+
PermissionActions.REPLY_SUPPORT_TICKET,
|
|
345
|
+
PermissionActions.CLOSE_SUPPORT_TICKET,
|
|
346
|
+
PermissionActions.REOPEN_SUPPORT_TICKET
|
|
328
347
|
]
|
|
329
348
|
},
|
|
330
349
|
{
|
|
331
350
|
name: Roles.MOBILE_USER,
|
|
332
|
-
description: 'Mobile User: Create Incidents',
|
|
351
|
+
description: 'Mobile User: Create Incidents, raise support tickets',
|
|
333
352
|
permissions: [
|
|
334
353
|
//Organization
|
|
335
354
|
PermissionActions.READ_ORGANIZATION,
|
|
@@ -348,7 +367,26 @@ export const ROLES_DATA = [
|
|
|
348
367
|
//Incident Category Type
|
|
349
368
|
PermissionActions.READ_INCIDENT_CATEGORY_TYPE,
|
|
350
369
|
//Response Unit
|
|
351
|
-
PermissionActions.READ_RESPONSE_UNIT
|
|
370
|
+
PermissionActions.READ_RESPONSE_UNIT,
|
|
371
|
+
//Support - the CUSTOMER surface only.
|
|
372
|
+
//
|
|
373
|
+
//These five are what the gateway's customer support controller
|
|
374
|
+
//guards, and nothing more: raise a ticket, read your own, reply to
|
|
375
|
+
//it, close it, reopen it. CREATE_SUPPORT_TICKET also covers rating
|
|
376
|
+
//and the customer's own feedback thread.
|
|
377
|
+
//
|
|
378
|
+
//They are NOT an agent grant. The same permission names appear on
|
|
379
|
+
//the admin controller, but clarion-support scopes a caller whose
|
|
380
|
+
//context says isMobileUser to their own records and never shows
|
|
381
|
+
//them an internal note - see TenantContextService.getEffectiveScope
|
|
382
|
+
//and mayReadInternalNotes. Deliberately absent: NOTE (internal
|
|
383
|
+
//notes), ASSIGN, CHANGE_STATUS and CHANGE_PRIORITY, which the
|
|
384
|
+
//service refuses to a non-staff caller anyway.
|
|
385
|
+
PermissionActions.CREATE_SUPPORT_TICKET,
|
|
386
|
+
PermissionActions.READ_SUPPORT_TICKET,
|
|
387
|
+
PermissionActions.REPLY_SUPPORT_TICKET,
|
|
388
|
+
PermissionActions.CLOSE_SUPPORT_TICKET,
|
|
389
|
+
PermissionActions.REOPEN_SUPPORT_TICKET
|
|
352
390
|
]
|
|
353
391
|
}
|
|
354
392
|
];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles.data.js","sourceRoot":"","sources":["../../../../../src/modules/role/data/roles.data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,MAAM,CAAC,MAAM,UAAU,GAAW;IAC9B;QACI,IAAI,EAAE,KAAK,CAAC,WA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B,CAAC,oBAAoB;SACzC;KACJ;IACD;QACI,IAAI,EAAE,KAAK,CAAC,mBAAmB;QAC/B,WAAW,EAAE,uEAAuE;QACpF,WAAW,EAAE;YACT,cAAc;YACd,iBAAiB,CAAC,iBAAiB;YACnC,gEAAgE;YAChE,oEAAoE;YACpE,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,wBAAwB;YAC1C,iBAAiB,CAAC,uBAAuB;YACzC,gBAAgB;YAChB,iBAAiB,CAAC,mBAAmB;YACrC,MAAM;YACN,iBAAiB,CAAC,SAAS;YAC3B,MAAM;YACN,iBAAiB,CAAC,SAAS;YAC3B,MAAM;YACN,iBAAiB,CAAC,SAAS;YAC3B,+DAA+D;YAC/D,oEAAoE;YACpE,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,mBAAmB;YACrC,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,oBAAoB;YACtC,iBAAiB,CAAC,mBAAmB;YACrC,iBAAiB,CAAC,4BAA4B;YAC9C,iBAAiB,CAAC,8BAA8B;YAChD,iBAAiB,CAAC,oBAAoB;YACtC,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,qBAAqB;YACvC,UAAU;YACV,iBAAiB,CAAC,eAAe;YACjC,iBAAiB,CAAC,aAAa;YAC/B,iBAAiB,CAAC,eAAe;YACjC,wBAAwB;YACxB,iBAAiB,CAAC,2BAA2B;YAC7C,eAAe;YACf,iBAAiB,CAAC,kBAAkB;SACvC;KACJ;IACD;QACI,IAAI,EAAE,KAAK,CAAC,SAAS;QACrB,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"roles.data.js","sourceRoot":"","sources":["../../../../../src/modules/role/data/roles.data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAG3C,MAAM,CAAC,MAAM,UAAU,GAAW;IAC9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D,+CAA+C;YAC/C,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,mBAAmB;YACrC,iBAAiB,CAAC,oBAAoB;YACtC,iBAAiB,CAAC,oBAAoB;YACtC,iBAAiB,CAAC,qBAAqB;SAC1C;KACJ;CACJ,CAAC"}
|
|
@@ -18,6 +18,7 @@ import { GuardianDto } from './guardian.dto';
|
|
|
18
18
|
import { IncidentAppId } from '../../incident';
|
|
19
19
|
import { CountryCode } from '../../country/enums/country-code.enum';
|
|
20
20
|
import { IsSupportedPhoneNumber } from '../../phone/validators/is-supported-phone-number.decorator';
|
|
21
|
+
import { IsBirthDate } from '../../common/decorators/calendar-date.decorator';
|
|
21
22
|
export class CreateUserDto {
|
|
22
23
|
}
|
|
23
24
|
__decorate([
|
|
@@ -150,4 +151,13 @@ __decorate([
|
|
|
150
151
|
IsNotEmpty(),
|
|
151
152
|
__metadata("design:type", Number)
|
|
152
153
|
], CreateUserDto.prototype, "organizationId", void 0);
|
|
154
|
+
__decorate([
|
|
155
|
+
ApiPropertyOptional({
|
|
156
|
+
description: 'Date of birth as a calendar date. Required by some emergency-response partners to register the person as a member; never used to gate access.',
|
|
157
|
+
example: '1990-04-17',
|
|
158
|
+
}),
|
|
159
|
+
IsOptional(),
|
|
160
|
+
IsBirthDate(),
|
|
161
|
+
__metadata("design:type", String)
|
|
162
|
+
], CreateUserDto.prototype, "dateOfBirth", void 0);
|
|
153
163
|
//# sourceMappingURL=create-user.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-user.dto.js","sourceRoot":"","sources":["../../../../../src/modules/user/dtos/create-user.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACH,aAAa,EACb,OAAO,EACP,SAAS,EACT,MAAM,EACN,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,4DAA4D,CAAC;
|
|
1
|
+
{"version":3,"file":"create-user.dto.js","sourceRoot":"","sources":["../../../../../src/modules/user/dtos/create-user.dto.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACH,aAAa,EACb,OAAO,EACP,SAAS,EACT,MAAM,EACN,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,cAAc,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,E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AAC;IACD,UAAU,EAAE;IACZ,WAAW,EAAE;;kDACO"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ValidationOptions } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Validates a `YYYY-MM-DD` calendar date on a DTO.
|
|
4
|
+
*
|
|
5
|
+
* Exists so the rule has ONE definition. Before this decorator the same regex
|
|
6
|
+
* was written out by hand in three DTOs and one utility, and they had already
|
|
7
|
+
* drifted apart - a `@Matches` regex accepts `2026-02-30`, which Postgres then
|
|
8
|
+
* quietly rolls forward to 1 March.
|
|
9
|
+
*
|
|
10
|
+
* A decorator alone guarantees nothing on this platform, and that is not a
|
|
11
|
+
* theoretical caveat: clarion-authentication registers no global ValidationPipe
|
|
12
|
+
* at all, the spreadsheet importer builds plain objects the pipe never sees,
|
|
13
|
+
* and internal service-to-service calls bypass HTTP entirely. Any service that
|
|
14
|
+
* OWNS a date of birth must re-check it in the service layer with
|
|
15
|
+
* `isCalendarDate` / `isPlausibleBirthDate`, the way `UserService.updateCountry`
|
|
16
|
+
* re-checks `isSupportedCountryCode`.
|
|
17
|
+
*/
|
|
18
|
+
export declare function IsCalendarDate(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
|
|
19
|
+
/**
|
|
20
|
+
* A calendar date that could belong to a living person.
|
|
21
|
+
*
|
|
22
|
+
* Refuses a future date and one older than any human lifespan, and imposes NO
|
|
23
|
+
* minimum age - dependents on a family membership are children by design, so a
|
|
24
|
+
* minimum would refuse exactly the people the feature exists to cover.
|
|
25
|
+
*/
|
|
26
|
+
export declare function IsBirthDate(validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
|
|
@@ -11,3 +11,5 @@ export * from './constants/service.const';
|
|
|
11
11
|
export * from './services';
|
|
12
12
|
export * from './enums/secrets-fetch-strategy.enum';
|
|
13
13
|
export * from './enums/entity-name.enum';
|
|
14
|
+
export * from './utils/calendar-date.util';
|
|
15
|
+
export * from './decorators/calendar-date.decorator';
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The platform's one definition of a calendar date.
|
|
3
|
+
*
|
|
4
|
+
* A date of birth is a CALENDAR DATE, not an instant. It has no time, no zone
|
|
5
|
+
* and no offset: somebody born on 17 April 1990 was born on that day in Nairobi,
|
|
6
|
+
* in Kampala and in London alike. Every bug this module exists to prevent comes
|
|
7
|
+
* from the same mistake - treating that date as a moment, reading it back in a
|
|
8
|
+
* different zone, and landing a day earlier.
|
|
9
|
+
*
|
|
10
|
+
* That mistake had already been made. Before this module the platform carried
|
|
11
|
+
* four independent copies of the `YYYY-MM-DD` regex and a conversion that did
|
|
12
|
+
* `new Date(freeText)` and then `.toISOString()`. Under `TZ=Africa/Nairobi`,
|
|
13
|
+
* which is what the production pods run:
|
|
14
|
+
*
|
|
15
|
+
* '04/17/1990' -> '1990-04-16' (a day early)
|
|
16
|
+
* new Date(1990,3,17) -> '1990-04-16' (a day early - and this is exactly
|
|
17
|
+
* what a date picker hands you)
|
|
18
|
+
* '17/04/1990' -> undefined (the East African spelling, refused)
|
|
19
|
+
*
|
|
20
|
+
* A birth date that is wrong by a day is worse than one that is missing.
|
|
21
|
+
* Rescue.co cannot delete a member once registered, so a drifted date is
|
|
22
|
+
* permanent, and it is the field a paramedic uses to size a drug dose. So the
|
|
23
|
+
* rule here is deliberately narrow: parse what is unambiguous, refuse
|
|
24
|
+
* everything else, and never guess.
|
|
25
|
+
*/
|
|
26
|
+
/** `YYYY-MM-DD`. The single definition - do not re-declare this anywhere. */
|
|
27
|
+
export declare const ISO_CALENDAR_DATE_PATTERN: RegExp;
|
|
28
|
+
/** Nobody lives longer than this, so anything older is a typo or a placeholder. */
|
|
29
|
+
export declare const MAX_HUMAN_AGE_YEARS = 120;
|
|
30
|
+
/**
|
|
31
|
+
* The age at which a person is treated as an adult, for COPY ONLY.
|
|
32
|
+
*
|
|
33
|
+
* Never a validator. Dependents on a family membership are children by design -
|
|
34
|
+
* that is the entire point of registering them with an emergency responder -
|
|
35
|
+
* so a minimum age would refuse exactly the people the feature exists for.
|
|
36
|
+
*/
|
|
37
|
+
export declare const AGE_OF_MAJORITY_YEARS = 18;
|
|
38
|
+
/**
|
|
39
|
+
* A real `YYYY-MM-DD` day, not merely a string shaped like one.
|
|
40
|
+
*
|
|
41
|
+
* Rejects `2026-02-30` and `2026-13-01`: the shape is right and the day does
|
|
42
|
+
* not exist. Parsed at UTC midnight so the check cannot depend on where it runs.
|
|
43
|
+
*/
|
|
44
|
+
export declare function isCalendarDate(value: unknown): value is string;
|
|
45
|
+
/**
|
|
46
|
+
* Reduce a stored or submitted value to a calendar date, or refuse it.
|
|
47
|
+
*
|
|
48
|
+
* Accepts exactly three things, and nothing else:
|
|
49
|
+
*
|
|
50
|
+
* 1. `YYYY-MM-DD` - the wire format every client must send
|
|
51
|
+
* 2. a full ISO-8601 instant in UTC - `1990-04-17T00:00:00.000Z`, which is
|
|
52
|
+
* what the spreadsheet importer produces
|
|
53
|
+
* 3. a `Date` - read in UTC, so callers must build it
|
|
54
|
+
* with `Date.UTC`, never `new Date(y,m,d)`
|
|
55
|
+
*
|
|
56
|
+
* Free text is REFUSED rather than guessed at. `'04/17/1990'` and `'17/04/1990'`
|
|
57
|
+
* are the same eight characters in different orders and the platform serves
|
|
58
|
+
* Kenya, Uganda and Tanzania, where the second spelling is the common one.
|
|
59
|
+
* There is no reading of that string that is safe to infer, so the honest
|
|
60
|
+
* answer is `undefined` - which surfaces as a field the operator is asked to
|
|
61
|
+
* collect, instead of a wrong birthday nobody ever notices.
|
|
62
|
+
*/
|
|
63
|
+
export declare function toCalendarDate(value: Date | string | null | undefined): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* A date that could belong to a living person.
|
|
66
|
+
*
|
|
67
|
+
* Deliberately NOT an age gate. There is no minimum: a dependent on a family
|
|
68
|
+
* membership may be a newborn. What it refuses is a date that cannot be a birth
|
|
69
|
+
* date at all - one in the future, or one further back than any human lifespan -
|
|
70
|
+
* because those are data-entry accidents (a 2026 default on a picker, a
|
|
71
|
+
* mis-keyed century) rather than facts about a person.
|
|
72
|
+
*
|
|
73
|
+
* `now` is injectable so the rule is deterministic under test, matching
|
|
74
|
+
* `isUsableMembership` and `isMembershipCoverActive`.
|
|
75
|
+
*/
|
|
76
|
+
export declare function isPlausibleBirthDate(value: unknown, now?: Date): boolean;
|
|
77
|
+
/** Whole years, UTC throughout. Returns undefined when the date is unusable. */
|
|
78
|
+
export declare function calculateAge(value: unknown, now?: Date): number | undefined;
|
|
79
|
+
/** True when the person is below the age of majority - for COPY, never a gate. */
|
|
80
|
+
export declare function isMinor(value: unknown, now?: Date): boolean;
|
|
@@ -18,7 +18,14 @@ export declare class PartnerMemberProfileDto {
|
|
|
18
18
|
*/
|
|
19
19
|
phoneNumber?: string;
|
|
20
20
|
email?: string;
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* `YYYY-MM-DD`. A calendar date, never a timestamp.
|
|
23
|
+
*
|
|
24
|
+
* `@IsBirthDate` rather than a regex: the regex this replaces accepted
|
|
25
|
+
* `2026-02-30` and `2999-01-01` - a day that does not exist, and one that
|
|
26
|
+
* has not happened yet - and Postgres rolls the first quietly forward to
|
|
27
|
+
* 1 March.
|
|
28
|
+
*/
|
|
22
29
|
dateOfBirth?: string;
|
|
23
30
|
gender?: PartnerMemberGender;
|
|
24
31
|
documentType?: PartnerMemberDocumentType;
|
|
@@ -31,6 +31,7 @@ export * from './interfaces/partner-connection-test-result';
|
|
|
31
31
|
export * from './interfaces/partner-dispatch-events';
|
|
32
32
|
export * from './interfaces/partner-member-profile';
|
|
33
33
|
export * from './interfaces/partner-membership-descriptor';
|
|
34
|
+
export * from './interfaces/partner-member-readiness';
|
|
34
35
|
export * from './interfaces/partner-membership';
|
|
35
36
|
export * from './constants/partner-defaults.const';
|
|
36
37
|
export * from './constants/partner-kafka.const';
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { PartnerMemberProfileFieldDescriptor } from './partner-membership-descriptor';
|
|
2
|
+
/**
|
|
3
|
+
* One thing still standing between a person and cover with a partner, described
|
|
4
|
+
* well enough for any client to render an input for it without knowing which
|
|
5
|
+
* partner asked.
|
|
6
|
+
*
|
|
7
|
+
* Carries the DESCRIPTOR and the REASON, and deliberately never the value that
|
|
8
|
+
* is already held. A prompt exists to collect what is missing; sending back
|
|
9
|
+
* what is already stored would put a date of birth into a mobile response, a
|
|
10
|
+
* browser cache and any log that captured it, to redisplay a fact the person
|
|
11
|
+
* supplied themselves.
|
|
12
|
+
*/
|
|
13
|
+
export interface PartnerMemberRequirement extends PartnerMemberProfileFieldDescriptor {
|
|
14
|
+
/**
|
|
15
|
+
* MISSING needs the fact collected; MALFORMED needs it corrected. An
|
|
16
|
+
* operator shown "missing" for a field that is plainly filled in has
|
|
17
|
+
* nothing to act on.
|
|
18
|
+
*/
|
|
19
|
+
reason: 'MISSING' | 'MALFORMED';
|
|
20
|
+
/** Why this specific value was refused, where that can be said usefully. */
|
|
21
|
+
detail?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Whether the platform could register this person with the partners that cover
|
|
25
|
+
* them, and what it still needs if not.
|
|
26
|
+
*
|
|
27
|
+
* The contract behind every capture prompt in the product - the mobile sheet,
|
|
28
|
+
* the admin worklist, the beneficiary form. All of them render THIS rather than
|
|
29
|
+
* a hardcoded date-of-birth field, which is what keeps the feature honest as
|
|
30
|
+
* partners are added: a second partner wanting a national id number is a
|
|
31
|
+
* descriptor edit in one adapter, not an app release.
|
|
32
|
+
*/
|
|
33
|
+
export interface PartnerMemberReadiness {
|
|
34
|
+
subjectReference: string;
|
|
35
|
+
/** True when nothing is outstanding - either satisfied, or nobody needs anything. */
|
|
36
|
+
ready: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Names of the partners that want something, for copy like "Rescue.co needs
|
|
39
|
+
* your date of birth". Empty when nothing is outstanding.
|
|
40
|
+
*/
|
|
41
|
+
awaitingPartnerNames: string[];
|
|
42
|
+
/**
|
|
43
|
+
* Merged across every partner covering this person and de-duplicated by
|
|
44
|
+
* key, because two partners both wanting a date of birth is one question to
|
|
45
|
+
* ask, not two.
|
|
46
|
+
*/
|
|
47
|
+
requirements: PartnerMemberRequirement[];
|
|
48
|
+
/**
|
|
49
|
+
* True when the person was asked and declined. Kept so "declined" can be
|
|
50
|
+
* told apart from "never asked" - without it a dismissed prompt is
|
|
51
|
+
* indistinguishable from a bug, and the only safe response to either is to
|
|
52
|
+
* ask again, forever.
|
|
53
|
+
*/
|
|
54
|
+
declined?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/** Readiness for a person and, where they have them, their dependents. */
|
|
57
|
+
export interface PartnerMemberReadinessResult {
|
|
58
|
+
subject: PartnerMemberReadiness;
|
|
59
|
+
dependents: PartnerMemberReadiness[];
|
|
60
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isCalendarDate, toCalendarDate } from '../../common/utils/calendar-date.util';
|
|
1
2
|
import { PartnerMemberProfileField } from '../enums/partner-member-profile-field.enum';
|
|
2
3
|
import { PartnerMembershipStatus } from '../enums/partner-membership-status.enum';
|
|
3
4
|
import { PartnerMembershipSubjectType } from '../enums/partner-membership-subject-type.enum';
|
|
@@ -86,16 +87,26 @@ export declare function membershipRequired(integration: {
|
|
|
86
87
|
* retried forever against a value that will never become valid.
|
|
87
88
|
*/
|
|
88
89
|
export declare function isMemberProfileFieldPresent(profile: PartnerMemberProfileInput, field: PartnerMemberProfileField): boolean;
|
|
89
|
-
/**
|
|
90
|
-
|
|
90
|
+
/**
|
|
91
|
+
* Re-exported so partner code keeps one import, but there is only ONE
|
|
92
|
+
* implementation and it lives with the rest of the date contract.
|
|
93
|
+
*/
|
|
94
|
+
export { isCalendarDate };
|
|
91
95
|
/**
|
|
92
96
|
* A date of birth reduced to the calendar date partners want.
|
|
93
97
|
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
98
|
+
* Now a thin alias over the platform contract, and NARROWER than it used to be.
|
|
99
|
+
* The old body did `new Date(trimmed)` on anything that was not already
|
|
100
|
+
* `YYYY-MM-DD` and then read the result back in UTC, which under the pods' own
|
|
101
|
+
* `TZ=Africa/Nairobi` turned '04/17/1990' into '1990-04-16' and refused
|
|
102
|
+
* '17/04/1990' - the spelling most of East Africa actually writes.
|
|
103
|
+
*
|
|
104
|
+
* Ambiguous text is now refused outright. A refused date surfaces as a field an
|
|
105
|
+
* operator is asked to collect; a drifted one is a permanent wrong birthday at
|
|
106
|
+
* a partner that cannot delete a member, on the record a paramedic uses to size
|
|
107
|
+
* a drug dose.
|
|
97
108
|
*/
|
|
98
|
-
export declare
|
|
109
|
+
export declare const toPartnerCalendarDate: typeof toCalendarDate;
|
|
99
110
|
/**
|
|
100
111
|
* Seats to buy for a member and their dependents.
|
|
101
112
|
*
|
|
@@ -49,16 +49,6 @@ export declare function sanitizePartnerPayload(value: unknown, depth?: number):
|
|
|
49
49
|
* case-insensitively.
|
|
50
50
|
*/
|
|
51
51
|
export declare const SECRET_KEY_FRAGMENTS: string[];
|
|
52
|
-
/**
|
|
53
|
-
* Key substrings that mark a value as a government identity document number.
|
|
54
|
-
*
|
|
55
|
-
* These are NOT credentials - they cannot be rotated, and unlike an API key,
|
|
56
|
-
* losing one harms the PERSON rather than the platform. That asymmetry is why
|
|
57
|
-
* they are masked rather than redacted: an operator investigating "the partner
|
|
58
|
-
* rejected this member" still needs to tell one document from another, and
|
|
59
|
-
* blanking the field entirely would make the audit trail useless while a full
|
|
60
|
-
* value would put a national id in a table many people can read.
|
|
61
|
-
*/
|
|
62
52
|
export declare const IDENTITY_DOCUMENT_KEY_FRAGMENTS: string[];
|
|
63
53
|
/**
|
|
64
54
|
* Key substrings that mark a value as a date of birth.
|
|
@@ -68,7 +58,18 @@ export declare const IDENTITY_DOCUMENT_KEY_FRAGMENTS: string[];
|
|
|
68
58
|
* survives, because "the partner rejected a member born in 1988" is the kind of
|
|
69
59
|
* thing somebody actually has to debug.
|
|
70
60
|
*/
|
|
61
|
+
/**
|
|
62
|
+
* Matched against a key with every separator stripped, so one fragment covers
|
|
63
|
+
* every spelling a producer might use.
|
|
64
|
+
*
|
|
65
|
+
* The previous list matched raw keys and therefore missed `birth_date` and
|
|
66
|
+
* `date-of-birth` entirely - close enough to the ones it did match that the
|
|
67
|
+
* gap was invisible, and wide enough that an audit payload using either
|
|
68
|
+
* spelling was stored with the birth date in the clear.
|
|
69
|
+
*/
|
|
71
70
|
export declare const BIRTH_DATE_KEY_FRAGMENTS: string[];
|
|
71
|
+
/** `1988-04-12` becomes `1988-**-**`; anything unrecognised is blanked. */
|
|
72
|
+
export declare function maskBirthDate(value: string): string;
|
|
72
73
|
/**
|
|
73
74
|
* Personal attributes that carry no diagnostic value at all in an audit record.
|
|
74
75
|
*
|
|
@@ -19,6 +19,16 @@ export interface User {
|
|
|
19
19
|
password?: string;
|
|
20
20
|
avatar?: string;
|
|
21
21
|
designation?: string;
|
|
22
|
+
/**
|
|
23
|
+
* `YYYY-MM-DD`. A calendar date, never a timestamp.
|
|
24
|
+
*
|
|
25
|
+
* PRESENT ONLY WHERE IT WAS EXPLICITLY ASKED FOR. The column is
|
|
26
|
+
* `select: false` in clarion-authentication, so ordinary reads - user
|
|
27
|
+
* lists, guardian responses, the batch lookup other services use - do
|
|
28
|
+
* not load it and this property is simply absent there. Treat an absent
|
|
29
|
+
* value as "not loaded", never as "this person has no date of birth".
|
|
30
|
+
*/
|
|
31
|
+
dateOfBirth?: string | null;
|
|
22
32
|
status?: UserStatus;
|
|
23
33
|
guardians?: Guardian[];
|
|
24
34
|
dependentRelations?: GuardianRelation[];
|