grm-shared-library 1.1.205 → 1.1.207

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.
Files changed (65) hide show
  1. package/README.md +75 -0
  2. package/dist/cjs/exceptions/filters/http-exceptions.filter.js +19 -2
  3. package/dist/cjs/exceptions/filters/http-exceptions.filter.js.map +1 -1
  4. package/dist/cjs/modules/common/decorators/calendar-date.decorator.js +59 -0
  5. package/dist/cjs/modules/common/decorators/calendar-date.decorator.js.map +1 -0
  6. package/dist/cjs/modules/common/index.js +2 -0
  7. package/dist/cjs/modules/common/index.js.map +1 -1
  8. package/dist/cjs/modules/common/utils/calendar-date.util.js +148 -0
  9. package/dist/cjs/modules/common/utils/calendar-date.util.js.map +1 -0
  10. package/dist/cjs/modules/partner/dtos/partner-member-profile.dto.js +2 -3
  11. package/dist/cjs/modules/partner/dtos/partner-member-profile.dto.js.map +1 -1
  12. package/dist/cjs/modules/partner/index.js +1 -0
  13. package/dist/cjs/modules/partner/index.js.map +1 -1
  14. package/dist/cjs/modules/partner/interfaces/partner-member-readiness.js +3 -0
  15. package/dist/cjs/modules/partner/interfaces/partner-member-readiness.js.map +1 -0
  16. package/dist/cjs/modules/partner/utils/partner-membership.util.js +23 -31
  17. package/dist/cjs/modules/partner/utils/partner-membership.util.js.map +1 -1
  18. package/dist/cjs/modules/partner/utils/partner-payload.util.js +25 -8
  19. package/dist/cjs/modules/partner/utils/partner-payload.util.js.map +1 -1
  20. package/dist/cjs/modules/role/constants/roles-by-scope.js +2 -1
  21. package/dist/cjs/modules/role/constants/roles-by-scope.js.map +1 -1
  22. package/dist/cjs/modules/role/data/roles.data.js +30 -0
  23. package/dist/cjs/modules/role/data/roles.data.js.map +1 -1
  24. package/dist/cjs/modules/role/enums/role.enum.js +1 -0
  25. package/dist/cjs/modules/role/enums/role.enum.js.map +1 -1
  26. package/dist/cjs/modules/user/dtos/create-user.dto.js +10 -0
  27. package/dist/cjs/modules/user/dtos/create-user.dto.js.map +1 -1
  28. package/dist/esm/exceptions/filters/http-exceptions.filter.js +19 -2
  29. package/dist/esm/exceptions/filters/http-exceptions.filter.js.map +1 -1
  30. package/dist/esm/modules/common/decorators/calendar-date.decorator.js +55 -0
  31. package/dist/esm/modules/common/decorators/calendar-date.decorator.js.map +1 -0
  32. package/dist/esm/modules/common/index.js +2 -0
  33. package/dist/esm/modules/common/index.js.map +1 -1
  34. package/dist/esm/modules/common/utils/calendar-date.util.js +140 -0
  35. package/dist/esm/modules/common/utils/calendar-date.util.js.map +1 -0
  36. package/dist/esm/modules/partner/dtos/partner-member-profile.dto.js +2 -3
  37. package/dist/esm/modules/partner/dtos/partner-member-profile.dto.js.map +1 -1
  38. package/dist/esm/modules/partner/index.js +1 -0
  39. package/dist/esm/modules/partner/index.js.map +1 -1
  40. package/dist/esm/modules/partner/interfaces/partner-member-readiness.js +2 -0
  41. package/dist/esm/modules/partner/interfaces/partner-member-readiness.js.map +1 -0
  42. package/dist/esm/modules/partner/utils/partner-membership.util.js +25 -28
  43. package/dist/esm/modules/partner/utils/partner-membership.util.js.map +1 -1
  44. package/dist/esm/modules/partner/utils/partner-payload.util.js +25 -9
  45. package/dist/esm/modules/partner/utils/partner-payload.util.js.map +1 -1
  46. package/dist/esm/modules/role/constants/roles-by-scope.js +2 -1
  47. package/dist/esm/modules/role/constants/roles-by-scope.js.map +1 -1
  48. package/dist/esm/modules/role/data/roles.data.js +30 -0
  49. package/dist/esm/modules/role/data/roles.data.js.map +1 -1
  50. package/dist/esm/modules/role/enums/role.enum.js +1 -0
  51. package/dist/esm/modules/role/enums/role.enum.js.map +1 -1
  52. package/dist/esm/modules/user/dtos/create-user.dto.js +10 -0
  53. package/dist/esm/modules/user/dtos/create-user.dto.js.map +1 -1
  54. package/dist/types/modules/common/decorators/calendar-date.decorator.d.ts +26 -0
  55. package/dist/types/modules/common/index.d.ts +2 -0
  56. package/dist/types/modules/common/utils/calendar-date.util.d.ts +80 -0
  57. package/dist/types/modules/partner/dtos/partner-member-profile.dto.d.ts +8 -1
  58. package/dist/types/modules/partner/index.d.ts +1 -0
  59. package/dist/types/modules/partner/interfaces/partner-member-readiness.d.ts +60 -0
  60. package/dist/types/modules/partner/utils/partner-membership.util.d.ts +17 -6
  61. package/dist/types/modules/partner/utils/partner-payload.util.d.ts +11 -10
  62. package/dist/types/modules/role/enums/role.enum.d.ts +1 -0
  63. package/dist/types/modules/user/dtos/create-user.dto.d.ts +1 -0
  64. package/dist/types/modules/user/interfaces/user.d.ts +10 -0
  65. package/package.json +1 -1
@@ -126,18 +126,25 @@ function isSecretKey(key) {
126
126
  * blanking the field entirely would make the audit trail useless while a full
127
127
  * value would put a national id in a table many people can read.
128
128
  */
129
+ /**
130
+ * Strips every separator before matching, so one fragment covers `dateOfBirth`,
131
+ * `date_of_birth`, `date-of-birth` and `DATE OF BIRTH` alike.
132
+ *
133
+ * Matching raw keys is what let `birth_date` through: it is not a substring of
134
+ * `dateofbirth`, `date_of_birth` or `birthdate`, so a payload spelled that way
135
+ * was archived with the birth date in the clear.
136
+ */
137
+ function normalizeKeyForMatching(key) {
138
+ return key.toLowerCase().replace(/[^a-z0-9]/g, '');
139
+ }
129
140
  export const IDENTITY_DOCUMENT_KEY_FRAGMENTS = [
130
141
  'documentnumber',
131
- 'document_number',
132
142
  'nationalid',
133
- 'national_id',
134
143
  'idnumber',
135
- 'id_number',
136
144
  'passportnumber',
137
- 'passport_number',
138
145
  ];
139
146
  function isIdentityDocumentKey(key) {
140
- const normalized = key.toLowerCase();
147
+ const normalized = normalizeKeyForMatching(key);
141
148
  return IDENTITY_DOCUMENT_KEY_FRAGMENTS.some((fragment) => normalized.includes(fragment));
142
149
  }
143
150
  /**
@@ -162,13 +169,22 @@ function maskIdentityDocument(value) {
162
169
  * survives, because "the partner rejected a member born in 1988" is the kind of
163
170
  * thing somebody actually has to debug.
164
171
  */
165
- export const BIRTH_DATE_KEY_FRAGMENTS = ['dateofbirth', 'date_of_birth', 'birthdate', 'dob'];
172
+ /**
173
+ * Matched against a key with every separator stripped, so one fragment covers
174
+ * every spelling a producer might use.
175
+ *
176
+ * The previous list matched raw keys and therefore missed `birth_date` and
177
+ * `date-of-birth` entirely - close enough to the ones it did match that the
178
+ * gap was invisible, and wide enough that an audit payload using either
179
+ * spelling was stored with the birth date in the clear.
180
+ */
181
+ export const BIRTH_DATE_KEY_FRAGMENTS = ['dateofbirth', 'birthdate', 'birthday', 'dob'];
166
182
  function isBirthDateKey(key) {
167
- const normalized = key.toLowerCase();
183
+ const normalized = normalizeKeyForMatching(key);
168
184
  return BIRTH_DATE_KEY_FRAGMENTS.some((fragment) => normalized.includes(fragment));
169
185
  }
170
186
  /** `1988-04-12` becomes `1988-**-**`; anything unrecognised is blanked. */
171
- function maskBirthDate(value) {
187
+ export function maskBirthDate(value) {
172
188
  const trimmed = value.trim();
173
189
  const match = /^(\d{4})-\d{2}-\d{2}/.exec(trimmed);
174
190
  return match ? `${match[1]}-**-**` : '[REDACTED]';
@@ -181,7 +197,7 @@ function maskBirthDate(value) {
181
197
  */
182
198
  export const REDACTED_PERSONAL_KEY_FRAGMENTS = ['gender'];
183
199
  function isRedactedPersonalKey(key) {
184
- const normalized = key.toLowerCase();
200
+ const normalized = normalizeKeyForMatching(key);
185
201
  return REDACTED_PERSONAL_KEY_FRAGMENTS.some((fragment) => normalized.includes(fragment));
186
202
  }
187
203
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"partner-payload.util.js","sourceRoot":"","sources":["../../../../../src/modules/partner/utils/partner-payload.util.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAgC,EAAE,SAAiB;IAClF,IAAI,KAAK,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IACpC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IACrC,IAAI,OAAO,KAAK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roles.ORGANIZATION_ADMIN,
5
5
  Roles.ORGANIZATION_USER,
6
6
  Roles.ORGANIZATION_BILLING_ADMIN,
7
- Roles.ORGANIZATION_NEWSFEED_ADMIN
7
+ Roles.ORGANIZATION_NEWSFEED_ADMIN,
8
+ Roles.ORGANIZATION_PARTNERSHIPS_ADMIN
8
9
  ];
9
10
  export const CONTROL_CENTRE_ROLES = [
10
11
  Roles.CONTROL_CENTRE_ADMIN,
@@ -1 +1 @@
1
- {"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAa;IACxC,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,iBAAiB;IACvB,KAAK,CAAC,0BAA0B;IAChC,KAAK,CAAC,2BAA2B;CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC1C,KAAK,CAAC,oBAAoB;IAC1B,KAAK,CAAC,mBAAmB;IACzB,KAAK,CAAC,SAAS;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAa;IAClC,KAAK,CAAC,WAAW;CACpB,CAAC"}
1
+ {"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAa;IACxC,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,iBAAiB;IACvB,KAAK,CAAC,0BAA0B;IAChC,KAAK,CAAC,2BAA2B;IACjC,KAAK,CAAC,+BAA+B;CACxC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC1C,KAAK,CAAC,oBAAoB;IAC1B,KAAK,CAAC,mBAAmB;IACzB,KAAK,CAAC,SAAS;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAa;IAClC,KAAK,CAAC,WAAW;CACpB,CAAC"}
@@ -197,6 +197,36 @@ export const ROLES_DATA = [
197
197
  PermissionActions.READ_RESPONSE_UNIT
198
198
  ]
199
199
  },
200
+ {
201
+ name: Roles.ORGANIZATION_PARTNERSHIPS_ADMIN,
202
+ description: 'Organization Partnerships Admin: Manage partnerships with third-party responders - their configuration, coverage, dispatches and member registration',
203
+ permissions: [
204
+ //Partner: every action in the Partner permission module. Pinned by
205
+ //roles.spec.ts, so an action added to that module later has to be
206
+ //granted here - or deliberately withheld - rather than silently missed.
207
+ PermissionActions.CREATE_PARTNER,
208
+ PermissionActions.READ_PARTNER,
209
+ PermissionActions.UPDATE_PARTNER,
210
+ PermissionActions.DELETE_PARTNER,
211
+ //Partner dispatch
212
+ PermissionActions.READ_PARTNER_DISPATCH,
213
+ PermissionActions.APPROVE_PARTNER_DISPATCH,
214
+ PermissionActions.UPDATE_PARTNER_DISPATCH,
215
+ PermissionActions.CANCEL_PARTNER_DISPATCH,
216
+ PermissionActions.RESEND_PARTNER_DISPATCH,
217
+ //Partner membership: includes reading and correcting a member's date
218
+ //of birth. Registering people with a partner is this role's job.
219
+ PermissionActions.READ_PARTNER_MEMBERSHIP,
220
+ PermissionActions.MANAGE_PARTNER_MEMBERSHIP,
221
+ //Billing: which packages a partnership registers subscribers of.
222
+ //Read-only - this role configures partnerships, not the packages.
223
+ PermissionActions.READ_PACKAGE,
224
+ //Incident Category Type: which incident types and categories a
225
+ //partnership's coverage rules route to that partner. Read-only, and
226
+ //the taxonomy only - not the incidents themselves.
227
+ PermissionActions.READ_INCIDENT_CATEGORY_TYPE
228
+ ]
229
+ },
200
230
  {
201
231
  name: Roles.CONTROL_CENTRE_ADMIN,
202
232
  description: 'Control Centre Admin: Manage Control Centre',
@@ -1 +1 @@
1
- {"version":3,"file":"roles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AAiB,CAAC,kBAAkB;YACpC,sCAAsC;YACtC,EAAE;YACF,+DAA+D;YAC/D,mEAAmE;YACnE,mEAAmE;YACnE,yCAAyC;YACzC,EAAE;YACF,kEAAkE;YAClE,iEAAiE;YACjE,gEAAgE;YAChE,oEAAoE;YACpE,+DAA+D;YAC/D,8DAA8D;YAC9D,+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"}
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,WAAW;QACvB,WAAW,EAAE,aAAa;QAC1B,WAAW,EAAE,CAAC,GAAG,CAAC;KACrB;IACD;QACI,IAAI,EAAE,KAAK,CAAC,kBAAkB;QAC9B,WAAW,EAAE,wDAAwD;QACrE,WAAW,EAAE;YACT,cAAc;YACd,iBAAiB,CAAC,iBAAiB;YACnC,iBAAiB,CAAC,mBAAmB;YACrC,iBAAiB,CAAC,mBAAmB;YACrC,SAAS;YACT,iBAAiB,CAAC,cAAc;YAChC,iBAAiB,CAAC,YAAY;YAC9B,iBAAiB,CAAC,cAAc;YAChC,iBAAiB,CAAC,cAAc;YAChC,kBAAkB;YAClB,iBAAiB,CAAC,qBAAqB;YACvC,iBAAiB,CAAC,wBAAwB;YAC1C,iBAAiB,CAAC,uBAAuB;YACzC,iBAAiB,CAAC,uBAAuB;YACzC,iBAAiB,CAAC,uBAAuB;YACzC,oBAAoB;YACpB,iBAAiB,CAAC,uBAAuB;YAC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D,8DAA8D;YAC9D,+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"}
@@ -6,6 +6,7 @@ export var Roles;
6
6
  Roles["ORGANIZATION_USER"] = "Organization:User";
7
7
  Roles["ORGANIZATION_BILLING_ADMIN"] = "Organization:Billing-Admin";
8
8
  Roles["ORGANIZATION_NEWSFEED_ADMIN"] = "Organization:Newsfeed-Admin";
9
+ Roles["ORGANIZATION_PARTNERSHIPS_ADMIN"] = "Organization:Partnerships-Admin";
9
10
  Roles["CONTROL_CENTRE_ADMIN"] = "Control-Centre:Admin";
10
11
  Roles["CONTROL_CENTRE_USER"] = "Control-Centre:User";
11
12
  Roles["RESPONDER"] = "Responder";
@@ -1 +1 @@
1
- {"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAWX;AAXD,WAAY,KAAK;IACb,oCAA2B,CAAA;IAC3B,kDAAyC,CAAA;IACzC,kDAAyC,CAAA;IACzC,gDAAuC,CAAA;IACvC,kEAAyD,CAAA;IACzD,oEAA2D,CAAA;IAC3D,sDAA6C,CAAA;IAC7C,oDAA2C,CAAA;IAC3C,gCAAuB,CAAA;IACvB,oCAA2B,CAAA;AAC/B,CAAC,EAXW,KAAK,KAAL,KAAK,QAWhB;AAED;;GAEG"}
1
+ {"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAYX;AAZD,WAAY,KAAK;IACb,oCAA2B,CAAA;IAC3B,kDAAyC,CAAA;IACzC,kDAAyC,CAAA;IACzC,gDAAuC,CAAA;IACvC,kEAAyD,CAAA;IACzD,oEAA2D,CAAA;IAC3D,4EAAmE,CAAA;IACnE,sDAA6C,CAAA;IAC7C,oDAA2C,CAAA;IAC3C,gCAAuB,CAAA;IACvB,oCAA2B,CAAA;AAC/B,CAAC,EAZW,KAAK,KAAL,KAAK,QAYhB;AAED;;GAEG"}
@@ -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,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EAAE;IACV,UAAU,EAAE;;sDACY;AAIzB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;qDACW"}
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;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AAE9E,MAAM,OAAO,aAAa;CAyHzB;AAjHG;IAPC,WAAW,CAAC;QACT,WAAW,EAAE,oCAAoC;QACjD,IAAI,EAAE,aAAa;QACnB,OAAO,EAAE,aAAa,CAAC,GAAG;KAC7B,CAAC;IACD,MAAM,CAAC,aAAa,CAAC;IACrB,UAAU,EAAE;;4CACS;AAatB;IAXC,WAAW,CAAC;QACT,WAAW,EAAE,uBAAuB;QACpC,OAA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ACV,UAAU,EAAE;;6CACG;AAKhB;IAHC,QAAQ,EAAE;IACV,UAAU,EAAE;IACZ,SAAS,CAAC,EAAE,CAAC;;kDACO;AAIrB;IAFC,MAAM,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE;;6CACO;AAKpB;IAHC,cAAc,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC9B,IAAI,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC;IACvB,UAAU,EAAE;;gDACa;AAK1B;IAHC,OAAO,EAAE;IACT,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC5B,UAAU,EAAE;;mDACW;AAIxB;IAFC,SAAS,EAAE;IACX,UAAU,EAAE;;sDACa;AAI1B;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;wDACc;AAI3B;IAFC,MAAM,EAAE;IACR,UAAU,EAAE;8BACgB,IAAI;iEAAC;AAIlC;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;sDACY;AAIzB;IAFC,QAAQ,EAAE;IACV,UAAU,EAAE;;qDACW;AAQxB;IANC,mBAAmB,CAAC;QACjB,WAAW,EAAE,+IAA+I;QAC5J,OAAO,EAAE,YAAY;KACxB,CAAC;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
- /** `YYYY-MM-DD`. A calendar date, never a timestamp. */
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
- /** A real `YYYY-MM-DD` date, not merely one shaped like it (rejects 2026-02-30). */
90
- export declare function isCalendarDate(value: string): boolean;
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
- * Accepts what the platform actually stores - a `Date`, a timestamp string, a
95
- * bare date - and returns UTC, never local. Reading a stored instant in the
96
- * server's zone is how a birthday drifts a day when a pod moves region.
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 function toPartnerCalendarDate(value: Date | string | null | undefined): string | undefined;
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
  *
@@ -5,6 +5,7 @@ export declare enum Roles {
5
5
  ORGANIZATION_USER = "Organization:User",
6
6
  ORGANIZATION_BILLING_ADMIN = "Organization:Billing-Admin",
7
7
  ORGANIZATION_NEWSFEED_ADMIN = "Organization:Newsfeed-Admin",
8
+ ORGANIZATION_PARTNERSHIPS_ADMIN = "Organization:Partnerships-Admin",
8
9
  CONTROL_CENTRE_ADMIN = "Control-Centre:Admin",
9
10
  CONTROL_CENTRE_USER = "Control-Centre:User",
10
11
  RESPONDER = "Responder",
@@ -21,4 +21,5 @@ export declare class CreateUserDto {
21
21
  verificationTokenExpiresAt?: Date;
22
22
  controlCentreId: number;
23
23
  organizationId: number;
24
+ dateOfBirth?: string;
24
25
  }
@@ -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[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.1.205",
3
+ "version": "1.1.207",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",