@owox/idp-protocol 0.12.0-next-20251030140609 → 0.12.0-next-20251031104058

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.
@@ -1,10 +1,14 @@
1
1
  /**
2
2
  * Base error class for the IDP protocol
3
3
  */
4
- export declare class IdpError extends Error {
4
+ export interface HttpError {
5
+ getStatus(): number;
6
+ }
7
+ export declare class IdpError extends Error implements HttpError {
5
8
  code: string;
6
9
  statusCode: number;
7
10
  constructor(message: string, code: string, statusCode?: number);
11
+ getStatus(): number;
8
12
  }
9
13
  /**
10
14
  * Authentication error
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;IAGxB,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,MAAM;gBAFzB,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAAY;CAKlC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,OAAO,GAAE,MAAgC;CAGtD;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,OAAO,GAAE,MAAmC;CAGzD;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,OAAO,GAAE,MAA4B;CAGlD;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,OAAO,GAAE,MAAwB;CAG9C"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/types/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,SAAS,IAAI,MAAM,CAAC;CACrB;AAED,qBAAa,QAAS,SAAQ,KAAM,YAAW,SAAS;IAG7C,IAAI,EAAE,MAAM;IACZ,UAAU,EAAE,MAAM;gBAFzB,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAAY;IAMjC,SAAS,IAAI,MAAM;CAGpB;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,QAAQ;gBACnC,OAAO,GAAE,MAAgC;CAGtD;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,OAAO,GAAE,MAAmC;CAGzD;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,OAAO,GAAE,MAA4B;CAGlD;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ;gBACjC,OAAO,GAAE,MAAwB;CAG9C"}
@@ -1,6 +1,3 @@
1
- /**
2
- * Base error class for the IDP protocol
3
- */
4
1
  export class IdpError extends Error {
5
2
  code;
6
3
  statusCode;
@@ -10,6 +7,9 @@ export class IdpError extends Error {
10
7
  this.statusCode = statusCode;
11
8
  this.name = 'IdpError';
12
9
  }
10
+ getStatus() {
11
+ return this.statusCode;
12
+ }
13
13
  }
14
14
  /**
15
15
  * Authentication error
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owox/idp-protocol",
3
- "version": "0.12.0-next-20251030140609",
3
+ "version": "0.12.0-next-20251031104058",
4
4
  "type": "module",
5
5
  "author": "OWOX",
6
6
  "license": "ELv2",