dolphin-client 1.0.5 → 1.0.9

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/api.d.ts CHANGED
@@ -12,7 +12,27 @@ export declare class APIHandler {
12
12
  del(pathOrOptions: any, options: any): any;
13
13
  request(method: any, subPath: any, body: any, options: any): any;
14
14
  requestDirect(method: any, path: any, body: any, options: any): any;
15
+ _findCSRFToken(): string;
16
+ _resolveBaseUrl(path: string): string;
17
+ _normalizeValidationErrors(errData: any): Record<string, string>;
15
18
  };
19
+ /**
20
+ * Attempts to find a CSRF token in the document (meta tags, forms, or cookies).
21
+ * Works for Laravel, CakePHP, WordPress, Express, NestJS, etc.
22
+ * @private
23
+ */
24
+ _findCSRFToken(): string | null;
25
+ /**
26
+ * Dynamically resolves the Base Path/URL from `<base href="...">` or subfolders.
27
+ * @private
28
+ */
29
+ _resolveBaseUrl(path: string): string;
30
+ /**
31
+ * Normalizes backend validation errors from major PHP and Node.js frameworks
32
+ * into a unified { [field]: message } object.
33
+ * @private
34
+ */
35
+ _normalizeValidationErrors(errData: any): Record<string, string>;
16
36
  /**
17
37
  * Intercept request for offline-first caching and queuing.
18
38
  */
package/dist/core.d.ts CHANGED
@@ -14,6 +14,8 @@ export declare class DolphinClient {
14
14
  fileHandlers: Set<any>;
15
15
  _offlineQueue: string[];
16
16
  reconnectAttempts: number;
17
+ /** @fix: Store timer ID so disconnect() can cancel pending reconnects (was: memory/logic leak) */
18
+ _reconnectTimer: ReturnType<typeof setTimeout> | null;
17
19
  _attachedListeners: {
18
20
  target: any;
19
21
  event: string;
@@ -78,7 +80,7 @@ export declare class DolphinClient {
78
80
  * @param {function(number): void} [onProgress] — progress callback (0-100)
79
81
  * @returns {Promise<void>}
80
82
  */
81
- pubFile(fileId: any, fileData: any, filename: string, onProgress: any): Promise<void>;
83
+ pubFile(fileId: any, fileData: any, filename?: string, onProgress?: any): Promise<void>;
82
84
  /** @private */
83
85
  _uint8ToBase64(uint8: any): string;
84
86
  /**