@readyfor/api-client-base 1.75.0-pr1467.e629c28 → 1.75.0-pr1469.346fa0c
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/index.mjs +5 -2
- package/dist/requestUrl.d.ts +1 -6
- package/dist/requestUrl.js +5 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -142,9 +142,12 @@ const createVoidFetcher = (customRequestInit = {}, options = {}) => (input, requ
|
|
|
142
142
|
});
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/requestUrl.ts
|
|
145
|
-
function __internal__requestUrl(
|
|
145
|
+
function __internal__requestUrl(...args) {
|
|
146
146
|
const config = store.getState();
|
|
147
|
-
const
|
|
147
|
+
const rawPath = args[0];
|
|
148
|
+
const params = args[1] || {};
|
|
149
|
+
const query = args[2];
|
|
150
|
+
const path = (config.hostName ? typeof config.hostName === "string" ? config.hostName : config.hostName(rawPath) : "") + Object.entries(params).reduce((path, [key, value]) => path.replace(`{${key}}`, String(value)), rawPath);
|
|
148
151
|
return query ? `${path}?${qs.stringify(query)}` : path;
|
|
149
152
|
}
|
|
150
153
|
//#endregion
|
package/dist/requestUrl.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
//#region src/requestUrl.d.ts
|
|
2
|
-
|
|
3
|
-
type UrlArgs = {
|
|
4
|
-
path?: UrlParams;
|
|
5
|
-
query?: UrlParams;
|
|
6
|
-
};
|
|
7
|
-
declare function __internal__requestUrl(rawPath: string, { path: pathParams, query }?: UrlArgs): string;
|
|
2
|
+
declare function __internal__requestUrl(...args: any[]): string;
|
|
8
3
|
//#endregion
|
|
9
4
|
export { __internal__requestUrl };
|
package/dist/requestUrl.js
CHANGED
|
@@ -4,9 +4,12 @@ const require_apiClientConfigStore = require("./apiClientConfigStore.js");
|
|
|
4
4
|
let qs = require("qs");
|
|
5
5
|
qs = require_runtime.__toESM(qs);
|
|
6
6
|
//#region src/requestUrl.ts
|
|
7
|
-
function __internal__requestUrl(
|
|
7
|
+
function __internal__requestUrl(...args) {
|
|
8
8
|
const config = require_apiClientConfigStore.store.getState();
|
|
9
|
-
const
|
|
9
|
+
const rawPath = args[0];
|
|
10
|
+
const params = args[1] || {};
|
|
11
|
+
const query = args[2];
|
|
12
|
+
const path = (config.hostName ? typeof config.hostName === "string" ? config.hostName : config.hostName(rawPath) : "") + Object.entries(params).reduce((path, [key, value]) => path.replace(`{${key}}`, String(value)), rawPath);
|
|
10
13
|
return query ? `${path}?${qs.default.stringify(query)}` : path;
|
|
11
14
|
}
|
|
12
15
|
//#endregion
|