@commercetools-frontend/sdk 21.23.6 → 21.23.7

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.
@@ -335,7 +335,7 @@ var index = /*#__PURE__*/Object.freeze({
335
335
  });
336
336
 
337
337
  // NOTE: This string will be replaced on build time with the package version.
338
- var version = "21.23.6";
338
+ var version = "21.23.7";
339
339
 
340
340
  /* eslint-disable no-console */
341
341
  var isLoggerEnabled = function isLoggerEnabled() {
@@ -326,7 +326,7 @@ var index = /*#__PURE__*/Object.freeze({
326
326
  });
327
327
 
328
328
  // NOTE: This string will be replaced on build time with the package version.
329
- var version = "21.23.6";
329
+ var version = "21.23.7";
330
330
 
331
331
  var mcHostnameRegex = /^mc(-(\d){4,})?\.(.*)$/;
332
332
  var mcPreviewHostnameRegex = /^.*\.mc-preview\.(.*)$/;
@@ -311,7 +311,7 @@ var index = /*#__PURE__*/Object.freeze({
311
311
  });
312
312
 
313
313
  // NOTE: This string will be replaced on build time with the package version.
314
- var version = "21.23.6";
314
+ var version = "21.23.7";
315
315
 
316
316
  /* eslint-disable no-console */
317
317
  var isLoggerEnabled = function isLoggerEnabled() {
@@ -1,5 +1,5 @@
1
1
  import type { TSdkActionPayloadBody, TSdkActionPayloadForUri, TSdkActionPayloadForService, TSdkActionGetForUri, TSdkActionGetForService, TSdkActionDeleteForUri, TSdkActionDeleteForService, TSdkActionHeadForUri, TSdkActionHeadForService, TSdkActionPostForUri, TSdkActionPostForService } from '../types';
2
- export declare type THeaders = Record<string, string>;
2
+ export type THeaders = Record<string, string>;
3
3
  export declare function get(payload: TSdkActionPayloadForUri): TSdkActionGetForUri;
4
4
  export declare function get(payload: TSdkActionPayloadForService): TSdkActionGetForService;
5
5
  export declare function del(payload: TSdkActionPayloadForUri): TSdkActionDeleteForUri;
@@ -2,24 +2,24 @@
2
2
  import type { SuccessResult, HttpErrorType } from '@commercetools/sdk-client';
3
3
  import type { TSdkAction } from '../../types';
4
4
  import { Component } from 'react';
5
- declare type TSdkError = Error | HttpErrorType;
6
- declare type TActionCreatorArgs = unknown[];
7
- declare type State = {
5
+ type TSdkError = Error | HttpErrorType;
6
+ type TActionCreatorArgs = unknown[];
7
+ type State = {
8
8
  isWaitingForCompletionOfFirstRequest: boolean;
9
9
  requestsInFlight: number;
10
10
  result?: SuccessResult['body'];
11
11
  error?: TSdkError;
12
12
  };
13
- declare type TRenderOptions = {
13
+ type TRenderOptions = {
14
14
  isLoading: boolean;
15
15
  refresh: () => Promise<void | SuccessResult['body']>;
16
16
  result?: State['result'];
17
17
  error?: State['error'];
18
18
  };
19
- declare type DispatchProps = {
19
+ type DispatchProps = {
20
20
  dispatch: (action: TSdkAction) => Promise<SuccessResult['body']>;
21
21
  };
22
- declare type OwnProps = {
22
+ type OwnProps = {
23
23
  actionCreator: (...args: TActionCreatorArgs) => TSdkAction;
24
24
  actionCreatorArgs: TActionCreatorArgs;
25
25
  shouldRefetch: (prevArgs: TActionCreatorArgs, nextArgs: TActionCreatorArgs) => boolean;
@@ -27,8 +27,8 @@ declare type OwnProps = {
27
27
  onError?: (error: TSdkError) => void;
28
28
  render: (options: TRenderOptions) => JSX.Element;
29
29
  };
30
- export declare type Props = DispatchProps & OwnProps;
31
- declare type StaticErrorHandler = (error: TSdkError) => void;
30
+ export type Props = DispatchProps & OwnProps;
31
+ type StaticErrorHandler = (error: TSdkError) => void;
32
32
  export declare class SdkGet extends Component<Props, State> {
33
33
  static displayName: string;
34
34
  static errorHandler: StaticErrorHandler;
@@ -1,4 +1,4 @@
1
1
  import type { TSdkAction } from '../types';
2
- declare type TAsyncDispatch<Action extends TSdkAction, Data> = (action: Action) => Promise<Data>;
2
+ type TAsyncDispatch<Action extends TSdkAction, Data> = (action: Action) => Promise<Data>;
3
3
  declare function useAsyncDispatch<Action extends TSdkAction, Data>(): TAsyncDispatch<Action, Data>;
4
4
  export default useAsyncDispatch;
@@ -1,16 +1,16 @@
1
1
  import type { Dispatch } from 'redux';
2
2
  import type { TSdkAction, Json } from '../types';
3
- export declare type Headers = {
3
+ export type Headers = {
4
4
  [key: string]: string;
5
5
  };
6
- export declare type MethodType = 'GET' | 'POST' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'PUT' | 'PATCH' | 'TRACE';
7
- export declare type ClientRequest = {
6
+ export type MethodType = 'GET' | 'POST' | 'DELETE' | 'HEAD' | 'OPTIONS' | 'PUT' | 'PATCH' | 'TRACE';
7
+ export type ClientRequest = {
8
8
  uri: string;
9
9
  method: MethodType;
10
10
  body?: unknown;
11
11
  headers?: Headers;
12
12
  };
13
- export declare type HttpErrorType = {
13
+ export type HttpErrorType = {
14
14
  name: string;
15
15
  message: string;
16
16
  code: number;
@@ -29,6 +29,6 @@ interface TSdkMockSuccess extends TSdkMockBase {
29
29
  interface TSdkMockFailure extends TSdkMockBase {
30
30
  error: HttpErrorType;
31
31
  }
32
- export declare type TSdkMock = TSdkMockSuccess | TSdkMockFailure;
32
+ export type TSdkMock = TSdkMockSuccess | TSdkMockFailure;
33
33
  declare const createTestMiddleware: (mocks: TSdkMock[]) => () => (next: Dispatch<TSdkAction>) => (action: TSdkAction) => Promise<Json>;
34
34
  export { createTestMiddleware };
@@ -1,14 +1,14 @@
1
1
  import type { TMcApiProxyTargets } from '@commercetools-frontend/constants';
2
- export declare type Json = {
2
+ export type Json = {
3
3
  [key: string]: unknown;
4
4
  };
5
- export declare type THttpMethod = 'GET' | 'POST' | 'DELETE' | 'HEAD';
6
- export declare type TForwardToAudiencePolicy = 'forward-url-full-path' | 'forward-url-origin';
7
- export declare type TForwardToExchangeTokenClaim = 'permissions';
8
- export declare type TSdkActionPayloadMethod<Method extends THttpMethod> = {
5
+ export type THttpMethod = 'GET' | 'POST' | 'DELETE' | 'HEAD';
6
+ export type TForwardToAudiencePolicy = 'forward-url-full-path' | 'forward-url-origin';
7
+ export type TForwardToExchangeTokenClaim = 'permissions';
8
+ export type TSdkActionPayloadMethod<Method extends THttpMethod> = {
9
9
  method: Method;
10
10
  };
11
- export declare type TSdkActionPayloadBody = {
11
+ export type TSdkActionPayloadBody = {
12
12
  payload: unknown;
13
13
  };
14
14
  export interface TSdkActionPayloadBase {
@@ -26,41 +26,41 @@ export interface TSdkActionPayloadForService extends TSdkActionPayloadBase {
26
26
  service: string;
27
27
  options: Json;
28
28
  }
29
- export declare type TSdkActionPayload = TSdkActionPayloadForUri | TSdkActionPayloadForService;
30
- export declare type TSdkActionGetForUri = {
29
+ export type TSdkActionPayload = TSdkActionPayloadForUri | TSdkActionPayloadForService;
30
+ export type TSdkActionGetForUri = {
31
31
  type: 'SDK';
32
32
  payload: TSdkActionPayloadForUri & TSdkActionPayloadMethod<'GET'>;
33
33
  };
34
- export declare type TSdkActionGetForService = {
34
+ export type TSdkActionGetForService = {
35
35
  type: 'SDK';
36
36
  payload: TSdkActionPayloadForService & TSdkActionPayloadMethod<'GET'>;
37
37
  };
38
- export declare type TSdkActionGet = TSdkActionGetForUri | TSdkActionGetForService;
39
- export declare type TSdkActionPostForUri = {
38
+ export type TSdkActionGet = TSdkActionGetForUri | TSdkActionGetForService;
39
+ export type TSdkActionPostForUri = {
40
40
  type: 'SDK';
41
41
  payload: TSdkActionPayloadForUri & TSdkActionPayloadMethod<'POST'> & TSdkActionPayloadBody;
42
42
  };
43
- export declare type TSdkActionPostForService = {
43
+ export type TSdkActionPostForService = {
44
44
  type: 'SDK';
45
45
  payload: TSdkActionPayloadForService & TSdkActionPayloadMethod<'POST'> & TSdkActionPayloadBody;
46
46
  };
47
- export declare type TSdkActionPost = TSdkActionPostForUri | TSdkActionPostForService;
48
- export declare type TSdkActionDeleteForUri = {
47
+ export type TSdkActionPost = TSdkActionPostForUri | TSdkActionPostForService;
48
+ export type TSdkActionDeleteForUri = {
49
49
  type: 'SDK';
50
50
  payload: TSdkActionPayloadForUri & TSdkActionPayloadMethod<'DELETE'>;
51
51
  };
52
- export declare type TSdkActionDeleteForService = {
52
+ export type TSdkActionDeleteForService = {
53
53
  type: 'SDK';
54
54
  payload: TSdkActionPayloadForService & TSdkActionPayloadMethod<'DELETE'>;
55
55
  };
56
- export declare type TSdkActionDelete = TSdkActionDeleteForUri | TSdkActionDeleteForService;
57
- export declare type TSdkActionHeadForUri = {
56
+ export type TSdkActionDelete = TSdkActionDeleteForUri | TSdkActionDeleteForService;
57
+ export type TSdkActionHeadForUri = {
58
58
  type: 'SDK';
59
59
  payload: TSdkActionPayloadForUri & TSdkActionPayloadMethod<'HEAD'>;
60
60
  };
61
- export declare type TSdkActionHeadForService = {
61
+ export type TSdkActionHeadForService = {
62
62
  type: 'SDK';
63
63
  payload: TSdkActionPayloadForService & TSdkActionPayloadMethod<'HEAD'>;
64
64
  };
65
- export declare type TSdkActionHead = TSdkActionHeadForUri | TSdkActionHeadForService;
66
- export declare type TSdkAction = TSdkActionGet | TSdkActionPost | TSdkActionDelete | TSdkActionHead;
65
+ export type TSdkActionHead = TSdkActionHeadForUri | TSdkActionHeadForService;
66
+ export type TSdkAction = TSdkActionGet | TSdkActionPost | TSdkActionDelete | TSdkActionHead;
@@ -1,5 +1,5 @@
1
1
  import type { THttpMethod, TSdkAction, Json } from '../types';
2
- declare type LogRequestParams = {
2
+ type LogRequestParams = {
3
3
  method: THttpMethod;
4
4
  request: {
5
5
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/sdk",
3
- "version": "21.23.6",
3
+ "version": "21.23.7",
4
4
  "description": "Tools for declarative fetching",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -21,18 +21,18 @@
21
21
  "module": "dist/commercetools-frontend-sdk.esm.js",
22
22
  "files": ["dist", "test-utils", "package.json", "LICENSE", "README.md"],
23
23
  "dependencies": {
24
- "@babel/runtime": "^7.19.0",
25
- "@babel/runtime-corejs3": "^7.19.0",
26
- "@commercetools-frontend/constants": "21.23.6",
24
+ "@babel/runtime": "^7.20.13",
25
+ "@babel/runtime-corejs3": "^7.20.13",
26
+ "@commercetools-frontend/constants": "21.23.7",
27
27
  "@commercetools/api-request-builder": "6.0.0",
28
28
  "@commercetools/http-user-agent": "3.0.0",
29
29
  "@commercetools/sdk-client": "3.0.0",
30
30
  "@commercetools/sdk-middleware-correlation-id": "3.0.0",
31
- "@commercetools/sdk-middleware-http": "7.0.1",
31
+ "@commercetools/sdk-middleware-http": "7.0.2",
32
32
  "@types/node-fetch": "2.6.2",
33
33
  "@types/prop-types": "^15.7.5",
34
- "@types/react": "^17.0.49",
35
- "@types/react-redux": "^7.1.24",
34
+ "@types/react": "^17.0.53",
35
+ "@types/react-redux": "^7.1.25",
36
36
  "buffer": "6.0.3",
37
37
  "fast-equals": "2.0.4",
38
38
  "omit-empty-es": "1.1.3",
@@ -46,8 +46,8 @@
46
46
  "@types/uuid": "8.3.4",
47
47
  "react": "17.0.2",
48
48
  "react-redux": "7.2.9",
49
- "redux": "4.2.0",
50
- "redux-thunk": "2.4.1"
49
+ "redux": "4.2.1",
50
+ "redux-thunk": "2.4.2"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": "17.x",