@algolia/client-common 5.0.0-alpha.8 → 5.0.0-alpha.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.
|
@@ -530,13 +530,15 @@ function createTransporter({
|
|
|
530
530
|
const dataQueryParameters = request.method === 'GET' ? { ...request.data,
|
|
531
531
|
...requestOptions.data
|
|
532
532
|
} : {};
|
|
533
|
-
const queryParameters = {
|
|
534
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
535
|
-
...baseQueryParameters,
|
|
533
|
+
const queryParameters = { ...baseQueryParameters,
|
|
536
534
|
...request.queryParameters,
|
|
537
535
|
...dataQueryParameters
|
|
538
536
|
};
|
|
539
537
|
|
|
538
|
+
if (algoliaAgent.value) {
|
|
539
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
540
|
+
}
|
|
541
|
+
|
|
540
542
|
if (requestOptions && requestOptions.queryParameters) {
|
|
541
543
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
542
544
|
// We want to keep `undefined` and `null` values,
|
|
@@ -526,13 +526,15 @@ function createTransporter({
|
|
|
526
526
|
const dataQueryParameters = request.method === 'GET' ? { ...request.data,
|
|
527
527
|
...requestOptions.data
|
|
528
528
|
} : {};
|
|
529
|
-
const queryParameters = {
|
|
530
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
531
|
-
...baseQueryParameters,
|
|
529
|
+
const queryParameters = { ...baseQueryParameters,
|
|
532
530
|
...request.queryParameters,
|
|
533
531
|
...dataQueryParameters
|
|
534
532
|
};
|
|
535
533
|
|
|
534
|
+
if (algoliaAgent.value) {
|
|
535
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
536
|
+
}
|
|
537
|
+
|
|
536
538
|
if (requestOptions && requestOptions.queryParameters) {
|
|
537
539
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
538
540
|
// We want to keep `undefined` and `null` values,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTransporter.d.ts","sourceRoot":"","sources":["../../../src/transporter/createTransporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,kBAAkB,EAClB,WAAW,EAEZ,MAAM,UAAU,CAAC;AAsBlB,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"createTransporter.d.ts","sourceRoot":"","sources":["../../../src/transporter/createTransporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAOV,kBAAkB,EAClB,WAAW,EAEZ,MAAM,UAAU,CAAC;AAsBlB,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,GACf,EAAE,kBAAkB,GAAG,WAAW,CAmTlC"}
|
package/package.json
CHANGED
|
@@ -110,12 +110,15 @@ export function createTransporter({
|
|
|
110
110
|
: {};
|
|
111
111
|
|
|
112
112
|
const queryParameters: QueryParameters = {
|
|
113
|
-
'x-algolia-agent': algoliaAgent.value,
|
|
114
113
|
...baseQueryParameters,
|
|
115
114
|
...request.queryParameters,
|
|
116
115
|
...dataQueryParameters,
|
|
117
116
|
};
|
|
118
117
|
|
|
118
|
+
if (algoliaAgent.value) {
|
|
119
|
+
queryParameters['x-algolia-agent'] = algoliaAgent.value;
|
|
120
|
+
}
|
|
121
|
+
|
|
119
122
|
if (requestOptions && requestOptions.queryParameters) {
|
|
120
123
|
for (const key of Object.keys(requestOptions.queryParameters)) {
|
|
121
124
|
// We want to keep `undefined` and `null` values,
|