wallaby-cash 3.2.0 → 3.3.0

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.
package/dist/base.d.ts CHANGED
@@ -34,14 +34,21 @@ export declare abstract class Base {
34
34
  * @protected
35
35
  */
36
36
  get localStorageService(): StorageService;
37
+ /**
38
+ * Fetches a new access/refresh token pair using the stored refresh token.
39
+ * All concurrent callers share the same in-flight promise via the module-level
40
+ * `refreshDedupeManager` so only one network request is issued per user/environment scope.
41
+ */
42
+ protected _performTokenRefresh(): Promise<void>;
37
43
  /**
38
44
  * Main request method for making API calls to the Wallaby API.
39
45
  * @param route - Route configuration object containing the endpoint path and HTTP method
40
46
  * @param options - Optional request options including payload and query parameters
47
+ * @param retried - Internal flag; set to true when retrying after a 401 to prevent loops
41
48
  * @returns Promise resolving to the typed response data
42
49
  * @throws Error if the API returns an error response or network failure occurs
43
50
  */
44
- protected request<T>(route: RequestRoute, options?: RequestOptions): Promise<T>;
51
+ protected request<T>(route: RequestRoute, options?: RequestOptions, retried?: boolean): Promise<T>;
45
52
  private _getRequestHeaders;
46
53
  protected securityWorker(securityData: any): Promise<any>;
47
54
  }