cozy-client 51.7.0 → 52.0.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.
@@ -1353,7 +1353,7 @@ var CozyClient = /*#__PURE__*/function () {
1353
1353
  requestFn = executeFromStore ? function () {
1354
1354
  return Promise.resolve((0, _store.executeQueryFromState)(_this4.store.getState(), queryDefinition));
1355
1355
  } : function () {
1356
- return _this4.requestQuery(queryDefinition);
1356
+ return _this4.requestQuery(queryDefinition, options);
1357
1357
  };
1358
1358
  _context8.next = 25;
1359
1359
  return this._promiseCache.exec(requestFn, function () {
@@ -1565,7 +1565,7 @@ var CozyClient = /*#__PURE__*/function () {
1565
1565
  this.dispatch((0, _store.initMutation)(mutationId, mutationDefinition));
1566
1566
  _context10.prev = 5;
1567
1567
  _context10.next = 8;
1568
- return this.requestMutation(mutationDefinition);
1568
+ return this.requestMutation(mutationDefinition, options);
1569
1569
 
1570
1570
  case 8:
1571
1571
  response = _context10.sent;
@@ -1606,14 +1606,14 @@ var CozyClient = /*#__PURE__*/function () {
1606
1606
  }, {
1607
1607
  key: "requestQuery",
1608
1608
  value: function () {
1609
- var _requestQuery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(definition) {
1609
+ var _requestQuery = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(definition, options) {
1610
1610
  var mainResponse, withIncluded;
1611
1611
  return _regenerator.default.wrap(function _callee11$(_context11) {
1612
1612
  while (1) {
1613
1613
  switch (_context11.prev = _context11.next) {
1614
1614
  case 0:
1615
1615
  _context11.next = 2;
1616
- return this.chain.request(definition);
1616
+ return this.chain.request(definition, options);
1617
1617
 
1618
1618
  case 2:
1619
1619
  mainResponse = _context11.sent;
@@ -1644,7 +1644,7 @@ var CozyClient = /*#__PURE__*/function () {
1644
1644
  }, _callee11, this);
1645
1645
  }));
1646
1646
 
1647
- function requestQuery(_x12) {
1647
+ function requestQuery(_x12, _x13) {
1648
1648
  return _requestQuery.apply(this, arguments);
1649
1649
  }
1650
1650
 
@@ -1745,7 +1745,7 @@ var CozyClient = /*#__PURE__*/function () {
1745
1745
  }, _callee12, this, [[12, 22, 25, 28]]);
1746
1746
  }));
1747
1747
 
1748
- function persistVirtualDocuments(_x13, _x14) {
1748
+ function persistVirtualDocuments(_x14, _x15) {
1749
1749
  return _persistVirtualDocuments.apply(this, arguments);
1750
1750
  }
1751
1751
 
@@ -1794,7 +1794,7 @@ var CozyClient = /*#__PURE__*/function () {
1794
1794
  }, _callee13, this);
1795
1795
  }));
1796
1796
 
1797
- function persistVirtualDocument(_x15, _x16) {
1797
+ function persistVirtualDocument(_x16, _x17) {
1798
1798
  return _persistVirtualDocument.apply(this, arguments);
1799
1799
  }
1800
1800
 
@@ -1910,7 +1910,7 @@ var CozyClient = /*#__PURE__*/function () {
1910
1910
  }, _callee14);
1911
1911
  }));
1912
1912
 
1913
- function fetchRelationships(_x17, _x18) {
1913
+ function fetchRelationships(_x18, _x19) {
1914
1914
  return _fetchRelationships.apply(this, arguments);
1915
1915
  }
1916
1916
 
@@ -1919,7 +1919,7 @@ var CozyClient = /*#__PURE__*/function () {
1919
1919
  }, {
1920
1920
  key: "requestMutation",
1921
1921
  value: function () {
1922
- var _requestMutation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(definition) {
1922
+ var _requestMutation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15(definition, options) {
1923
1923
  var _this6 = this;
1924
1924
 
1925
1925
  var _definition, first, rest, firstResponse;
@@ -1949,7 +1949,7 @@ var CozyClient = /*#__PURE__*/function () {
1949
1949
  return _context15.abrupt("return", firstResponse);
1950
1950
 
1951
1951
  case 8:
1952
- return _context15.abrupt("return", this.chain.request(definition));
1952
+ return _context15.abrupt("return", this.chain.request(definition, options));
1953
1953
 
1954
1954
  case 9:
1955
1955
  case "end":
@@ -1959,7 +1959,7 @@ var CozyClient = /*#__PURE__*/function () {
1959
1959
  }, _callee15, this);
1960
1960
  }));
1961
1961
 
1962
- function requestMutation(_x19) {
1962
+ function requestMutation(_x20, _x21) {
1963
1963
  return _requestMutation.apply(this, arguments);
1964
1964
  }
1965
1965
 
@@ -2245,7 +2245,7 @@ var CozyClient = /*#__PURE__*/function () {
2245
2245
  }, _callee16, this);
2246
2246
  }));
2247
2247
 
2248
- function startOAuthFlow(_x20) {
2248
+ function startOAuthFlow(_x22) {
2249
2249
  return _startOAuthFlow.apply(this, arguments);
2250
2250
  }
2251
2251
 
@@ -2786,7 +2786,7 @@ var CozyClient = /*#__PURE__*/function () {
2786
2786
  }, _callee21, this);
2787
2787
  }));
2788
2788
 
2789
- function getSettings(_x21, _x22) {
2789
+ function getSettings(_x23, _x24) {
2790
2790
  return _getSettings2.apply(this, arguments);
2791
2791
  }
2792
2792
 
@@ -2824,7 +2824,7 @@ var CozyClient = /*#__PURE__*/function () {
2824
2824
  }, _callee22, this);
2825
2825
  }));
2826
2826
 
2827
- function saveAfterFetchSettings(_x23, _x24, _x25) {
2827
+ function saveAfterFetchSettings(_x25, _x26, _x27) {
2828
2828
  return _saveAfterFetchSettings2.apply(this, arguments);
2829
2829
  }
2830
2830
 
@@ -2881,7 +2881,7 @@ var CozyClient = /*#__PURE__*/function () {
2881
2881
  }, _callee23, this, [[0, 10]]);
2882
2882
  }));
2883
2883
 
2884
- function resetQuery(_x26) {
2884
+ function resetQuery(_x28) {
2885
2885
  return _resetQuery2.apply(this, arguments);
2886
2886
  }
2887
2887
 
@@ -2956,7 +2956,7 @@ var CozyClient = /*#__PURE__*/function () {
2956
2956
  }, _callee24);
2957
2957
  }));
2958
2958
 
2959
- function fromOldOAuthClient(_x27, _x28) {
2959
+ function fromOldOAuthClient(_x29, _x30) {
2960
2960
  return _fromOldOAuthClient.apply(this, arguments);
2961
2961
  }
2962
2962
 
@@ -3049,7 +3049,7 @@ var CozyClient = /*#__PURE__*/function () {
3049
3049
  CozyClient.hooks = CozyClient.hooks || {};
3050
3050
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
3051
3051
 
3052
- CozyClient.version = "51.7.0";
3052
+ CozyClient.version = "52.0.1";
3053
3053
 
3054
3054
  _microee.default.mixin(CozyClient);
3055
3055
 
@@ -64,13 +64,13 @@ describe('CozyClient initialization', () => {
64
64
 
65
65
  beforeEach(() => {
66
66
  links = [
67
- new CozyLink((operation, result = '', forward) => {
68
- return forward(operation, result + 'foo')
67
+ new CozyLink((operation, options, result = '', forward) => {
68
+ return forward(operation, options, result + 'foo')
69
69
  }),
70
- new CozyLink((operation, result, forward) => {
71
- return forward(operation, result + 'bar')
70
+ new CozyLink((operation, options, result, forward) => {
71
+ return forward(operation, options, result + 'bar')
72
72
  }),
73
- (operation, result) => {
73
+ (operation, options, result) => {
74
74
  return result + 'baz'
75
75
  }
76
76
  ]
@@ -475,13 +475,13 @@ describe('CozyClient logout', () => {
475
475
 
476
476
  beforeEach(() => {
477
477
  links = [
478
- new CozyLink((operation, result = '', forward) => {
479
- return forward(operation, result + 'foo')
478
+ new CozyLink((operation, options, result = '', forward) => {
479
+ return forward(operation, options, result + 'foo')
480
480
  }),
481
- new CozyLink((operation, result, forward) => {
482
- return forward(operation, result + 'bar')
481
+ new CozyLink((operation, options, result, forward) => {
482
+ return forward(operation, options, result + 'bar')
483
483
  }),
484
- (operation, result) => {
484
+ (operation, options, result) => {
485
485
  return result + 'baz'
486
486
  }
487
487
  ]
@@ -632,13 +632,13 @@ describe('CozyClient login', () => {
632
632
 
633
633
  beforeEach(() => {
634
634
  links = [
635
- new CozyLink((operation, result = '', forward) => {
636
- return forward(operation, result + 'foo')
635
+ new CozyLink((operation, options, result = '', forward) => {
636
+ return forward(operation, options, result + 'foo')
637
637
  }),
638
- new CozyLink((operation, result, forward) => {
639
- return forward(operation, result + 'bar')
638
+ new CozyLink((operation, options, result, forward) => {
639
+ return forward(operation, options, result + 'bar')
640
640
  }),
641
- (operation, result) => {
641
+ (operation, options, result) => {
642
642
  return result + 'baz'
643
643
  }
644
644
  ]
package/dist/CozyLink.js CHANGED
@@ -33,6 +33,7 @@ var CozyLink = /*#__PURE__*/function () {
33
33
  * Request the given operation from the link
34
34
  *
35
35
  * @param {any} operation - The operation to request
36
+ * @param {any} options - The request options
36
37
  * @param {any} result - The result from the previous request of the chain
37
38
  * @param {any} forward - The next request of the chain
38
39
  * @returns {Promise<any>}
@@ -42,7 +43,7 @@ var CozyLink = /*#__PURE__*/function () {
42
43
  (0, _createClass2.default)(CozyLink, [{
43
44
  key: "request",
44
45
  value: function () {
45
- var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(operation, result, forward) {
46
+ var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(operation, options, result, forward) {
46
47
  return _regenerator.default.wrap(function _callee$(_context) {
47
48
  while (1) {
48
49
  switch (_context.prev = _context.next) {
@@ -57,7 +58,7 @@ var CozyLink = /*#__PURE__*/function () {
57
58
  }, _callee);
58
59
  }));
59
60
 
60
- function request(_x, _x2, _x3) {
61
+ function request(_x, _x2, _x3, _x4) {
61
62
  return _request.apply(this, arguments);
62
63
  }
63
64
 
@@ -89,7 +90,7 @@ var CozyLink = /*#__PURE__*/function () {
89
90
  }, _callee2);
90
91
  }));
91
92
 
92
- function persistCozyData(_x4, _x5) {
93
+ function persistCozyData(_x5, _x6) {
93
94
  return _persistCozyData.apply(this, arguments);
94
95
  }
95
96
 
@@ -135,7 +136,7 @@ var toLink = function toLink(handler) {
135
136
  return typeof handler === 'function' ? new CozyLink(handler) : handler;
136
137
  };
137
138
 
138
- var defaultLinkRequestHandler = function defaultLinkRequestHandler(operation, result) {
139
+ var defaultLinkRequestHandler = function defaultLinkRequestHandler(operation, options, result) {
139
140
  if (result) return result;else if (operation.execute) return operation.execute();else throw new Error("No link could handle operation ".concat(JSON.stringify(operation)));
140
141
  };
141
142
 
@@ -151,12 +152,12 @@ var chain = function chain(links) {
151
152
  exports.chain = chain;
152
153
 
153
154
  var concat = function concat(firstLink, nextLink) {
154
- var requestHandler = function requestHandler(operation, result, forward) {
155
- var nextForward = function nextForward(op, res) {
156
- return nextLink.request(op, res, forward);
155
+ var requestHandler = function requestHandler(operation, options, result, forward) {
156
+ var nextForward = function nextForward(op, opts, res) {
157
+ return nextLink.request(op, opts, res, forward);
157
158
  };
158
159
 
159
- return firstLink.request(operation, result, nextForward);
160
+ return firstLink.request(operation, options, result, nextForward);
160
161
  };
161
162
 
162
163
  var persistHandler = function persistHandler(data, forward) {
@@ -3,13 +3,13 @@ import CozyLink, { chain } from './CozyLink'
3
3
  describe('CozyLink', () => {
4
4
  it('should be chainable', () => {
5
5
  const link = chain([
6
- new CozyLink((operation, result = '', forward) => {
7
- return forward(operation, result + 'foo')
6
+ new CozyLink((operation, options, result = '', forward) => {
7
+ return forward(operation, options, result + 'foo')
8
8
  }),
9
- new CozyLink((operation, result, forward) => {
10
- return forward(operation, result + 'bar')
9
+ new CozyLink((operation, options, result, forward) => {
10
+ return forward(operation, options, result + 'bar')
11
11
  }),
12
- (operation, result) => {
12
+ (operation, options, result) => {
13
13
  return result + 'baz'
14
14
  }
15
15
  ])
@@ -19,8 +19,8 @@ describe('CozyLink', () => {
19
19
  describe('default last link', () => {
20
20
  it('should throw an error when called without result', () => {
21
21
  const link = chain([
22
- new CozyLink((operation, result = '', forward) => {
23
- return forward(operation)
22
+ new CozyLink((operation, options, result = '', forward) => {
23
+ return forward(operation, options)
24
24
  })
25
25
  ])
26
26
  expect(() =>
@@ -28,10 +28,10 @@ describe('CozyLink', () => {
28
28
  ).toThrowErrorMatchingSnapshot()
29
29
  })
30
30
 
31
- it('should return the final result if tehre is one', () => {
31
+ it('should return the final result if there is one', () => {
32
32
  const link = chain([
33
- new CozyLink((operation, result, forward) => {
34
- return forward(operation, 'foo')
33
+ new CozyLink((operation, options, result, forward) => {
34
+ return forward(operation, options, 'foo')
35
35
  })
36
36
  ])
37
37
 
@@ -40,8 +40,8 @@ describe('CozyLink', () => {
40
40
 
41
41
  it('should call the custom execution function', () => {
42
42
  const link = chain([
43
- new CozyLink((operation, result = '', forward) => {
44
- return forward(operation)
43
+ new CozyLink((operation, options, result = '', forward) => {
44
+ return forward(operation, options)
45
45
  })
46
46
  ])
47
47
  const spyFn = jest.fn(() => 'bar')
package/dist/StackLink.js CHANGED
@@ -175,12 +175,12 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
175
175
  }, {
176
176
  key: "request",
177
177
  value: function () {
178
- var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(operation, result, forward) {
178
+ var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(operation, options, result, forward) {
179
179
  return _regenerator.default.wrap(function _callee2$(_context2) {
180
180
  while (1) {
181
181
  switch (_context2.prev = _context2.next) {
182
182
  case 0:
183
- _context2.t0 = this.isOnline;
183
+ _context2.t0 = !(options !== null && options !== void 0 && options.forceStack) && this.isOnline;
184
184
 
185
185
  if (!_context2.t0) {
186
186
  _context2.next = 5;
@@ -199,7 +199,7 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
199
199
  break;
200
200
  }
201
201
 
202
- return _context2.abrupt("return", forward(operation));
202
+ return _context2.abrupt("return", forward(operation, options));
203
203
 
204
204
  case 7:
205
205
  _context2.prev = 7;
@@ -210,7 +210,7 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
210
210
  }
211
211
 
212
212
  _context2.next = 11;
213
- return this.executeMutation(operation, result, forward);
213
+ return this.executeMutation(operation, options, result, forward);
214
214
 
215
215
  case 11:
216
216
  return _context2.abrupt("return", _context2.sent);
@@ -226,12 +226,12 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
226
226
  _context2.prev = 17;
227
227
  _context2.t1 = _context2["catch"](7);
228
228
 
229
- if (!(0, _utils.isReactNativeOfflineError)(_context2.t1)) {
229
+ if (!(!(options !== null && options !== void 0 && options.forceStack) && (0, _utils.isReactNativeOfflineError)(_context2.t1))) {
230
230
  _context2.next = 21;
231
231
  break;
232
232
  }
233
233
 
234
- return _context2.abrupt("return", forward(operation));
234
+ return _context2.abrupt("return", forward(operation, options));
235
235
 
236
236
  case 21:
237
237
  throw _context2.t1;
@@ -244,7 +244,7 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
244
244
  }, _callee2, this, [[7, 17]]);
245
245
  }));
246
246
 
247
- function request(_x, _x2, _x3) {
247
+ function request(_x, _x2, _x3, _x4) {
248
248
  return _request.apply(this, arguments);
249
249
  }
250
250
 
@@ -268,7 +268,7 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
268
268
  }, _callee3);
269
269
  }));
270
270
 
271
- function persistCozyData(_x4, _x5) {
271
+ function persistCozyData(_x5, _x6) {
272
272
  return _persistCozyData.apply(this, arguments);
273
273
  }
274
274
 
@@ -319,7 +319,7 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
319
319
  }, {
320
320
  key: "executeMutation",
321
321
  value: function () {
322
- var _executeMutation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(mutation, result, forward) {
322
+ var _executeMutation = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(mutation, options, result, forward) {
323
323
  var mutationType, doc, docs, props, updateAllResp;
324
324
  return _regenerator.default.wrap(function _callee4$(_context4) {
325
325
  while (1) {
@@ -379,7 +379,7 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
379
379
  return _context4.abrupt("return", this.stackClient.collection(_const.DOCTYPE_FILES).upload(props.file, props.dirPath));
380
380
 
381
381
  case 24:
382
- return _context4.abrupt("return", forward(mutation, result));
382
+ return _context4.abrupt("return", forward(mutation, options, result));
383
383
 
384
384
  case 25:
385
385
  case "end":
@@ -389,7 +389,7 @@ var StackLink = /*#__PURE__*/function (_CozyLink) {
389
389
  }, _callee4, this);
390
390
  }));
391
391
 
392
- function executeMutation(_x6, _x7, _x8) {
392
+ function executeMutation(_x7, _x8, _x9, _x10) {
393
393
  return _executeMutation.apply(this, arguments);
394
394
  }
395
395
 
@@ -76,12 +76,12 @@ var WebFlagshipLink = /*#__PURE__*/function (_CozyLink) {
76
76
  }, {
77
77
  key: "request",
78
78
  value: function () {
79
- var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(operation, result, forward) {
79
+ var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(operation, options, result, forward) {
80
80
  return _regenerator.default.wrap(function _callee2$(_context2) {
81
81
  while (1) {
82
82
  switch (_context2.prev = _context2.next) {
83
83
  case 0:
84
- return _context2.abrupt("return", this.webviewIntent.call('flagshipLinkRequest', operation));
84
+ return _context2.abrupt("return", this.webviewIntent.call('flagshipLinkRequest', operation, options));
85
85
 
86
86
  case 1:
87
87
  case "end":
@@ -91,7 +91,7 @@ var WebFlagshipLink = /*#__PURE__*/function (_CozyLink) {
91
91
  }, _callee2, this);
92
92
  }));
93
93
 
94
- function request(_x, _x2, _x3) {
94
+ function request(_x, _x2, _x3, _x4) {
95
95
  return _request.apply(this, arguments);
96
96
  }
97
97
 
@@ -115,7 +115,7 @@ var WebFlagshipLink = /*#__PURE__*/function (_CozyLink) {
115
115
  }, _callee3);
116
116
  }));
117
117
 
118
- function persistCozyData(_x4, _x5) {
118
+ function persistCozyData(_x5, _x6) {
119
119
  return _persistCozyData.apply(this, arguments);
120
120
  }
121
121
 
@@ -388,10 +388,10 @@ var formatDateMetadataValue = function formatDateMetadataValue(value, _ref3) {
388
388
 
389
389
  if (value) {
390
390
  if (lang === 'en') {
391
- return f(value, 'MM/DD/YYYY');
391
+ return f(value, 'LL/dd/yyyy');
392
392
  }
393
393
 
394
- return f(value, 'DD/MM/YYYY');
394
+ return f(value, 'dd/LL/yyyy');
395
395
  } else {
396
396
  return t('Scan.qualification.noInfo');
397
397
  }
package/dist/types.js CHANGED
@@ -309,6 +309,7 @@ var _dsl = require("./queries/dsl");
309
309
  * a single doc instead of an array for single doc queries. Defaults to false for backward
310
310
  * compatibility but will be set to true in the future.
311
311
  * @property {boolean} [executeFromStore=false] - If set to true, the query will be run directly on the current store's state
312
+ * @property {boolean} [forceStack] - If set to true, the query will be executed through StackLink only even if there are other links available
312
313
  */
313
314
 
314
315
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "51.7.0",
3
+ "version": "52.0.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -18,7 +18,7 @@
18
18
  "@types/jest": "^26.0.20",
19
19
  "@types/lodash": "^4.14.170",
20
20
  "btoa": "^1.2.1",
21
- "cozy-stack-client": "^51.6.0",
21
+ "cozy-stack-client": "^52.0.0",
22
22
  "date-fns": "2.29.3",
23
23
  "json-stable-stringify": "^1.0.1",
24
24
  "lodash": "^4.17.13",
@@ -72,5 +72,5 @@
72
72
  "react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
73
73
  },
74
74
  "sideEffects": false,
75
- "gitHead": "86418c696e22dcf873aa9d84ed195253ec058783"
75
+ "gitHead": "1dc4f9c1de6c1c740953bbfb2887f9a99cb1bdcf"
76
76
  }
@@ -535,7 +535,7 @@ declare class CozyClient {
535
535
  * @private
536
536
  */
537
537
  private fetchRelationships;
538
- requestMutation(definition: any): any;
538
+ requestMutation(definition: any, options: any): any;
539
539
  getIncludesRelationships(queryDefinition: any): import("lodash").Dictionary<any>;
540
540
  /**
541
541
  * Returns documents with their relationships resolved according to their schema.
@@ -4,11 +4,12 @@ export default class CozyLink {
4
4
  * Request the given operation from the link
5
5
  *
6
6
  * @param {any} operation - The operation to request
7
+ * @param {any} options - The request options
7
8
  * @param {any} result - The result from the previous request of the chain
8
9
  * @param {any} forward - The next request of the chain
9
10
  * @returns {Promise<any>}
10
11
  */
11
- request(operation: any, result: any, forward: any): Promise<any>;
12
+ request(operation: any, options: any, result: any, forward: any): Promise<any>;
12
13
  /**
13
14
  * Persist the given data into the links storage
14
15
  *
@@ -27,7 +27,7 @@ export default class StackLink extends CozyLink {
27
27
  * @returns {Promise<import("./types").ClientResponse>}
28
28
  */
29
29
  executeQuery(query: QueryDefinition): Promise<import("./types").ClientResponse>;
30
- executeMutation(mutation: any, result: any, forward: any): Promise<any>;
30
+ executeMutation(mutation: any, options: any, result: any, forward: any): Promise<any>;
31
31
  }
32
32
  export type StackLinkOptions = {
33
33
  /**
package/types/types.d.ts CHANGED
@@ -553,6 +553,10 @@ export type QueryOptions = {
553
553
  * - If set to true, the query will be run directly on the current store's state
554
554
  */
555
555
  executeFromStore?: boolean;
556
+ /**
557
+ * - If set to true, the query will be executed through StackLink only even if there are other links available
558
+ */
559
+ forceStack?: boolean;
556
560
  };
557
561
  export type Query = {
558
562
  definition: QueryDefinition;