@trycourier/react-provider 1.56.3-internal.9b31124.0 → 1.56.3-internal.b37eaac.0

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.
@@ -11,5 +11,13 @@ Object.defineProperty(exports, "useCourier", {
11
11
  return _useCourier["default"];
12
12
  }
13
13
  });
14
+ Object.defineProperty(exports, "useCourierActions", {
15
+ enumerable: true,
16
+ get: function get() {
17
+ return _useCourierActions["default"];
18
+ }
19
+ });
20
+
21
+ var _useCourier = _interopRequireDefault(require("./use-courier"));
14
22
 
15
- var _useCourier = _interopRequireDefault(require("./use-courier"));
23
+ var _useCourierActions = _interopRequireDefault(require("./use-courier-actions"));
package/dist/index.js CHANGED
@@ -103,8 +103,12 @@ var CourierProvider = function CourierProvider(_ref) {
103
103
  _transport = _ref.transport,
104
104
  userId = _ref.userId,
105
105
  userSignature = _ref.userSignature,
106
- wsOptions = _ref.wsOptions;
106
+ _ref$wsOptions = _ref.wsOptions,
107
+ _wsOptions = _ref$wsOptions === void 0 ? {} : _ref$wsOptions;
107
108
 
109
+ var wsOptions = (0, _react.useMemo)(function () {
110
+ return _wsOptions;
111
+ }, [_wsOptions.connectionTimeout, _wsOptions.onClose, _wsOptions.onError, _wsOptions.url]);
108
112
  var clientSourceId = (0, _useClientSourceId["default"])({
109
113
  authorization: authorization,
110
114
  clientKey: clientKey,
package/dist/reducer.js CHANGED
@@ -47,6 +47,13 @@ var rootReducer = function rootReducer(state, action) {
47
47
  return _objectSpread(_objectSpread({}, state), action.payload);
48
48
  }
49
49
 
50
+ case "root/UPDATE_AUTH_TOKEN":
51
+ {
52
+ return _objectSpread(_objectSpread({}, state), {}, {
53
+ authorization: action.payload
54
+ });
55
+ }
56
+
50
57
  case "root/GET_BRAND/DONE":
51
58
  {
52
59
  return _objectSpread(_objectSpread({}, state), {}, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/react-provider",
3
- "version": "1.56.3-internal.9b31124.0+9b31124",
3
+ "version": "1.56.3-internal.b37eaac.0+b37eaac",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "typings/index.d.ts",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "license": "ISC",
17
17
  "dependencies": {
18
- "@trycourier/client-graphql": "^1.56.3-internal.9b31124.0+9b31124",
18
+ "@trycourier/client-graphql": "^1.56.3-internal.b37eaac.0+b37eaac",
19
19
  "buffer": "^6.0.3",
20
20
  "react-use": "^17.2.1",
21
21
  "reconnecting-websocket": "^4.4.0",
@@ -31,5 +31,5 @@
31
31
  "dist/",
32
32
  "typings/"
33
33
  ],
34
- "gitHead": "9b3112481484fc3e7c4921ecaef64b962c22bee5"
34
+ "gitHead": "b37eaac53f8fe24fbf2aac86ae5c9dd3de429948"
35
35
  }
@@ -1,2 +1,3 @@
1
1
  export { default as useCourier } from "./use-courier";
2
+ export { default as useCourierActions } from "./use-courier-actions";
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAiC,MAAM,OAAO,CAAC;AAGtD,OAAO,EACL,KAAK,EACL,eAAe,EACf,qBAAqB,EACrB,QAAQ,EACR,SAAS,EACV,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,eAAe,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
@@ -1 +1 @@
1
- {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../src/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,GAAG,CAAC;CACd;AAGD,eAAO,MAAM,eAAe,oCAM3B,CAAC;AAEF,QAAA,MAAM,WAAW,UAAW,QAAQ,eAAe,CAAC,qBAyCnD,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../src/reducer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,EAAE,GAAG,CAAC;CACd;AAGD,eAAO,MAAM,eAAe,oCAM3B,CAAC;AAEF,QAAA,MAAM,WAAW,UAAW,QAAQ,eAAe,CAAC,qBA+CnD,CAAC;AAEF,eAAe,WAAW,CAAC"}