@atlaskit/editor-synced-block-provider 3.3.0 → 3.4.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.
Files changed (24) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/clients/block-service/blockService.js +92 -46
  3. package/dist/cjs/providers/block-service/blockServiceAPI.js +262 -75
  4. package/dist/cjs/providers/syncBlockProvider.js +85 -47
  5. package/dist/cjs/store-manager/sourceSyncBlockStoreManager.js +33 -6
  6. package/dist/es2019/clients/block-service/blockService.js +24 -0
  7. package/dist/es2019/providers/block-service/blockServiceAPI.js +105 -1
  8. package/dist/es2019/providers/syncBlockProvider.js +26 -13
  9. package/dist/es2019/store-manager/sourceSyncBlockStoreManager.js +31 -6
  10. package/dist/esm/clients/block-service/blockService.js +91 -45
  11. package/dist/esm/providers/block-service/blockServiceAPI.js +263 -74
  12. package/dist/esm/providers/syncBlockProvider.js +85 -47
  13. package/dist/esm/store-manager/sourceSyncBlockStoreManager.js +33 -6
  14. package/dist/types/clients/block-service/blockService.d.ts +16 -0
  15. package/dist/types/providers/block-service/blockServiceAPI.d.ts +11 -0
  16. package/dist/types/providers/syncBlockProvider.d.ts +1 -1
  17. package/dist/types/providers/types.d.ts +1 -0
  18. package/dist/types/store-manager/sourceSyncBlockStoreManager.d.ts +3 -0
  19. package/dist/types-ts4.5/clients/block-service/blockService.d.ts +16 -0
  20. package/dist/types-ts4.5/providers/block-service/blockServiceAPI.d.ts +11 -0
  21. package/dist/types-ts4.5/providers/syncBlockProvider.d.ts +1 -1
  22. package/dist/types-ts4.5/providers/types.d.ts +1 -0
  23. package/dist/types-ts4.5/store-manager/sourceSyncBlockStoreManager.d.ts +3 -0
  24. package/package.json +8 -2
@@ -15,8 +15,9 @@ var _ari = require("../../clients/block-service/ari");
15
15
  var _blockService = require("../../clients/block-service/blockService");
16
16
  var _types = require("../../common/types");
17
17
  var _errorHandling = require("../../utils/errorHandling");
18
- /* eslint-disable require-unicode-regexp */
19
-
18
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
19
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
20
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; } /* eslint-disable require-unicode-regexp */
20
21
  var mapBlockError = function mapBlockError(error) {
21
22
  switch (error.status) {
22
23
  case 400:
@@ -205,6 +206,192 @@ var BlockServiceADFFetchProvider = /*#__PURE__*/function () {
205
206
  }
206
207
  return fetchData;
207
208
  }()
209
+ /**
210
+ * Extracts the resourceId from a block ARI.
211
+ * Block ARI format: ari:cloud:blocks:<cloudId>:synced-block/<resourceId>
212
+ */
213
+ }, {
214
+ key: "extractResourceIdFromBlockAri",
215
+ value: function extractResourceIdFromBlockAri(blockAri) {
216
+ var match = blockAri.match(/ari:cloud:blocks:[^:]+:synced-block\/(.+)$/);
217
+ return match === null || match === void 0 ? void 0 : match[1];
218
+ }
219
+
220
+ /**
221
+ * Batch fetches multiple synced blocks by their resource IDs.
222
+ * @param resourceIds - Array of resource IDs to fetch
223
+ * @returns Array of SyncBlockInstance results
224
+ */
225
+ }, {
226
+ key: "batchFetchData",
227
+ value: (function () {
228
+ var _batchFetchData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(resourceIds) {
229
+ var _this = this;
230
+ var blockAris, validResourceIds, processedResourceIds, response, results, _iterator, _step, blockContentResponse, resourceId, value, syncedBlockData, _iterator2, _step2, errorResponse, _resourceId, _iterator3, _step3, _resourceId2;
231
+ return _regenerator.default.wrap(function _callee3$(_context3) {
232
+ while (1) switch (_context3.prev = _context3.next) {
233
+ case 0:
234
+ blockAris = resourceIds.map(function (resourceId) {
235
+ return (0, _ari.generateBlockAriFromReference)({
236
+ cloudId: _this.cloudId,
237
+ resourceId: resourceId
238
+ });
239
+ }); // Create a set of valid resourceIds for validation
240
+ validResourceIds = new Set(resourceIds); // Track which resourceIds have been processed
241
+ processedResourceIds = new Set();
242
+ _context3.prev = 3;
243
+ _context3.next = 6;
244
+ return (0, _blockService.batchRetrieveSyncedBlocks)({
245
+ blockAris: blockAris
246
+ });
247
+ case 6:
248
+ response = _context3.sent;
249
+ results = []; // Process successful blocks
250
+ if (!response.success) {
251
+ _context3.next = 33;
252
+ break;
253
+ }
254
+ _iterator = _createForOfIteratorHelper(response.success);
255
+ _context3.prev = 10;
256
+ _iterator.s();
257
+ case 12:
258
+ if ((_step = _iterator.n()).done) {
259
+ _context3.next = 25;
260
+ break;
261
+ }
262
+ blockContentResponse = _step.value;
263
+ // Extract resourceId from the returned blockAri
264
+ resourceId = this.extractResourceIdFromBlockAri(blockContentResponse.blockAri);
265
+ if (!(!resourceId || !validResourceIds.has(resourceId))) {
266
+ _context3.next = 17;
267
+ break;
268
+ }
269
+ return _context3.abrupt("continue", 23);
270
+ case 17:
271
+ processedResourceIds.add(resourceId);
272
+ value = blockContentResponse.content;
273
+ if (value) {
274
+ _context3.next = 22;
275
+ break;
276
+ }
277
+ results.push({
278
+ error: _types.SyncBlockError.NotFound,
279
+ resourceId: resourceId
280
+ });
281
+ return _context3.abrupt("continue", 23);
282
+ case 22:
283
+ try {
284
+ syncedBlockData = JSON.parse(value);
285
+ results.push({
286
+ data: {
287
+ content: syncedBlockData,
288
+ resourceId: blockContentResponse.blockAri,
289
+ blockInstanceId: blockContentResponse.blockInstanceId,
290
+ sourceAri: blockContentResponse.sourceAri,
291
+ product: blockContentResponse.product
292
+ },
293
+ resourceId: resourceId
294
+ });
295
+ } catch (_unused2) {
296
+ results.push({
297
+ error: _types.SyncBlockError.Errored,
298
+ resourceId: resourceId
299
+ });
300
+ }
301
+ case 23:
302
+ _context3.next = 12;
303
+ break;
304
+ case 25:
305
+ _context3.next = 30;
306
+ break;
307
+ case 27:
308
+ _context3.prev = 27;
309
+ _context3.t0 = _context3["catch"](10);
310
+ _iterator.e(_context3.t0);
311
+ case 30:
312
+ _context3.prev = 30;
313
+ _iterator.f();
314
+ return _context3.finish(30);
315
+ case 33:
316
+ if (!response.error) {
317
+ _context3.next = 54;
318
+ break;
319
+ }
320
+ _iterator2 = _createForOfIteratorHelper(response.error);
321
+ _context3.prev = 35;
322
+ _iterator2.s();
323
+ case 37:
324
+ if ((_step2 = _iterator2.n()).done) {
325
+ _context3.next = 46;
326
+ break;
327
+ }
328
+ errorResponse = _step2.value;
329
+ // Extract resourceId from the returned blockAri
330
+ _resourceId = this.extractResourceIdFromBlockAri(errorResponse.blockAri);
331
+ if (!(!_resourceId || !validResourceIds.has(_resourceId))) {
332
+ _context3.next = 42;
333
+ break;
334
+ }
335
+ return _context3.abrupt("continue", 44);
336
+ case 42:
337
+ processedResourceIds.add(_resourceId);
338
+ results.push({
339
+ error: _types.SyncBlockError.Errored,
340
+ resourceId: _resourceId
341
+ });
342
+ case 44:
343
+ _context3.next = 37;
344
+ break;
345
+ case 46:
346
+ _context3.next = 51;
347
+ break;
348
+ case 48:
349
+ _context3.prev = 48;
350
+ _context3.t1 = _context3["catch"](35);
351
+ _iterator2.e(_context3.t1);
352
+ case 51:
353
+ _context3.prev = 51;
354
+ _iterator2.f();
355
+ return _context3.finish(51);
356
+ case 54:
357
+ // Ensure all resourceIds have a result - return NotFound for any missing ones
358
+ _iterator3 = _createForOfIteratorHelper(resourceIds);
359
+ try {
360
+ for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
361
+ _resourceId2 = _step3.value;
362
+ if (!processedResourceIds.has(_resourceId2)) {
363
+ results.push({
364
+ error: _types.SyncBlockError.NotFound,
365
+ resourceId: _resourceId2
366
+ });
367
+ }
368
+ }
369
+ } catch (err) {
370
+ _iterator3.e(err);
371
+ } finally {
372
+ _iterator3.f();
373
+ }
374
+ return _context3.abrupt("return", results);
375
+ case 59:
376
+ _context3.prev = 59;
377
+ _context3.t2 = _context3["catch"](3);
378
+ return _context3.abrupt("return", resourceIds.map(function (resourceId) {
379
+ return {
380
+ error: _context3.t2 instanceof _blockService.BlockError ? mapBlockError(_context3.t2) : _types.SyncBlockError.Errored,
381
+ resourceId: resourceId
382
+ };
383
+ }));
384
+ case 62:
385
+ case "end":
386
+ return _context3.stop();
387
+ }
388
+ }, _callee3, this, [[3, 59], [10, 27, 30, 33], [35, 48, 51, 54]]);
389
+ }));
390
+ function batchFetchData(_x3) {
391
+ return _batchFetchData.apply(this, arguments);
392
+ }
393
+ return batchFetchData;
394
+ }())
208
395
  }]);
209
396
  }();
210
397
  /**
@@ -229,10 +416,10 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
229
416
  return (0, _createClass2.default)(BlockServiceADFWriteProvider, [{
230
417
  key: "writeData",
231
418
  value: function () {
232
- var _writeData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data) {
419
+ var _writeData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
233
420
  var resourceId, blockAri, stepVersion;
234
- return _regenerator.default.wrap(function _callee3$(_context3) {
235
- while (1) switch (_context3.prev = _context3.next) {
421
+ return _regenerator.default.wrap(function _callee4$(_context4) {
422
+ while (1) switch (_context4.prev = _context4.next) {
236
423
  case 0:
237
424
  resourceId = data.resourceId;
238
425
  blockAri = (0, _ari.generateBlockAri)({
@@ -242,40 +429,40 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
242
429
  resourceId: resourceId
243
430
  });
244
431
  stepVersion = this.getVersion ? this.getVersion() : undefined;
245
- _context3.prev = 3;
246
- _context3.next = 6;
432
+ _context4.prev = 3;
433
+ _context4.next = 6;
247
434
  return (0, _blockService.updateSyncedBlock)({
248
435
  blockAri: blockAri,
249
436
  content: JSON.stringify(data.content),
250
437
  stepVersion: stepVersion
251
438
  });
252
439
  case 6:
253
- return _context3.abrupt("return", {
440
+ return _context4.abrupt("return", {
254
441
  resourceId: resourceId
255
442
  });
256
443
  case 9:
257
- _context3.prev = 9;
258
- _context3.t0 = _context3["catch"](3);
259
- if (!(_context3.t0 instanceof _blockService.BlockError)) {
260
- _context3.next = 13;
444
+ _context4.prev = 9;
445
+ _context4.t0 = _context4["catch"](3);
446
+ if (!(_context4.t0 instanceof _blockService.BlockError)) {
447
+ _context4.next = 13;
261
448
  break;
262
449
  }
263
- return _context3.abrupt("return", {
264
- error: mapBlockError(_context3.t0),
450
+ return _context4.abrupt("return", {
451
+ error: mapBlockError(_context4.t0),
265
452
  resourceId: resourceId
266
453
  });
267
454
  case 13:
268
- return _context3.abrupt("return", {
269
- error: (0, _errorHandling.stringifyError)(_context3.t0),
455
+ return _context4.abrupt("return", {
456
+ error: (0, _errorHandling.stringifyError)(_context4.t0),
270
457
  resourceId: resourceId
271
458
  });
272
459
  case 14:
273
460
  case "end":
274
- return _context3.stop();
461
+ return _context4.stop();
275
462
  }
276
- }, _callee3, this, [[3, 9]]);
463
+ }, _callee4, this, [[3, 9]]);
277
464
  }));
278
- function writeData(_x3) {
465
+ function writeData(_x4) {
279
466
  return _writeData.apply(this, arguments);
280
467
  }
281
468
  return writeData;
@@ -283,10 +470,10 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
283
470
  }, {
284
471
  key: "createData",
285
472
  value: function () {
286
- var _createData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
473
+ var _createData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
287
474
  var resourceId, blockAri, stepVersion;
288
- return _regenerator.default.wrap(function _callee4$(_context4) {
289
- while (1) switch (_context4.prev = _context4.next) {
475
+ return _regenerator.default.wrap(function _callee5$(_context5) {
476
+ while (1) switch (_context5.prev = _context5.next) {
290
477
  case 0:
291
478
  resourceId = data.resourceId;
292
479
  blockAri = (0, _ari.generateBlockAri)({
@@ -296,8 +483,8 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
296
483
  resourceId: resourceId
297
484
  });
298
485
  stepVersion = this.getVersion ? this.getVersion() : undefined;
299
- _context4.prev = 3;
300
- _context4.next = 6;
486
+ _context5.prev = 3;
487
+ _context5.next = 6;
301
488
  return (0, _blockService.createSyncedBlock)({
302
489
  blockAri: blockAri,
303
490
  blockInstanceId: data.blockInstanceId,
@@ -307,32 +494,32 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
307
494
  stepVersion: stepVersion
308
495
  });
309
496
  case 6:
310
- return _context4.abrupt("return", {
497
+ return _context5.abrupt("return", {
311
498
  resourceId: resourceId
312
499
  });
313
500
  case 9:
314
- _context4.prev = 9;
315
- _context4.t0 = _context4["catch"](3);
316
- if (!(_context4.t0 instanceof _blockService.BlockError)) {
317
- _context4.next = 13;
501
+ _context5.prev = 9;
502
+ _context5.t0 = _context5["catch"](3);
503
+ if (!(_context5.t0 instanceof _blockService.BlockError)) {
504
+ _context5.next = 13;
318
505
  break;
319
506
  }
320
- return _context4.abrupt("return", {
321
- error: mapBlockError(_context4.t0),
507
+ return _context5.abrupt("return", {
508
+ error: mapBlockError(_context5.t0),
322
509
  resourceId: resourceId
323
510
  });
324
511
  case 13:
325
- return _context4.abrupt("return", {
326
- error: (0, _errorHandling.stringifyError)(_context4.t0),
512
+ return _context5.abrupt("return", {
513
+ error: (0, _errorHandling.stringifyError)(_context5.t0),
327
514
  resourceId: resourceId
328
515
  });
329
516
  case 14:
330
517
  case "end":
331
- return _context4.stop();
518
+ return _context5.stop();
332
519
  }
333
- }, _callee4, this, [[3, 9]]);
520
+ }, _callee5, this, [[3, 9]]);
334
521
  }));
335
- function createData(_x4) {
522
+ function createData(_x5) {
336
523
  return _createData.apply(this, arguments);
337
524
  }
338
525
  return createData;
@@ -340,10 +527,10 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
340
527
  }, {
341
528
  key: "deleteData",
342
529
  value: function () {
343
- var _deleteData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(resourceId) {
530
+ var _deleteData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(resourceId) {
344
531
  var blockAri;
345
- return _regenerator.default.wrap(function _callee5$(_context5) {
346
- while (1) switch (_context5.prev = _context5.next) {
532
+ return _regenerator.default.wrap(function _callee6$(_context6) {
533
+ while (1) switch (_context6.prev = _context6.next) {
347
534
  case 0:
348
535
  blockAri = (0, _ari.generateBlockAri)({
349
536
  cloudId: this.cloudId,
@@ -351,51 +538,51 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
351
538
  product: this.product,
352
539
  resourceId: resourceId
353
540
  });
354
- _context5.prev = 1;
355
- _context5.next = 4;
541
+ _context6.prev = 1;
542
+ _context6.next = 4;
356
543
  return (0, _blockService.deleteSyncedBlock)({
357
544
  blockAri: blockAri
358
545
  });
359
546
  case 4:
360
- return _context5.abrupt("return", {
547
+ return _context6.abrupt("return", {
361
548
  resourceId: resourceId,
362
549
  success: true,
363
550
  error: undefined
364
551
  });
365
552
  case 7:
366
- _context5.prev = 7;
367
- _context5.t0 = _context5["catch"](1);
368
- if (!(_context5.t0 instanceof _blockService.BlockError)) {
369
- _context5.next = 13;
553
+ _context6.prev = 7;
554
+ _context6.t0 = _context6["catch"](1);
555
+ if (!(_context6.t0 instanceof _blockService.BlockError)) {
556
+ _context6.next = 13;
370
557
  break;
371
558
  }
372
- if (!(_context5.t0.status === 404)) {
373
- _context5.next = 12;
559
+ if (!(_context6.t0.status === 404)) {
560
+ _context6.next = 12;
374
561
  break;
375
562
  }
376
- return _context5.abrupt("return", {
563
+ return _context6.abrupt("return", {
377
564
  resourceId: resourceId,
378
565
  success: true
379
566
  });
380
567
  case 12:
381
- return _context5.abrupt("return", {
568
+ return _context6.abrupt("return", {
382
569
  resourceId: resourceId,
383
570
  success: false,
384
- error: mapBlockError(_context5.t0)
571
+ error: mapBlockError(_context6.t0)
385
572
  });
386
573
  case 13:
387
- return _context5.abrupt("return", {
574
+ return _context6.abrupt("return", {
388
575
  resourceId: resourceId,
389
576
  success: false,
390
- error: (0, _errorHandling.stringifyError)(_context5.t0)
577
+ error: (0, _errorHandling.stringifyError)(_context6.t0)
391
578
  });
392
579
  case 14:
393
580
  case "end":
394
- return _context5.stop();
581
+ return _context6.stop();
395
582
  }
396
- }, _callee5, this, [[1, 7]]);
583
+ }, _callee6, this, [[1, 7]]);
397
584
  }));
398
- function deleteData(_x5) {
585
+ function deleteData(_x6) {
399
586
  return _deleteData.apply(this, arguments);
400
587
  }
401
588
  return deleteData;
@@ -413,19 +600,19 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
413
600
  }, {
414
601
  key: "updateReferenceData",
415
602
  value: function () {
416
- var _updateReferenceData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(blocks, noContent) {
417
- var _this = this;
418
- return _regenerator.default.wrap(function _callee6$(_context6) {
419
- while (1) switch (_context6.prev = _context6.next) {
603
+ var _updateReferenceData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(blocks, noContent) {
604
+ var _this2 = this;
605
+ return _regenerator.default.wrap(function _callee7$(_context7) {
606
+ while (1) switch (_context7.prev = _context7.next) {
420
607
  case 0:
421
- _context6.prev = 0;
422
- _context6.next = 3;
608
+ _context7.prev = 0;
609
+ _context7.next = 3;
423
610
  return (0, _blockService.updateReferenceSyncedBlockOnDocument)({
424
611
  documentAri: this.parentAri,
425
612
  blocks: blocks.map(function (block) {
426
613
  return {
427
614
  blockAri: (0, _ari.generateBlockAriFromReference)({
428
- cloudId: _this.cloudId,
615
+ cloudId: _this2.cloudId,
429
616
  resourceId: block.resourceId
430
617
  }),
431
618
  blockInstanceId: block.localId
@@ -434,32 +621,32 @@ var BlockServiceADFWriteProvider = /*#__PURE__*/function () {
434
621
  noContent: noContent
435
622
  });
436
623
  case 3:
437
- return _context6.abrupt("return", {
624
+ return _context7.abrupt("return", {
438
625
  success: true
439
626
  });
440
627
  case 6:
441
- _context6.prev = 6;
442
- _context6.t0 = _context6["catch"](0);
443
- if (!(_context6.t0 instanceof _blockService.BlockError)) {
444
- _context6.next = 10;
628
+ _context7.prev = 6;
629
+ _context7.t0 = _context7["catch"](0);
630
+ if (!(_context7.t0 instanceof _blockService.BlockError)) {
631
+ _context7.next = 10;
445
632
  break;
446
633
  }
447
- return _context6.abrupt("return", {
634
+ return _context7.abrupt("return", {
448
635
  success: false,
449
- error: mapBlockError(_context6.t0)
636
+ error: mapBlockError(_context7.t0)
450
637
  });
451
638
  case 10:
452
- return _context6.abrupt("return", {
639
+ return _context7.abrupt("return", {
453
640
  success: false,
454
- error: (0, _errorHandling.stringifyError)(_context6.t0)
641
+ error: (0, _errorHandling.stringifyError)(_context7.t0)
455
642
  });
456
643
  case 11:
457
644
  case "end":
458
- return _context6.stop();
645
+ return _context7.stop();
459
646
  }
460
- }, _callee6, this, [[0, 6]]);
647
+ }, _callee7, this, [[0, 6]]);
461
648
  }));
462
- function updateReferenceData(_x6, _x7) {
649
+ function updateReferenceData(_x7, _x8) {
463
650
  return _updateReferenceData.apply(this, arguments);
464
651
  }
465
652
  return updateReferenceData;