@vrplatform/api 1.3.1-2568 → 1.3.1-2582
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/build/main/client.js +2 -0
- package/build/main/client.js.map +1 -1
- package/build/main/generated/v1.d.ts +5116 -452
- package/build/main/generated/v1.js.map +1 -1
- package/build/module/client.js +2 -0
- package/build/module/client.js.map +1 -1
- package/build/module/generated/v1.d.ts +5116 -452
- package/build/module/generated/v1.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +3 -0
- package/src/generated/v1.ts +5116 -452
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -9,6 +9,8 @@ import type { paths } from './generated/v1';
|
|
|
9
9
|
import { generateApiKeySec } from './sec';
|
|
10
10
|
import type { ApiClient, ApiClientAuth } from './types';
|
|
11
11
|
|
|
12
|
+
const DEFAULT_API_CLIENT_ATTEMPTS = 5;
|
|
13
|
+
|
|
12
14
|
export function useApiClient({
|
|
13
15
|
baseUrl: base,
|
|
14
16
|
local,
|
|
@@ -45,6 +47,7 @@ export function useApiClient({
|
|
|
45
47
|
|
|
46
48
|
const retryableFetch = useRetryableFetch({
|
|
47
49
|
...retryableFetchParams,
|
|
50
|
+
attempts: retryableFetchParams.attempts ?? DEFAULT_API_CLIENT_ATTEMPTS,
|
|
48
51
|
onRetry(arg) {
|
|
49
52
|
cache.invalidate();
|
|
50
53
|
if (retryableFetchParams.onRetry) retryableFetchParams.onRetry(arg);
|