@putkoff/abstract-utilities 0.1.138 → 0.1.140

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.
@@ -5,7 +5,11 @@ export declare function ensureAbstractUrl(endpoint: string, slices?: string[]):
5
5
  */
6
6
  export declare function getResult<T>(obj: unknown): T;
7
7
  export declare function api(endpoint: string): string;
8
- export declare function checkResponse(res: Response): any;
8
+ /**
9
+ * Intercept 401/403 and force a clean redirect to login
10
+ * without ever showing an alert.
11
+ */
12
+ export declare function checkResponse(res: Response): Response;
9
13
  export declare function parseResult(res: Response): Promise<unknown>;
10
14
  export declare function getMethod(method?: string | null, body?: unknown): string;
11
15
  export declare function getHeaders(headers?: Record<string, string>, method?: string | null, body?: unknown): Record<string, string>;
package/dist/index.d.ts CHANGED
@@ -142,9 +142,9 @@ declare const API_PREFIX = "/secure-files/api";
142
142
  declare const DEV_PREFIX = "/secure-files-dev/";
143
143
 
144
144
  declare function get_window(): (Window & typeof globalThis) | null;
145
- declare function get_window_location(): "https://abstractendeavors.com" | Location | null;
145
+ declare function get_window_location(): Location | "https://abstractendeavors.com" | null;
146
146
  declare function get_window_pathname(): string | null;
147
- declare function get_window_parts(): "https://abstractendeavors.com" | Location | null;
147
+ declare function get_window_parts(): Location | "https://abstractendeavors.com" | null;
148
148
 
149
149
  /**
150
150
  * Given an “endpoint” slug like "api/list", build the full URL
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putkoff/abstract-utilities",
3
- "version": "0.1.138",
3
+ "version": "0.1.140",
4
4
  "type": "module",
5
5
  "description": "A reusable React Login component with JWT authentication",
6
6
  "main": "dist/cjs/index.js",