From d684ade520689d6207c699cea0681a9331f06069 Mon Sep 17 00:00:00 2001 From: Zubair Date: Sat, 13 Jul 2024 04:30:47 +0800 Subject: [PATCH] Update 'rol' types in PrivateClaims (#274) --- .changeset/poor-mice-bake.md | 7 +++++++ packages/core/src/JsonWebToken.ts | 4 +--- 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 .changeset/poor-mice-bake.md diff --git a/.changeset/poor-mice-bake.md b/.changeset/poor-mice-bake.md new file mode 100644 index 00000000..6b051964 --- /dev/null +++ b/.changeset/poor-mice-bake.md @@ -0,0 +1,7 @@ +--- +"@quiltt/core": patch +"@quiltt/react": patch +"@quiltt/react-native": patch +--- + +Update 'rol' types in PrivateClaims diff --git a/packages/core/src/JsonWebToken.ts b/packages/core/src/JsonWebToken.ts index b0fd71b8..a632eebb 100644 --- a/packages/core/src/JsonWebToken.ts +++ b/packages/core/src/JsonWebToken.ts @@ -1,7 +1,5 @@ import type { Maybe } from './types' -type AdminRole = 'manager' | 'core' | 'basic' - export type RegisteredClaims = { iss: string // (issuer): Issuer of the JWT sub: string // (subject): Subject of the JWT (Person ID) @@ -18,7 +16,7 @@ export type PrivateClaims = { cid: string // Client ID aid: string // Administrator ID ver: number // Session Token Version - rol: AdminRole // Administrator Role + rol: 'basic' | 'core' | 'manager' | 'super-admin' // Administrator Role } export type Claims = RegisteredClaims & T