cozy-client 38.11.1 → 40.0.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.
- package/dist/CozyClient.js +10 -2
- package/dist/CozyClient.spec.js +31 -0
- package/dist/helpers/index.js +6 -0
- package/dist/helpers/urlHelper.js +107 -14
- package/dist/helpers/urlHelper.spec.js +58 -1
- package/dist/index.js +7 -0
- package/dist/index.node.js +7 -0
- package/package.json +3 -3
- package/types/helpers/index.d.ts +1 -1
- package/types/helpers/urlHelper.d.ts +4 -0
- package/types/index.d.ts +1 -1
- package/types/index.node.d.ts +1 -1
package/dist/CozyClient.js
CHANGED
|
@@ -2263,9 +2263,17 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2263
2263
|
while (1) {
|
|
2264
2264
|
switch (_context17.prev = _context17.next) {
|
|
2265
2265
|
case 0:
|
|
2266
|
+
if (!(this.stackClient instanceof _cozyStackClient.OAuthClient)) {
|
|
2267
|
+
_context17.next = 4;
|
|
2268
|
+
break;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2266
2271
|
return _context17.abrupt("return", this.stackClient.checkForRevocation());
|
|
2267
2272
|
|
|
2268
|
-
case
|
|
2273
|
+
case 4:
|
|
2274
|
+
throw 'checkForRevocation is only implemented for OAutClient';
|
|
2275
|
+
|
|
2276
|
+
case 5:
|
|
2269
2277
|
case "end":
|
|
2270
2278
|
return _context17.stop();
|
|
2271
2279
|
}
|
|
@@ -2677,7 +2685,7 @@ var CozyClient = /*#__PURE__*/function () {
|
|
|
2677
2685
|
CozyClient.hooks = CozyClient.hooks || {};
|
|
2678
2686
|
CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
|
|
2679
2687
|
|
|
2680
|
-
CozyClient.version = "
|
|
2688
|
+
CozyClient.version = "40.0.0";
|
|
2681
2689
|
|
|
2682
2690
|
_microee.default.mixin(CozyClient);
|
|
2683
2691
|
|
package/dist/CozyClient.spec.js
CHANGED
|
@@ -2060,3 +2060,34 @@ describe('document creation', () => {
|
|
|
2060
2060
|
expect(updatedDoc.data.relationships.authors.data[0]._id).toBe(1)
|
|
2061
2061
|
})
|
|
2062
2062
|
})
|
|
2063
|
+
|
|
2064
|
+
describe('CozyClient revocation handling', () => {
|
|
2065
|
+
let client
|
|
2066
|
+
let mockCallback
|
|
2067
|
+
|
|
2068
|
+
beforeEach(() => {
|
|
2069
|
+
client = new CozyClient({})
|
|
2070
|
+
client.stackClient.refreshToken = jest.fn().mockImplementation(() => {
|
|
2071
|
+
client.stackClient.onRevocationChange(true)
|
|
2072
|
+
})
|
|
2073
|
+
|
|
2074
|
+
mockCallback = jest.fn()
|
|
2075
|
+
client.on('revoked', mockCallback)
|
|
2076
|
+
})
|
|
2077
|
+
|
|
2078
|
+
it('should call "revoked" event when token is expired', async () => {
|
|
2079
|
+
await client.stackClient.refreshToken()
|
|
2080
|
+
|
|
2081
|
+
expect(mockCallback).toHaveBeenCalledTimes(1)
|
|
2082
|
+
})
|
|
2083
|
+
|
|
2084
|
+
it('should not call "revoked" event when token is not expired', async () => {
|
|
2085
|
+
client.stackClient.refreshToken = jest.fn().mockImplementation(() => {
|
|
2086
|
+
client.stackClient.onRevocationChange(false)
|
|
2087
|
+
})
|
|
2088
|
+
|
|
2089
|
+
await client.stackClient.refreshToken()
|
|
2090
|
+
|
|
2091
|
+
expect(mockCallback).not.toHaveBeenCalled()
|
|
2092
|
+
})
|
|
2093
|
+
})
|
package/dist/helpers/index.js
CHANGED
|
@@ -51,6 +51,12 @@ Object.defineProperty(exports, "InvalidProtocolError", {
|
|
|
51
51
|
return _urlHelper.InvalidProtocolError;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
Object.defineProperty(exports, "BlockedCozyError", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _urlHelper.BlockedCozyError;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
54
60
|
Object.defineProperty(exports, "dehydrate", {
|
|
55
61
|
enumerable: true,
|
|
56
62
|
get: function get() {
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.rootCozyUrl = exports.InvalidCozyUrlError = exports.InvalidProtocolError = exports.InvalidRedirectLinkError = exports.deconstructRedirectLink = exports.deconstructCozyWebLinkWithSlug = exports.generateWebLink = exports.ensureFirstSlash = void 0;
|
|
8
|
+
exports.rootCozyUrl = exports.InvalidCozyUrlError = exports.BlockedCozyError = exports.InvalidProtocolError = exports.InvalidRedirectLinkError = exports.deconstructRedirectLink = exports.deconstructCozyWebLinkWithSlug = exports.generateWebLink = exports.ensureFirstSlash = void 0;
|
|
9
9
|
|
|
10
10
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
11
11
|
|
|
@@ -206,20 +206,39 @@ var InvalidProtocolError = /*#__PURE__*/function (_Error2) {
|
|
|
206
206
|
|
|
207
207
|
exports.InvalidProtocolError = InvalidProtocolError;
|
|
208
208
|
|
|
209
|
-
var
|
|
210
|
-
(0, _inherits2.default)(
|
|
209
|
+
var BlockedCozyError = /*#__PURE__*/function (_Error3) {
|
|
210
|
+
(0, _inherits2.default)(BlockedCozyError, _Error3);
|
|
211
211
|
|
|
212
|
-
var _super3 = _createSuper(
|
|
212
|
+
var _super3 = _createSuper(BlockedCozyError);
|
|
213
213
|
|
|
214
|
-
function
|
|
214
|
+
function BlockedCozyError(url) {
|
|
215
215
|
var _this3;
|
|
216
216
|
|
|
217
|
-
(0, _classCallCheck2.default)(this,
|
|
218
|
-
_this3 = _super3.call(this, "
|
|
217
|
+
(0, _classCallCheck2.default)(this, BlockedCozyError);
|
|
218
|
+
_this3 = _super3.call(this, "Blocked cozy ".concat(url.toString()));
|
|
219
219
|
_this3.url = url;
|
|
220
220
|
return _this3;
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
return BlockedCozyError;
|
|
224
|
+
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
225
|
+
|
|
226
|
+
exports.BlockedCozyError = BlockedCozyError;
|
|
227
|
+
|
|
228
|
+
var InvalidCozyUrlError = /*#__PURE__*/function (_Error4) {
|
|
229
|
+
(0, _inherits2.default)(InvalidCozyUrlError, _Error4);
|
|
230
|
+
|
|
231
|
+
var _super4 = _createSuper(InvalidCozyUrlError);
|
|
232
|
+
|
|
233
|
+
function InvalidCozyUrlError(url) {
|
|
234
|
+
var _this4;
|
|
235
|
+
|
|
236
|
+
(0, _classCallCheck2.default)(this, InvalidCozyUrlError);
|
|
237
|
+
_this4 = _super4.call(this, "URL ".concat(url.toString(), " does not seem to be a valid Cozy URL"));
|
|
238
|
+
_this4.url = url;
|
|
239
|
+
return _this4;
|
|
240
|
+
}
|
|
241
|
+
|
|
223
242
|
return InvalidCozyUrlError;
|
|
224
243
|
}( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
|
|
225
244
|
/* uri - Returns a well formed URL origin from a protocol, a hostname and a port
|
|
@@ -270,7 +289,12 @@ var wellKnownUrl = function wellKnownUrl(url) {
|
|
|
270
289
|
* page accessible from the given origin so we suppose it's a valid Cozy
|
|
271
290
|
* origin (i.e. it could be another site altogether though)
|
|
272
291
|
* - a 401 response status means the pointed page requires authentication so the
|
|
273
|
-
* origin is probably pointing to a
|
|
292
|
+
* origin is probably pointing to a cozy-app. In that case we should consider this
|
|
293
|
+
* URL to be invalid
|
|
294
|
+
* - a 503 response status with a "Blocked" reason means the pointed page is a Cozy
|
|
295
|
+
* but it is blocked. In that case we consider that the url is a valid Cozy origin
|
|
296
|
+
* but we want the method to throw as we cannot verify if the URL points to the
|
|
297
|
+
* Cozy's root or to a specifc slug. The caller is responsible to handle that exception
|
|
274
298
|
* - another status means there aren't any Cozy behind to the given origin
|
|
275
299
|
*
|
|
276
300
|
* @param {object} url Object of URL elements
|
|
@@ -280,13 +304,13 @@ var wellKnownUrl = function wellKnownUrl(url) {
|
|
|
280
304
|
*
|
|
281
305
|
* @returns {Promise<boolean>} True if we believe there's a Cozy behind the given origin
|
|
282
306
|
* @throws {InvalidCozyUrlError} Thrown when we know for sure there aren't any Cozy behind the given origin
|
|
307
|
+
* @throws {BlockedCozyError} Thrown when we know for sure there is Cozy behind the given origin but it is in a "Blocked" state
|
|
283
308
|
*/
|
|
284
309
|
|
|
285
310
|
|
|
286
311
|
var isValidOrigin = /*#__PURE__*/function () {
|
|
287
312
|
var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(url) {
|
|
288
|
-
var
|
|
289
|
-
|
|
313
|
+
var response, status;
|
|
290
314
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
291
315
|
while (1) {
|
|
292
316
|
switch (_context.prev = _context.next) {
|
|
@@ -295,8 +319,8 @@ var isValidOrigin = /*#__PURE__*/function () {
|
|
|
295
319
|
return fetch(wellKnownUrl(url));
|
|
296
320
|
|
|
297
321
|
case 2:
|
|
298
|
-
|
|
299
|
-
status =
|
|
322
|
+
response = _context.sent;
|
|
323
|
+
status = response.status;
|
|
300
324
|
|
|
301
325
|
if (!(status === 404)) {
|
|
302
326
|
_context.next = 6;
|
|
@@ -306,9 +330,21 @@ var isValidOrigin = /*#__PURE__*/function () {
|
|
|
306
330
|
throw new InvalidCozyUrlError(url);
|
|
307
331
|
|
|
308
332
|
case 6:
|
|
333
|
+
_context.next = 8;
|
|
334
|
+
return isResponseAboutBlockedCozy(response);
|
|
335
|
+
|
|
336
|
+
case 8:
|
|
337
|
+
if (!_context.sent) {
|
|
338
|
+
_context.next = 10;
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
throw new BlockedCozyError(url);
|
|
343
|
+
|
|
344
|
+
case 10:
|
|
309
345
|
return _context.abrupt("return", status === 200);
|
|
310
346
|
|
|
311
|
-
case
|
|
347
|
+
case 11:
|
|
312
348
|
case "end":
|
|
313
349
|
return _context.stop();
|
|
314
350
|
}
|
|
@@ -455,5 +491,62 @@ var rootCozyUrl = /*#__PURE__*/function () {
|
|
|
455
491
|
return _ref4.apply(this, arguments);
|
|
456
492
|
};
|
|
457
493
|
}();
|
|
494
|
+
/**
|
|
495
|
+
* Check if the given response is about a Cozy being blocked
|
|
496
|
+
*
|
|
497
|
+
* @param {Response} response - Fetch API response
|
|
498
|
+
* @returns {Promise<boolean>} true if the response is about a Cozy being blocked, false otherwize
|
|
499
|
+
*/
|
|
500
|
+
|
|
458
501
|
|
|
459
|
-
exports.rootCozyUrl = rootCozyUrl;
|
|
502
|
+
exports.rootCozyUrl = rootCozyUrl;
|
|
503
|
+
|
|
504
|
+
var isResponseAboutBlockedCozy = /*#__PURE__*/function () {
|
|
505
|
+
var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(response) {
|
|
506
|
+
var _data$some;
|
|
507
|
+
|
|
508
|
+
var contentType, isJson, data;
|
|
509
|
+
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
510
|
+
while (1) {
|
|
511
|
+
switch (_context3.prev = _context3.next) {
|
|
512
|
+
case 0:
|
|
513
|
+
if (!(response.status !== 503)) {
|
|
514
|
+
_context3.next = 2;
|
|
515
|
+
break;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
return _context3.abrupt("return", false);
|
|
519
|
+
|
|
520
|
+
case 2:
|
|
521
|
+
contentType = response.headers.get('content-type');
|
|
522
|
+
isJson = contentType && contentType.indexOf('json') >= 0;
|
|
523
|
+
_context3.next = 6;
|
|
524
|
+
return isJson ? response.json() : response.text();
|
|
525
|
+
|
|
526
|
+
case 6:
|
|
527
|
+
data = _context3.sent;
|
|
528
|
+
|
|
529
|
+
if (!(data !== null && data !== void 0 && (_data$some = data.some) !== null && _data$some !== void 0 && _data$some.call(data, function (reason) {
|
|
530
|
+
return reason.title === 'Blocked';
|
|
531
|
+
}))) {
|
|
532
|
+
_context3.next = 9;
|
|
533
|
+
break;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
return _context3.abrupt("return", true);
|
|
537
|
+
|
|
538
|
+
case 9:
|
|
539
|
+
return _context3.abrupt("return", false);
|
|
540
|
+
|
|
541
|
+
case 10:
|
|
542
|
+
case "end":
|
|
543
|
+
return _context3.stop();
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
}, _callee3);
|
|
547
|
+
}));
|
|
548
|
+
|
|
549
|
+
return function isResponseAboutBlockedCozy(_x3) {
|
|
550
|
+
return _ref5.apply(this, arguments);
|
|
551
|
+
};
|
|
552
|
+
}();
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
rootCozyUrl,
|
|
8
8
|
InvalidRedirectLinkError,
|
|
9
9
|
InvalidCozyUrlError,
|
|
10
|
-
InvalidProtocolError
|
|
10
|
+
InvalidProtocolError,
|
|
11
|
+
BlockedCozyError
|
|
11
12
|
} from './urlHelper'
|
|
12
13
|
|
|
13
14
|
describe('generateWebLink', () => {
|
|
@@ -420,4 +421,60 @@ describe('rootCozyUrl', () => {
|
|
|
420
421
|
rootCozyUrl(new URL('https://missing.mycozy.cloud'))
|
|
421
422
|
).rejects.toBeInstanceOf(InvalidCozyUrlError)
|
|
422
423
|
})
|
|
424
|
+
|
|
425
|
+
it('should reject if Blocked cozy', async () => {
|
|
426
|
+
fetch.mockResponse(() => {
|
|
427
|
+
return Promise.resolve({
|
|
428
|
+
headers: {
|
|
429
|
+
'content-type': 'application/json; charset=UTF-8'
|
|
430
|
+
},
|
|
431
|
+
body: JSON.stringify([
|
|
432
|
+
{
|
|
433
|
+
status: '503',
|
|
434
|
+
title: 'Blocked',
|
|
435
|
+
code: 'UNKNOWN',
|
|
436
|
+
detail: 'The Cozy is blocked for an unknown reason',
|
|
437
|
+
source: {}
|
|
438
|
+
}
|
|
439
|
+
]),
|
|
440
|
+
ok: false,
|
|
441
|
+
status: 503,
|
|
442
|
+
statusText: '',
|
|
443
|
+
type: 'default',
|
|
444
|
+
url: 'https://camillenimbus.com/.well-known/change-password'
|
|
445
|
+
})
|
|
446
|
+
})
|
|
447
|
+
|
|
448
|
+
await expect(
|
|
449
|
+
rootCozyUrl(new URL('https://camillenimbus.com'))
|
|
450
|
+
).rejects.toBeInstanceOf(BlockedCozyError)
|
|
451
|
+
})
|
|
452
|
+
|
|
453
|
+
it('should reject on 503 error (if not Blocked)', async () => {
|
|
454
|
+
fetch.mockResponse(() => {
|
|
455
|
+
return Promise.resolve({
|
|
456
|
+
headers: {
|
|
457
|
+
'content-type': 'application/json; charset=UTF-8'
|
|
458
|
+
},
|
|
459
|
+
body: JSON.stringify([
|
|
460
|
+
{
|
|
461
|
+
status: '503',
|
|
462
|
+
title: 'Some error',
|
|
463
|
+
code: 'UNKNOWN',
|
|
464
|
+
detail: 'Some error description',
|
|
465
|
+
source: {}
|
|
466
|
+
}
|
|
467
|
+
]),
|
|
468
|
+
ok: false,
|
|
469
|
+
status: 503,
|
|
470
|
+
statusText: '',
|
|
471
|
+
type: 'default',
|
|
472
|
+
url: 'https://camillenimbus.com/.well-known/change-password'
|
|
473
|
+
})
|
|
474
|
+
})
|
|
475
|
+
|
|
476
|
+
await expect(
|
|
477
|
+
rootCozyUrl(new URL('https://camillenimbus.com'))
|
|
478
|
+
).rejects.toBeInstanceOf(InvalidCozyUrlError)
|
|
479
|
+
})
|
|
423
480
|
})
|
package/dist/index.js
CHANGED
|
@@ -35,6 +35,7 @@ var _exportNames = {
|
|
|
35
35
|
InvalidRedirectLinkError: true,
|
|
36
36
|
InvalidCozyUrlError: true,
|
|
37
37
|
InvalidProtocolError: true,
|
|
38
|
+
BlockedCozyError: true,
|
|
38
39
|
cancelable: true,
|
|
39
40
|
isQueryLoading: true,
|
|
40
41
|
hasQueryBeenLoaded: true,
|
|
@@ -221,6 +222,12 @@ Object.defineProperty(exports, "InvalidProtocolError", {
|
|
|
221
222
|
return _helpers2.InvalidProtocolError;
|
|
222
223
|
}
|
|
223
224
|
});
|
|
225
|
+
Object.defineProperty(exports, "BlockedCozyError", {
|
|
226
|
+
enumerable: true,
|
|
227
|
+
get: function get() {
|
|
228
|
+
return _helpers2.BlockedCozyError;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
224
231
|
Object.defineProperty(exports, "cancelable", {
|
|
225
232
|
enumerable: true,
|
|
226
233
|
get: function get() {
|
package/dist/index.node.js
CHANGED
|
@@ -30,6 +30,7 @@ var _exportNames = {
|
|
|
30
30
|
rootCozyUrl: true,
|
|
31
31
|
InvalidCozyUrlError: true,
|
|
32
32
|
InvalidProtocolError: true,
|
|
33
|
+
BlockedCozyError: true,
|
|
33
34
|
cancelable: true,
|
|
34
35
|
getQueryFromState: true,
|
|
35
36
|
Registry: true,
|
|
@@ -176,6 +177,12 @@ Object.defineProperty(exports, "InvalidProtocolError", {
|
|
|
176
177
|
return _helpers.InvalidProtocolError;
|
|
177
178
|
}
|
|
178
179
|
});
|
|
180
|
+
Object.defineProperty(exports, "BlockedCozyError", {
|
|
181
|
+
enumerable: true,
|
|
182
|
+
get: function get() {
|
|
183
|
+
return _helpers.BlockedCozyError;
|
|
184
|
+
}
|
|
185
|
+
});
|
|
179
186
|
Object.defineProperty(exports, "cancelable", {
|
|
180
187
|
enumerable: true,
|
|
181
188
|
get: function get() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cozy-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "40.0.0",
|
|
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": "^
|
|
21
|
+
"cozy-stack-client": "^40.0.0",
|
|
22
22
|
"date-fns": "2.29.3",
|
|
23
23
|
"json-stable-stringify": "^1.0.1",
|
|
24
24
|
"lodash": "^4.17.13",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"react-native-ios11-devicecheck": "https://github.com/cozy/react-native-devicecheck#app-attest-v0.1"
|
|
74
74
|
},
|
|
75
75
|
"sideEffects": false,
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "3565b5df7e88225528c82afe5e1436018c75530f"
|
|
77
77
|
}
|
package/types/helpers/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { dehydrate } from "./dehydrateHelper";
|
|
2
|
-
export { deconstructCozyWebLinkWithSlug, deconstructRedirectLink, generateWebLink, ensureFirstSlash, rootCozyUrl, InvalidRedirectLinkError, InvalidCozyUrlError, InvalidProtocolError } from "./urlHelper";
|
|
2
|
+
export { deconstructCozyWebLinkWithSlug, deconstructRedirectLink, generateWebLink, ensureFirstSlash, rootCozyUrl, InvalidRedirectLinkError, InvalidCozyUrlError, InvalidProtocolError, BlockedCozyError } from "./urlHelper";
|
|
@@ -17,6 +17,10 @@ export class InvalidProtocolError extends Error {
|
|
|
17
17
|
constructor(url: any);
|
|
18
18
|
url: any;
|
|
19
19
|
}
|
|
20
|
+
export class BlockedCozyError extends Error {
|
|
21
|
+
constructor(url: any);
|
|
22
|
+
url: any;
|
|
23
|
+
}
|
|
20
24
|
export class InvalidCozyUrlError extends Error {
|
|
21
25
|
constructor(url: any);
|
|
22
26
|
url: any;
|
package/types/index.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ export { manifest, models };
|
|
|
19
19
|
export { QueryDefinition, Q, Mutations, MutationTypes, getDoctypeFromOperation } from "./queries/dsl";
|
|
20
20
|
export { Association, HasMany, HasOne, HasOneInPlace, HasManyInPlace, HasManyTriggers } from "./associations";
|
|
21
21
|
export { isReferencedBy, isReferencedById, getReferencedBy, getReferencedById } from "./associations/helpers";
|
|
22
|
-
export { deconstructCozyWebLinkWithSlug, deconstructRedirectLink, dehydrate, generateWebLink, ensureFirstSlash, rootCozyUrl, InvalidRedirectLinkError, InvalidCozyUrlError, InvalidProtocolError } from "./helpers";
|
|
22
|
+
export { deconstructCozyWebLinkWithSlug, deconstructRedirectLink, dehydrate, generateWebLink, ensureFirstSlash, rootCozyUrl, InvalidRedirectLinkError, InvalidCozyUrlError, InvalidProtocolError, BlockedCozyError } from "./helpers";
|
|
23
23
|
export { cancelable, isQueryLoading, hasQueryBeenLoaded } from "./utils";
|
|
24
24
|
export { queryConnect, queryConnectFlat, withClient } from "./hoc";
|
package/types/index.node.d.ts
CHANGED
|
@@ -14,4 +14,4 @@ import * as models from "./models";
|
|
|
14
14
|
export { manifest, models };
|
|
15
15
|
export { QueryDefinition, Mutations, MutationTypes, getDoctypeFromOperation, Q } from "./queries/dsl";
|
|
16
16
|
export { Association, HasMany, HasOne, HasOneInPlace, HasManyInPlace, HasManyTriggers } from "./associations";
|
|
17
|
-
export { deconstructCozyWebLinkWithSlug, deconstructRedirectLink, dehydrate, generateWebLink, ensureFirstSlash, rootCozyUrl, InvalidCozyUrlError, InvalidProtocolError } from "./helpers";
|
|
17
|
+
export { deconstructCozyWebLinkWithSlug, deconstructRedirectLink, dehydrate, generateWebLink, ensureFirstSlash, rootCozyUrl, InvalidCozyUrlError, InvalidProtocolError, BlockedCozyError } from "./helpers";
|