{"version":3,"sources":["../../src/types/jwt.types.ts"],"names":["JwtErrorType"],"mappings":";;;AAGO,IAAK,YAAA,qBAAAA,aAAAA,KAAL;AACL,EAAAA,cAAA,eAAA,CAAA,GAAgB,eAAA;AAChB,EAAAA,cAAA,eAAA,CAAA,GAAgB,eAAA;AAChB,EAAAA,cAAA,iBAAA,CAAA,GAAkB,iBAAA;AAClB,EAAAA,cAAA,qBAAA,CAAA,GAAsB,eAAA;AACtB,EAAAA,cAAA,gBAAA,CAAA,GAAiB,aAAA;AACjB,EAAAA,cAAA,gBAAA,CAAA,GAAiB,gBAAA;AANP,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA","file":"jwt.types.cjs","sourcesContent":["import type { VerifyOptions, SignOptions, DecodeOptions } from \"jsonwebtoken\"\r\nimport type { StdResponse } from \"@digicroz/js-kit/std-response\"\r\n\r\nexport enum JwtErrorType {\r\n  INVALID_TOKEN = \"invalid_token\",\r\n  EXPIRED_TOKEN = \"expired_token\",\r\n  MALFORMED_TOKEN = \"malformed_token\",\r\n  VERIFICATION_FAILED = \"verify_failed\",\r\n  SIGNING_FAILED = \"sign_failed\",\r\n  INVALID_SECRET = \"invalid_secret\",\r\n}\r\n\r\nexport type JwtResult<T> = StdResponse<T, JwtErrorType>\r\n\r\nexport interface JwtPayload {\r\n  [key: string]: unknown\r\n  iat?: number\r\n  exp?: number\r\n  nbf?: number\r\n  iss?: string\r\n  sub?: string\r\n  aud?: string | string[]\r\n  jti?: string\r\n}\r\n\r\nexport interface JwtVerifyOptions extends VerifyOptions {\r\n  debug?: boolean\r\n}\r\n\r\nexport type JwtSignOptions = SignOptions\r\n\r\nexport type JwtDecodeOptions = DecodeOptions\r\n"]}