@plyaz/api 1.7.3 → 1.7.4
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/cache/strategies.d.ts.map +1 -1
- package/dist/api/client/createApiClient.d.ts.map +1 -1
- package/dist/api/client/helpers/interceptors.d.ts +2 -2
- package/dist/api/client/helpers/interceptors.d.ts.map +1 -1
- package/dist/api/strategies/unified.d.ts.map +1 -1
- package/dist/entry-frontend.cjs +97 -22
- package/dist/entry-frontend.cjs.map +1 -1
- package/dist/entry-frontend.mjs +97 -22
- package/dist/entry-frontend.mjs.map +1 -1
- package/dist/index.cjs +97 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +97 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strategies.d.ts","sourceRoot":"","sources":["../../../src/api/cache/strategies.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAoB,MAAM,kBAAkB,CAAC;AAGjG;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,
|
|
1
|
+
{"version":3,"file":"strategies.d.ts","sourceRoot":"","sources":["../../../src/api/cache/strategies.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAoB,MAAM,kBAAkB,CAAC;AAGjG;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAyE3E,CAAC;AAEX;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,GAAG,mBAAmB,CAMpF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,iBAAiB,GAAG,mBAAmB,CAiC7E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,OAAO,EAAE,CAAC,mBAAmB,GAAG,SAAS,CAAC,EAAE,GAC9C,mBAAmB,CAiBrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/api/client/createApiClient.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAEV,gBAAgB,EAOhB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"createApiClient.d.ts","sourceRoot":"","sources":["../../../src/api/client/createApiClient.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAEV,gBAAgB,EAOhB,mBAAmB,EASpB,MAAM,kBAAkB,CAAC;AAgC1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAo1B/D,wBAAsB,eAAe,CACnC,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,mBAAmB,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC,CAkIjE"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Handles request/response interceptor chains and transformations
|
|
4
4
|
*/
|
|
5
5
|
import type { RequestConfig } from 'fetchff';
|
|
6
|
-
import type {
|
|
6
|
+
import type { ResponseInterceptor, ErrorInterceptor, RetryInterceptor, ApiClientOptions, SetupUnifiedHandlersParams, OnRequestHandlerOptions } from '@plyaz/types/api';
|
|
7
7
|
/**
|
|
8
8
|
* Create unified onRetry handler that triggers ApiConfig.onRetry[] and emits events
|
|
9
9
|
*/
|
|
@@ -11,7 +11,7 @@ export declare function createOnRetryHandler(handlers: RetryInterceptor[] | unde
|
|
|
11
11
|
/**
|
|
12
12
|
* Create unified onRequest handler that triggers ApiConfig.onRequest[] and emits events
|
|
13
13
|
*/
|
|
14
|
-
export declare function createOnRequestHandler(
|
|
14
|
+
export declare function createOnRequestHandler(options: OnRequestHandlerOptions): RequestConfig<unknown, unknown, unknown, unknown>['onRequest'];
|
|
15
15
|
/**
|
|
16
16
|
* Create unified onResponse handler that triggers ApiConfig.onResponse[] and emits events
|
|
17
17
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interceptors.d.ts","sourceRoot":"","sources":["../../../../src/api/client/helpers/interceptors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,SAAS,CAAC;AAM3E,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"interceptors.d.ts","sourceRoot":"","sources":["../../../../src/api/client/helpers/interceptors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAgC,MAAM,SAAS,CAAC;AAM3E,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAEhB,gBAAgB,EAChB,0BAA0B,EAC1B,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AA4F1B;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,SAAS,GACvC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAwB9D;AAqCD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,uBAAuB,GAC/B,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAqHhE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAC3C,uBAAuB,CAAC,EAAE,MAAM,IAAI,EACpC,eAAe,CAAC,EAAE,OAAO,EACzB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,GAChD,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,CAiDjE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,gBAAgB,EAAE,GAAG,SAAS,EACxC,uBAAuB,CAAC,EAAE,MAAM,IAAI,EACpC,eAAe,CAAC,EAAE,OAAO,GACxB,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAuD9D;AA6BD,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,0BAA0B,GAAG;IACxE,SAAS,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;IAC1E,UAAU,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC;IAC5E,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;IACtE,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;CACvE,CAsEA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unified.d.ts","sourceRoot":"","sources":["../../../src/api/strategies/unified.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAEV,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAK1B,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEpG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,
|
|
1
|
+
{"version":3,"file":"unified.d.ts","sourceRoot":"","sources":["../../../src/api/strategies/unified.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAEV,mBAAmB,EACnB,eAAe,EACf,qBAAqB,EACtB,MAAM,kBAAkB,CAAC;AAK1B,YAAY,EAAE,mBAAmB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEpG;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAuF3E,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,mBAAmB,GAAG,qBAAqB,CAS7F;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,GAAG,eAAe,CAyB7E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,mBAAmB,EACjC,SAAS,GAAE,OAAO,CAAC,eAAe,CAAM,GACvC,eAAe,CAOjB;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAElF;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,mBAAmB,EAAE,CAE/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,eAAe,GACtB,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAEjC"}
|
package/dist/entry-frontend.cjs
CHANGED
|
@@ -12856,10 +12856,17 @@ __name(createStatusCodeLimits, "createStatusCodeLimits");
|
|
|
12856
12856
|
var cacheStrategies = {
|
|
12857
12857
|
/**
|
|
12858
12858
|
* No caching - always fetch fresh data
|
|
12859
|
-
* Use for: Real-time data, sensitive information
|
|
12859
|
+
* Use for: Real-time data, sensitive information, mutations
|
|
12860
|
+
*
|
|
12861
|
+
* IMPORTANT: Explicit ttl/stale of 0 prevents staleTime refetch issues.
|
|
12862
|
+
* The skip:true alone doesn't prevent default staleTime from being applied.
|
|
12860
12863
|
*/
|
|
12861
12864
|
none: {
|
|
12862
|
-
skip: true
|
|
12865
|
+
skip: true,
|
|
12866
|
+
ttl: 0,
|
|
12867
|
+
// No caching
|
|
12868
|
+
stale: 0
|
|
12869
|
+
// No stale refetch (prevents 60s re-trigger issue)
|
|
12863
12870
|
},
|
|
12864
12871
|
/**
|
|
12865
12872
|
* Short-lived cache for frequently changing data
|
|
@@ -17244,18 +17251,19 @@ var unifiedStrategies = {
|
|
|
17244
17251
|
},
|
|
17245
17252
|
/**
|
|
17246
17253
|
* Mutation: POST/PUT/DELETE operations (uploads, creates, updates, deletes)
|
|
17247
|
-
* - NO caching (
|
|
17248
|
-
* -
|
|
17254
|
+
* - NO caching (cache: 'none' sets skip:true, ttl:0, stale:0 - prevents staleTime refetch!)
|
|
17255
|
+
* - Conservative retry (allows retry on server errors 500/502/503/504)
|
|
17249
17256
|
* - NO polling (critical! - polling causes duplicate mutations)
|
|
17250
17257
|
* - Realtime performance (immediate response)
|
|
17251
17258
|
*
|
|
17252
|
-
*
|
|
17259
|
+
* Note: The retry is safe because it only triggers on actual errors (5xx).
|
|
17260
|
+
* The staleTime refetch issue was fixed by setting stale:0 in cache:'none'.
|
|
17253
17261
|
*/
|
|
17254
17262
|
mutation: {
|
|
17255
17263
|
cache: "none",
|
|
17256
|
-
// Never cache mutations
|
|
17257
|
-
retry: "
|
|
17258
|
-
//
|
|
17264
|
+
// Never cache mutations (ttl:0, stale:0 prevents refetch)
|
|
17265
|
+
retry: "conservative",
|
|
17266
|
+
// Retry on server errors (500/502/503/504) only
|
|
17259
17267
|
// NO polling - this is critical! Polling would re-execute the mutation
|
|
17260
17268
|
performance: "realtime"
|
|
17261
17269
|
// Immediate response, no batching
|
|
@@ -21539,10 +21547,28 @@ function mergeHeadersCaseInsensitive(...headerSets) {
|
|
|
21539
21547
|
return result;
|
|
21540
21548
|
}
|
|
21541
21549
|
__name(mergeHeadersCaseInsensitive, "mergeHeadersCaseInsensitive");
|
|
21542
|
-
function createOnRequestHandler(
|
|
21550
|
+
function createOnRequestHandler(options) {
|
|
21551
|
+
const {
|
|
21552
|
+
handlers,
|
|
21553
|
+
enrichedHeadersConfig,
|
|
21554
|
+
encryptionConfig,
|
|
21555
|
+
configStrategy,
|
|
21556
|
+
getResolvedFetchffConfig
|
|
21557
|
+
} = options;
|
|
21543
21558
|
return async (config) => {
|
|
21544
21559
|
const performanceFactory = getPerformanceEventFactory();
|
|
21545
21560
|
const requestId = errors$1.generateRequestId();
|
|
21561
|
+
if (getResolvedFetchffConfig) {
|
|
21562
|
+
const resolvedConfig = getResolvedFetchffConfig();
|
|
21563
|
+
config = {
|
|
21564
|
+
...config,
|
|
21565
|
+
...resolvedConfig,
|
|
21566
|
+
headers: {
|
|
21567
|
+
...resolvedConfig.headers,
|
|
21568
|
+
...config.headers
|
|
21569
|
+
}
|
|
21570
|
+
};
|
|
21571
|
+
}
|
|
21546
21572
|
startRequestTracking(requestId);
|
|
21547
21573
|
UnifiedDebugger.getInstance().trackConfigChange(
|
|
21548
21574
|
{ headers: config.headers },
|
|
@@ -21711,7 +21737,8 @@ function setupUnifiedHandlers(params) {
|
|
|
21711
21737
|
enrichedHeadersConfig,
|
|
21712
21738
|
globalConfig,
|
|
21713
21739
|
clientOptions,
|
|
21714
|
-
clearTemporaryOverrides: clearTemporaryOverrides2
|
|
21740
|
+
clearTemporaryOverrides: clearTemporaryOverrides2,
|
|
21741
|
+
getResolvedFetchffConfig
|
|
21715
21742
|
} = params;
|
|
21716
21743
|
const mergedOnRequest = mergeHandlers(
|
|
21717
21744
|
globalConfig?.onRequest,
|
|
@@ -21737,12 +21764,13 @@ function setupUnifiedHandlers(params) {
|
|
|
21737
21764
|
const encryptionConfig = mergedConfig.encryption ?? globalConfig?.encryption ?? clientOptions?.encryption;
|
|
21738
21765
|
const configStrategy = mergedConfig.configOverride?.strategy ?? clientOptions?.configOverride?.strategy ?? globalConfig?.configOverride?.strategy ?? "merge";
|
|
21739
21766
|
return {
|
|
21740
|
-
onRequest: createOnRequestHandler(
|
|
21741
|
-
mergedOnRequest,
|
|
21767
|
+
onRequest: createOnRequestHandler({
|
|
21768
|
+
handlers: mergedOnRequest,
|
|
21742
21769
|
enrichedHeadersConfig,
|
|
21743
21770
|
encryptionConfig,
|
|
21744
|
-
configStrategy
|
|
21745
|
-
|
|
21771
|
+
configStrategy,
|
|
21772
|
+
getResolvedFetchffConfig
|
|
21773
|
+
}),
|
|
21746
21774
|
onResponse: createOnResponseHandler(
|
|
21747
21775
|
mergedOnResponse,
|
|
21748
21776
|
clearTemporaryOverrides2,
|
|
@@ -22097,15 +22125,21 @@ function createUpdateConfigMethod(initialConfigState, eventManager2, client, set
|
|
|
22097
22125
|
const validation = validateConfigUpdate(updates, updateOptions);
|
|
22098
22126
|
if (!validation.valid) {
|
|
22099
22127
|
handleInvalidConfigUpdate(validation, updates, updateOptions);
|
|
22100
|
-
return;
|
|
22128
|
+
return { fetchffConfig: {}, applied: false };
|
|
22101
22129
|
}
|
|
22102
22130
|
const result = applyConfigUpdate(configState, updates, updateOptions);
|
|
22103
22131
|
configState = result.state;
|
|
22104
22132
|
setConfigState(configState);
|
|
22105
22133
|
const newConfig = getEffectiveConfig(configState);
|
|
22134
|
+
let resolvedUpdates = { ...updates };
|
|
22135
|
+
if (updates.unifiedStrategy) {
|
|
22136
|
+
resolvedUpdates = applyUnifiedStrategyToConfig(resolvedUpdates, updates.unifiedStrategy);
|
|
22137
|
+
}
|
|
22138
|
+
resolvedUpdates = applyIndividualStrategies(resolvedUpdates, updates);
|
|
22139
|
+
const fetchffConfig = toFetchffConfig(resolvedUpdates);
|
|
22106
22140
|
if (client && "__config" in client) {
|
|
22107
22141
|
const fetchffClient = client;
|
|
22108
|
-
Object.assign(fetchffClient["__config"],
|
|
22142
|
+
Object.assign(fetchffClient["__config"], fetchffConfig);
|
|
22109
22143
|
}
|
|
22110
22144
|
eventManager2.updateConfig(updates, updateOptions ?? {});
|
|
22111
22145
|
const afterEventState = captureEventState(eventManager2);
|
|
@@ -22119,11 +22153,13 @@ function createUpdateConfigMethod(initialConfigState, eventManager2, client, set
|
|
|
22119
22153
|
validation,
|
|
22120
22154
|
startTime
|
|
22121
22155
|
});
|
|
22156
|
+
return { fetchffConfig, applied: true };
|
|
22122
22157
|
};
|
|
22123
22158
|
}
|
|
22124
22159
|
__name(createUpdateConfigMethod, "createUpdateConfigMethod");
|
|
22125
|
-
function createFetchffClient(
|
|
22126
|
-
|
|
22160
|
+
function createFetchffClient(params) {
|
|
22161
|
+
const { fetchffConfig, effectiveConfig, options, unifiedHandlers, getResolvedFetchffConfig } = params;
|
|
22162
|
+
const rawClient = fetchff.createApiFetcher({
|
|
22127
22163
|
...fetchffConfig,
|
|
22128
22164
|
baseURL: effectiveConfig.baseURL ?? options.apiUrl,
|
|
22129
22165
|
endpoints,
|
|
@@ -22132,6 +22168,26 @@ function createFetchffClient(fetchffConfig, effectiveConfig, options, unifiedHan
|
|
|
22132
22168
|
onError: unifiedHandlers.onError,
|
|
22133
22169
|
onRetry: unifiedHandlers.onRetry
|
|
22134
22170
|
});
|
|
22171
|
+
const endpointMethodNames = new Set(Object.keys(endpoints));
|
|
22172
|
+
return new Proxy(rawClient, {
|
|
22173
|
+
get(target, prop, receiver) {
|
|
22174
|
+
const value = Reflect.get(target, prop, receiver);
|
|
22175
|
+
if (typeof value !== "function" || typeof prop !== "string") {
|
|
22176
|
+
return value;
|
|
22177
|
+
}
|
|
22178
|
+
if (!endpointMethodNames.has(prop)) {
|
|
22179
|
+
return value;
|
|
22180
|
+
}
|
|
22181
|
+
return /* @__PURE__ */ __name(function wrappedEndpointMethod(config) {
|
|
22182
|
+
const resolvedConfig = getResolvedFetchffConfig();
|
|
22183
|
+
const mergedConfig = {
|
|
22184
|
+
...resolvedConfig,
|
|
22185
|
+
...config
|
|
22186
|
+
};
|
|
22187
|
+
return value.call(this, mergedConfig);
|
|
22188
|
+
}, "wrappedEndpointMethod");
|
|
22189
|
+
}
|
|
22190
|
+
});
|
|
22135
22191
|
}
|
|
22136
22192
|
__name(createFetchffClient, "createFetchffClient");
|
|
22137
22193
|
function enhanceClientWithMethods(params) {
|
|
@@ -22216,14 +22272,33 @@ async function createApiClient(options = {}) {
|
|
|
22216
22272
|
const effectiveConfig = getEffectiveConfig(stateContainer.current);
|
|
22217
22273
|
const fetchffConfig = toFetchffConfig(effectiveConfig);
|
|
22218
22274
|
let clearTemporaryOverridesFn;
|
|
22275
|
+
const getResolvedFetchffConfig = /* @__PURE__ */ __name(() => {
|
|
22276
|
+
const currentConfig = getEffectiveConfig(stateContainer.current);
|
|
22277
|
+
let resolvedConfig2 = { ...currentConfig };
|
|
22278
|
+
if (currentConfig.unifiedStrategy) {
|
|
22279
|
+
resolvedConfig2 = applyUnifiedStrategyToConfig(
|
|
22280
|
+
resolvedConfig2,
|
|
22281
|
+
currentConfig.unifiedStrategy
|
|
22282
|
+
);
|
|
22283
|
+
}
|
|
22284
|
+
resolvedConfig2 = applyIndividualStrategies(resolvedConfig2, currentConfig);
|
|
22285
|
+
return toFetchffConfig(resolvedConfig2);
|
|
22286
|
+
}, "getResolvedFetchffConfig");
|
|
22219
22287
|
const unifiedHandlers = setupUnifiedHandlers({
|
|
22220
22288
|
mergedConfig: effectiveConfig,
|
|
22221
22289
|
enrichedHeadersConfig: options.enrichedHeaders,
|
|
22222
22290
|
globalConfig,
|
|
22223
22291
|
clientOptions: options,
|
|
22224
|
-
clearTemporaryOverrides: /* @__PURE__ */ __name(() => clearTemporaryOverridesFn?.(), "clearTemporaryOverrides")
|
|
22292
|
+
clearTemporaryOverrides: /* @__PURE__ */ __name(() => clearTemporaryOverridesFn?.(), "clearTemporaryOverrides"),
|
|
22293
|
+
getResolvedFetchffConfig
|
|
22294
|
+
});
|
|
22295
|
+
const client = createFetchffClient({
|
|
22296
|
+
fetchffConfig,
|
|
22297
|
+
effectiveConfig,
|
|
22298
|
+
options,
|
|
22299
|
+
unifiedHandlers,
|
|
22300
|
+
getResolvedFetchffConfig
|
|
22225
22301
|
});
|
|
22226
|
-
const client = createFetchffClient(fetchffConfig, effectiveConfig, options, unifiedHandlers);
|
|
22227
22302
|
const clientWithEvents = setupClientEvents(client, globalConfig, options);
|
|
22228
22303
|
const { eventManager: eventManager2 } = clientWithEvents;
|
|
22229
22304
|
Object.defineProperty(clientWithEvents, "then", {
|
|
@@ -23776,8 +23851,8 @@ async function uploadFile(data, options) {
|
|
|
23776
23851
|
const client = options?.apiClient ?? getDefaultApiClient();
|
|
23777
23852
|
const serviceDefaults = {
|
|
23778
23853
|
unifiedStrategy: "mutation",
|
|
23779
|
-
timeout:
|
|
23780
|
-
//
|
|
23854
|
+
timeout: 12e4
|
|
23855
|
+
// 2 minutes for large uploads
|
|
23781
23856
|
};
|
|
23782
23857
|
const mergedConfig = mergeConfigs(serviceDefaults, options?.apiConfig ?? {});
|
|
23783
23858
|
const updateOptions = {
|