@singi-labs/sifa-sdk 0.12.34 → 0.12.36

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 (37) hide show
  1. package/dist/{adult-content-BHIB4rxu.d.cts → adult-content-jthSA_zt.d.cts} +9 -0
  2. package/dist/{adult-content-BHIB4rxu.d.ts → adult-content-jthSA_zt.d.ts} +9 -0
  3. package/dist/{index-CBx6UJvX.d.ts → index-CNVAxcK1.d.ts} +5 -3
  4. package/dist/{index-CEoJMzkP.d.cts → index-Cvtj97AW.d.cts} +3 -3
  5. package/dist/{index-DMN5tQBL.d.cts → index-HNbo0d_Q.d.cts} +5 -3
  6. package/dist/{index-Bf_BI0TG.d.ts → index-ilznrlB1.d.ts} +3 -3
  7. package/dist/index.cjs +41 -1
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.cts +85 -4
  10. package/dist/index.d.ts +85 -4
  11. package/dist/index.js +39 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/{org-OFRiuRqU.d.cts → org-BKjipmq7.d.cts} +2 -2
  14. package/dist/{org-C8LR9MpF.d.ts → org-CNQA-2mM.d.ts} +2 -2
  15. package/dist/{org-settings-CmaSX5ZI.d.cts → org-settings-B8e01iZx.d.cts} +2 -0
  16. package/dist/{org-settings-CmaSX5ZI.d.ts → org-settings-B8e01iZx.d.ts} +2 -0
  17. package/dist/{profile-summary-DsaEk_GD.d.cts → profile-summary-C-SxRTjI.d.cts} +1 -1
  18. package/dist/{profile-summary-sWTKu58A.d.ts → profile-summary-C6uqYJB1.d.ts} +1 -1
  19. package/dist/query/fetchers/index.d.cts +5 -5
  20. package/dist/query/fetchers/index.d.ts +5 -5
  21. package/dist/query/hooks/index.d.cts +4 -4
  22. package/dist/query/hooks/index.d.ts +4 -4
  23. package/dist/query/index.d.cts +7 -7
  24. package/dist/query/index.d.ts +7 -7
  25. package/dist/schemas/index.cjs +7 -0
  26. package/dist/schemas/index.cjs.map +1 -1
  27. package/dist/schemas/index.d.cts +1 -0
  28. package/dist/schemas/index.d.ts +1 -0
  29. package/dist/schemas/index.js +7 -0
  30. package/dist/schemas/index.js.map +1 -1
  31. package/dist/schemas/write/index.cjs +10 -1
  32. package/dist/schemas/write/index.cjs.map +1 -1
  33. package/dist/schemas/write/index.d.cts +2 -1
  34. package/dist/schemas/write/index.d.ts +2 -1
  35. package/dist/schemas/write/index.js +10 -1
  36. package/dist/schemas/write/index.js.map +1 -1
  37. package/package.json +1 -1
@@ -529,6 +529,15 @@ interface OrgFloorVerdict {
529
529
  isOrg: boolean;
530
530
  orgProfile?: OrgProfileView;
531
531
  recognized: boolean;
532
+ /**
533
+ * Whether the account also keeps a visible personal profile, from
534
+ * `id.sifa.org.profile.personalProfileVisible`. True only for a claimed org
535
+ * (`isOrg`) that opted in -- the sole-trader case, where one DID carries both
536
+ * a person facet at `/p/` and a company facet at `/c/` and neither route
537
+ * redirects to the other. Absent or false is the exclusive default: the
538
+ * account presents solely as an organization and `/p/` redirects to `/c/`.
539
+ */
540
+ personalProfileVisible?: boolean;
532
541
  /**
533
542
  * Invariant (not encoded in the type, matching the flat wire shape the api
534
543
  * sends): present whenever `recognized` is true, absent when false. Callers
@@ -529,6 +529,15 @@ interface OrgFloorVerdict {
529
529
  isOrg: boolean;
530
530
  orgProfile?: OrgProfileView;
531
531
  recognized: boolean;
532
+ /**
533
+ * Whether the account also keeps a visible personal profile, from
534
+ * `id.sifa.org.profile.personalProfileVisible`. True only for a claimed org
535
+ * (`isOrg`) that opted in -- the sole-trader case, where one DID carries both
536
+ * a person facet at `/p/` and a company facet at `/c/` and neither route
537
+ * redirects to the other. Absent or false is the exclusive default: the
538
+ * account presents solely as an organization and `/p/` redirects to `/c/`.
539
+ */
540
+ personalProfileVisible?: boolean;
532
541
  /**
533
542
  * Invariant (not encoded in the type, matching the flat wire shape the api
534
543
  * sends): present whenever `recognized` is true, absent when false. Callers
@@ -1,11 +1,11 @@
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, ax as UpdateProfileOverrideInput, ay as UpdateProfileSelfInput, az as UploadAvatarResult, j as CreateResult, au as SubCategoryBulkResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aA 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, aw 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, aB as WipePreview, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-C8LR9MpF.js';
3
+ import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ah as RefreshPdsResult, ax as UpdateProfileOverrideInput, ay as UpdateProfileSelfInput, az as UploadAvatarResult, j as CreateResult, au as SubCategoryBulkResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aA 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, aw 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, aB as WipePreview, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-CNQA-2mM.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-BHIB4rxu.js';
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-jthSA_zt.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-C8aHEPw4.js';
8
- import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.js';
8
+ import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-B8e01iZx.js';
9
9
 
10
10
  interface SifaProviderProps {
11
11
  config: SifaApiConfig;
@@ -686,6 +686,7 @@ declare function useOrgClaim(handleOrDid: string | null, options?: Omit<UseMutat
686
686
  description?: string | undefined;
687
687
  website?: string | undefined;
688
688
  contact?: string | undefined;
689
+ personalProfileVisible?: boolean | undefined;
689
690
  }, unknown>;
690
691
 
691
692
  type OrgProfileUpdateMutationResult = WriteResult & Partial<OrgProfileUpdateResult>;
@@ -707,6 +708,7 @@ declare function useUpdateOrgProfile(handleOrDid: string | null, options?: Omit<
707
708
  mimeType: string;
708
709
  size: number;
709
710
  } | undefined;
711
+ personalProfileVisible?: boolean | undefined;
710
712
  }, unknown>;
711
713
 
712
714
  type OrgDomainChallengeMutationResult = WriteResult & Partial<OrgDomainChallengeResult>;
@@ -1,7 +1,7 @@
1
- import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-OFRiuRqU.cjs';
2
- import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-BHIB4rxu.cjs';
1
+ import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-BKjipmq7.cjs';
2
+ import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-jthSA_zt.cjs';
3
3
  import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-C8aHEPw4.cjs';
4
- import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-DsaEk_GD.cjs';
4
+ import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-C-SxRTjI.cjs';
5
5
 
6
6
  /**
7
7
  * Read the aggregated profile for a handle or DID.
@@ -1,11 +1,11 @@
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, ax as UpdateProfileOverrideInput, ay as UpdateProfileSelfInput, az as UploadAvatarResult, j as CreateResult, au as SubCategoryBulkResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aA 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, aw 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, aB as WipePreview, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-OFRiuRqU.cjs';
3
+ import { S as SifaApiConfig, s as sifaQueryKeys, W as WriteResult, ah as RefreshPdsResult, ax as UpdateProfileOverrideInput, ay as UpdateProfileSelfInput, az as UploadAvatarResult, j as CreateResult, au as SubCategoryBulkResult, a5 as ProfileLocationInput, k as ExternalAccountInput, i as CreateExternalAccountResult, aA 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, aw 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, aB as WipePreview, X as OrgClaimResult, a1 as OrgProfileUpdateResult, Y as OrgDomainChallengeResult, Z as OrgDomainVerifyResult, _ as OrgNotificationEmailAddResult, $ as OrgNotificationEmailRemoveResult } from './org-BKjipmq7.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-BHIB4rxu.cjs';
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-jthSA_zt.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-C8aHEPw4.cjs';
8
- import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-CmaSX5ZI.cjs';
8
+ import { O as OrgClaimRequestInput, h as OrgProfileUpdateRequestInput, b as OrgDomainChallengeRequestInput, d as OrgDomainVerifyRequestInput, f as OrgNotificationEmailRequestInput } from './org-settings-B8e01iZx.cjs';
9
9
 
10
10
  interface SifaProviderProps {
11
11
  config: SifaApiConfig;
@@ -686,6 +686,7 @@ declare function useOrgClaim(handleOrDid: string | null, options?: Omit<UseMutat
686
686
  description?: string | undefined;
687
687
  website?: string | undefined;
688
688
  contact?: string | undefined;
689
+ personalProfileVisible?: boolean | undefined;
689
690
  }, unknown>;
690
691
 
691
692
  type OrgProfileUpdateMutationResult = WriteResult & Partial<OrgProfileUpdateResult>;
@@ -707,6 +708,7 @@ declare function useUpdateOrgProfile(handleOrDid: string | null, options?: Omit<
707
708
  mimeType: string;
708
709
  size: number;
709
710
  } | undefined;
711
+ personalProfileVisible?: boolean | undefined;
710
712
  }, unknown>;
711
713
 
712
714
  type OrgDomainChallengeMutationResult = WriteResult & Partial<OrgDomainChallengeResult>;
@@ -1,7 +1,7 @@
1
- import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-C8LR9MpF.js';
2
- import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-BHIB4rxu.js';
1
+ import { S as SifaApiConfig, A as ApiFetchOptions, j as CreateResult, W as WriteResult } from './org-CNQA-2mM.js';
2
+ import { e as Profile, P as ProfileView, f as ProfilePosition, a6 as SkillRef } from './adult-content-jthSA_zt.js';
3
3
  import { m as EntitySearchResponse, E as EntitySearchResult, g as EntityMintDomainResponse, k as EntityResolveDomainResponse, p as EntitySelectRequest, r as EntitySelectResponse } from './feed-C8aHEPw4.js';
4
- import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-sWTKu58A.js';
4
+ import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-C6uqYJB1.js';
5
5
 
6
6
  /**
7
7
  * Read the aggregated profile for a handle or DID.
package/dist/index.cjs CHANGED
@@ -930,6 +930,14 @@ function groupSkillsBySubCategory(skills) {
930
930
  return ordered;
931
931
  }
932
932
 
933
+ // src/taxonomy/skill-display-groups.ts
934
+ function groupSkillsForDisplay(skills, options = {}) {
935
+ const grouped = groupSkillsBySubCategory(skills);
936
+ const labelled = grouped.filter(([label]) => label !== null);
937
+ const groups = options.ungroupedFirst ? [...grouped.filter(([label]) => label === null), ...labelled] : grouped;
938
+ return { groups, showLabels: labelled.length >= 2 };
939
+ }
940
+
933
941
  // src/taxonomy/app-categories.ts
934
942
  var APP_CATEGORIES = {
935
943
  Articles: { phosphorIcon: "Article" },
@@ -4090,6 +4098,28 @@ function qualifiesAsOrg(record, handle) {
4090
4098
  if (record === null || record === void 0) return false;
4091
4099
  return isRegistrableDomainHandle(handle);
4092
4100
  }
4101
+ function hasPersonalProfileContent(profile) {
4102
+ const filled = (text) => typeof text === "string" && text.trim() !== "";
4103
+ if (filled(profile.headline) || filled(profile.about)) return true;
4104
+ const sections = [
4105
+ profile.positions,
4106
+ profile.education,
4107
+ profile.skills,
4108
+ profile.certifications,
4109
+ profile.projects,
4110
+ profile.publications,
4111
+ profile.volunteering,
4112
+ profile.involvement,
4113
+ profile.honors,
4114
+ profile.courses
4115
+ ];
4116
+ return sections.some((section) => Array.isArray(section) && section.length > 0);
4117
+ }
4118
+ function rendersPersonalProfile(org) {
4119
+ if (org === null || org === void 0) return true;
4120
+ if (!org.isOrg && !org.recognized) return true;
4121
+ return org.isOrg && org.personalProfileVisible === true;
4122
+ }
4093
4123
 
4094
4124
  // src/logic/company-page-indexable.ts
4095
4125
  var COMPANY_PAGE_MIN_FIRMOGRAPHIC_FIELDS = 2;
@@ -4397,6 +4427,13 @@ var OrgProfileRecordSchema = zod.z.object({
4397
4427
  companySize: zod.z.string().optional(),
4398
4428
  /** Featured links or content surfaced on the org profile. */
4399
4429
  links: zod.z.array(orgLinkSchema).max(10).optional(),
4430
+ /**
4431
+ * Whether the account holder's personal profile stays visible alongside this
4432
+ * org profile. For sole traders whose personal domain is also their trade
4433
+ * name: one account, two facets, both pages render. Absent or false means the
4434
+ * account presents solely as an organization.
4435
+ */
4436
+ personalProfileVisible: zod.z.boolean().optional(),
4400
4437
  labels: selfLabelsSchema.optional(),
4401
4438
  createdAt: datetimeSchema
4402
4439
  });
@@ -4828,7 +4865,7 @@ function roadmapIssueUrl(issue) {
4828
4865
  }
4829
4866
 
4830
4867
  // src/index.ts
4831
- var SIFA_SDK_VERSION = "0.12.34";
4868
+ var SIFA_SDK_VERSION = "0.12.36";
4832
4869
 
4833
4870
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
4834
4871
  exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
@@ -4991,7 +5028,9 @@ exports.getWorkplaceTypeLabel = getWorkplaceTypeLabel;
4991
5028
  exports.groupInvolvementByHeading = groupInvolvementByHeading;
4992
5029
  exports.groupSkillsByCategory = groupSkillsByCategory;
4993
5030
  exports.groupSkillsBySubCategory = groupSkillsBySubCategory;
5031
+ exports.groupSkillsForDisplay = groupSkillsForDisplay;
4994
5032
  exports.hasAdultContent = hasAdultContent;
5033
+ exports.hasPersonalProfileContent = hasPersonalProfileContent;
4995
5034
  exports.hoistPrimary = hoistPrimary;
4996
5035
  exports.isAppCategory = isAppCategory;
4997
5036
  exports.isCompanyPageIndexable = isCompanyPageIndexable;
@@ -5034,6 +5073,7 @@ exports.primaryVerification = primaryVerification;
5034
5073
  exports.profileToDimensionInputs = profileToDimensionInputs;
5035
5074
  exports.qualifiesAsOrg = qualifiesAsOrg;
5036
5075
  exports.relativeLuminance = relativeLuminance;
5076
+ exports.rendersPersonalProfile = rendersPersonalProfile;
5037
5077
  exports.resolveCardHealth = resolveCardHealth;
5038
5078
  exports.resolveCardUrl = resolveCardUrl;
5039
5079
  exports.resolveEmbed = resolveEmbed;