@dereekb/model 13.4.1 → 13.4.2

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/index.cjs.js CHANGED
@@ -87,7 +87,7 @@ var makeError = require('make-error');
87
87
  d: "0 < string <= ".concat(WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH)
88
88
  });
89
89
 
90
- function _array_like_to_array$2(arr, len) {
90
+ function _array_like_to_array$3(arr, len) {
91
91
  if (len == null || len > arr.length) len = arr.length;
92
92
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
93
93
  return arr2;
@@ -123,15 +123,15 @@ function _non_iterable_rest$2() {
123
123
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
124
124
  }
125
125
  function _sliced_to_array$2(arr, i) {
126
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
126
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$2();
127
127
  }
128
- function _unsupported_iterable_to_array$2(o, minLen) {
128
+ function _unsupported_iterable_to_array$3(o, minLen) {
129
129
  if (!o) return;
130
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
130
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
131
131
  var n = Object.prototype.toString.call(o).slice(8, -1);
132
132
  if (n === "Object" && o.constructor) n = o.constructor.name;
133
133
  if (n === "Map" || n === "Set") return Array.from(n);
134
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
134
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
135
135
  }
136
136
  /**
137
137
  * Maximum character length for a {@link WebsiteFileLinkType}. Matches {@link WEBSITE_LINK_TYPE_MAX_LENGTH}.
@@ -234,7 +234,7 @@ function _unsupported_iterable_to_array$2(o, minLen) {
234
234
  * // encoded === 't|test/test|https://example.com/|test-name'
235
235
  * ```
236
236
  */ function encodeWebsiteFileLinkToWebsiteLinkEncodedData(input) {
237
- var encoded = [
237
+ return [
238
238
  input.type,
239
239
  input.mime,
240
240
  input.data,
@@ -242,7 +242,6 @@ function _unsupported_iterable_to_array$2(o, minLen) {
242
242
  ].map(function(x) {
243
243
  return x || '';
244
244
  }).join(WEBSITE_FILE_LINK_ENCODE_SEPARATOR);
245
- return encoded;
246
245
  }
247
246
  /**
248
247
  * Decodes a pipe-separated encoded string back into a {@link WebsiteFileLink}.
@@ -305,8 +304,7 @@ function _unsupported_iterable_to_array$2(o, minLen) {
305
304
  * ```
306
305
  */ function usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, prefix) {
307
306
  var username = util.toRelativeSlashPathStartType(WEBSITE_LINK_ISOLATE_BASE_URL_PROFILE_ID(usernameOrWebsiteUrlToWebsiteUrl(input)));
308
- var result = prefix ? util.addPrefix(prefix, username) : username;
309
- return result;
307
+ return prefix ? util.addPrefix(prefix, username) : username;
310
308
  }
311
309
  /**
312
310
  * Extracts a username from either a raw username string or a full profile URL using a custom path isolation function.
@@ -381,8 +379,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
381
379
  };
382
380
  }
383
381
  // MARK: Facebook
384
- /** Base URL for Facebook profiles. */ var FACEBOOK_BASE_URL = "https://www.facebook.com";
385
- /** {@link WebsiteLinkType} code for Facebook. */ var FACEBOOK_WEBSITE_LINK_TYPE = 'fb';
382
+ /**
383
+ * Base URL for Facebook profiles.
384
+ */ var FACEBOOK_BASE_URL = "https://www.facebook.com";
385
+ /**
386
+ * {@link WebsiteLinkType} code for Facebook.
387
+ */ var FACEBOOK_WEBSITE_LINK_TYPE = 'fb';
386
388
  /**
387
389
  * Converts a Facebook profile ID or URL into a {@link WebsiteLink}.
388
390
  *
@@ -414,8 +416,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
414
416
  return "".concat(FACEBOOK_BASE_URL, "/").concat(profileId);
415
417
  }
416
418
  // MARK: Instagram
417
- /** Base URL for Instagram profiles. */ var INSTAGRAM_BASE_URL = "https://www.instagram.com";
418
- /** {@link WebsiteLinkType} code for Instagram. */ var INSTAGRAM_WEBSITE_LINK_TYPE = 'ig';
419
+ /**
420
+ * Base URL for Instagram profiles.
421
+ */ var INSTAGRAM_BASE_URL = "https://www.instagram.com";
422
+ /**
423
+ * {@link WebsiteLinkType} code for Instagram.
424
+ */ var INSTAGRAM_WEBSITE_LINK_TYPE = 'ig';
419
425
  /**
420
426
  * Converts an Instagram profile ID or URL into a {@link WebsiteLink}.
421
427
  *
@@ -436,8 +442,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
436
442
  return "".concat(INSTAGRAM_BASE_URL, "/").concat(profileId);
437
443
  }
438
444
  // MARK: Twitter
439
- /** Base URL for Twitter profiles. */ var TWITTER_BASE_URL = "https://www.twitter.com";
440
- /** {@link WebsiteLinkType} code for Twitter. */ var TWITTER_WEBSITE_LINK_TYPE = 'tw';
445
+ /**
446
+ * Base URL for Twitter profiles.
447
+ */ var TWITTER_BASE_URL = "https://www.twitter.com";
448
+ /**
449
+ * {@link WebsiteLinkType} code for Twitter.
450
+ */ var TWITTER_WEBSITE_LINK_TYPE = 'tw';
441
451
  /**
442
452
  * Converts a Twitter profile ID or URL into a {@link WebsiteLink}.
443
453
  *
@@ -458,9 +468,15 @@ function _unsupported_iterable_to_array$2(o, minLen) {
458
468
  return "".concat(TWITTER_BASE_URL, "/").concat(profileId);
459
469
  }
460
470
  // MARK: Tiktok
461
- /** Base URL for TikTok profiles. */ var TIKTOK_BASE_URL = "https://tiktok.com";
462
- /** TikTok usernames are prefixed with "@" in URLs and stored data. */ var TIKTOK_USERNAME_PREFIX = '@';
463
- /** {@link WebsiteLinkType} code for TikTok. */ var TIKTOK_WEBSITE_LINK_TYPE = 'tt';
471
+ /**
472
+ * Base URL for TikTok profiles.
473
+ */ var TIKTOK_BASE_URL = "https://tiktok.com";
474
+ /**
475
+ * TikTok usernames are prefixed with "@" in URLs and stored data.
476
+ */ var TIKTOK_USERNAME_PREFIX = '@';
477
+ /**
478
+ * {@link WebsiteLinkType} code for TikTok.
479
+ */ var TIKTOK_WEBSITE_LINK_TYPE = 'tt';
464
480
  /**
465
481
  * Converts a TikTok profile ID or URL into a {@link WebsiteLink}.
466
482
  *
@@ -483,8 +499,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
483
499
  return "".concat(TIKTOK_BASE_URL, "/@").concat(profileId);
484
500
  }
485
501
  // MARK: Snapchat
486
- /** Base URL for Snapchat profiles. */ var SNAPCHAT_BASE_URL = "https://snapchat.com";
487
- /** {@link WebsiteLinkType} code for Snapchat. */ var SNAPCHAT_WEBSITE_LINK_TYPE = 'sc';
502
+ /**
503
+ * Base URL for Snapchat profiles.
504
+ */ var SNAPCHAT_BASE_URL = "https://snapchat.com";
505
+ /**
506
+ * {@link WebsiteLinkType} code for Snapchat.
507
+ */ var SNAPCHAT_WEBSITE_LINK_TYPE = 'sc';
488
508
  /**
489
509
  * Isolates a Snapchat username from a URL, ignoring the `/add/` base path segment.
490
510
  */ var SNAPCHAT_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
@@ -515,8 +535,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
515
535
  return "".concat(SNAPCHAT_BASE_URL, "/add/").concat(profileId);
516
536
  }
517
537
  // MARK: YouTube
518
- /** Base URL for YouTube channels. */ var YOUTUBE_BASE_URL = "https://youtube.com";
519
- /** {@link WebsiteLinkType} code for YouTube. */ var YOUTUBE_WEBSITE_LINK_TYPE = 'yt';
538
+ /**
539
+ * Base URL for YouTube channels.
540
+ */ var YOUTUBE_BASE_URL = "https://youtube.com";
541
+ /**
542
+ * {@link WebsiteLinkType} code for YouTube.
543
+ */ var YOUTUBE_WEBSITE_LINK_TYPE = 'yt';
520
544
  /**
521
545
  * Isolates a YouTube channel name from a URL, ignoring the `/c/` base path segment.
522
546
  */ var YOUTUBE_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
@@ -547,8 +571,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
547
571
  return "".concat(YOUTUBE_BASE_URL, "/c/").concat(profileId);
548
572
  }
549
573
  // MARK: PayPal
550
- /** Base URL for PayPal.me profiles. */ var PAYPAL_BASE_URL = "https://paypal.me";
551
- /** {@link WebsiteLinkType} code for PayPal. */ var PAYPAL_WEBSITE_LINK_TYPE = 'pp';
574
+ /**
575
+ * Base URL for PayPal.me profiles.
576
+ */ var PAYPAL_BASE_URL = "https://paypal.me";
577
+ /**
578
+ * {@link WebsiteLinkType} code for PayPal.
579
+ */ var PAYPAL_WEBSITE_LINK_TYPE = 'pp';
552
580
  /**
553
581
  * Converts a PayPal profile ID or URL into a {@link WebsiteLink}.
554
582
  *
@@ -569,9 +597,15 @@ function _unsupported_iterable_to_array$2(o, minLen) {
569
597
  return "".concat(PAYPAL_BASE_URL, "/").concat(profileId);
570
598
  }
571
599
  // MARK: Cashapp
572
- /** Base URL for Cash App profiles. */ var CASHAPP_BASE_URL = "https://cash.app";
573
- /** Cash App usernames are prefixed with "$" (cashtag). */ var CASHAPP_USERNAME_PREFIX = '$';
574
- /** {@link WebsiteLinkType} code for Cash App. */ var CASHAPP_WEBSITE_LINK_TYPE = 'ca';
600
+ /**
601
+ * Base URL for Cash App profiles.
602
+ */ var CASHAPP_BASE_URL = "https://cash.app";
603
+ /**
604
+ * Cash App usernames are prefixed with "$" (cashtag).
605
+ */ var CASHAPP_USERNAME_PREFIX = '$';
606
+ /**
607
+ * {@link WebsiteLinkType} code for Cash App.
608
+ */ var CASHAPP_WEBSITE_LINK_TYPE = 'ca';
575
609
  /**
576
610
  * Converts a Cash App profile ID or URL into a {@link WebsiteLink}.
577
611
  *
@@ -594,8 +628,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
594
628
  return "".concat(CASHAPP_BASE_URL, "/$").concat(profileId);
595
629
  }
596
630
  // MARK: Venmo
597
- /** Base URL for Venmo profiles. */ var VENMO_BASE_URL = "https://account.venmo.com";
598
- /** {@link WebsiteLinkType} code for Venmo. */ var VENMO_WEBSITE_LINK_TYPE = 'vn';
631
+ /**
632
+ * Base URL for Venmo profiles.
633
+ */ var VENMO_BASE_URL = "https://account.venmo.com";
634
+ /**
635
+ * {@link WebsiteLinkType} code for Venmo.
636
+ */ var VENMO_WEBSITE_LINK_TYPE = 'vn';
599
637
  /**
600
638
  * Isolates a Venmo username from a URL, ignoring the `/u/` base path segment.
601
639
  */ var VENMO_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
@@ -626,8 +664,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
626
664
  return "".concat(VENMO_BASE_URL, "/u/").concat(profileId);
627
665
  }
628
666
  // MARK: Spotify
629
- /** Base URL for Spotify profiles. */ var SPOTIFY_BASE_URL = "https://open.spotify.com/";
630
- /** {@link WebsiteLinkType} code for Spotify. */ var SPOTIFY_WEBSITE_LINK_TYPE = 'sp';
667
+ /**
668
+ * Base URL for Spotify profiles.
669
+ */ var SPOTIFY_BASE_URL = "https://open.spotify.com/";
670
+ /**
671
+ * {@link WebsiteLinkType} code for Spotify.
672
+ */ var SPOTIFY_WEBSITE_LINK_TYPE = 'sp';
631
673
  /**
632
674
  * Isolates a Spotify username from a URL, ignoring the `/user/` base path segment.
633
675
  */ var SPOTIFY_WEBSITE_LINK_ISOLATE_PROFILE_ID = util.isolateWebsitePathFunction({
@@ -658,7 +700,7 @@ function _unsupported_iterable_to_array$2(o, minLen) {
658
700
  return "".concat(SPOTIFY_BASE_URL, "/user/").concat(profileId);
659
701
  }
660
702
 
661
- function _array_like_to_array$1(arr, len) {
703
+ function _array_like_to_array$2(arr, len) {
662
704
  if (len == null || len > arr.length) len = arr.length;
663
705
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
664
706
  return arr2;
@@ -725,15 +767,15 @@ function _non_iterable_rest$1() {
725
767
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
726
768
  }
727
769
  function _sliced_to_array$1(arr, i) {
728
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
770
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
729
771
  }
730
- function _unsupported_iterable_to_array$1(o, minLen) {
772
+ function _unsupported_iterable_to_array$2(o, minLen) {
731
773
  if (!o) return;
732
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
774
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
733
775
  var n = Object.prototype.toString.call(o).slice(8, -1);
734
776
  if (n === "Object" && o.constructor) n = o.constructor.name;
735
777
  if (n === "Map" || n === "Set") return Array.from(n);
736
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
778
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
737
779
  }
738
780
  var GRANTED_SYS_ADMIN_ROLE_KEY = 'sysadmin';
739
781
  var GRANTED_OWNER_ROLE_KEY = 'owner';
@@ -1288,7 +1330,7 @@ function _ts_generator$3(thisArg, body) {
1288
1330
  },
1289
1331
  {
1290
1332
  key: "isUsableOutputForRoles",
1291
- value: function isUsableOutputForRoles(output, context) {
1333
+ value: function isUsableOutputForRoles(_output, _context) {
1292
1334
  return true; // can override in parent functions to further filter roles.
1293
1335
  }
1294
1336
  }
@@ -1494,6 +1536,31 @@ function _is_native_reflect_construct() {
1494
1536
  }
1495
1537
  (makeError.BaseError);
1496
1538
 
1539
+ function _array_like_to_array$1(arr, len) {
1540
+ if (len == null || len > arr.length) len = arr.length;
1541
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1542
+ return arr2;
1543
+ }
1544
+ function _array_without_holes$1(arr) {
1545
+ if (Array.isArray(arr)) return _array_like_to_array$1(arr);
1546
+ }
1547
+ function _iterable_to_array$1(iter) {
1548
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1549
+ }
1550
+ function _non_iterable_spread$1() {
1551
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1552
+ }
1553
+ function _to_consumable_array$1(arr) {
1554
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
1555
+ }
1556
+ function _unsupported_iterable_to_array$1(o, minLen) {
1557
+ if (!o) return;
1558
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
1559
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1560
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1561
+ if (n === "Map" || n === "Set") return Array.from(n);
1562
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
1563
+ }
1497
1564
  /**
1498
1565
  * Creates a {@link SyncEntitySynchronizer} from the given configuration.
1499
1566
  *
@@ -1520,7 +1587,7 @@ function _is_native_reflect_construct() {
1520
1587
  x
1521
1588
  ];
1522
1589
  }));
1523
- var commonTypes = Array.from(map.keys());
1590
+ var commonTypes = _to_consumable_array$1(map.keys());
1524
1591
  var commonTypeSynchronizer = function commonTypeSynchronizer(input) {
1525
1592
  var synchronizer = map.get(input);
1526
1593
  if (!synchronizer) {
@@ -1624,10 +1691,6 @@ function _non_iterable_rest() {
1624
1691
  function _non_iterable_spread() {
1625
1692
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1626
1693
  }
1627
- function _object_destructuring_empty(o) {
1628
- if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
1629
- return o;
1630
- }
1631
1694
  function _object_spread(target) {
1632
1695
  for(var i = 1; i < arguments.length; i++){
1633
1696
  var source = arguments[i] != null ? arguments[i] : {};
@@ -1801,6 +1864,7 @@ function _ts_generator$2(thisArg, body) {
1801
1864
  /**
1802
1865
  * Loads the relevant sources for the given entity and context.
1803
1866
  *
1867
+ * @param entityCommonTypeIdPair The common type/id pair identifying the entity.
1804
1868
  * @param entitySourceContext The contextual information for the entity.
1805
1869
  * @returns The relevant sources for the entity.
1806
1870
  */ function loadSources(entityCommonTypeIdPair, entitySourceContext) {
@@ -1913,7 +1977,10 @@ function _ts_generator$2(thisArg, body) {
1913
1977
  loadRelevantSources = util.cachedGetter(_loadRelevantSources);
1914
1978
  }
1915
1979
  /**
1916
- * Performs the synchonization
1980
+ * Performs the synchronization for this entity instance.
1981
+ *
1982
+ * @param context Optional synchronization context with additional configuration.
1983
+ * @returns The result of the synchronization operation.
1917
1984
  */ synchronize = function synchronize(context) {
1918
1985
  return _async_to_generator$2(function() {
1919
1986
  var _sourcesByFlowType_get, _sourcesByFlowType_get1, _sourcesByFlowType_get2, relevantSources, syncEntityInstances, sourcesByFlowType, primarySources, secondarySources, replicaSources, result;
@@ -2124,7 +2191,6 @@ function _ts_generator$2(thisArg, body) {
2124
2191
  return _ts_generator$2(this, function(_state) {
2125
2192
  switch(_state.label){
2126
2193
  case 0:
2127
- _object_destructuring_empty(context !== null && context !== void 0 ? context : {});
2128
2194
  return [
2129
2195
  4,
2130
2196
  loadRelevantSources()
package/index.esm.js CHANGED
@@ -85,7 +85,7 @@ import { BaseError } from 'make-error';
85
85
  d: "0 < string <= ".concat(WEBSITE_LINK_ENCODED_DATA_MAX_LENGTH)
86
86
  });
87
87
 
88
- function _array_like_to_array$2(arr, len) {
88
+ function _array_like_to_array$3(arr, len) {
89
89
  if (len == null || len > arr.length) len = arr.length;
90
90
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
91
91
  return arr2;
@@ -121,15 +121,15 @@ function _non_iterable_rest$2() {
121
121
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
122
122
  }
123
123
  function _sliced_to_array$2(arr, i) {
124
- return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
124
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest$2();
125
125
  }
126
- function _unsupported_iterable_to_array$2(o, minLen) {
126
+ function _unsupported_iterable_to_array$3(o, minLen) {
127
127
  if (!o) return;
128
- if (typeof o === "string") return _array_like_to_array$2(o, minLen);
128
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
129
129
  var n = Object.prototype.toString.call(o).slice(8, -1);
130
130
  if (n === "Object" && o.constructor) n = o.constructor.name;
131
131
  if (n === "Map" || n === "Set") return Array.from(n);
132
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
132
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
133
133
  }
134
134
  /**
135
135
  * Maximum character length for a {@link WebsiteFileLinkType}. Matches {@link WEBSITE_LINK_TYPE_MAX_LENGTH}.
@@ -232,7 +232,7 @@ function _unsupported_iterable_to_array$2(o, minLen) {
232
232
  * // encoded === 't|test/test|https://example.com/|test-name'
233
233
  * ```
234
234
  */ function encodeWebsiteFileLinkToWebsiteLinkEncodedData(input) {
235
- var encoded = [
235
+ return [
236
236
  input.type,
237
237
  input.mime,
238
238
  input.data,
@@ -240,7 +240,6 @@ function _unsupported_iterable_to_array$2(o, minLen) {
240
240
  ].map(function(x) {
241
241
  return x || '';
242
242
  }).join(WEBSITE_FILE_LINK_ENCODE_SEPARATOR);
243
- return encoded;
244
243
  }
245
244
  /**
246
245
  * Decodes a pipe-separated encoded string back into a {@link WebsiteFileLink}.
@@ -303,8 +302,7 @@ function _unsupported_iterable_to_array$2(o, minLen) {
303
302
  * ```
304
303
  */ function usernameFromUsernameOrWebsiteWithBaseUrlUsername(input, prefix) {
305
304
  var username = toRelativeSlashPathStartType(WEBSITE_LINK_ISOLATE_BASE_URL_PROFILE_ID(usernameOrWebsiteUrlToWebsiteUrl(input)));
306
- var result = prefix ? addPrefix(prefix, username) : username;
307
- return result;
305
+ return prefix ? addPrefix(prefix, username) : username;
308
306
  }
309
307
  /**
310
308
  * Extracts a username from either a raw username string or a full profile URL using a custom path isolation function.
@@ -379,8 +377,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
379
377
  };
380
378
  }
381
379
  // MARK: Facebook
382
- /** Base URL for Facebook profiles. */ var FACEBOOK_BASE_URL = "https://www.facebook.com";
383
- /** {@link WebsiteLinkType} code for Facebook. */ var FACEBOOK_WEBSITE_LINK_TYPE = 'fb';
380
+ /**
381
+ * Base URL for Facebook profiles.
382
+ */ var FACEBOOK_BASE_URL = "https://www.facebook.com";
383
+ /**
384
+ * {@link WebsiteLinkType} code for Facebook.
385
+ */ var FACEBOOK_WEBSITE_LINK_TYPE = 'fb';
384
386
  /**
385
387
  * Converts a Facebook profile ID or URL into a {@link WebsiteLink}.
386
388
  *
@@ -412,8 +414,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
412
414
  return "".concat(FACEBOOK_BASE_URL, "/").concat(profileId);
413
415
  }
414
416
  // MARK: Instagram
415
- /** Base URL for Instagram profiles. */ var INSTAGRAM_BASE_URL = "https://www.instagram.com";
416
- /** {@link WebsiteLinkType} code for Instagram. */ var INSTAGRAM_WEBSITE_LINK_TYPE = 'ig';
417
+ /**
418
+ * Base URL for Instagram profiles.
419
+ */ var INSTAGRAM_BASE_URL = "https://www.instagram.com";
420
+ /**
421
+ * {@link WebsiteLinkType} code for Instagram.
422
+ */ var INSTAGRAM_WEBSITE_LINK_TYPE = 'ig';
417
423
  /**
418
424
  * Converts an Instagram profile ID or URL into a {@link WebsiteLink}.
419
425
  *
@@ -434,8 +440,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
434
440
  return "".concat(INSTAGRAM_BASE_URL, "/").concat(profileId);
435
441
  }
436
442
  // MARK: Twitter
437
- /** Base URL for Twitter profiles. */ var TWITTER_BASE_URL = "https://www.twitter.com";
438
- /** {@link WebsiteLinkType} code for Twitter. */ var TWITTER_WEBSITE_LINK_TYPE = 'tw';
443
+ /**
444
+ * Base URL for Twitter profiles.
445
+ */ var TWITTER_BASE_URL = "https://www.twitter.com";
446
+ /**
447
+ * {@link WebsiteLinkType} code for Twitter.
448
+ */ var TWITTER_WEBSITE_LINK_TYPE = 'tw';
439
449
  /**
440
450
  * Converts a Twitter profile ID or URL into a {@link WebsiteLink}.
441
451
  *
@@ -456,9 +466,15 @@ function _unsupported_iterable_to_array$2(o, minLen) {
456
466
  return "".concat(TWITTER_BASE_URL, "/").concat(profileId);
457
467
  }
458
468
  // MARK: Tiktok
459
- /** Base URL for TikTok profiles. */ var TIKTOK_BASE_URL = "https://tiktok.com";
460
- /** TikTok usernames are prefixed with "@" in URLs and stored data. */ var TIKTOK_USERNAME_PREFIX = '@';
461
- /** {@link WebsiteLinkType} code for TikTok. */ var TIKTOK_WEBSITE_LINK_TYPE = 'tt';
469
+ /**
470
+ * Base URL for TikTok profiles.
471
+ */ var TIKTOK_BASE_URL = "https://tiktok.com";
472
+ /**
473
+ * TikTok usernames are prefixed with "@" in URLs and stored data.
474
+ */ var TIKTOK_USERNAME_PREFIX = '@';
475
+ /**
476
+ * {@link WebsiteLinkType} code for TikTok.
477
+ */ var TIKTOK_WEBSITE_LINK_TYPE = 'tt';
462
478
  /**
463
479
  * Converts a TikTok profile ID or URL into a {@link WebsiteLink}.
464
480
  *
@@ -481,8 +497,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
481
497
  return "".concat(TIKTOK_BASE_URL, "/@").concat(profileId);
482
498
  }
483
499
  // MARK: Snapchat
484
- /** Base URL for Snapchat profiles. */ var SNAPCHAT_BASE_URL = "https://snapchat.com";
485
- /** {@link WebsiteLinkType} code for Snapchat. */ var SNAPCHAT_WEBSITE_LINK_TYPE = 'sc';
500
+ /**
501
+ * Base URL for Snapchat profiles.
502
+ */ var SNAPCHAT_BASE_URL = "https://snapchat.com";
503
+ /**
504
+ * {@link WebsiteLinkType} code for Snapchat.
505
+ */ var SNAPCHAT_WEBSITE_LINK_TYPE = 'sc';
486
506
  /**
487
507
  * Isolates a Snapchat username from a URL, ignoring the `/add/` base path segment.
488
508
  */ var SNAPCHAT_WEBSITE_LINK_ISOLATE_PROFILE_ID = isolateWebsitePathFunction({
@@ -513,8 +533,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
513
533
  return "".concat(SNAPCHAT_BASE_URL, "/add/").concat(profileId);
514
534
  }
515
535
  // MARK: YouTube
516
- /** Base URL for YouTube channels. */ var YOUTUBE_BASE_URL = "https://youtube.com";
517
- /** {@link WebsiteLinkType} code for YouTube. */ var YOUTUBE_WEBSITE_LINK_TYPE = 'yt';
536
+ /**
537
+ * Base URL for YouTube channels.
538
+ */ var YOUTUBE_BASE_URL = "https://youtube.com";
539
+ /**
540
+ * {@link WebsiteLinkType} code for YouTube.
541
+ */ var YOUTUBE_WEBSITE_LINK_TYPE = 'yt';
518
542
  /**
519
543
  * Isolates a YouTube channel name from a URL, ignoring the `/c/` base path segment.
520
544
  */ var YOUTUBE_WEBSITE_LINK_ISOLATE_PROFILE_ID = isolateWebsitePathFunction({
@@ -545,8 +569,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
545
569
  return "".concat(YOUTUBE_BASE_URL, "/c/").concat(profileId);
546
570
  }
547
571
  // MARK: PayPal
548
- /** Base URL for PayPal.me profiles. */ var PAYPAL_BASE_URL = "https://paypal.me";
549
- /** {@link WebsiteLinkType} code for PayPal. */ var PAYPAL_WEBSITE_LINK_TYPE = 'pp';
572
+ /**
573
+ * Base URL for PayPal.me profiles.
574
+ */ var PAYPAL_BASE_URL = "https://paypal.me";
575
+ /**
576
+ * {@link WebsiteLinkType} code for PayPal.
577
+ */ var PAYPAL_WEBSITE_LINK_TYPE = 'pp';
550
578
  /**
551
579
  * Converts a PayPal profile ID or URL into a {@link WebsiteLink}.
552
580
  *
@@ -567,9 +595,15 @@ function _unsupported_iterable_to_array$2(o, minLen) {
567
595
  return "".concat(PAYPAL_BASE_URL, "/").concat(profileId);
568
596
  }
569
597
  // MARK: Cashapp
570
- /** Base URL for Cash App profiles. */ var CASHAPP_BASE_URL = "https://cash.app";
571
- /** Cash App usernames are prefixed with "$" (cashtag). */ var CASHAPP_USERNAME_PREFIX = '$';
572
- /** {@link WebsiteLinkType} code for Cash App. */ var CASHAPP_WEBSITE_LINK_TYPE = 'ca';
598
+ /**
599
+ * Base URL for Cash App profiles.
600
+ */ var CASHAPP_BASE_URL = "https://cash.app";
601
+ /**
602
+ * Cash App usernames are prefixed with "$" (cashtag).
603
+ */ var CASHAPP_USERNAME_PREFIX = '$';
604
+ /**
605
+ * {@link WebsiteLinkType} code for Cash App.
606
+ */ var CASHAPP_WEBSITE_LINK_TYPE = 'ca';
573
607
  /**
574
608
  * Converts a Cash App profile ID or URL into a {@link WebsiteLink}.
575
609
  *
@@ -592,8 +626,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
592
626
  return "".concat(CASHAPP_BASE_URL, "/$").concat(profileId);
593
627
  }
594
628
  // MARK: Venmo
595
- /** Base URL for Venmo profiles. */ var VENMO_BASE_URL = "https://account.venmo.com";
596
- /** {@link WebsiteLinkType} code for Venmo. */ var VENMO_WEBSITE_LINK_TYPE = 'vn';
629
+ /**
630
+ * Base URL for Venmo profiles.
631
+ */ var VENMO_BASE_URL = "https://account.venmo.com";
632
+ /**
633
+ * {@link WebsiteLinkType} code for Venmo.
634
+ */ var VENMO_WEBSITE_LINK_TYPE = 'vn';
597
635
  /**
598
636
  * Isolates a Venmo username from a URL, ignoring the `/u/` base path segment.
599
637
  */ var VENMO_WEBSITE_LINK_ISOLATE_PROFILE_ID = isolateWebsitePathFunction({
@@ -624,8 +662,12 @@ function _unsupported_iterable_to_array$2(o, minLen) {
624
662
  return "".concat(VENMO_BASE_URL, "/u/").concat(profileId);
625
663
  }
626
664
  // MARK: Spotify
627
- /** Base URL for Spotify profiles. */ var SPOTIFY_BASE_URL = "https://open.spotify.com/";
628
- /** {@link WebsiteLinkType} code for Spotify. */ var SPOTIFY_WEBSITE_LINK_TYPE = 'sp';
665
+ /**
666
+ * Base URL for Spotify profiles.
667
+ */ var SPOTIFY_BASE_URL = "https://open.spotify.com/";
668
+ /**
669
+ * {@link WebsiteLinkType} code for Spotify.
670
+ */ var SPOTIFY_WEBSITE_LINK_TYPE = 'sp';
629
671
  /**
630
672
  * Isolates a Spotify username from a URL, ignoring the `/user/` base path segment.
631
673
  */ var SPOTIFY_WEBSITE_LINK_ISOLATE_PROFILE_ID = isolateWebsitePathFunction({
@@ -656,7 +698,7 @@ function _unsupported_iterable_to_array$2(o, minLen) {
656
698
  return "".concat(SPOTIFY_BASE_URL, "/user/").concat(profileId);
657
699
  }
658
700
 
659
- function _array_like_to_array$1(arr, len) {
701
+ function _array_like_to_array$2(arr, len) {
660
702
  if (len == null || len > arr.length) len = arr.length;
661
703
  for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
662
704
  return arr2;
@@ -723,15 +765,15 @@ function _non_iterable_rest$1() {
723
765
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
724
766
  }
725
767
  function _sliced_to_array$1(arr, i) {
726
- return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
768
+ return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$1();
727
769
  }
728
- function _unsupported_iterable_to_array$1(o, minLen) {
770
+ function _unsupported_iterable_to_array$2(o, minLen) {
729
771
  if (!o) return;
730
- if (typeof o === "string") return _array_like_to_array$1(o, minLen);
772
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
731
773
  var n = Object.prototype.toString.call(o).slice(8, -1);
732
774
  if (n === "Object" && o.constructor) n = o.constructor.name;
733
775
  if (n === "Map" || n === "Set") return Array.from(n);
734
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
776
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
735
777
  }
736
778
  var GRANTED_SYS_ADMIN_ROLE_KEY = 'sysadmin';
737
779
  var GRANTED_OWNER_ROLE_KEY = 'owner';
@@ -1286,7 +1328,7 @@ function _ts_generator$3(thisArg, body) {
1286
1328
  },
1287
1329
  {
1288
1330
  key: "isUsableOutputForRoles",
1289
- value: function isUsableOutputForRoles(output, context) {
1331
+ value: function isUsableOutputForRoles(_output, _context) {
1290
1332
  return true; // can override in parent functions to further filter roles.
1291
1333
  }
1292
1334
  }
@@ -1492,6 +1534,31 @@ function _is_native_reflect_construct() {
1492
1534
  }
1493
1535
  (BaseError);
1494
1536
 
1537
+ function _array_like_to_array$1(arr, len) {
1538
+ if (len == null || len > arr.length) len = arr.length;
1539
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1540
+ return arr2;
1541
+ }
1542
+ function _array_without_holes$1(arr) {
1543
+ if (Array.isArray(arr)) return _array_like_to_array$1(arr);
1544
+ }
1545
+ function _iterable_to_array$1(iter) {
1546
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1547
+ }
1548
+ function _non_iterable_spread$1() {
1549
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1550
+ }
1551
+ function _to_consumable_array$1(arr) {
1552
+ return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
1553
+ }
1554
+ function _unsupported_iterable_to_array$1(o, minLen) {
1555
+ if (!o) return;
1556
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
1557
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1558
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1559
+ if (n === "Map" || n === "Set") return Array.from(n);
1560
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
1561
+ }
1495
1562
  /**
1496
1563
  * Creates a {@link SyncEntitySynchronizer} from the given configuration.
1497
1564
  *
@@ -1518,7 +1585,7 @@ function _is_native_reflect_construct() {
1518
1585
  x
1519
1586
  ];
1520
1587
  }));
1521
- var commonTypes = Array.from(map.keys());
1588
+ var commonTypes = _to_consumable_array$1(map.keys());
1522
1589
  var commonTypeSynchronizer = function commonTypeSynchronizer(input) {
1523
1590
  var synchronizer = map.get(input);
1524
1591
  if (!synchronizer) {
@@ -1622,10 +1689,6 @@ function _non_iterable_rest() {
1622
1689
  function _non_iterable_spread() {
1623
1690
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1624
1691
  }
1625
- function _object_destructuring_empty(o) {
1626
- if (o === null || o === void 0) throw new TypeError("Cannot destructure " + o);
1627
- return o;
1628
- }
1629
1692
  function _object_spread(target) {
1630
1693
  for(var i = 1; i < arguments.length; i++){
1631
1694
  var source = arguments[i] != null ? arguments[i] : {};
@@ -1799,6 +1862,7 @@ function _ts_generator$2(thisArg, body) {
1799
1862
  /**
1800
1863
  * Loads the relevant sources for the given entity and context.
1801
1864
  *
1865
+ * @param entityCommonTypeIdPair The common type/id pair identifying the entity.
1802
1866
  * @param entitySourceContext The contextual information for the entity.
1803
1867
  * @returns The relevant sources for the entity.
1804
1868
  */ function loadSources(entityCommonTypeIdPair, entitySourceContext) {
@@ -1911,7 +1975,10 @@ function _ts_generator$2(thisArg, body) {
1911
1975
  loadRelevantSources = cachedGetter(_loadRelevantSources);
1912
1976
  }
1913
1977
  /**
1914
- * Performs the synchonization
1978
+ * Performs the synchronization for this entity instance.
1979
+ *
1980
+ * @param context Optional synchronization context with additional configuration.
1981
+ * @returns The result of the synchronization operation.
1915
1982
  */ synchronize = function synchronize(context) {
1916
1983
  return _async_to_generator$2(function() {
1917
1984
  var _sourcesByFlowType_get, _sourcesByFlowType_get1, _sourcesByFlowType_get2, relevantSources, syncEntityInstances, sourcesByFlowType, primarySources, secondarySources, replicaSources, result;
@@ -2122,7 +2189,6 @@ function _ts_generator$2(thisArg, body) {
2122
2189
  return _ts_generator$2(this, function(_state) {
2123
2190
  switch(_state.label){
2124
2191
  case 0:
2125
- _object_destructuring_empty(context !== null && context !== void 0 ? context : {});
2126
2192
  return [
2127
2193
  4,
2128
2194
  loadRelevantSources()
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dereekb/model",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.4.1",
5
+ "@dereekb/util": "13.4.2",
6
6
  "arktype": "^2.2.0",
7
7
  "make-error": "^1.3.0"
8
8
  },
@@ -90,9 +90,13 @@ export declare const PHONE_URL_WEBSITE_LINK_TYPE = "p";
90
90
  * @returns a WebsiteLink storing the phone number as data
91
91
  */
92
92
  export declare function phoneNumberToWebsiteLink(input: E164PhoneNumber): WebsiteLink;
93
- /** Base URL for Facebook profiles. */
93
+ /**
94
+ * Base URL for Facebook profiles.
95
+ */
94
96
  export declare const FACEBOOK_BASE_URL = "https://www.facebook.com";
95
- /** {@link WebsiteLinkType} code for Facebook. */
97
+ /**
98
+ * {@link WebsiteLinkType} code for Facebook.
99
+ */
96
100
  export declare const FACEBOOK_WEBSITE_LINK_TYPE: WebsiteLinkType;
97
101
  export type FacebookBaseUrl = typeof FACEBOOK_BASE_URL;
98
102
  export type FacebookProfileUrl<P extends FacebookProfileId> = `${FacebookBaseUrl}/${P}`;
@@ -123,9 +127,13 @@ export declare function facebookProfileUrlToWebsiteLink(input: FacebookProfileId
123
127
  * @returns the full profile URL
124
128
  */
125
129
  export declare function facebookProfileUrl<P extends FacebookProfileId>(profileId: P): FacebookProfileUrl<P>;
126
- /** Base URL for Instagram profiles. */
130
+ /**
131
+ * Base URL for Instagram profiles.
132
+ */
127
133
  export declare const INSTAGRAM_BASE_URL = "https://www.instagram.com";
128
- /** {@link WebsiteLinkType} code for Instagram. */
134
+ /**
135
+ * {@link WebsiteLinkType} code for Instagram.
136
+ */
129
137
  export declare const INSTAGRAM_WEBSITE_LINK_TYPE: WebsiteLinkType;
130
138
  export type InstagramBaseUrl = typeof INSTAGRAM_BASE_URL;
131
139
  export type InstagramProfileUrl<P extends InstagramProfileId> = `${InstagramBaseUrl}/${P}`;
@@ -145,9 +153,13 @@ export declare function instagramProfileUrlToWebsiteLink(input: InstagramProfile
145
153
  * @returns the full profile URL
146
154
  */
147
155
  export declare function instagramProfileUrl<P extends InstagramProfileId>(profileId: P): InstagramProfileUrl<P>;
148
- /** Base URL for Twitter profiles. */
156
+ /**
157
+ * Base URL for Twitter profiles.
158
+ */
149
159
  export declare const TWITTER_BASE_URL = "https://www.twitter.com";
150
- /** {@link WebsiteLinkType} code for Twitter. */
160
+ /**
161
+ * {@link WebsiteLinkType} code for Twitter.
162
+ */
151
163
  export declare const TWITTER_WEBSITE_LINK_TYPE: WebsiteLinkType;
152
164
  export type TwitterBaseUrl = typeof TWITTER_BASE_URL;
153
165
  export type TwitterProfileUrl<P extends TwitterProfileId> = `${TwitterBaseUrl}/${P}`;
@@ -167,11 +179,17 @@ export declare function twitterProfileUrlToWebsiteLink(input: TwitterProfileId |
167
179
  * @returns the full profile URL
168
180
  */
169
181
  export declare function twitterProfileUrl<P extends TwitterProfileId>(profileId: P): TwitterProfileUrl<P>;
170
- /** Base URL for TikTok profiles. */
182
+ /**
183
+ * Base URL for TikTok profiles.
184
+ */
171
185
  export declare const TIKTOK_BASE_URL = "https://tiktok.com";
172
- /** TikTok usernames are prefixed with "@" in URLs and stored data. */
186
+ /**
187
+ * TikTok usernames are prefixed with "@" in URLs and stored data.
188
+ */
173
189
  export declare const TIKTOK_USERNAME_PREFIX = "@";
174
- /** {@link WebsiteLinkType} code for TikTok. */
190
+ /**
191
+ * {@link WebsiteLinkType} code for TikTok.
192
+ */
175
193
  export declare const TIKTOK_WEBSITE_LINK_TYPE: WebsiteLinkType;
176
194
  export type TikTokBaseUrl = typeof TIKTOK_BASE_URL;
177
195
  export type TikTokProfileUrl<P extends TikTokProfileId> = `${TikTokBaseUrl}/@${P}`;
@@ -193,9 +211,13 @@ export declare function tiktokProfileUrlToWebsiteLink(input: TikTokProfileId | W
193
211
  * @returns the full profile URL with "@" prefix
194
212
  */
195
213
  export declare function tiktokProfileUrl<P extends TikTokProfileId>(profileId: P): TikTokProfileUrl<P>;
196
- /** Base URL for Snapchat profiles. */
214
+ /**
215
+ * Base URL for Snapchat profiles.
216
+ */
197
217
  export declare const SNAPCHAT_BASE_URL = "https://snapchat.com";
198
- /** {@link WebsiteLinkType} code for Snapchat. */
218
+ /**
219
+ * {@link WebsiteLinkType} code for Snapchat.
220
+ */
199
221
  export declare const SNAPCHAT_WEBSITE_LINK_TYPE: WebsiteLinkType;
200
222
  export type SnapchatBaseUrl = typeof SNAPCHAT_BASE_URL;
201
223
  export type SnapchatProfileUrl<P extends SnapchatProfileId> = `${SnapchatBaseUrl}/add/${P}`;
@@ -221,9 +243,13 @@ export declare function snapchatProfileUrlToWebsiteLink(input: SnapchatProfileId
221
243
  * @returns the full profile URL with `/add/` path
222
244
  */
223
245
  export declare function snapchatProfileUrl<P extends SnapchatProfileId>(profileId: P): SnapchatProfileUrl<P>;
224
- /** Base URL for YouTube channels. */
246
+ /**
247
+ * Base URL for YouTube channels.
248
+ */
225
249
  export declare const YOUTUBE_BASE_URL = "https://youtube.com";
226
- /** {@link WebsiteLinkType} code for YouTube. */
250
+ /**
251
+ * {@link WebsiteLinkType} code for YouTube.
252
+ */
227
253
  export declare const YOUTUBE_WEBSITE_LINK_TYPE: WebsiteLinkType;
228
254
  export type YouTubeBaseUrl = typeof YOUTUBE_BASE_URL;
229
255
  export type YouTubeProfileUrl<P extends YouTubeProfileId> = `${YouTubeBaseUrl}/c/${P}`;
@@ -249,9 +275,13 @@ export declare function youtubeProfileUrlToWebsiteLink(input: YouTubeProfileId |
249
275
  * @returns the full channel URL with `/c/` path
250
276
  */
251
277
  export declare function youtubeProfileUrl<P extends YouTubeProfileId>(profileId: P): YouTubeProfileUrl<P>;
252
- /** Base URL for PayPal.me profiles. */
278
+ /**
279
+ * Base URL for PayPal.me profiles.
280
+ */
253
281
  export declare const PAYPAL_BASE_URL = "https://paypal.me";
254
- /** {@link WebsiteLinkType} code for PayPal. */
282
+ /**
283
+ * {@link WebsiteLinkType} code for PayPal.
284
+ */
255
285
  export declare const PAYPAL_WEBSITE_LINK_TYPE: WebsiteLinkType;
256
286
  export type PayPalBaseUrl = typeof PAYPAL_BASE_URL;
257
287
  export type PayPalProfileUrl<P extends PayPalProfileId> = `${PayPalBaseUrl}/${P}`;
@@ -271,11 +301,17 @@ export declare function paypalProfileUrlToWebsiteLink(input: PayPalProfileId | W
271
301
  * @returns the full PayPal.me URL
272
302
  */
273
303
  export declare function paypalProfileUrl<P extends PayPalProfileId>(profileId: P): PayPalProfileUrl<P>;
274
- /** Base URL for Cash App profiles. */
304
+ /**
305
+ * Base URL for Cash App profiles.
306
+ */
275
307
  export declare const CASHAPP_BASE_URL = "https://cash.app";
276
- /** Cash App usernames are prefixed with "$" (cashtag). */
308
+ /**
309
+ * Cash App usernames are prefixed with "$" (cashtag).
310
+ */
277
311
  export declare const CASHAPP_USERNAME_PREFIX = "$";
278
- /** {@link WebsiteLinkType} code for Cash App. */
312
+ /**
313
+ * {@link WebsiteLinkType} code for Cash App.
314
+ */
279
315
  export declare const CASHAPP_WEBSITE_LINK_TYPE: WebsiteLinkType;
280
316
  export type CashappBaseUrl = typeof CASHAPP_BASE_URL;
281
317
  export type CashappProfileUrl<P extends CashappProfileId> = `${CashappBaseUrl}/$${P}`;
@@ -297,9 +333,13 @@ export declare function cashappProfileUrlToWebsiteLink(input: CashappProfileId |
297
333
  * @returns the full Cash App URL with "$" prefix
298
334
  */
299
335
  export declare function cashappProfileUrl<P extends CashappProfileId>(profileId: P): CashappProfileUrl<P>;
300
- /** Base URL for Venmo profiles. */
336
+ /**
337
+ * Base URL for Venmo profiles.
338
+ */
301
339
  export declare const VENMO_BASE_URL = "https://account.venmo.com";
302
- /** {@link WebsiteLinkType} code for Venmo. */
340
+ /**
341
+ * {@link WebsiteLinkType} code for Venmo.
342
+ */
303
343
  export declare const VENMO_WEBSITE_LINK_TYPE: WebsiteLinkType;
304
344
  export type VenmoBaseUrl = typeof VENMO_BASE_URL;
305
345
  export type VenmoProfileUrl<P extends VenmoProfileId> = `${VenmoBaseUrl}/u/${P}`;
@@ -325,9 +365,13 @@ export declare function venmoProfileUrlToWebsiteLink(input: VenmoProfileId | Web
325
365
  * @returns the full profile URL with `/u/` path
326
366
  */
327
367
  export declare function venmoProfileUrl<P extends VenmoProfileId>(profileId: P): VenmoProfileUrl<P>;
328
- /** Base URL for Spotify profiles. */
368
+ /**
369
+ * Base URL for Spotify profiles.
370
+ */
329
371
  export declare const SPOTIFY_BASE_URL = "https://open.spotify.com/";
330
- /** {@link WebsiteLinkType} code for Spotify. */
372
+ /**
373
+ * {@link WebsiteLinkType} code for Spotify.
374
+ */
331
375
  export declare const SPOTIFY_WEBSITE_LINK_TYPE: WebsiteLinkType;
332
376
  export type SpotifyBaseUrl = typeof SPOTIFY_BASE_URL;
333
377
  export type SpotifyProfileUrl<P extends SpotifyProfileId> = `${SpotifyBaseUrl}/user/${P}`;
@@ -13,6 +13,7 @@ export interface ModelPermissionService<C, T, R extends string = string, O = T>
13
13
  export interface ModelOnlyModelPermissionService<C, T, R extends string = string, O = T> {
14
14
  /**
15
15
  * Returns roles for the model given the input context.
16
+ *
16
17
  * @param model
17
18
  * @param context
18
19
  */
@@ -24,6 +25,7 @@ export interface ModelOnlyModelPermissionService<C, T, R extends string = string
24
25
  export interface KeyOnlyModelPermissionService<C, T, R extends string = string, O = T> {
25
26
  /**
26
27
  * Returns roles for the model given the input context.
28
+ *
27
29
  * @param model
28
30
  * @param context
29
31
  */
@@ -40,7 +42,7 @@ export declare abstract class AbstractModelPermissionService<C, T, R extends str
40
42
  roleMapForModelContext(model: T, context: C): Promise<ContextGrantedModelRoles<O, C, R>>;
41
43
  protected getRoleMapForOutput(output: O, context: C, model: T): Promise<ContextGrantedModelRoles<O, C, R>>;
42
44
  protected abstract outputForModel(model: T, context: C): PromiseOrValue<Maybe<O>>;
43
- protected isUsableOutputForRoles(output: O, context: C): boolean;
45
+ protected isUsableOutputForRoles(_output: O, _context: C): boolean;
44
46
  protected abstract roleMapForModel(output: O, context: C, model: T): PromiseOrValue<GrantedRoleMap<R>>;
45
47
  }
46
48
  /**
@@ -55,6 +57,7 @@ export interface ModelsPermissionService<C> {
55
57
  export interface InContextModelOnlyModelPermissionService<C, T, R extends string = string, O = T> {
56
58
  /**
57
59
  * Returns roles for the model given the input context.
60
+ *
58
61
  * @param model
59
62
  * @param context
60
63
  */
@@ -66,6 +69,7 @@ export interface InContextModelOnlyModelPermissionService<C, T, R extends string
66
69
  export interface InContextKeyOnlyModelPermissionService<C, T, R extends string = string, O = T> {
67
70
  /**
68
71
  * Returns roles for the model given the input context.
72
+ *
69
73
  * @param model
70
74
  * @param context
71
75
  */
@@ -36,6 +36,9 @@ export type Clearable<T> = Maybe<T>;
36
36
  * "items?": clearable(mySchemaType.array()), // .array() result
37
37
  * });
38
38
  * ```
39
+ *
40
+ * @param definition The ArkType definition string or Type instance to make clearable.
41
+ * @returns An ArkType schema that accepts the defined type, null, or undefined.
39
42
  */
40
43
  export declare function clearable<const def extends string>(definition: def): Type<type.infer<def> | null | undefined>;
41
44
  export declare function clearable<T>(definition: Type<T>): Type<T | null | undefined>;