@singi-labs/sifa-sdk 0.19.32 → 0.19.34

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 (55) hide show
  1. package/dist/{index-piLIwMN1.d.cts → index-CH8NiQwH.d.cts} +18 -1
  2. package/dist/{index-CpbCm2Fe.d.ts → index-ayiu2kGy.d.ts} +18 -1
  3. package/dist/index.cjs +268 -1
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +125 -7
  6. package/dist/index.d.ts +125 -7
  7. package/dist/index.js +262 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/jsonld/index.d.cts +1 -1
  10. package/dist/jsonld/index.d.ts +1 -1
  11. package/dist/{network-map-BgeHssxs.d.ts → network-map-CtXK5EY7.d.ts} +3 -4
  12. package/dist/{network-map-9VAyPnle.d.cts → network-map-DG4_UpQ4.d.cts} +3 -4
  13. package/dist/{org-BIbPhHLx.d.cts → org-9B__E4ad.d.cts} +5 -256
  14. package/dist/{org-Dx8K7Mh8.d.ts → org-C_s76iQT.d.ts} +5 -256
  15. package/dist/{profile-investment-PDLfao_i.d.cts → profile-investment-BIOYJf-x.d.cts} +12 -1
  16. package/dist/{profile-investment-PDLfao_i.d.ts → profile-investment-BIOYJf-x.d.ts} +12 -1
  17. package/dist/{profile-summary-Bm3gJPKC.d.cts → profile-summary-BYWU098I.d.cts} +1 -1
  18. package/dist/{profile-summary-CHUPtU__.d.ts → profile-summary-DXnFXPlO.d.ts} +1 -1
  19. package/dist/query/fetchers/index.cjs +3 -1
  20. package/dist/query/fetchers/index.cjs.map +1 -1
  21. package/dist/query/fetchers/index.d.cts +6 -6
  22. package/dist/query/fetchers/index.d.ts +6 -6
  23. package/dist/query/fetchers/index.js +3 -1
  24. package/dist/query/fetchers/index.js.map +1 -1
  25. package/dist/query/hooks/index.cjs +3 -1
  26. package/dist/query/hooks/index.cjs.map +1 -1
  27. package/dist/query/hooks/index.d.cts +4 -5
  28. package/dist/query/hooks/index.d.ts +4 -5
  29. package/dist/query/hooks/index.js +3 -1
  30. package/dist/query/hooks/index.js.map +1 -1
  31. package/dist/query/index.cjs +3 -1
  32. package/dist/query/index.cjs.map +1 -1
  33. package/dist/query/index.d.cts +10 -9
  34. package/dist/query/index.d.ts +10 -9
  35. package/dist/query/index.js +3 -1
  36. package/dist/query/index.js.map +1 -1
  37. package/dist/resume/index.d.cts +1 -1
  38. package/dist/resume/index.d.ts +1 -1
  39. package/dist/schemas/index.cjs +7 -0
  40. package/dist/schemas/index.cjs.map +1 -1
  41. package/dist/schemas/index.d.cts +1 -1
  42. package/dist/schemas/index.d.ts +1 -1
  43. package/dist/schemas/index.js +7 -1
  44. package/dist/schemas/index.js.map +1 -1
  45. package/dist/schemas/write/index.cjs +9 -0
  46. package/dist/schemas/write/index.cjs.map +1 -1
  47. package/dist/schemas/write/index.d.cts +39 -1
  48. package/dist/schemas/write/index.d.ts +39 -1
  49. package/dist/schemas/write/index.js +9 -1
  50. package/dist/schemas/write/index.js.map +1 -1
  51. package/dist/{types-mmGgHkik.d.cts → types-By-g5caY.d.cts} +259 -2
  52. package/dist/{types-Mosj_JIx.d.ts → types-pK_aShdG.d.ts} +259 -2
  53. package/dist/{use-org-notification-emails-Dsek36iZ.d.ts → use-org-notification-emails-BwYnA7tk.d.ts} +3 -3
  54. package/dist/{use-org-notification-emails-OHgt6WRP.d.cts → use-org-notification-emails-DamYHmQc.d.cts} +3 -3
  55. package/package.json +1 -1
@@ -255,6 +255,17 @@ interface AuthorSuggestion {
255
255
  /** Display name on the matched account, for showing what is being proposed. */
256
256
  displayName?: string;
257
257
  }
258
+ /**
259
+ * A typed link from a work to another version or form of it
260
+ * (`id.sifa.defs#relatedIdentifier`). `relationType` uses the DataCite
261
+ * vocabulary, e.g. `IsPreprintOf` on a preprint pointing at its published
262
+ * version. `identifierType` is `DOI` (the default when absent), `AT-URI` or `URL`.
263
+ */
264
+ interface RelatedIdentifier {
265
+ identifier: string;
266
+ identifierType?: string;
267
+ relationType: string;
268
+ }
258
269
  interface ProfilePublication {
259
270
  rkey: string;
260
271
  title: string;
@@ -293,6 +304,12 @@ interface ProfilePublication {
293
304
  * for Sifa/ORCID publications, null when none could be resolved.
294
305
  */
295
306
  image?: string | null;
307
+ /**
308
+ * Other versions or forms of this work: relations declared on the record
309
+ * plus, for a DOI, those registered with DataCite or Crossref (#590). Feed
310
+ * to `groupPublicationVersions` to fold a preprint under its published version.
311
+ */
312
+ relatedIdentifiers?: RelatedIdentifier[];
296
313
  }
297
314
  interface ProfileVolunteering {
298
315
  rkey: string;
@@ -932,4 +949,4 @@ interface Profile {
932
949
  externalAccounts?: ExternalAccount[];
933
950
  }
934
951
 
935
- export { type AccountFacetMode as A, type ProfileInvestmentLink as B, type CoSpeaker as C, type ProfileInvolvementLink as D, type Endorsement as E, type FeedItem as F, type ProfileLocation as G, type ProfileOverrideSource as H, type ProfilePresentation as I, type ProfileVolunteering as J, type ProjectMemberCard as K, type LocationValue as L, type ProjectRole as M, type PublicationContributor as N, type OrgAddressView as O, type ProfileSkill as P, type SkillSuggestion as Q, type RecognizedEntity as R, type SkillRef as S, type TrustStat as T, type VerifiedAccount as V, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PresentationLinkView as w, type ProfileCourse as x, type ProfileIndustry as y, type ProfileInvestment as z };
952
+ export { type AccountFacetMode as A, type ProfileInvestmentLink as B, type CoSpeaker as C, type ProfileInvolvementLink as D, type Endorsement as E, type FeedItem as F, type ProfileLocation as G, type ProfileOverrideSource as H, type ProfilePresentation as I, type ProfileVolunteering as J, type ProjectMemberCard as K, type LocationValue as L, type ProjectRole as M, type PublicationContributor as N, type OrgAddressView as O, type ProfileSkill as P, type RecognizedEntity as Q, type RelatedIdentifier as R, type SkillRef as S, type SkillSuggestion as T, type TrustStat as U, type VerifiedAccount as V, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PresentationLinkView as w, type ProfileCourse as x, type ProfileIndustry as y, type ProfileInvestment as z };
@@ -255,6 +255,17 @@ interface AuthorSuggestion {
255
255
  /** Display name on the matched account, for showing what is being proposed. */
256
256
  displayName?: string;
257
257
  }
258
+ /**
259
+ * A typed link from a work to another version or form of it
260
+ * (`id.sifa.defs#relatedIdentifier`). `relationType` uses the DataCite
261
+ * vocabulary, e.g. `IsPreprintOf` on a preprint pointing at its published
262
+ * version. `identifierType` is `DOI` (the default when absent), `AT-URI` or `URL`.
263
+ */
264
+ interface RelatedIdentifier {
265
+ identifier: string;
266
+ identifierType?: string;
267
+ relationType: string;
268
+ }
258
269
  interface ProfilePublication {
259
270
  rkey: string;
260
271
  title: string;
@@ -293,6 +304,12 @@ interface ProfilePublication {
293
304
  * for Sifa/ORCID publications, null when none could be resolved.
294
305
  */
295
306
  image?: string | null;
307
+ /**
308
+ * Other versions or forms of this work: relations declared on the record
309
+ * plus, for a DOI, those registered with DataCite or Crossref (#590). Feed
310
+ * to `groupPublicationVersions` to fold a preprint under its published version.
311
+ */
312
+ relatedIdentifiers?: RelatedIdentifier[];
296
313
  }
297
314
  interface ProfileVolunteering {
298
315
  rkey: string;
@@ -932,4 +949,4 @@ interface Profile {
932
949
  externalAccounts?: ExternalAccount[];
933
950
  }
934
951
 
935
- export { type AccountFacetMode as A, type ProfileInvestmentLink as B, type CoSpeaker as C, type ProfileInvolvementLink as D, type Endorsement as E, type FeedItem as F, type ProfileLocation as G, type ProfileOverrideSource as H, type ProfilePresentation as I, type ProfileVolunteering as J, type ProjectMemberCard as K, type LocationValue as L, type ProjectRole as M, type PublicationContributor as N, type OrgAddressView as O, type ProfileSkill as P, type SkillSuggestion as Q, type RecognizedEntity as R, type SkillRef as S, type TrustStat as T, type VerifiedAccount as V, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PresentationLinkView as w, type ProfileCourse as x, type ProfileIndustry as y, type ProfileInvestment as z };
952
+ export { type AccountFacetMode as A, type ProfileInvestmentLink as B, type CoSpeaker as C, type ProfileInvolvementLink as D, type Endorsement as E, type FeedItem as F, type ProfileLocation as G, type ProfileOverrideSource as H, type ProfilePresentation as I, type ProfileVolunteering as J, type ProjectMemberCard as K, type LocationValue as L, type ProjectRole as M, type PublicationContributor as N, type OrgAddressView as O, type ProfileSkill as P, type RecognizedEntity as Q, type RelatedIdentifier as R, type SkillRef as S, type SkillSuggestion as T, type TrustStat as U, type VerifiedAccount as V, type ProfilePresentationDelivery as a, type PdsProviderInfo as b, type Profile as c, type ProfilePosition as d, type ProfileCertification as e, type ProfileEducation as f, type ProfileHonor as g, type ProfileLanguage as h, type ProfileProject as i, type ProfilePublication as j, type ProfileInvolvement as k, type ActiveApp as l, type ActorCard as m, type AuthorSuggestion as n, type EndorsementData as o, type ExternalAccount as p, type ExternalAccountKeytraceClaim as q, type LanguageProficiency as r, type OrgFloorVerdict as s, type OrgLinkView as t, type OrgProfileView as u, PROJECT_ROLES as v, type PresentationLinkView as w, type ProfileCourse as x, type ProfileIndustry as y, type ProfileInvestment as z };
package/dist/index.cjs CHANGED
@@ -686,64 +686,161 @@ function getIndustryLabelKey(value) {
686
686
  }
687
687
  return value;
688
688
  }
689
+ var INDUSTRY_LABELS = {
690
+ industryTechnology: "Technology",
691
+ domainSoftwareEngineering: "Software Engineering",
692
+ domainDataScience: "Data Science & ML",
693
+ domainCybersecurity: "Cybersecurity",
694
+ domainDevops: "DevOps & Infrastructure",
695
+ domainProductDesign: "Product & UX Design",
696
+ domainGameDev: "Game Development",
697
+ industryFinance: "Finance & Banking",
698
+ domainBanking: "Banking",
699
+ domainFintech: "Fintech",
700
+ domainInsurance: "Insurance",
701
+ domainInvestmentMgmt: "Investment Management",
702
+ industryHealthcare: "Healthcare & Life Sciences",
703
+ domainClinicalResearch: "Clinical Research",
704
+ domainHealthtech: "Health Technology",
705
+ domainPharma: "Pharmaceuticals",
706
+ industryEducation: "Education & Research",
707
+ domainHigherEd: "Higher Education",
708
+ domainEdtech: "Education Technology",
709
+ domainPrimarySecondary: "Primary & Secondary Education",
710
+ industryMedia: "Media & Entertainment",
711
+ domainJournalism: "Journalism",
712
+ domainFilmVideo: "Film & Video",
713
+ domainGaming: "Gaming & Interactive Media",
714
+ domainAdvertising: "Advertising & Marketing",
715
+ industryRetail: "Retail & E-commerce",
716
+ domainEcommerce: "E-commerce",
717
+ domainSupplyChain: "Supply Chain & Fulfillment",
718
+ industryManufacturing: "Manufacturing & Engineering",
719
+ domainAutomotive: "Automotive",
720
+ domainAerospace: "Aerospace & Defense",
721
+ domainHardware: "Hardware & Electronics",
722
+ industryEnergy: "Energy & Environment",
723
+ domainRenewables: "Renewable Energy",
724
+ domainOilGas: "Oil & Gas",
725
+ domainClimateTech: "Climate Tech",
726
+ industryGovernment: "Government & Public Sector",
727
+ domainPublicPolicy: "Public Policy",
728
+ domainDefense: "Defense & Intelligence",
729
+ industryLegal: "Legal",
730
+ domainIpLaw: "Intellectual Property",
731
+ domainCompliance: "Compliance & Regulatory",
732
+ industryConsulting: "Consulting & Professional Services",
733
+ domainManagementConsulting: "Management Consulting",
734
+ domainDevrel: "Developer Relations",
735
+ domainHrRecruitment: "HR & Recruitment",
736
+ industryNonprofit: "Non-profit & Social Impact",
737
+ domainHumanRights: "Human Rights",
738
+ domainOpenSource: "Open Source",
739
+ industryRealEstate: "Real Estate & Construction",
740
+ domainProptech: "Property Technology",
741
+ industryTransport: "Transportation & Logistics",
742
+ domainAutonomousVehicles: "Autonomous Vehicles",
743
+ domainLogistics: "Logistics & Warehousing",
744
+ industryAgriculture: "Agriculture & Food",
745
+ domainAgritech: "Agricultural Technology",
746
+ domainFoodTech: "Food Technology & Processing",
747
+ industryHospitality: "Hospitality & Tourism",
748
+ domainHotels: "Hotels & Accommodation",
749
+ domainTravelTourism: "Travel & Tourism",
750
+ domainFoodBeverage: "Food & Beverage",
751
+ industryTelecom: "Telecommunications",
752
+ domainNetworkInfra: "Network Infrastructure",
753
+ domainMobileServices: "Mobile & Wireless Services",
754
+ industryMining: "Mining & Resources",
755
+ domainExtraction: "Extraction & Processing",
756
+ domainGeological: "Geological Services",
757
+ industryFashion: "Fashion & Textiles",
758
+ domainFashionDesign: "Fashion Design",
759
+ domainTextileManufacturing: "Textile Manufacturing",
760
+ industryMaritime: "Maritime & Shipping",
761
+ domainShipping: "Shipping & Freight",
762
+ domainPortOperations: "Port & Terminal Operations",
763
+ domainNavalArchitecture: "Naval Architecture & Marine Engineering",
764
+ industryOther: "Other"
765
+ };
766
+ function getIndustryLabel(value) {
767
+ return INDUSTRY_LABELS[getIndustryLabelKey(value)] ?? value;
768
+ }
689
769
 
690
770
  // src/taxonomy/open-to.ts
691
771
  var OPEN_TO_OPTIONS = [
692
772
  {
693
773
  value: "id.sifa.defs#fullTimeRoles",
694
774
  labelKey: "fullTimeRoles",
775
+ label: "Full-time roles",
695
776
  token: "fullTime",
696
777
  group: "work"
697
778
  },
698
779
  {
699
780
  value: "id.sifa.defs#partTimeRoles",
700
781
  labelKey: "partTimeRoles",
782
+ label: "Part-time roles",
701
783
  token: "partTime",
702
784
  group: "work"
703
785
  },
704
786
  {
705
787
  value: "id.sifa.defs#contractRoles",
706
788
  labelKey: "contractRoles",
789
+ label: "Contract roles",
707
790
  token: "contract",
708
791
  group: "work"
709
792
  },
710
793
  {
711
794
  value: "id.sifa.defs#commissions",
712
795
  labelKey: "commissions",
796
+ label: "Commissioned work",
713
797
  token: "commissions",
714
798
  group: "work"
715
799
  },
716
800
  {
717
801
  value: "id.sifa.defs#boardPositions",
718
802
  labelKey: "boardPositions",
803
+ label: "Board positions",
719
804
  token: "board",
720
805
  group: "work"
721
806
  },
722
807
  {
723
808
  value: "id.sifa.defs#speakingEngagements",
724
809
  labelKey: "speakingEngagements",
810
+ label: "Speaking engagements",
725
811
  token: "speaking",
726
812
  group: "work"
727
813
  },
728
814
  {
729
815
  value: "id.sifa.defs#mentoringOthers",
730
816
  labelKey: "mentoringOthers",
817
+ label: "Mentoring others",
731
818
  token: "mentor",
732
819
  group: "mentorship"
733
820
  },
734
821
  {
735
822
  value: "id.sifa.defs#beingMentored",
736
823
  labelKey: "beingMentored",
824
+ label: "Being mentored",
737
825
  token: "mentee",
738
826
  group: "mentorship"
739
827
  },
740
828
  {
741
829
  value: "id.sifa.defs#collaborations",
742
830
  labelKey: "collaborations",
831
+ label: "Collaborations",
743
832
  token: "collab",
744
833
  group: "peer"
745
834
  }
746
835
  ];
836
+ var OPEN_TO_TOKEN_LABELS = Object.fromEntries(
837
+ OPEN_TO_OPTIONS.map((o) => [o.token, o.label])
838
+ );
839
+ var OPEN_TO_GROUP_LABELS = {
840
+ work: "Work",
841
+ mentorship: "Mentorship",
842
+ peer: "Peer"
843
+ };
747
844
  var OPEN_TO_TOKEN_TO_VALUE = Object.fromEntries(
748
845
  OPEN_TO_OPTIONS.map((o) => [o.token, o.value])
749
846
  );
@@ -785,6 +882,69 @@ function normalizeOpenTo(values) {
785
882
  return out;
786
883
  }
787
884
 
885
+ // src/taxonomy/search-filter-defs.ts
886
+ var SEARCH_FILTER_DEFS = [
887
+ {
888
+ key: "skill",
889
+ label: "Skill",
890
+ control: "skill-typeahead",
891
+ optionSource: { kind: "typeahead" },
892
+ order: 1,
893
+ peopleOnly: true
894
+ },
895
+ {
896
+ key: "country",
897
+ label: "Country",
898
+ allLabel: "All countries",
899
+ control: "select",
900
+ optionSource: { kind: "facet", ref: "countries" },
901
+ order: 2
902
+ },
903
+ {
904
+ key: "industry",
905
+ label: "Industry",
906
+ allLabel: "All industries",
907
+ control: "select",
908
+ optionSource: { kind: "taxonomy", ref: "industry" },
909
+ order: 3
910
+ },
911
+ {
912
+ key: "domain",
913
+ label: "Domain",
914
+ allLabel: "All domains",
915
+ control: "select",
916
+ optionSource: { kind: "taxonomy", ref: "domain" },
917
+ order: 4,
918
+ dependsOn: "industry"
919
+ },
920
+ {
921
+ key: "workplace",
922
+ label: "Workplace",
923
+ allLabel: "Any arrangement",
924
+ control: "select",
925
+ optionSource: { kind: "taxonomy", ref: "workplace" },
926
+ order: 5,
927
+ peopleOnly: true
928
+ },
929
+ {
930
+ key: "openTo",
931
+ label: "Open to",
932
+ control: "multi-select",
933
+ optionSource: { kind: "taxonomy", ref: "openTo" },
934
+ order: 6,
935
+ peopleOnly: true
936
+ },
937
+ {
938
+ key: "app",
939
+ label: "App",
940
+ allLabel: "All apps",
941
+ control: "select",
942
+ optionSource: { kind: "facet", ref: "apps" },
943
+ order: 7,
944
+ hidden: true
945
+ }
946
+ ];
947
+
788
948
  // src/taxonomy/workplace-type.ts
789
949
  var WORKPLACE_TYPE_OPTIONS = [
790
950
  { value: "id.sifa.defs#onSite", label: "On-site" },
@@ -5669,6 +5829,100 @@ function groupInvolvementByHeading(items) {
5669
5829
  return groups;
5670
5830
  }
5671
5831
 
5832
+ // src/profile/publication-versions.ts
5833
+ var PREPRINT_OF = /* @__PURE__ */ new Set(["IsPreprintOf", "IsPublishedIn"]);
5834
+ var DEFERS_TO = /* @__PURE__ */ new Set(["IsVersionOf", "IsPreviousVersionOf"]);
5835
+ var doiKey = (doi) => `doi:${normalizeDoi(doi).toLowerCase()}`;
5836
+ function targetKey(rel) {
5837
+ const id = rel.identifier?.trim();
5838
+ if (!id) return void 0;
5839
+ const type = rel.identifierType ?? "DOI";
5840
+ if (type === "AT-URI") return `uri:${id}`;
5841
+ if (type === "URL") {
5842
+ const bare = normalizeDoi(id);
5843
+ return bare.startsWith("10.") ? doiKey(bare) : `url:${id}`;
5844
+ }
5845
+ return doiKey(id);
5846
+ }
5847
+ function groupPublicationVersions(pubs, options = {}) {
5848
+ const keyToIndex = /* @__PURE__ */ new Map();
5849
+ pubs.forEach((p, i) => {
5850
+ if (p.doi) keyToIndex.set(doiKey(p.doi), i);
5851
+ if (options.ownerDid && (!p.source || p.source === "sifa")) {
5852
+ keyToIndex.set(`uri:at://${options.ownerDid}/id.sifa.profile.publication/${p.rkey}`, i);
5853
+ }
5854
+ if (p.publicationUri) keyToIndex.set(`uri:${p.publicationUri}`, i);
5855
+ });
5856
+ const parent = pubs.map((_, i) => i);
5857
+ const find = (i) => {
5858
+ while (parent[i] !== i) {
5859
+ parent[i] = parent[parent[i]];
5860
+ i = parent[i];
5861
+ }
5862
+ return i;
5863
+ };
5864
+ const union = (a, b) => {
5865
+ const ra = find(a);
5866
+ const rb = find(b);
5867
+ if (ra !== rb) parent[rb] = ra;
5868
+ };
5869
+ const preprints = /* @__PURE__ */ new Set();
5870
+ const deferring = /* @__PURE__ */ new Set();
5871
+ const siblingsOf = /* @__PURE__ */ new Map();
5872
+ pubs.forEach((p, i) => {
5873
+ if (p.type === "preprint") preprints.add(i);
5874
+ for (const rel of p.relatedIdentifiers ?? []) {
5875
+ const key = targetKey(rel);
5876
+ if (!key) continue;
5877
+ const j = keyToIndex.get(key);
5878
+ if (j === void 0) {
5879
+ if (rel.relationType === "IsVersionOf") {
5880
+ const first = siblingsOf.get(key);
5881
+ if (first === void 0) siblingsOf.set(key, i);
5882
+ else union(first, i);
5883
+ }
5884
+ continue;
5885
+ }
5886
+ if (j === i) continue;
5887
+ union(i, j);
5888
+ if (PREPRINT_OF.has(rel.relationType)) preprints.add(i);
5889
+ if (DEFERS_TO.has(rel.relationType)) deferring.add(i);
5890
+ if (rel.relationType === "HasPreprint") preprints.add(j);
5891
+ }
5892
+ });
5893
+ const members = /* @__PURE__ */ new Map();
5894
+ pubs.forEach((_, i) => {
5895
+ const root = find(i);
5896
+ const list = members.get(root);
5897
+ if (list) list.push(i);
5898
+ else members.set(root, [i]);
5899
+ });
5900
+ const newestFirst = (a, b) => {
5901
+ const da = pubs[a].date ?? "";
5902
+ const db = pubs[b].date ?? "";
5903
+ if (da !== db) return db.localeCompare(da);
5904
+ const fa = deferring.has(a) ? 1 : 0;
5905
+ const fb = deferring.has(b) ? 1 : 0;
5906
+ if (fa !== fb) return fa - fb;
5907
+ return a - b;
5908
+ };
5909
+ const groups = [];
5910
+ for (const indexes of members.values()) {
5911
+ const primary = indexes.find((i) => pubs[i].primary);
5912
+ const published = indexes.filter((i) => !preprints.has(i));
5913
+ const pool = published.length ? published : indexes;
5914
+ const lead = primary ?? [...pool].sort(newestFirst)[0];
5915
+ groups.push({
5916
+ order: Math.min(...indexes),
5917
+ group: {
5918
+ lead: pubs[lead],
5919
+ versions: indexes.filter((i) => i !== lead).sort(newestFirst).map((i) => ({ pub: pubs[i], kind: preprints.has(i) ? "preprint" : "version" }))
5920
+ }
5921
+ });
5922
+ }
5923
+ return groups.sort((a, b) => a.order - b.order).map((g) => g.group);
5924
+ }
5925
+
5672
5926
  // src/profile/highlights.ts
5673
5927
  function coPeopleLabel(people, self) {
5674
5928
  const names = (people ?? []).filter((p) => p.did !== self.did && (!p.handle || p.handle !== self.handle)).map((p) => p.displayName ?? p.name ?? p.handle).filter((n) => Boolean(n && n.trim()));
@@ -6326,6 +6580,11 @@ var PublicationAuthorSchema = zod.z.object({
6326
6580
  name: zod.z.string().min(1).refine(maxGraphemes(100)).max(1e3),
6327
6581
  did: didSchema.optional()
6328
6582
  });
6583
+ var RelatedIdentifierSchema = zod.z.object({
6584
+ identifier: zod.z.string().min(1).max(2048),
6585
+ identifierType: zod.z.string().max(32).optional(),
6586
+ relationType: zod.z.string().min(1).max(64)
6587
+ });
6329
6588
  var ProfilePublicationRecordSchema = zod.z.object({
6330
6589
  title: zod.z.string().min(1).refine(maxGraphemes(200)).max(2e3),
6331
6590
  subtitle: zod.z.string().refine(maxGraphemes(200)).max(2e3).optional(),
@@ -6333,6 +6592,7 @@ var ProfilePublicationRecordSchema = zod.z.object({
6333
6592
  url: uriSchema.optional(),
6334
6593
  description: zod.z.string().refine(maxGraphemes(5e3)).max(5e4).optional(),
6335
6594
  authors: zod.z.array(PublicationAuthorSchema).max(50).optional(),
6595
+ relatedIdentifiers: zod.z.array(RelatedIdentifierSchema).max(20).optional(),
6336
6596
  publishedAt: partialDateSchema.optional(),
6337
6597
  isPrimary: zod.z.boolean().optional(),
6338
6598
  createdAt: datetimeSchema
@@ -6696,7 +6956,7 @@ function describeSifaRecord(collection, value) {
6696
6956
  }
6697
6957
 
6698
6958
  // src/index.ts
6699
- var SIFA_SDK_VERSION = "0.19.32";
6959
+ var SIFA_SDK_VERSION = "0.19.34";
6700
6960
 
6701
6961
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
6702
6962
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -6749,6 +7009,7 @@ exports.FollowFeedPageSchema = FollowFeedPageSchema;
6749
7009
  exports.FollowProfilePageSchema = FollowProfilePageSchema;
6750
7010
  exports.FollowProfileSchema = FollowProfileSchema;
6751
7011
  exports.GraphFollowRecordSchema = GraphFollowRecordSchema;
7012
+ exports.INDUSTRY_LABELS = INDUSTRY_LABELS;
6752
7013
  exports.INDUSTRY_OPTIONS = INDUSTRY_OPTIONS;
6753
7014
  exports.INVESTMENT_ROLE_LABELS = INVESTMENT_ROLE_LABELS;
6754
7015
  exports.INVESTMENT_ROLE_OPTIONS = INVESTMENT_ROLE_OPTIONS;
@@ -6763,8 +7024,10 @@ exports.INVOLVEMENT_KIND_OPTIONS = INVOLVEMENT_KIND_OPTIONS;
6763
7024
  exports.InvestmentAmountSchema = InvestmentAmountSchema;
6764
7025
  exports.MIN_SKILLS = MIN_SKILLS;
6765
7026
  exports.ON_BEHALF_OF_EMPLOYMENT_TYPES = ON_BEHALF_OF_EMPLOYMENT_TYPES;
7027
+ exports.OPEN_TO_GROUP_LABELS = OPEN_TO_GROUP_LABELS;
6766
7028
  exports.OPEN_TO_OPTIONS = OPEN_TO_OPTIONS;
6767
7029
  exports.OPEN_TO_TOKENS = OPEN_TO_TOKENS;
7030
+ exports.OPEN_TO_TOKEN_LABELS = OPEN_TO_TOKEN_LABELS;
6768
7031
  exports.OPEN_TO_TOKEN_TO_VALUE = OPEN_TO_TOKEN_TO_VALUE;
6769
7032
  exports.OPEN_TO_VALUE_TO_TOKEN = OPEN_TO_VALUE_TO_TOKEN;
6770
7033
  exports.OrgEmploymentAttestationRecordSchema = OrgEmploymentAttestationRecordSchema;
@@ -6802,6 +7065,8 @@ exports.ProfileVolunteeringRecordSchema = ProfileVolunteeringRecordSchema;
6802
7065
  exports.PublicationAuthorSchema = PublicationAuthorSchema;
6803
7066
  exports.ROADMAP_ISSUES_REPO = ROADMAP_ISSUES_REPO;
6804
7067
  exports.ROADMAP_ITEM_META = ROADMAP_ITEM_META;
7068
+ exports.RelatedIdentifierSchema = RelatedIdentifierSchema;
7069
+ exports.SEARCH_FILTER_DEFS = SEARCH_FILTER_DEFS;
6805
7070
  exports.SECTION_GROUPS = SECTION_GROUPS;
6806
7071
  exports.SECTION_LABELS = SECTION_LABELS;
6807
7072
  exports.SELF_APP_ID = SELF_APP_ID;
@@ -6875,6 +7140,7 @@ exports.getEmploymentTypeLabel = getEmploymentTypeLabel;
6875
7140
  exports.getFaviconUrl = getFaviconUrl;
6876
7141
  exports.getFilledDimensionsMap = getFilledDimensionsMap;
6877
7142
  exports.getHandleStem = getHandleStem;
7143
+ exports.getIndustryLabel = getIndustryLabel;
6878
7144
  exports.getIndustryLabelKey = getIndustryLabelKey;
6879
7145
  exports.getInvestmentRoleLabel = getInvestmentRoleLabel;
6880
7146
  exports.getInvestmentStageLabel = getInvestmentStageLabel;
@@ -6896,6 +7162,7 @@ exports.getVerificationProvider = getVerificationProvider;
6896
7162
  exports.getVisibleSectionIds = getVisibleSectionIds;
6897
7163
  exports.getWorkplaceTypeLabel = getWorkplaceTypeLabel;
6898
7164
  exports.groupInvolvementByHeading = groupInvolvementByHeading;
7165
+ exports.groupPublicationVersions = groupPublicationVersions;
6899
7166
  exports.groupSkillsByCategory = groupSkillsByCategory;
6900
7167
  exports.groupSkillsBySubCategory = groupSkillsBySubCategory;
6901
7168
  exports.groupSkillsForDisplay = groupSkillsForDisplay;