@singi-labs/sifa-sdk 0.19.87 → 0.19.89

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 (51) hide show
  1. package/dist/{follow-profile-ceqefXAw.d.ts → follow-profile-CVcA2w1v.d.ts} +1 -1
  2. package/dist/{follow-profile-CQ3DTTak.d.cts → follow-profile-CgLLLQtJ.d.cts} +1 -1
  3. package/dist/{index-B0BDMGLm.d.ts → index-BEAuoL6l.d.ts} +1 -1
  4. package/dist/{index-BrWWVQLL.d.cts → index-DU0pYHch.d.cts} +1 -1
  5. package/dist/index.cjs +48 -7
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +9 -9
  8. package/dist/index.d.ts +9 -9
  9. package/dist/index.js +8 -2
  10. package/dist/index.js.map +1 -1
  11. package/dist/jsonld/index.d.cts +2 -2
  12. package/dist/jsonld/index.d.ts +2 -2
  13. package/dist/{network-map-NbEQwn91.d.ts → network-map-Bx5ohCEV.d.ts} +4 -4
  14. package/dist/{network-map-BRoBXwPG.d.cts → network-map-D39CQj9J.d.cts} +4 -4
  15. package/dist/{profile-summary-BpfRgE0z.d.cts → profile-summary-D56VII1x.d.cts} +1 -1
  16. package/dist/{profile-summary-BGIJ6ovO.d.ts → profile-summary-DPNTzeDv.d.ts} +1 -1
  17. package/dist/query/fetchers/index.d.cts +8 -8
  18. package/dist/query/fetchers/index.d.ts +8 -8
  19. package/dist/query/hooks/index.d.cts +6 -6
  20. package/dist/query/hooks/index.d.ts +6 -6
  21. package/dist/query/index.d.cts +11 -11
  22. package/dist/query/index.d.ts +11 -11
  23. package/dist/resume/index.d.cts +2 -2
  24. package/dist/resume/index.d.ts +2 -2
  25. package/dist/schemas/follow-profile.js +3 -1
  26. package/dist/schemas/follow-profile.js.map +1 -1
  27. package/dist/schemas/index.cjs +9 -5
  28. package/dist/schemas/index.cjs.map +1 -1
  29. package/dist/schemas/index.d.cts +2 -2
  30. package/dist/schemas/index.d.ts +2 -2
  31. package/dist/taxonomy/index.js +8 -2
  32. package/dist/taxonomy/index.js.map +1 -1
  33. package/dist/taxonomy/verification-providers.js +45 -6
  34. package/dist/taxonomy/verification-providers.js.map +1 -1
  35. package/dist/tokens/colors.js +6 -1
  36. package/dist/tokens/colors.js.map +1 -1
  37. package/dist/tokens/index.cjs +5 -0
  38. package/dist/tokens/index.cjs.map +1 -1
  39. package/dist/tokens/index.d.cts +17 -1
  40. package/dist/tokens/index.d.ts +17 -1
  41. package/dist/tokens/index.js +3 -2
  42. package/dist/tokens/index.js.map +1 -1
  43. package/dist/{types-D2IffOnb.d.ts → types-BqxbmLY6.d.ts} +2 -2
  44. package/dist/{types-CPi-Xcur.d.cts → types-Dd7UMXIz.d.cts} +2 -2
  45. package/dist/{use-user-settings-BxIVvuk3.d.cts → use-user-settings-CBH1CeDP.d.cts} +4 -4
  46. package/dist/{use-user-settings-D_APuRP2.d.ts → use-user-settings-CFhaGcAq.d.ts} +4 -4
  47. package/dist/{user-settings-BFyyuR3C.d.cts → user-settings-ChPm0BFN.d.cts} +4 -4
  48. package/dist/{user-settings-BSlRJc0W.d.ts → user-settings-D1zKOWa2.d.ts} +4 -4
  49. package/dist/{verification-providers-7il3kPQS.d.cts → verification-providers-DeyGqaoC.d.cts} +66 -12
  50. package/dist/{verification-providers-7il3kPQS.d.ts → verification-providers-DeyGqaoC.d.ts} +66 -12
  51. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { a as AccountVerification } from './verification-providers-7il3kPQS.js';
2
+ import { a as AccountVerification } from './verification-providers-DeyGqaoC.js';
3
3
 
4
4
  /**
5
5
  * A single typeahead row. Discriminated on `source`: a curated `entity` row
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { a as AccountVerification } from './verification-providers-7il3kPQS.cjs';
2
+ import { a as AccountVerification } from './verification-providers-DeyGqaoC.cjs';
3
3
 
4
4
  /**
5
5
  * A single typeahead row. Discriminated on `source`: a curated `entity` row
@@ -1,4 +1,4 @@
1
- import { A as AgentRef, a as AccountVerification } from './verification-providers-7il3kPQS.js';
1
+ import { A as AgentRef, a as AccountVerification } from './verification-providers-DeyGqaoC.js';
2
2
 
3
3
  interface LocationValue {
4
4
  city?: string;
@@ -1,4 +1,4 @@
1
- import { A as AgentRef, a as AccountVerification } from './verification-providers-7il3kPQS.cjs';
1
+ import { A as AgentRef, a as AccountVerification } from './verification-providers-DeyGqaoC.cjs';
2
2
 
3
3
  interface LocationValue {
4
4
  city?: string;
package/dist/index.cjs CHANGED
@@ -2566,9 +2566,9 @@ function getArtifactLinkKindLabel(value) {
2566
2566
  }
2567
2567
 
2568
2568
  // src/taxonomy/verification-providers.ts
2569
- var MU_VERIFIER_DIDS = [
2570
- "did:plc:ooensn4mr5mhznzypvxelfa3",
2571
- // eurosky.social -- coordinates the trusted-verifier program
2569
+ var MU_ROOT_DID = "did:plc:ooensn4mr5mhznzypvxelfa3";
2570
+ var MU_VERIFIER_LIST_URI = `at://${MU_ROOT_DID}/app.bsky.graph.list/3mogaw2g4an23`;
2571
+ var MU_FALLBACK_VERIFIER_DIDS = [
2572
2572
  "did:plc:durcipmx2rwgzzagbiumobs5",
2573
2573
  // france-atmosphe.re
2574
2574
  "did:plc:zsf5p7rqilz2qvyd7ezmxrfj",
@@ -2597,7 +2597,9 @@ var VERIFICATION_PROVIDERS = {
2597
2597
  label: "mu (Eurosky)",
2598
2598
  priority: 1,
2599
2599
  source: "firehose",
2600
- verifierDids: MU_VERIFIER_DIDS
2600
+ verifierDids: [MU_ROOT_DID],
2601
+ verifierListUri: MU_VERIFIER_LIST_URI,
2602
+ fallbackVerifierDids: MU_FALLBACK_VERIFIER_DIDS
2601
2603
  }
2602
2604
  };
2603
2605
  function isKnownVerificationProvider(id) {
@@ -2606,13 +2608,31 @@ function isKnownVerificationProvider(id) {
2606
2608
  function getVerificationProvider(id) {
2607
2609
  return isKnownVerificationProvider(id) ? VERIFICATION_PROVIDERS[id] : void 0;
2608
2610
  }
2609
- function resolveVerifierProvider(issuerDid) {
2611
+ function resolveVerifierProvider(issuerDid, listMembers) {
2610
2612
  for (const provider of Object.values(VERIFICATION_PROVIDERS)) {
2611
2613
  if (provider.source !== "firehose") continue;
2612
2614
  if (provider.verifierDids.includes(issuerDid)) return provider.id;
2615
+ if (!listMembers && provider.fallbackVerifierDids?.includes(issuerDid)) return provider.id;
2613
2616
  }
2617
+ const fromList = listMembers?.get(issuerDid);
2618
+ if (fromList && getVerificationProvider(fromList)?.source === "firehose") return fromList;
2614
2619
  return null;
2615
2620
  }
2621
+ function buildVerifierListMembers(items) {
2622
+ const members = /* @__PURE__ */ new Map();
2623
+ for (const provider of Object.values(VERIFICATION_PROVIDERS)) {
2624
+ if (provider.source !== "firehose" || !provider.verifierListUri) continue;
2625
+ const owner = provider.verifierListUri.split("/")[2];
2626
+ if (!owner || !provider.verifierDids.includes(owner)) continue;
2627
+ for (const item of items) {
2628
+ if (item.repoDid !== owner || item.list !== provider.verifierListUri) continue;
2629
+ if (typeof item.subject !== "string" || !/^did:[a-z]+:[A-Za-z0-9._:%-]+$/.test(item.subject))
2630
+ continue;
2631
+ if (!members.has(item.subject)) members.set(item.subject, provider.id);
2632
+ }
2633
+ }
2634
+ return members;
2635
+ }
2616
2636
  function primaryVerification(verifications) {
2617
2637
  let best = null;
2618
2638
  let bestPriority = Number.POSITIVE_INFINITY;
@@ -2626,6 +2646,22 @@ function primaryVerification(verifications) {
2626
2646
  }
2627
2647
  return best;
2628
2648
  }
2649
+ var MAX_LABEL_LENGTH = 64;
2650
+ function verificationLabel(v) {
2651
+ const name = v.issuerName?.trim();
2652
+ if (name) {
2653
+ const chars = [...name];
2654
+ return chars.length > MAX_LABEL_LENGTH ? `${chars.slice(0, MAX_LABEL_LENGTH - 1).join("")}\u2026` : name;
2655
+ }
2656
+ return getVerificationProvider(v.provider)?.label ?? v.provider;
2657
+ }
2658
+ function resolveVerificationBadges(input) {
2659
+ const badges = input.verificationBadges;
2660
+ if (badges && badges.length === 0) return [];
2661
+ const known = (badges ?? []).filter((b) => isKnownVerificationProvider(b.provider));
2662
+ if (known.length > 0) return known;
2663
+ return input.blueskyVerified ? [{ provider: "bluesky", verifiedAt: input.blueskyVerifiedAt ?? null }] : [];
2664
+ }
2629
2665
 
2630
2666
  // src/taxonomy/investment.ts
2631
2667
  var INVESTMENT_ROLE_OPTIONS = [
@@ -6948,7 +6984,9 @@ var AccountVerificationSchema = zod.z.object({
6948
6984
  (value) => typeof value === "string" && Object.hasOwn(VERIFICATION_PROVIDERS, value)
6949
6985
  ),
6950
6986
  verifiedAt: datetimeSchema.nullable().optional(),
6951
- issuerDid: didSchema.nullable().optional()
6987
+ issuerDid: didSchema.nullable().optional(),
6988
+ // Bluesky caps displayName at 640 bytes; anything longer is not a real name.
6989
+ issuerName: zod.z.string().max(640).nullable().optional()
6952
6990
  });
6953
6991
  var VerificationBadgesSchema = zod.z.array(zod.z.unknown()).transform(
6954
6992
  (items) => items.flatMap((item) => {
@@ -7654,7 +7692,7 @@ function describeSifaRecord(collection, value) {
7654
7692
  }
7655
7693
 
7656
7694
  // src/index.ts
7657
- var SIFA_SDK_VERSION = "0.19.87";
7695
+ var SIFA_SDK_VERSION = "0.19.89";
7658
7696
 
7659
7697
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
7660
7698
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -7798,6 +7836,7 @@ exports.blobProxyUrl = blobProxyUrl;
7798
7836
  exports.buildMetaDescription = buildMetaDescription;
7799
7837
  exports.buildProfileHighlights = buildProfileHighlights;
7800
7838
  exports.buildTalkSlug = buildTalkSlug;
7839
+ exports.buildVerifierListMembers = buildVerifierListMembers;
7801
7840
  exports.categoryForApp = categoryForApp;
7802
7841
  exports.certDateExtractor = certDateExtractor;
7803
7842
  exports.cidSchema = cidSchema;
@@ -7959,6 +7998,7 @@ exports.resolveCardHealth = resolveCardHealth;
7959
7998
  exports.resolveCardUrl = resolveCardUrl;
7960
7999
  exports.resolveEmbed = resolveEmbed;
7961
8000
  exports.resolveEmploymentVerification = resolveEmploymentVerification;
8001
+ exports.resolveVerificationBadges = resolveVerificationBadges;
7962
8002
  exports.resolveVerifierProvider = resolveVerifierProvider;
7963
8003
  exports.rgbToString = rgbToString;
7964
8004
  exports.roadmapIssueUrl = roadmapIssueUrl;
@@ -8009,6 +8049,7 @@ exports.truncateGraphemes = truncateGraphemes;
8009
8049
  exports.uriSchema = uriSchema;
8010
8050
  exports.validateTalksImport = validateTalksImport;
8011
8051
  exports.verbForCollection = verbForCollection;
8052
+ exports.verificationLabel = verificationLabel;
8012
8053
  exports.visibleItems = visibleItems;
8013
8054
  exports.youtubeThumbnailUrl = youtubeThumbnailUrl;
8014
8055
  exports.youtubeVideoId = youtubeVideoId;