@singi-labs/sifa-sdk 0.12.28 → 0.12.30
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/dist/{adult-content-DdY7S5nN.d.cts → adult-content-BHIB4rxu.d.cts} +8 -0
- package/dist/{adult-content-DdY7S5nN.d.ts → adult-content-BHIB4rxu.d.ts} +8 -0
- package/dist/{index-ipyzSVry.d.cts → index-C95t5Gg5.d.cts} +2 -2
- package/dist/{index-wMuFhu7d.d.ts → index-CZAG8uku.d.ts} +3 -3
- package/dist/{index-ZXWW6RsR.d.cts → index-O2oJHRq0.d.cts} +3 -3
- package/dist/{index-B6GHpvcg.d.ts → index-ZoAKneCP.d.ts} +2 -2
- package/dist/index.cjs +33 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +14 -4
- package/dist/index.d.ts +14 -4
- package/dist/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/dist/{org-Dme1VvNa.d.cts → org-DWAqK-TV.d.cts} +1 -1
- package/dist/{org-CLRdUB1W.d.ts → org-Octhy3vS.d.ts} +1 -1
- package/dist/{profile-summary-DjRf3Snf.d.cts → profile-summary-DsaEk_GD.d.cts} +1 -1
- package/dist/{profile-summary-B9SuY-EU.d.ts → profile-summary-sWTKu58A.d.ts} +1 -1
- package/dist/query/fetchers/index.cjs +4 -1
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +4 -4
- package/dist/query/fetchers/index.d.ts +4 -4
- package/dist/query/fetchers/index.js +4 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +4 -1
- package/dist/query/hooks/index.cjs.map +1 -1
- package/dist/query/hooks/index.d.cts +3 -3
- package/dist/query/hooks/index.d.ts +3 -3
- package/dist/query/hooks/index.js +4 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +4 -1
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +6 -6
- package/dist/query/index.d.ts +6 -6
- package/dist/query/index.js +4 -1
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +1 -0
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +4 -1
- package/dist/schemas/index.d.ts +4 -1
- package/dist/schemas/index.js +1 -0
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +40 -1
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +1 -0
- package/dist/schemas/write/index.d.ts +1 -0
- package/dist/schemas/write/index.js +40 -1
- package/dist/schemas/write/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -74,6 +74,12 @@ interface ProfileSkill {
|
|
|
74
74
|
rkey: string;
|
|
75
75
|
name: string;
|
|
76
76
|
category?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Freeform user-defined grouping label nested under `category` (e.g.
|
|
79
|
+
* "Frontend", "Backend"). No known values; renderers decide the display
|
|
80
|
+
* label. See `groupSkillsBySubCategory`.
|
|
81
|
+
*/
|
|
82
|
+
subCategory?: string;
|
|
77
83
|
endorsementCount?: number;
|
|
78
84
|
endorsed?: boolean;
|
|
79
85
|
activityBacked?: boolean;
|
|
@@ -690,6 +696,8 @@ interface SkillView {
|
|
|
690
696
|
rkey: string;
|
|
691
697
|
name: string;
|
|
692
698
|
category?: string;
|
|
699
|
+
/** Freeform user-defined grouping label nested under `category` (#305). */
|
|
700
|
+
subCategory?: string;
|
|
693
701
|
positionRkeys?: string[];
|
|
694
702
|
}
|
|
695
703
|
interface CertificationView {
|
|
@@ -74,6 +74,12 @@ interface ProfileSkill {
|
|
|
74
74
|
rkey: string;
|
|
75
75
|
name: string;
|
|
76
76
|
category?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Freeform user-defined grouping label nested under `category` (e.g.
|
|
79
|
+
* "Frontend", "Backend"). No known values; renderers decide the display
|
|
80
|
+
* label. See `groupSkillsBySubCategory`.
|
|
81
|
+
*/
|
|
82
|
+
subCategory?: string;
|
|
77
83
|
endorsementCount?: number;
|
|
78
84
|
endorsed?: boolean;
|
|
79
85
|
activityBacked?: boolean;
|
|
@@ -690,6 +696,8 @@ interface SkillView {
|
|
|
690
696
|
rkey: string;
|
|
691
697
|
name: string;
|
|
692
698
|
category?: string;
|
|
699
|
+
/** Freeform user-defined grouping label nested under `category` (#305). */
|
|
700
|
+
subCategory?: string;
|
|
693
701
|
positionRkeys?: string[];
|
|
694
702
|
}
|
|
695
703
|
interface CertificationView {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ah as RefreshPdsResult, aw as UpdateProfileOverrideInput, ax as UpdateProfileSelfInput, ay as UploadAvatarResult, j as CreateResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, az as VerifyExternalAccountResult, E as EndorsementInput, ag as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, R as HideProfileItemInput, at as StatsResponse, g as AppRegistryEntry, O as HiddenApp, x as FilterOptions, ao as SearchFilters, ap as SearchResponse, as as SkillSearchResult, l as FeaturedProfile, ar as SimilarProfile, w as FetchSuggestionsOptions, av as SuggestionsResponse, H as FollowUserResult, o as FetchFollowListOptions, y as FollowListPage, I as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, G as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, N as HeatmapResponse, U as MyGithubPullRequestsResponse, a as AccountCheckResult, af as ReactionStatus, ae as ReactionResult, ad as ReactionError, an as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, ai as ResetProfileResult, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ah as RefreshPdsResult, aw as UpdateProfileOverrideInput, ax as UpdateProfileSelfInput, ay as UploadAvatarResult, j as CreateResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, az as VerifyExternalAccountResult, E as EndorsementInput, ag as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, R as HideProfileItemInput, at as StatsResponse, g as AppRegistryEntry, O as HiddenApp, x as FilterOptions, ao as SearchFilters, ap as SearchResponse, as as SkillSearchResult, l as FeaturedProfile, ar as SimilarProfile, w as FetchSuggestionsOptions, av as SuggestionsResponse, H as FollowUserResult, o as FetchFollowListOptions, y as FollowListPage, I as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, G as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, N as HeatmapResponse, U as MyGithubPullRequestsResponse, a as AccountCheckResult, af as ReactionStatus, ae as ReactionResult, ad as ReactionError, an as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, ai as ResetProfileResult, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-DWAqK-TV.cjs';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef, E as ExternalAccount, S as SkillSuggestion, M as OrgFloorVerdict } from './adult-content-
|
|
6
|
+
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef, E as ExternalAccount, S as SkillSuggestion, M as OrgFloorVerdict } from './adult-content-BHIB4rxu.cjs';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.cjs';
|
|
8
8
|
import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.cjs';
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-
|
|
2
|
-
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-Octhy3vS.js';
|
|
2
|
+
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-BHIB4rxu.js';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.js';
|
|
4
|
-
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-
|
|
4
|
+
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-sWTKu58A.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Read the aggregated profile for a handle or DID.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-
|
|
2
|
-
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-DWAqK-TV.cjs';
|
|
2
|
+
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-BHIB4rxu.cjs';
|
|
3
3
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-D2ZV8Eaj.cjs';
|
|
4
|
-
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-
|
|
4
|
+
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-DsaEk_GD.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Read the aggregated profile for a handle or DID.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ah as RefreshPdsResult, aw as UpdateProfileOverrideInput, ax as UpdateProfileSelfInput, ay as UploadAvatarResult, j as CreateResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, az as VerifyExternalAccountResult, E as EndorsementInput, ag as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, R as HideProfileItemInput, at as StatsResponse, g as AppRegistryEntry, O as HiddenApp, x as FilterOptions, ao as SearchFilters, ap as SearchResponse, as as SkillSearchResult, l as FeaturedProfile, ar as SimilarProfile, w as FetchSuggestionsOptions, av as SuggestionsResponse, H as FollowUserResult, o as FetchFollowListOptions, y as FollowListPage, I as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, G as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, N as HeatmapResponse, U as MyGithubPullRequestsResponse, a as AccountCheckResult, af as ReactionStatus, ae as ReactionResult, ad as ReactionError, an as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, ai as ResetProfileResult, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-
|
|
3
|
+
import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ah as RefreshPdsResult, aw as UpdateProfileOverrideInput, ax as UpdateProfileSelfInput, ay as UploadAvatarResult, j as CreateResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, az as VerifyExternalAccountResult, E as EndorsementInput, ag as RefreshOrcidPublicationsResult, B as BulkHideProfileItemInput, R as HideProfileItemInput, at as StatsResponse, g as AppRegistryEntry, O as HiddenApp, x as FilterOptions, ao as SearchFilters, ap as SearchResponse, as as SkillSearchResult, l as FeaturedProfile, ar as SimilarProfile, w as FetchSuggestionsOptions, av as SuggestionsResponse, H as FollowUserResult, o as FetchFollowListOptions, y as FollowListPage, I as FollowingResponse, q as FetchFollowingFeedOptions, p as FetchFollowProfilePageOptions, G as FollowProfilePageResponse, F as FeatureAllowlistResponse, m as FetchActivityFeedOptions, b as ActivityFeedResponse, e as ActivityTeaserResponse, N as HeatmapResponse, U as MyGithubPullRequestsResponse, a as AccountCheckResult, af as ReactionStatus, ae as ReactionResult, ad as ReactionError, an as RoadmapVotesResponse, C as CastRoadmapVoteResult, D as DeleteAccountResult, ai as ResetProfileResult, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-Octhy3vS.js';
|
|
4
4
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
5
5
|
import { UseQueryOptions, UseMutationOptions, UseInfiniteQueryOptions, InfiniteData } from '@tanstack/react-query';
|
|
6
|
-
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef, E as ExternalAccount, S as SkillSuggestion, M as OrgFloorVerdict } from './adult-content-
|
|
6
|
+
import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef, E as ExternalAccount, S as SkillSuggestion, M as OrgFloorVerdict } from './adult-content-BHIB4rxu.js';
|
|
7
7
|
import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, r as EntitySelectResponse, p as EntitySelectRequest, F as FollowFeedPage, c as FeatureFlag } from './feed-D2ZV8Eaj.js';
|
|
8
8
|
import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.js';
|
|
9
9
|
|
package/dist/index.cjs
CHANGED
|
@@ -864,6 +864,10 @@ function dedupeSkills(skills) {
|
|
|
864
864
|
}
|
|
865
865
|
existing.mergedRkeys.push(skill.rkey);
|
|
866
866
|
if (!existing.category && skill.category) existing.category = skill.category;
|
|
867
|
+
const incomingSubCategory = skill.subCategory?.trim();
|
|
868
|
+
if (incomingSubCategory && !existing.subCategory?.trim()) {
|
|
869
|
+
existing.subCategory = incomingSubCategory;
|
|
870
|
+
}
|
|
867
871
|
if ((skill.endorsementCount ?? 0) > (existing.endorsementCount ?? 0)) {
|
|
868
872
|
existing.endorsementCount = skill.endorsementCount;
|
|
869
873
|
}
|
|
@@ -899,6 +903,32 @@ function groupSkillsByCategory(skills) {
|
|
|
899
903
|
if (otherGroup?.length) ordered.push(["other", otherGroup]);
|
|
900
904
|
return ordered;
|
|
901
905
|
}
|
|
906
|
+
function groupSkillsBySubCategory(skills) {
|
|
907
|
+
const labels = /* @__PURE__ */ new Map();
|
|
908
|
+
const grouped = /* @__PURE__ */ new Map();
|
|
909
|
+
for (const skill of skills) {
|
|
910
|
+
const raw = skill.subCategory?.trim();
|
|
911
|
+
const key = raw ? raw.toLowerCase() : "";
|
|
912
|
+
if (raw && !labels.has(key)) labels.set(key, raw);
|
|
913
|
+
const bucket = grouped.get(key) ?? [];
|
|
914
|
+
bucket.push(skill);
|
|
915
|
+
grouped.set(key, bucket);
|
|
916
|
+
}
|
|
917
|
+
const sortByRank = (groupSkills) => [...groupSkills].sort((a, b) => {
|
|
918
|
+
const countDiff = (b.endorsementCount ?? 0) - (a.endorsementCount ?? 0);
|
|
919
|
+
if (countDiff !== 0) return countDiff;
|
|
920
|
+
return a.name.localeCompare(b.name);
|
|
921
|
+
});
|
|
922
|
+
const ordered = [];
|
|
923
|
+
for (const key of [...labels.keys()].sort((a, b) => a.localeCompare(b))) {
|
|
924
|
+
const label = labels.get(key);
|
|
925
|
+
const group = grouped.get(key);
|
|
926
|
+
if (label && group?.length) ordered.push([label, sortByRank(group)]);
|
|
927
|
+
}
|
|
928
|
+
const ungrouped = grouped.get("");
|
|
929
|
+
if (ungrouped?.length) ordered.push([null, sortByRank(ungrouped)]);
|
|
930
|
+
return ordered;
|
|
931
|
+
}
|
|
902
932
|
|
|
903
933
|
// src/taxonomy/app-categories.ts
|
|
904
934
|
var APP_CATEGORIES = {
|
|
@@ -4676,6 +4706,7 @@ var ProfileSelfRecordSchema = zod.z.object({
|
|
|
4676
4706
|
var ProfileSkillRecordSchema = zod.z.object({
|
|
4677
4707
|
name: zod.z.string().min(1).refine(maxGraphemes(64)).max(640),
|
|
4678
4708
|
category: zod.z.string().optional(),
|
|
4709
|
+
subCategory: zod.z.string().refine(maxGraphemes(64)).max(640).optional(),
|
|
4679
4710
|
createdAt: datetimeSchema
|
|
4680
4711
|
});
|
|
4681
4712
|
var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
@@ -4693,7 +4724,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
|
|
|
4693
4724
|
});
|
|
4694
4725
|
|
|
4695
4726
|
// src/index.ts
|
|
4696
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
4727
|
+
var SIFA_SDK_VERSION = "0.12.30";
|
|
4697
4728
|
|
|
4698
4729
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
4699
4730
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -4853,6 +4884,7 @@ exports.getVisibleSectionIds = getVisibleSectionIds;
|
|
|
4853
4884
|
exports.getWorkplaceTypeLabel = getWorkplaceTypeLabel;
|
|
4854
4885
|
exports.groupInvolvementByHeading = groupInvolvementByHeading;
|
|
4855
4886
|
exports.groupSkillsByCategory = groupSkillsByCategory;
|
|
4887
|
+
exports.groupSkillsBySubCategory = groupSkillsBySubCategory;
|
|
4856
4888
|
exports.hasAdultContent = hasAdultContent;
|
|
4857
4889
|
exports.hoistPrimary = hoistPrimary;
|
|
4858
4890
|
exports.isAppCategory = isAppCategory;
|