@singi-labs/sifa-sdk 0.9.9 → 0.9.11

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.
@@ -24,6 +24,7 @@ interface ProfilePosition {
24
24
  skills?: SkillRef[];
25
25
  linkedSkills?: ProfileSkill[];
26
26
  primary?: boolean;
27
+ hidden?: boolean;
27
28
  }
28
29
  interface ProfileEducation {
29
30
  rkey: string;
@@ -34,6 +35,7 @@ interface ProfileEducation {
34
35
  activities?: string;
35
36
  startedAt?: string;
36
37
  endedAt?: string;
38
+ hidden?: boolean;
37
39
  }
38
40
  interface ProfileSkill {
39
41
  rkey: string;
@@ -83,6 +85,7 @@ interface ProfileCertification {
83
85
  issueDate?: string;
84
86
  expiryDate?: string;
85
87
  credentialUrl?: string;
88
+ hidden?: boolean;
86
89
  }
87
90
  interface ProfileProject {
88
91
  rkey: string;
@@ -91,6 +94,7 @@ interface ProfileProject {
91
94
  url?: string;
92
95
  startDate?: string;
93
96
  endDate?: string;
97
+ hidden?: boolean;
94
98
  }
95
99
  interface PublicationContributor {
96
100
  name: string;
@@ -126,6 +130,7 @@ interface ProfileVolunteering {
126
130
  startDate?: string;
127
131
  endDate?: string;
128
132
  description?: string;
133
+ hidden?: boolean;
129
134
  }
130
135
  interface ProfileHonor {
131
136
  rkey: string;
@@ -133,18 +138,21 @@ interface ProfileHonor {
133
138
  issuer?: string;
134
139
  date?: string;
135
140
  description?: string;
141
+ hidden?: boolean;
136
142
  }
137
143
  type LanguageProficiency = 'elementary' | 'limited_working' | 'professional_working' | 'full_professional' | 'native';
138
144
  interface ProfileLanguage {
139
145
  rkey: string;
140
146
  language: string;
141
147
  proficiency?: LanguageProficiency;
148
+ hidden?: boolean;
142
149
  }
143
150
  interface ProfileCourse {
144
151
  rkey: string;
145
152
  name: string;
146
153
  institution?: string;
147
154
  number?: string;
155
+ hidden?: boolean;
148
156
  }
149
157
  interface TrustStat {
150
158
  key: string;
@@ -24,6 +24,7 @@ interface ProfilePosition {
24
24
  skills?: SkillRef[];
25
25
  linkedSkills?: ProfileSkill[];
26
26
  primary?: boolean;
27
+ hidden?: boolean;
27
28
  }
28
29
  interface ProfileEducation {
29
30
  rkey: string;
@@ -34,6 +35,7 @@ interface ProfileEducation {
34
35
  activities?: string;
35
36
  startedAt?: string;
36
37
  endedAt?: string;
38
+ hidden?: boolean;
37
39
  }
38
40
  interface ProfileSkill {
39
41
  rkey: string;
@@ -83,6 +85,7 @@ interface ProfileCertification {
83
85
  issueDate?: string;
84
86
  expiryDate?: string;
85
87
  credentialUrl?: string;
88
+ hidden?: boolean;
86
89
  }
87
90
  interface ProfileProject {
88
91
  rkey: string;
@@ -91,6 +94,7 @@ interface ProfileProject {
91
94
  url?: string;
92
95
  startDate?: string;
93
96
  endDate?: string;
97
+ hidden?: boolean;
94
98
  }
95
99
  interface PublicationContributor {
96
100
  name: string;
@@ -126,6 +130,7 @@ interface ProfileVolunteering {
126
130
  startDate?: string;
127
131
  endDate?: string;
128
132
  description?: string;
133
+ hidden?: boolean;
129
134
  }
130
135
  interface ProfileHonor {
131
136
  rkey: string;
@@ -133,18 +138,21 @@ interface ProfileHonor {
133
138
  issuer?: string;
134
139
  date?: string;
135
140
  description?: string;
141
+ hidden?: boolean;
136
142
  }
137
143
  type LanguageProficiency = 'elementary' | 'limited_working' | 'professional_working' | 'full_professional' | 'native';
138
144
  interface ProfileLanguage {
139
145
  rkey: string;
140
146
  language: string;
141
147
  proficiency?: LanguageProficiency;
148
+ hidden?: boolean;
142
149
  }
143
150
  interface ProfileCourse {
144
151
  rkey: string;
145
152
  name: string;
146
153
  institution?: string;
147
154
  number?: string;
155
+ hidden?: boolean;
148
156
  }
149
157
  interface TrustStat {
150
158
  key: string;
package/dist/index.cjs CHANGED
@@ -1657,6 +1657,16 @@ function countFilledDimensions(input) {
1657
1657
  }
1658
1658
  return n;
1659
1659
  }
1660
+
1661
+ // src/logic/primary-position.ts
1662
+ function pickPrimaryPosition(positions) {
1663
+ if (!positions || positions.length === 0) return void 0;
1664
+ const active = positions.filter((p) => !p.endedAt);
1665
+ if (active.length === 0) return void 0;
1666
+ const flagged = active.find((p) => p.primary === true);
1667
+ if (flagged) return flagged;
1668
+ return [...active].sort((a, b) => (b.startedAt ?? "").localeCompare(a.startedAt ?? ""))[0];
1669
+ }
1660
1670
  function maxGraphemes(max) {
1661
1671
  return (value) => {
1662
1672
  const segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
@@ -1820,7 +1830,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
1820
1830
  });
1821
1831
 
1822
1832
  // src/index.ts
1823
- var SIFA_SDK_VERSION = "0.9.9";
1833
+ var SIFA_SDK_VERSION = "0.9.11";
1824
1834
 
1825
1835
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
1826
1836
  exports.APP_URL_PATTERNS = APP_URL_PATTERNS;
@@ -1902,6 +1912,7 @@ exports.maxGraphemes = maxGraphemes;
1902
1912
  exports.meetsContrastAA = meetsContrastAA;
1903
1913
  exports.parseLocationString = parseLocationString;
1904
1914
  exports.pdsProviderFromApi = pdsProviderFromApi;
1915
+ exports.pickPrimaryPosition = pickPrimaryPosition;
1905
1916
  exports.profileToDimensionInputs = profileToDimensionInputs;
1906
1917
  exports.relativeLuminance = relativeLuminance;
1907
1918
  exports.resolveCardUrl = resolveCardUrl;