@dereekb/model 13.9.0 → 13.10.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.
package/index.cjs.js CHANGED
@@ -2327,6 +2327,7 @@ function _async_to_generator$1(fn) {
2327
2327
  };
2328
2328
  }
2329
2329
  function _instanceof(left, right) {
2330
+ "@swc/helpers - instanceof";
2330
2331
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
2331
2332
  return !!right[Symbol.hasInstance](left);
2332
2333
  } else {
package/index.esm.js CHANGED
@@ -2325,6 +2325,7 @@ function _async_to_generator$1(fn) {
2325
2325
  };
2326
2326
  }
2327
2327
  function _instanceof(left, right) {
2328
+ "@swc/helpers - instanceof";
2328
2329
  if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
2329
2330
  return !!right[Symbol.hasInstance](left);
2330
2331
  } else {
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@dereekb/model",
3
- "version": "13.9.0",
3
+ "version": "13.10.1",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.9.0",
5
+ "@dereekb/util": "13.10.1",
6
6
  "arktype": "^2.2.0",
7
- "make-error": "^1.3.0"
7
+ "make-error": "^1.3.6"
8
8
  },
9
9
  "exports": {
10
10
  "./package.json": "./package.json",
@@ -31,6 +31,10 @@ export declare const WEBSITE_LINK_TYPE_REGEX: RegExp;
31
31
  export declare function isValidWebsiteLinkType(input: string): input is WebsiteLinkType;
32
32
  /**
33
33
  * Pipe-separated or raw string encoding of website link data.
34
+ *
35
+ * @semanticType
36
+ * @semanticTopic string
37
+ * @semanticTopic dereekb-model:website-link
34
38
  */
35
39
  export type WebsiteLinkEncodedData = string;
36
40
  /**
@@ -14,6 +14,10 @@ export declare const WEBSITE_FILE_LINK_TYPE_MAX_LENGTH = 32;
14
14
  export declare const WEBSITE_FILE_LINK_TYPE_REGEX: RegExp;
15
15
  /**
16
16
  * MIME type string for a file link (e.g., "image/png", "application/pdf").
17
+ *
18
+ * @semanticType
19
+ * @semanticTopic string
20
+ * @semanticTopic dereekb-model:website-link
17
21
  */
18
22
  export type WebsiteFileLinkMimeType = string;
19
23
  /**
@@ -26,6 +30,10 @@ export declare const WEBSITE_FILE_LINK_MIME_TYPE_MAX_LENGTH = 128;
26
30
  export declare const WEBSITE_FILE_LINK_MIME_TYPE_REGEX: RegExp;
27
31
  /**
28
32
  * Display name for a file link. Has no pattern restriction.
33
+ *
34
+ * @semanticType
35
+ * @semanticTopic string
36
+ * @semanticTopic dereekb-model:website-link
29
37
  */
30
38
  export type WebsiteFileLinkName = string;
31
39
  /**
@@ -34,6 +42,10 @@ export type WebsiteFileLinkName = string;
34
42
  export declare const WEBSITE_FILE_LINK_NAME_MAX_LENGTH = 128;
35
43
  /**
36
44
  * The data payload of a file link, typically a URL pointing to the file.
45
+ *
46
+ * @semanticType
47
+ * @semanticTopic string
48
+ * @semanticTopic dereekb-model:website-link
37
49
  */
38
50
  export type WebsiteFileLinkData = string;
39
51
  /**
@@ -100,6 +100,14 @@ export declare const FACEBOOK_BASE_URL = "https://www.facebook.com";
100
100
  export declare const FACEBOOK_WEBSITE_LINK_TYPE: WebsiteLinkType;
101
101
  export type FacebookBaseUrl = typeof FACEBOOK_BASE_URL;
102
102
  export type FacebookProfileUrl<P extends FacebookProfileId> = `${FacebookBaseUrl}/${P}`;
103
+ /**
104
+ * Facebook profile identifier.
105
+ *
106
+ * @semanticType
107
+ * @semanticTopic identifier
108
+ * @semanticTopic string
109
+ * @semanticTopic dereekb-model:social
110
+ */
103
111
  export type FacebookProfileId = string;
104
112
  export type FacebookWebsiteLinkType = typeof FACEBOOK_WEBSITE_LINK_TYPE;
105
113
  /**
@@ -137,6 +145,14 @@ export declare const INSTAGRAM_BASE_URL = "https://www.instagram.com";
137
145
  export declare const INSTAGRAM_WEBSITE_LINK_TYPE: WebsiteLinkType;
138
146
  export type InstagramBaseUrl = typeof INSTAGRAM_BASE_URL;
139
147
  export type InstagramProfileUrl<P extends InstagramProfileId> = `${InstagramBaseUrl}/${P}`;
148
+ /**
149
+ * Instagram profile identifier.
150
+ *
151
+ * @semanticType
152
+ * @semanticTopic identifier
153
+ * @semanticTopic string
154
+ * @semanticTopic dereekb-model:social
155
+ */
140
156
  export type InstagramProfileId = string;
141
157
  export type InstagramWebsiteLinkType = typeof INSTAGRAM_WEBSITE_LINK_TYPE;
142
158
  /**
@@ -163,6 +179,14 @@ export declare const TWITTER_BASE_URL = "https://www.twitter.com";
163
179
  export declare const TWITTER_WEBSITE_LINK_TYPE: WebsiteLinkType;
164
180
  export type TwitterBaseUrl = typeof TWITTER_BASE_URL;
165
181
  export type TwitterProfileUrl<P extends TwitterProfileId> = `${TwitterBaseUrl}/${P}`;
182
+ /**
183
+ * Twitter/X profile identifier.
184
+ *
185
+ * @semanticType
186
+ * @semanticTopic identifier
187
+ * @semanticTopic string
188
+ * @semanticTopic dereekb-model:social
189
+ */
166
190
  export type TwitterProfileId = string;
167
191
  export type TwitterWebsiteLinkType = typeof TWITTER_WEBSITE_LINK_TYPE;
168
192
  /**
@@ -193,6 +217,14 @@ export declare const TIKTOK_USERNAME_PREFIX = "@";
193
217
  export declare const TIKTOK_WEBSITE_LINK_TYPE: WebsiteLinkType;
194
218
  export type TikTokBaseUrl = typeof TIKTOK_BASE_URL;
195
219
  export type TikTokProfileUrl<P extends TikTokProfileId> = `${TikTokBaseUrl}/@${P}`;
220
+ /**
221
+ * TikTok profile identifier.
222
+ *
223
+ * @semanticType
224
+ * @semanticTopic identifier
225
+ * @semanticTopic string
226
+ * @semanticTopic dereekb-model:social
227
+ */
196
228
  export type TikTokProfileId = string;
197
229
  export type TikTokWebsiteLinkType = typeof TIKTOK_WEBSITE_LINK_TYPE;
198
230
  /**
@@ -221,6 +253,14 @@ export declare const SNAPCHAT_BASE_URL = "https://snapchat.com";
221
253
  export declare const SNAPCHAT_WEBSITE_LINK_TYPE: WebsiteLinkType;
222
254
  export type SnapchatBaseUrl = typeof SNAPCHAT_BASE_URL;
223
255
  export type SnapchatProfileUrl<P extends SnapchatProfileId> = `${SnapchatBaseUrl}/add/${P}`;
256
+ /**
257
+ * Snapchat profile identifier.
258
+ *
259
+ * @semanticType
260
+ * @semanticTopic identifier
261
+ * @semanticTopic string
262
+ * @semanticTopic dereekb-model:social
263
+ */
224
264
  export type SnapchatProfileId = string;
225
265
  export type SnapchatWebsiteLinkType = typeof SNAPCHAT_WEBSITE_LINK_TYPE;
226
266
  /**
@@ -253,6 +293,14 @@ export declare const YOUTUBE_BASE_URL = "https://youtube.com";
253
293
  export declare const YOUTUBE_WEBSITE_LINK_TYPE: WebsiteLinkType;
254
294
  export type YouTubeBaseUrl = typeof YOUTUBE_BASE_URL;
255
295
  export type YouTubeProfileUrl<P extends YouTubeProfileId> = `${YouTubeBaseUrl}/c/${P}`;
296
+ /**
297
+ * YouTube profile identifier.
298
+ *
299
+ * @semanticType
300
+ * @semanticTopic identifier
301
+ * @semanticTopic string
302
+ * @semanticTopic dereekb-model:social
303
+ */
256
304
  export type YouTubeProfileId = string;
257
305
  export type YouTubeWebsiteLinkType = typeof YOUTUBE_WEBSITE_LINK_TYPE;
258
306
  /**
@@ -285,6 +333,14 @@ export declare const PAYPAL_BASE_URL = "https://paypal.me";
285
333
  export declare const PAYPAL_WEBSITE_LINK_TYPE: WebsiteLinkType;
286
334
  export type PayPalBaseUrl = typeof PAYPAL_BASE_URL;
287
335
  export type PayPalProfileUrl<P extends PayPalProfileId> = `${PayPalBaseUrl}/${P}`;
336
+ /**
337
+ * PayPal profile identifier.
338
+ *
339
+ * @semanticType
340
+ * @semanticTopic identifier
341
+ * @semanticTopic string
342
+ * @semanticTopic dereekb-model:social
343
+ */
288
344
  export type PayPalProfileId = string;
289
345
  export type PayPalWebsiteLinkType = typeof PAYPAL_WEBSITE_LINK_TYPE;
290
346
  /**
@@ -315,6 +371,14 @@ export declare const CASHAPP_USERNAME_PREFIX = "$";
315
371
  export declare const CASHAPP_WEBSITE_LINK_TYPE: WebsiteLinkType;
316
372
  export type CashappBaseUrl = typeof CASHAPP_BASE_URL;
317
373
  export type CashappProfileUrl<P extends CashappProfileId> = `${CashappBaseUrl}/$${P}`;
374
+ /**
375
+ * Cash App profile identifier.
376
+ *
377
+ * @semanticType
378
+ * @semanticTopic identifier
379
+ * @semanticTopic string
380
+ * @semanticTopic dereekb-model:social
381
+ */
318
382
  export type CashappProfileId = string;
319
383
  export type CashappWebsiteLinkType = typeof CASHAPP_WEBSITE_LINK_TYPE;
320
384
  /**
@@ -343,6 +407,14 @@ export declare const VENMO_BASE_URL = "https://account.venmo.com";
343
407
  export declare const VENMO_WEBSITE_LINK_TYPE: WebsiteLinkType;
344
408
  export type VenmoBaseUrl = typeof VENMO_BASE_URL;
345
409
  export type VenmoProfileUrl<P extends VenmoProfileId> = `${VenmoBaseUrl}/u/${P}`;
410
+ /**
411
+ * Venmo profile identifier.
412
+ *
413
+ * @semanticType
414
+ * @semanticTopic identifier
415
+ * @semanticTopic string
416
+ * @semanticTopic dereekb-model:social
417
+ */
346
418
  export type VenmoProfileId = string;
347
419
  export type VenmoWebsiteLinkType = typeof VENMO_WEBSITE_LINK_TYPE;
348
420
  /**
@@ -375,6 +447,14 @@ export declare const SPOTIFY_BASE_URL = "https://open.spotify.com/";
375
447
  export declare const SPOTIFY_WEBSITE_LINK_TYPE: WebsiteLinkType;
376
448
  export type SpotifyBaseUrl = typeof SPOTIFY_BASE_URL;
377
449
  export type SpotifyProfileUrl<P extends SpotifyProfileId> = `${SpotifyBaseUrl}/user/${P}`;
450
+ /**
451
+ * Spotify profile identifier.
452
+ *
453
+ * @semanticType
454
+ * @semanticTopic identifier
455
+ * @semanticTopic string
456
+ * @semanticTopic dereekb-model:social
457
+ */
378
458
  export type SpotifyProfileId = string;
379
459
  export type SpotifyWebsiteLinkType = typeof SPOTIFY_WEBSITE_LINK_TYPE;
380
460
  /**
@@ -1,6 +1,11 @@
1
1
  import { type ArrayOrValue, type IterableOrValue, type Maybe, type SetIncludesMode } from '@dereekb/util';
2
2
  /**
3
3
  * A granted role for a model.
4
+ *
5
+ * @semanticType
6
+ * @semanticTopic identifier
7
+ * @semanticTopic string
8
+ * @semanticTopic dereekb-model:auth
4
9
  */
5
10
  export type GrantedRole = string;
6
11
  /**
@@ -2,16 +2,31 @@ import { type FactoryWithRequiredInput, type Maybe, type UniqueModel } from '@de
2
2
  import { type SyncSourceInfo } from './sync.source';
3
3
  /**
4
4
  * A unique identifier for an entity on a specific server.
5
+ *
6
+ * @semanticType
7
+ * @semanticTopic identifier
8
+ * @semanticTopic string
9
+ * @semanticTopic dereekb-model:sync
5
10
  */
6
11
  export type SyncEntityId = string;
7
12
  /**
8
13
  * A common type for an entity that is shared/used between all systems for an entity that should be synchronized.
14
+ *
15
+ * @semanticType
16
+ * @semanticTopic identifier
17
+ * @semanticTopic string
18
+ * @semanticTopic dereekb-model:sync
9
19
  */
10
20
  export type SyncEntityCommonType = string;
11
21
  /**
12
22
  * A common identifier for an entity that is shared/used between all systems for an entity that should be synchronized.
13
23
  *
14
24
  * This identifier should be used for retrieving a similar entity from any server.
25
+ *
26
+ * @semanticType
27
+ * @semanticTopic identifier
28
+ * @semanticTopic string
29
+ * @semanticTopic dereekb-model:sync
15
30
  */
16
31
  export type SyncEntityCommonId = string;
17
32
  /**
@@ -2,10 +2,19 @@
2
2
  * English name for a SyncSource.
3
3
  *
4
4
  * Is not used as a key.
5
+ *
6
+ * @semanticType
7
+ * @semanticTopic string
8
+ * @semanticTopic dereekb-model:sync
5
9
  */
6
10
  export type SyncSourceName = string;
7
11
  /**
8
12
  * A unique identifier for a SyncSource.
13
+ *
14
+ * @semanticType
15
+ * @semanticTopic identifier
16
+ * @semanticTopic string
17
+ * @semanticTopic dereekb-model:sync
9
18
  */
10
19
  export type SyncSourceId = string;
11
20
  /**