@singi-labs/sifa-sdk 0.10.14 → 0.10.16

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.
@@ -201,7 +201,7 @@ interface ExternalAccount {
201
201
  verifiable: boolean;
202
202
  verified: boolean;
203
203
  verifiedVia?: string | null;
204
- source?: 'sifa' | 'keytrace' | 'keyoxide';
204
+ source?: 'sifa' | 'keytrace' | 'keyoxide' | 'marque';
205
205
  hidden?: boolean;
206
206
  keytraceVerified?: boolean;
207
207
  keytraceClaim?: ExternalAccountKeytraceClaim;
@@ -201,7 +201,7 @@ interface ExternalAccount {
201
201
  verifiable: boolean;
202
202
  verified: boolean;
203
203
  verifiedVia?: string | null;
204
- source?: 'sifa' | 'keytrace' | 'keyoxide';
204
+ source?: 'sifa' | 'keytrace' | 'keyoxide' | 'marque';
205
205
  hidden?: boolean;
206
206
  keytraceVerified?: boolean;
207
207
  keytraceClaim?: ExternalAccountKeytraceClaim;
package/dist/index.cjs CHANGED
@@ -2332,7 +2332,7 @@ var ProfileVolunteeringRecordSchema = zod.z.object({
2332
2332
  });
2333
2333
 
2334
2334
  // src/index.ts
2335
- var SIFA_SDK_VERSION = "0.10.14";
2335
+ var SIFA_SDK_VERSION = "0.10.16";
2336
2336
 
2337
2337
  exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
2338
2338
  exports.ACTIVITY_VISIBILITY_RULES = ACTIVITY_VISIBILITY_RULES;
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProfileSkill, L as LocationValue, b as PdsProviderInfo, c as Profile } from './adult-content-DxasJdot.cjs';
2
- export { d as ADULT_CONTENT_LABELS, e as ActiveApp, a as ActivityLabel, A as AdultContentLabel, f as Endorsement, g as EndorsementData, E as ExternalAccount, h as ExternalAccountKeytraceClaim, F as FeedItem, i as LanguageProficiency, j as ProfileCertification, k as ProfileCourse, l as ProfileEducation, m as ProfileHonor, n as ProfileIndustry, o as ProfileLanguage, p as ProfileLocation, q as ProfileOverrideSource, r as ProfilePosition, s as ProfileProject, t as ProfilePublication, u as ProfileVolunteering, v as PublicationContributor, w as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, x as hasAdultContent } from './adult-content-DxasJdot.cjs';
1
+ import { P as ProfileSkill, L as LocationValue, b as PdsProviderInfo, c as Profile } from './adult-content-o0BxhFzc.cjs';
2
+ export { d as ADULT_CONTENT_LABELS, e as ActiveApp, a as ActivityLabel, A as AdultContentLabel, f as Endorsement, g as EndorsementData, E as ExternalAccount, h as ExternalAccountKeytraceClaim, F as FeedItem, i as LanguageProficiency, j as ProfileCertification, k as ProfileCourse, l as ProfileEducation, m as ProfileHonor, n as ProfileIndustry, o as ProfileLanguage, p as ProfileLocation, q as ProfileOverrideSource, r as ProfilePosition, s as ProfileProject, t as ProfilePublication, u as ProfileVolunteering, v as PublicationContributor, w as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, x as hasAdultContent } from './adult-content-o0BxhFzc.cjs';
3
3
  export { EndorsementConfirmationRecord, EndorsementConfirmationRecordSchema, EndorsementRecord, EndorsementRecordSchema, GraphFollowRecord, GraphFollowRecordSchema, ProfileCertificationRecord, ProfileCertificationRecordSchema, ProfileCourseRecord, ProfileCourseRecordSchema, ProfileEducationRecord, ProfileEducationRecordSchema, ProfileExternalAccountRecord, ProfileExternalAccountRecordSchema, ProfileHonorRecord, ProfileHonorRecordSchema, ProfileLanguageRecord, ProfileLanguageRecordSchema, ProfilePositionRecord, ProfilePositionRecordSchema, ProfileProjectRecord, ProfileProjectRecordSchema, ProfilePublicationRecord, ProfilePublicationRecordSchema, ProfileSelfRecord, ProfileSelfRecordSchema, ProfileSkillRecord, ProfileSkillRecordSchema, ProfileVolunteeringRecord, ProfileVolunteeringRecordSchema, PublicationAuthor, PublicationAuthorSchema, atUriSchema, cidSchema, datetimeSchema, didSchema, languageTagSchema, makeGraphFollowRecordSchema, maxGraphemes, selfLabelsSchema, strongRefSchema, uriSchema } from './schemas/index.cjs';
4
4
  export { A as AtmosphereFeedItem, d as AtmosphereFeedItemSchema, e as FEATURE_FLAGS, b as FeatureAllowlistEntry, f as FeatureAllowlistEntrySchema, c as FeatureFlag, g as FeedActor, h as FeedActorSchema, i as FeedCursor, j as FollowFeedItem, k as FollowFeedItemSchema, F as FollowFeedPage, l as FollowFeedPageSchema, a as FollowProfileItem, m as FollowProfilePage, n as FollowProfilePageSchema, o as FollowProfileSchema, S as SifaFeedItem, p as SifaFeedItemSchema, q as decodeFeedCursor, r as encodeFeedCursor } from './feed-DHTy7fUN.cjs';
5
5
  import 'zod';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as ProfileSkill, L as LocationValue, b as PdsProviderInfo, c as Profile } from './adult-content-DxasJdot.js';
2
- export { d as ADULT_CONTENT_LABELS, e as ActiveApp, a as ActivityLabel, A as AdultContentLabel, f as Endorsement, g as EndorsementData, E as ExternalAccount, h as ExternalAccountKeytraceClaim, F as FeedItem, i as LanguageProficiency, j as ProfileCertification, k as ProfileCourse, l as ProfileEducation, m as ProfileHonor, n as ProfileIndustry, o as ProfileLanguage, p as ProfileLocation, q as ProfileOverrideSource, r as ProfilePosition, s as ProfileProject, t as ProfilePublication, u as ProfileVolunteering, v as PublicationContributor, w as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, x as hasAdultContent } from './adult-content-DxasJdot.js';
1
+ import { P as ProfileSkill, L as LocationValue, b as PdsProviderInfo, c as Profile } from './adult-content-o0BxhFzc.js';
2
+ export { d as ADULT_CONTENT_LABELS, e as ActiveApp, a as ActivityLabel, A as AdultContentLabel, f as Endorsement, g as EndorsementData, E as ExternalAccount, h as ExternalAccountKeytraceClaim, F as FeedItem, i as LanguageProficiency, j as ProfileCertification, k as ProfileCourse, l as ProfileEducation, m as ProfileHonor, n as ProfileIndustry, o as ProfileLanguage, p as ProfileLocation, q as ProfileOverrideSource, r as ProfilePosition, s as ProfileProject, t as ProfilePublication, u as ProfileVolunteering, v as PublicationContributor, w as SkillRef, S as SkillSuggestion, T as TrustStat, V as VerifiedAccount, x as hasAdultContent } from './adult-content-o0BxhFzc.js';
3
3
  export { EndorsementConfirmationRecord, EndorsementConfirmationRecordSchema, EndorsementRecord, EndorsementRecordSchema, GraphFollowRecord, GraphFollowRecordSchema, ProfileCertificationRecord, ProfileCertificationRecordSchema, ProfileCourseRecord, ProfileCourseRecordSchema, ProfileEducationRecord, ProfileEducationRecordSchema, ProfileExternalAccountRecord, ProfileExternalAccountRecordSchema, ProfileHonorRecord, ProfileHonorRecordSchema, ProfileLanguageRecord, ProfileLanguageRecordSchema, ProfilePositionRecord, ProfilePositionRecordSchema, ProfileProjectRecord, ProfileProjectRecordSchema, ProfilePublicationRecord, ProfilePublicationRecordSchema, ProfileSelfRecord, ProfileSelfRecordSchema, ProfileSkillRecord, ProfileSkillRecordSchema, ProfileVolunteeringRecord, ProfileVolunteeringRecordSchema, PublicationAuthor, PublicationAuthorSchema, atUriSchema, cidSchema, datetimeSchema, didSchema, languageTagSchema, makeGraphFollowRecordSchema, maxGraphemes, selfLabelsSchema, strongRefSchema, uriSchema } from './schemas/index.js';
4
4
  export { A as AtmosphereFeedItem, d as AtmosphereFeedItemSchema, e as FEATURE_FLAGS, b as FeatureAllowlistEntry, f as FeatureAllowlistEntrySchema, c as FeatureFlag, g as FeedActor, h as FeedActorSchema, i as FeedCursor, j as FollowFeedItem, k as FollowFeedItemSchema, F as FollowFeedPage, l as FollowFeedPageSchema, a as FollowProfileItem, m as FollowProfilePage, n as FollowProfilePageSchema, o as FollowProfileSchema, S as SifaFeedItem, p as SifaFeedItemSchema, q as decodeFeedCursor, r as encodeFeedCursor } from './feed-DHTy7fUN.js';
5
5
  import 'zod';
package/dist/index.js CHANGED
@@ -2330,7 +2330,7 @@ var ProfileVolunteeringRecordSchema = z.object({
2330
2330
  });
2331
2331
 
2332
2332
  // src/index.ts
2333
- var SIFA_SDK_VERSION = "0.10.14";
2333
+ var SIFA_SDK_VERSION = "0.10.16";
2334
2334
 
2335
2335
  export { ACTIVITY_TIERS, ACTIVITY_VISIBILITY_RULES, ADULT_CONTENT_LABELS, APP_CATEGORIES, APP_CATEGORY_IDS, APP_CATEGORY_MAP, APP_URL_PATTERNS, AtmosphereFeedItemSchema, CATEGORY_LABELS, CATEGORY_ORDER, COLLECTION_TO_APP, COMPANY_OPTIONAL_EMPLOYMENT_TYPES, COMPLETENESS_MAX_SCORE, CONTINENTS, COUNTRIES, DIMENSIONS_MAX_SCORE, EMPLOYMENT_TYPE_GROUPS, EMPLOYMENT_TYPE_LABELS, EndorsementConfirmationRecordSchema, EndorsementRecordSchema, FEATURE_FLAGS, FeatureAllowlistEntrySchema, FeedActorSchema, FollowFeedItemSchema, FollowFeedPageSchema, FollowProfilePageSchema, FollowProfileSchema, GraphFollowRecordSchema, INDUSTRY_OPTIONS, MIN_SKILLS, OPEN_TO_OPTIONS, OPEN_TO_TOKENS, OPEN_TO_TOKEN_TO_VALUE, OPEN_TO_VALUE_TO_TOKEN, PLATFORM_LABELS, PLATFORM_OPTIONS, PUBLISHERS, ProfileCertificationRecordSchema, ProfileCourseRecordSchema, ProfileEducationRecordSchema, ProfileExternalAccountRecordSchema, ProfileHonorRecordSchema, ProfileLanguageRecordSchema, ProfilePositionRecordSchema, ProfileProjectRecordSchema, ProfilePublicationRecordSchema, ProfileSelfRecordSchema, ProfileSkillRecordSchema, ProfileVolunteeringRecordSchema, PublicationAuthorSchema, SIFA_SDK_VERSION, SKILL_CATEGORIES, STANDARD_PUBLISHER_ID, SifaFeedItemSchema, WORKPLACE_TYPE_LABELS, WORKPLACE_TYPE_OPTIONS, atUriSchema, categoryForApp, certDateExtractor, cidSchema, completenessPercent, completenessScore, contrastRatio, countFilledDimensions, countryCodeToFlag, dateRangeExtractor, datetimeSchema, decodeFeedCursor, dedupeSkills, detectPdsProvider, didSchema, dimensionsFromInputs, encodeFeedCursor, findIndustry, formatDistanceToNow, formatLocation, formatRelativeTime, getActivityTaxonomyVersion, getActivityTier, getAppCategoryIcon, getAppIdForCollection, getContinent, getDisplayLabel, getEmploymentTypeLabel, getFaviconUrl, getFilledDimensionsMap, getHandleStem, getIndustryLabelKey, getLexiconEntry, getOpenToLabelKey, getPdsDisplayName, getPlatformLabel, getPublisherByHost, getPublisherById, getPublisherFromSiteUrl, getTierMeta, getWorkplaceTypeLabel, groupSkillsByCategory, hasAdultContent, isAppCategory, isCompanyRequired, isKnownAppId, isKnownPlatform, isValidRgbColor, isVisibleActivityItem, languageTagSchema, lexiconDateExtractor, limitCombiningMarks, makeGraphFollowRecordSchema, maxGraphemes, meetsContrastAA, normalizeOpenTo, normalizeWorkplaceTypes, openToTokenToValue, openToValueToToken, parseLocationString, pdsProviderFromApi, pickPrimaryPosition, profileToDimensionInputs, relativeLuminance, resolveCardUrl, rgbToString, sanitizeDisplayText, sanitizeHandleInput, selfLabelsSchema, singleDateExtractor, sortByDateDesc, strongRefSchema, truncateGraphemes, uriSchema };
2336
2336
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-DxasJdot.js';
1
+ import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-o0BxhFzc.js';
2
2
  import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-DHTy7fUN.js';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-DxasJdot.cjs';
1
+ import { E as ExternalAccount, S as SkillSuggestion, a as ActivityLabel } from './adult-content-o0BxhFzc.cjs';
2
2
  import { F as FollowFeedPage, a as FollowProfileItem, b as FeatureAllowlistEntry, c as FeatureFlag } from './feed-DHTy7fUN.cjs';
3
3
 
4
4
  /**
@@ -14,6 +14,14 @@ var ApiError = class extends Error {
14
14
  var DEFAULT_TIMEOUT_MS = 1e4;
15
15
  var MAX_RATE_LIMIT_RETRIES = 3;
16
16
  var RATE_LIMIT_RETRY_CAP_SECONDS = 3;
17
+ function encodeIdentifier(value) {
18
+ let decoded = value;
19
+ try {
20
+ decoded = decodeURIComponent(value);
21
+ } catch {
22
+ }
23
+ return encodeURIComponent(decoded);
24
+ }
17
25
  async function apiFetch(config, path, options = {}) {
18
26
  const fetchFn = config.fetch ?? globalThis.fetch;
19
27
  const url = `${config.baseUrl}${path}`;
@@ -102,14 +110,14 @@ function apiWriteCreate(config, path, body, options = {}) {
102
110
 
103
111
  // src/query/fetchers/profile.ts
104
112
  function fetchProfile(config, handleOrDid, options = {}) {
105
- const path = `/api/profile/${encodeURIComponent(handleOrDid)}`;
113
+ const path = `/api/profile/${encodeIdentifier(handleOrDid)}`;
106
114
  return apiFetchOrNull(config, path, {
107
115
  retryOn429: true,
108
116
  ...options
109
117
  });
110
118
  }
111
119
  async function fetchAtFundLink(config, did, options = {}) {
112
- const path = `/api/profiles/${encodeURIComponent(did)}/at-fund-link`;
120
+ const path = `/api/profiles/${encodeIdentifier(did)}/at-fund-link`;
113
121
  try {
114
122
  const data = await apiFetch(config, path, {
115
123
  next: { revalidate: 3600 },
@@ -285,7 +293,7 @@ function deleteProfileLocation(config, rkey, options = {}) {
285
293
 
286
294
  // src/query/fetchers/external-accounts.ts
287
295
  async function fetchExternalAccounts(config, handleOrDid, options = {}) {
288
- const path = `/api/profile/${encodeURIComponent(handleOrDid)}/external-accounts`;
296
+ const path = `/api/profile/${encodeIdentifier(handleOrDid)}/external-accounts`;
289
297
  try {
290
298
  const data = await apiFetch(config, path, {
291
299
  credentials: "include",
@@ -545,7 +553,7 @@ async function searchSkills(config, query, limit = 10, options = {}) {
545
553
  // src/query/fetchers/discovery.ts
546
554
  async function fetchSimilarProfiles(config, did, opts = {}) {
547
555
  const limit = opts.limit ?? 5;
548
- const path = `/api/discover/similar/${encodeURIComponent(did)}?limit=${limit}`;
556
+ const path = `/api/discover/similar/${encodeIdentifier(did)}?limit=${limit}`;
549
557
  try {
550
558
  const data = await apiFetch(config, path, {
551
559
  next: { revalidate: 300 },
@@ -623,7 +631,7 @@ function followUser(config, handle, opts = {}) {
623
631
  const { note, ...rest } = opts;
624
632
  return apiWrite(
625
633
  config,
626
- `/api/follow/${encodeURIComponent(handle)}`,
634
+ `/api/follow/${encodeIdentifier(handle)}`,
627
635
  "POST",
628
636
  {
629
637
  body: note !== void 0 ? { note } : void 0,
@@ -632,7 +640,7 @@ function followUser(config, handle, opts = {}) {
632
640
  );
633
641
  }
634
642
  function unfollowUser(config, handle, opts = {}) {
635
- return apiWrite(config, `/api/follow/${encodeURIComponent(handle)}`, "DELETE", opts);
643
+ return apiWrite(config, `/api/follow/${encodeIdentifier(handle)}`, "DELETE", opts);
636
644
  }
637
645
  function buildListPath(prefix, opts) {
638
646
  const params = new URLSearchParams();
@@ -647,7 +655,7 @@ async function getFollowers(config, handle, opts = {}) {
647
655
  try {
648
656
  const res = await apiFetch(
649
657
  config,
650
- buildListPath(`/api/profile/${encodeURIComponent(handle)}/followers`, opts),
658
+ buildListPath(`/api/profile/${encodeIdentifier(handle)}/followers`, opts),
651
659
  { credentials: "include", cache: "no-store", ...opts, headers }
652
660
  );
653
661
  return { follows: res.follows, cursor: res.cursor ?? null };
@@ -661,7 +669,7 @@ async function getFollowing(config, handle, opts = {}) {
661
669
  try {
662
670
  const res = await apiFetch(
663
671
  config,
664
- buildListPath(`/api/profile/${encodeURIComponent(handle)}/following`, opts),
672
+ buildListPath(`/api/profile/${encodeIdentifier(handle)}/following`, opts),
665
673
  { credentials: "include", cache: "no-store", ...opts, headers }
666
674
  );
667
675
  return { follows: res.follows, cursor: res.cursor ?? null };
@@ -716,7 +724,7 @@ async function fetchFollowProfilePage(config, path, opts) {
716
724
  async function getMutuals(config, handleOrDid, opts = {}) {
717
725
  return fetchFollowProfilePage(
718
726
  config,
719
- buildListPath2(`/api/profile/${encodeURIComponent(handleOrDid)}/mutuals`, opts),
727
+ buildListPath2(`/api/profile/${encodeIdentifier(handleOrDid)}/mutuals`, opts),
720
728
  opts
721
729
  );
722
730
  }
@@ -749,7 +757,7 @@ function addFeatureAllowlist(config, flag, did, opts = {}) {
749
757
  function removeFeatureAllowlist(config, flag, did, opts = {}) {
750
758
  return apiWrite(
751
759
  config,
752
- `/api/admin/feature-allowlists/${encodeURIComponent(flag)}/${encodeURIComponent(did)}`,
760
+ `/api/admin/feature-allowlists/${encodeURIComponent(flag)}/${encodeIdentifier(did)}`,
753
761
  "DELETE",
754
762
  opts
755
763
  );
@@ -757,7 +765,7 @@ function removeFeatureAllowlist(config, flag, did, opts = {}) {
757
765
 
758
766
  // src/query/fetchers/activity.ts
759
767
  async function fetchHeatmapData(config, handleOrDid, days, options = {}) {
760
- const path = `/api/activity/${encodeURIComponent(handleOrDid)}/heatmap?days=${days}`;
768
+ const path = `/api/activity/${encodeIdentifier(handleOrDid)}/heatmap?days=${days}`;
761
769
  try {
762
770
  return await apiFetch(config, path, {
763
771
  next: { revalidate: 900, tags: [`heatmap-${handleOrDid}`] },
@@ -773,7 +781,7 @@ async function fetchActivityTeaser(config, handleOrDid, options = {}) {
773
781
  try {
774
782
  return await apiFetch(
775
783
  config,
776
- `/api/activity/${encodeURIComponent(handleOrDid)}/teaser`,
784
+ `/api/activity/${encodeIdentifier(handleOrDid)}/teaser`,
777
785
  {
778
786
  credentials: "include",
779
787
  timeoutMs: 8e3,
@@ -797,7 +805,7 @@ async function fetchActivityFeed(config, handleOrDid, options = {}) {
797
805
  try {
798
806
  return await apiFetch(
799
807
  config,
800
- `/api/activity/${encodeURIComponent(handleOrDid)}${qs ? `?${qs}` : ""}`,
808
+ `/api/activity/${encodeIdentifier(handleOrDid)}${qs ? `?${qs}` : ""}`,
801
809
  {
802
810
  credentials: "include",
803
811
  cache: "no-store",
@@ -812,7 +820,7 @@ async function fetchActivityFeed(config, handleOrDid, options = {}) {
812
820
 
813
821
  // src/query/fetchers/endorsement.ts
814
822
  async function fetchEndorsementCount(config, did, options = {}) {
815
- const path = `/api/endorsement/${encodeURIComponent(did)}`;
823
+ const path = `/api/endorsement/${encodeIdentifier(did)}`;
816
824
  try {
817
825
  const data = await apiFetch(config, path, {
818
826
  cache: "no-store",
@@ -836,7 +844,7 @@ async function fetchNetworkStreamCount(config, did, options = {}) {
836
844
  try {
837
845
  const data = await apiFetch(
838
846
  config,
839
- `/api/stream/network?did=${encodeURIComponent(did)}`,
847
+ `/api/stream/network?did=${encodeIdentifier(did)}`,
840
848
  {
841
849
  cache: "no-store",
842
850
  timeoutMs: 5e3,