@haste-health/jwt 0.12.0 → 0.126.4

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.
@@ -3,6 +3,7 @@ export declare const CUSTOM_CLAIMS: {
3
3
  RESOURCE_ID: "https://haste.health/resourceId";
4
4
  ACCESS_POLICY_VERSION_IDS: "https://haste.health/accessPolicyVersionIds";
5
5
  TENANT: "https://haste.health/tenant";
6
+ PROJECT: "https://haste.health/project";
6
7
  ROLE: "https://haste.health/user_role";
7
8
  };
8
9
  export type ALGORITHMS_ALLOWED = (typeof ALGORITHMS)[keyof typeof ALGORITHMS];
package/lib/constants.js CHANGED
@@ -3,6 +3,7 @@ export const CUSTOM_CLAIMS = {
3
3
  RESOURCE_ID: "https://haste.health/resourceId",
4
4
  ACCESS_POLICY_VERSION_IDS: ("https://haste.health/accessPolicyVersionIds"),
5
5
  TENANT: "https://haste.health/tenant",
6
+ PROJECT: "https://haste.health/project",
6
7
  ROLE: "https://haste.health/user_role",
7
8
  };
8
9
  export const ALGORITHMS = {
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAS,mCAAmC;IACzD,WAAW,EAAS,iCAAiC;IACrD,yBAAyB,EAAS,CAChC,6CAA6C,CAC9C;IACD,MAAM,EAAS,6BAA6B;IAC5C,IAAI,EAAS,gCAAgC;CAC9C,CAAC;AAIF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAS,mCAAmC;IACzD,WAAW,EAAS,iCAAiC;IACrD,yBAAyB,EAAS,CAChC,6CAA6C,CAC9C;IACD,MAAM,EAAS,6BAA6B;IAC5C,OAAO,EAAS,8BAA8B;IAC9C,IAAI,EAAS,gCAAgC;CAC9C,CAAC;AAIF,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;CACf,CAAC"}
package/lib/types.d.ts CHANGED
@@ -41,6 +41,7 @@ export interface HasteHealthCustomClaims<role> {
41
41
  * The tenant the token is associated with.
42
42
  */
43
43
  [CUSTOM_CLAIMS.TENANT]: TenantId;
44
+ [CUSTOM_CLAIMS.PROJECT]: ProjectId;
44
45
  }
45
46
  export interface SMARTPayload {
46
47
  fhirUser?: canonical;
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@haste-health/jwt",
3
- "version": "0.12.0",
3
+ "version": "0.126.4",
4
4
  "dependencies": {
5
- "jose": "^6.0.11"
5
+ "jose": "^6.2.3"
6
6
  },
7
7
  "type": "module",
8
8
  "description": "JWT utilities for Haste Health. Includes JWT Claim types.",
@@ -11,11 +11,11 @@
11
11
  "devDependencies": {
12
12
  "@jest/globals": "^29.7.0",
13
13
  "@types/jest": "^29.5.14",
14
- "@types/node": "^24.3.0",
14
+ "@types/node": "^24.13.2",
15
15
  "jest": "^29.7.0",
16
- "ts-jest": "^29.3.2",
17
- "typescript": "5.9.2",
18
- "@haste-health/fhir-types": "^0.13.0"
16
+ "ts-jest": "^29.4.11",
17
+ "typescript": "6.0.3",
18
+ "@haste-health/fhir-types": "^0.126.4"
19
19
  },
20
20
  "exports": {
21
21
  ".": "./lib/index.js",
package/src/constants.ts CHANGED
@@ -5,6 +5,7 @@ export const CUSTOM_CLAIMS = {
5
5
  "https://haste.health/accessPolicyVersionIds"
6
6
  ),
7
7
  TENANT: <const>"https://haste.health/tenant",
8
+ PROJECT: <const>"https://haste.health/project",
8
9
  ROLE: <const>"https://haste.health/user_role",
9
10
  };
10
11
 
package/src/types.ts CHANGED
@@ -54,6 +54,7 @@ export interface HasteHealthCustomClaims<role> {
54
54
  * The tenant the token is associated with.
55
55
  */
56
56
  [CUSTOM_CLAIMS.TENANT]: TenantId;
57
+ [CUSTOM_CLAIMS.PROJECT]: ProjectId;
57
58
  }
58
59
 
59
60
  export interface SMARTPayload {
@@ -64,9 +65,7 @@ export interface SMARTPayload {
64
65
  }
65
66
 
66
67
  export interface AccessTokenPayload<role>
67
- extends HasteHealthCustomClaims<role>,
68
- SMARTPayload,
69
- jose.JWTPayload {
68
+ extends HasteHealthCustomClaims<role>, SMARTPayload, jose.JWTPayload {
70
69
  /**
71
70
  * REQUIRED. Issuer Identifier for the Issuer of the response.
72
71
  * The iss value is a case-sensitive URL using the https scheme that contains scheme, host, and optionally,