contentful-management 11.48.0 → 11.49.0-beta.1

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.
@@ -22,7 +22,11 @@ export const makeRequest = async ({
22
22
  if (endpoint === undefined) {
23
23
  throw new Error('Unknown endpoint');
24
24
  }
25
- return await endpoint(axiosInstance, params, payload, _objectSpread(_objectSpread({}, headers), userAgent ? {
25
+ const response = await endpoint(axiosInstance, params, payload, _objectSpread(_objectSpread({}, headers), userAgent ? {
26
26
  'X-Contentful-User-Agent': userAgent
27
27
  } : {}));
28
+ if (response instanceof ReadableStream) {
29
+ return await new Response(response).json();
30
+ }
31
+ return response;
28
32
  };
@@ -47,7 +47,7 @@ function createClient(params, opts = {}) {
47
47
  const sdkMain = opts.type === 'plain' ? 'contentful-management-plain.js' : 'contentful-management.js';
48
48
  const userAgent = getUserAgentHeader(
49
49
  // @ts-expect-error
50
- `${sdkMain}/${"11.48.0"}`, params.application, params.integration, params.feature);
50
+ `${sdkMain}/${"11.49.0-beta.1"}`, params.application, params.integration, params.feature);
51
51
  const adapter = createAdapter(_objectSpread(_objectSpread({}, params), {}, {
52
52
  userAgent
53
53
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-management",
3
- "version": "11.48.0",
3
+ "version": "11.49.0-beta.1",
4
4
  "description": "Client for Contentful's Content Management API",
5
5
  "homepage": "https://www.contentful.com/developers/documentation/content-management-api/",
6
6
  "main": "./dist/contentful-management.node.js",