@singi-labs/sifa-sdk 0.12.56 → 0.12.58
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/{index-Cd_heN1n.d.ts → index-B1WYOzm1.d.ts} +3 -2
- package/dist/{index-mXTN0GbN.d.cts → index-BcKfdI4X.d.cts} +3 -2
- package/dist/{types-Vf-kTiu1.d.cts → index-DMyroYoB.d.cts} +1 -509
- package/dist/{types-Vf-kTiu1.d.ts → index-DMyroYoB.d.ts} +1 -509
- package/dist/{index-DZGw-VDY.d.cts → index-Dqe0Nlck.d.cts} +4 -3
- package/dist/{index-GmKuSxp6.d.ts → index-czrerd84.d.ts} +4 -3
- package/dist/index.cjs +44 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +36 -4
- package/dist/index.d.ts +36 -4
- package/dist/index.js +44 -18
- package/dist/index.js.map +1 -1
- package/dist/jsonld/index.cjs +891 -0
- package/dist/jsonld/index.cjs.map +1 -0
- package/dist/jsonld/index.d.cts +494 -0
- package/dist/jsonld/index.d.ts +494 -0
- package/dist/jsonld/index.js +878 -0
- package/dist/jsonld/index.js.map +1 -0
- package/dist/{org-fq2Xwg6Q.d.ts → org-66bQLHJd.d.ts} +2 -1
- package/dist/{org-CHVTcTcj.d.cts → org-GI1GVjZw.d.cts} +2 -1
- package/dist/{profile-summary-CdLI8k7M.d.cts → profile-summary-Bqj3TDVd.d.cts} +1 -1
- package/dist/{profile-summary-BS2GPBxw.d.ts → profile-summary-YZXjMymn.d.ts} +1 -1
- package/dist/query/fetchers/index.d.cts +5 -4
- package/dist/query/fetchers/index.d.ts +5 -4
- package/dist/query/hooks/index.d.cts +4 -3
- package/dist/query/hooks/index.d.ts +4 -3
- package/dist/query/index.d.cts +8 -7
- package/dist/query/index.d.ts +8 -7
- package/dist/types-BiBx2Utr.d.cts +511 -0
- package/dist/types-BkRDvKTp.d.ts +511 -0
- package/package.json +11 -1
|
@@ -728,512 +728,4 @@ interface Profile {
|
|
|
728
728
|
externalAccounts?: ExternalAccount[];
|
|
729
729
|
}
|
|
730
730
|
|
|
731
|
-
|
|
732
|
-
* Types for the `id.sifa.getProfileView` XRPC query: the aggregated public
|
|
733
|
-
* professional profile view served by a Sifa AppView. This is a curated public
|
|
734
|
-
* projection, viewer-specific and internal fields are not included and hidden
|
|
735
|
-
* items are omitted. Mirrors the `id.sifa.getProfileView` lexicon in
|
|
736
|
-
* @singi-labs/sifa-lexicons.
|
|
737
|
-
*/
|
|
738
|
-
|
|
739
|
-
interface IndustryDomain {
|
|
740
|
-
industry: string;
|
|
741
|
-
domain?: string;
|
|
742
|
-
}
|
|
743
|
-
interface ProfileLocationView {
|
|
744
|
-
rkey: string;
|
|
745
|
-
type?: string;
|
|
746
|
-
label?: string;
|
|
747
|
-
isPrimary?: boolean;
|
|
748
|
-
locationCountry?: string;
|
|
749
|
-
locationRegion?: string;
|
|
750
|
-
locationLocality?: string;
|
|
751
|
-
countryCode?: string;
|
|
752
|
-
location?: string;
|
|
753
|
-
}
|
|
754
|
-
interface PositionView {
|
|
755
|
-
rkey: string;
|
|
756
|
-
title: string;
|
|
757
|
-
company?: string;
|
|
758
|
-
companyDid?: string;
|
|
759
|
-
entityRef?: string;
|
|
760
|
-
entityName?: string;
|
|
761
|
-
description?: string;
|
|
762
|
-
employmentType?: string;
|
|
763
|
-
workplaceType?: string;
|
|
764
|
-
locationCountry?: string;
|
|
765
|
-
locationRegion?: string;
|
|
766
|
-
locationLocality?: string;
|
|
767
|
-
countryCode?: string;
|
|
768
|
-
location?: string;
|
|
769
|
-
startedAt?: string;
|
|
770
|
-
endedAt?: string;
|
|
771
|
-
primary?: boolean;
|
|
772
|
-
skillRkeys?: string[];
|
|
773
|
-
}
|
|
774
|
-
interface EducationView {
|
|
775
|
-
rkey: string;
|
|
776
|
-
institution?: string;
|
|
777
|
-
institutionDid?: string;
|
|
778
|
-
entityRef?: string;
|
|
779
|
-
degree?: string;
|
|
780
|
-
fieldOfStudy?: string;
|
|
781
|
-
activities?: string;
|
|
782
|
-
description?: string;
|
|
783
|
-
startedAt?: string;
|
|
784
|
-
endedAt?: string;
|
|
785
|
-
}
|
|
786
|
-
interface SkillView {
|
|
787
|
-
rkey: string;
|
|
788
|
-
name: string;
|
|
789
|
-
category?: string;
|
|
790
|
-
/** Freeform user-defined grouping label nested under `category` (#305). */
|
|
791
|
-
subCategory?: string;
|
|
792
|
-
positionRkeys?: string[];
|
|
793
|
-
}
|
|
794
|
-
interface CertificationView {
|
|
795
|
-
rkey: string;
|
|
796
|
-
name: string;
|
|
797
|
-
issuingOrg?: string;
|
|
798
|
-
entityRef?: string;
|
|
799
|
-
issueDate?: string;
|
|
800
|
-
expiryDate?: string;
|
|
801
|
-
credentialUrl?: string;
|
|
802
|
-
}
|
|
803
|
-
interface ProjectView {
|
|
804
|
-
rkey: string;
|
|
805
|
-
name: string;
|
|
806
|
-
description?: string;
|
|
807
|
-
url?: string;
|
|
808
|
-
startDate?: string;
|
|
809
|
-
endDate?: string;
|
|
810
|
-
members?: ProjectMemberView[];
|
|
811
|
-
/** AT-URI of the same project as recorded elsewhere, when this entry duplicates another. */
|
|
812
|
-
/** AT-URI of the same record on another person's profile, when they keep one. */
|
|
813
|
-
sameAs?: string;
|
|
814
|
-
}
|
|
815
|
-
/** A person named as a member of a project. Identity fields appear only once confirmed. */
|
|
816
|
-
interface ProjectMemberView {
|
|
817
|
-
did: string;
|
|
818
|
-
handle: string;
|
|
819
|
-
displayName?: string;
|
|
820
|
-
avatar?: string;
|
|
821
|
-
confirmed?: boolean;
|
|
822
|
-
confirmedStale?: boolean;
|
|
823
|
-
role?: string;
|
|
824
|
-
title?: string;
|
|
825
|
-
}
|
|
826
|
-
interface VolunteeringView {
|
|
827
|
-
rkey: string;
|
|
828
|
-
organization: string;
|
|
829
|
-
entityRef?: string;
|
|
830
|
-
role?: string;
|
|
831
|
-
cause?: string;
|
|
832
|
-
description?: string;
|
|
833
|
-
startDate?: string;
|
|
834
|
-
endDate?: string;
|
|
835
|
-
}
|
|
836
|
-
interface InvolvementLinkView {
|
|
837
|
-
url: string;
|
|
838
|
-
kind?: string;
|
|
839
|
-
label?: string;
|
|
840
|
-
verified?: boolean;
|
|
841
|
-
verifiedPlatform?: string;
|
|
842
|
-
}
|
|
843
|
-
interface InvolvementView {
|
|
844
|
-
rkey: string;
|
|
845
|
-
kind?: string;
|
|
846
|
-
upstream?: string;
|
|
847
|
-
upstreamDid?: string;
|
|
848
|
-
upstreamUrl?: string;
|
|
849
|
-
role?: string;
|
|
850
|
-
description?: string;
|
|
851
|
-
startedAt?: string;
|
|
852
|
-
endedAt?: string;
|
|
853
|
-
links: InvolvementLinkView[];
|
|
854
|
-
legacy: boolean;
|
|
855
|
-
/** Other people named on this involvement, hydrated from the stored DIDs. */
|
|
856
|
-
collaborators?: ProjectMemberView[];
|
|
857
|
-
/** AT-URI of the same involvement as recorded on another person's profile. */
|
|
858
|
-
sameAs?: string;
|
|
859
|
-
}
|
|
860
|
-
interface ContributorView {
|
|
861
|
-
name: string;
|
|
862
|
-
orcidId?: string;
|
|
863
|
-
did?: string;
|
|
864
|
-
handle?: string;
|
|
865
|
-
}
|
|
866
|
-
interface PublicationView {
|
|
867
|
-
rkey: string;
|
|
868
|
-
title: string;
|
|
869
|
-
subtitle?: string;
|
|
870
|
-
publisher?: string;
|
|
871
|
-
date?: string;
|
|
872
|
-
url?: string;
|
|
873
|
-
description?: string;
|
|
874
|
-
doi?: string;
|
|
875
|
-
type?: string;
|
|
876
|
-
typeLabel?: string;
|
|
877
|
-
contributors?: ContributorView[];
|
|
878
|
-
verified: boolean;
|
|
879
|
-
verifiedVia?: string;
|
|
880
|
-
orcidCorroborated?: boolean;
|
|
881
|
-
publicationUri?: string;
|
|
882
|
-
publicationUrl?: string;
|
|
883
|
-
publicationName?: string;
|
|
884
|
-
image?: string;
|
|
885
|
-
}
|
|
886
|
-
interface CourseView {
|
|
887
|
-
rkey: string;
|
|
888
|
-
name: string;
|
|
889
|
-
number?: string;
|
|
890
|
-
institution?: string;
|
|
891
|
-
entityRef?: string;
|
|
892
|
-
credentialRkey?: string;
|
|
893
|
-
}
|
|
894
|
-
interface DurationView {
|
|
895
|
-
minMinutes: number;
|
|
896
|
-
maxMinutes?: number;
|
|
897
|
-
}
|
|
898
|
-
/**
|
|
899
|
-
* A co-speaker on a presentation delivery.
|
|
900
|
-
*
|
|
901
|
-
* `displayName` and `avatar` are served only once `confirmed` is true. The
|
|
902
|
-
* lexicon also declares an unlinked free-text `name`, which the AppView has
|
|
903
|
-
* never emitted -- the record field is `format: did`, so there is nothing to
|
|
904
|
-
* emit it from.
|
|
905
|
-
*/
|
|
906
|
-
interface CoSpeakerView {
|
|
907
|
-
did?: string;
|
|
908
|
-
handle?: string;
|
|
909
|
-
displayName?: string;
|
|
910
|
-
avatar?: string;
|
|
911
|
-
hasSifaProfile?: boolean;
|
|
912
|
-
confirmed?: boolean;
|
|
913
|
-
confirmedStale?: boolean;
|
|
914
|
-
name?: string;
|
|
915
|
-
}
|
|
916
|
-
interface PresentationDeliveryView {
|
|
917
|
-
rkey: string;
|
|
918
|
-
presentationRkey?: string;
|
|
919
|
-
title?: string;
|
|
920
|
-
role?: string;
|
|
921
|
-
eventName?: string;
|
|
922
|
-
date?: string;
|
|
923
|
-
location?: string;
|
|
924
|
-
locationCountry?: string;
|
|
925
|
-
locationRegion?: string;
|
|
926
|
-
locationLocality?: string;
|
|
927
|
-
countryCode?: string;
|
|
928
|
-
mode?: string;
|
|
929
|
-
status?: string;
|
|
930
|
-
links?: PresentationLinkView[];
|
|
931
|
-
eventUri?: string;
|
|
932
|
-
coSpeakers?: CoSpeakerView[];
|
|
933
|
-
/** AT-URI of the same session as recorded on another person's profile. */
|
|
934
|
-
sameAs?: string;
|
|
935
|
-
}
|
|
936
|
-
interface PresentationView {
|
|
937
|
-
rkey: string;
|
|
938
|
-
title: string;
|
|
939
|
-
description?: string;
|
|
940
|
-
duration?: DurationView;
|
|
941
|
-
intendedAudiences?: string[];
|
|
942
|
-
links?: PresentationLinkView[];
|
|
943
|
-
writeupUri?: string;
|
|
944
|
-
coverImageUrl?: string;
|
|
945
|
-
deliveries: PresentationDeliveryView[];
|
|
946
|
-
}
|
|
947
|
-
interface HonorView {
|
|
948
|
-
rkey: string;
|
|
949
|
-
title: string;
|
|
950
|
-
issuer?: string;
|
|
951
|
-
entityRef?: string;
|
|
952
|
-
description?: string;
|
|
953
|
-
date?: string;
|
|
954
|
-
}
|
|
955
|
-
interface LanguageView {
|
|
956
|
-
rkey: string;
|
|
957
|
-
language: string;
|
|
958
|
-
proficiency?: string;
|
|
959
|
-
}
|
|
960
|
-
interface ExternalAccountView {
|
|
961
|
-
rkey: string;
|
|
962
|
-
platform?: string;
|
|
963
|
-
url: string;
|
|
964
|
-
label?: string;
|
|
965
|
-
feedUrl?: string;
|
|
966
|
-
verifiable?: boolean;
|
|
967
|
-
verified?: boolean;
|
|
968
|
-
verifiedVia?: string;
|
|
969
|
-
primary?: boolean;
|
|
970
|
-
}
|
|
971
|
-
interface ActiveAppView {
|
|
972
|
-
id: string;
|
|
973
|
-
name: string;
|
|
974
|
-
category?: string;
|
|
975
|
-
recentCount?: number;
|
|
976
|
-
latestRecordAt?: string;
|
|
977
|
-
}
|
|
978
|
-
interface AtfundLinkView {
|
|
979
|
-
url: string;
|
|
980
|
-
label?: string;
|
|
981
|
-
}
|
|
982
|
-
/** Aggregated public professional profile view (`id.sifa.getProfileView#profileView`). */
|
|
983
|
-
interface ProfileView {
|
|
984
|
-
did: string;
|
|
985
|
-
handle: string;
|
|
986
|
-
displayName?: string;
|
|
987
|
-
givenName?: string;
|
|
988
|
-
familyName?: string;
|
|
989
|
-
avatar?: string;
|
|
990
|
-
pronouns?: string;
|
|
991
|
-
headline?: string;
|
|
992
|
-
about?: string;
|
|
993
|
-
industries?: IndustryDomain[];
|
|
994
|
-
locationCountry?: string;
|
|
995
|
-
locationRegion?: string;
|
|
996
|
-
locationLocality?: string;
|
|
997
|
-
countryCode?: string;
|
|
998
|
-
location?: string;
|
|
999
|
-
locations?: ProfileLocationView[];
|
|
1000
|
-
website?: string;
|
|
1001
|
-
openTo?: string[];
|
|
1002
|
-
preferredWorkplace?: string[];
|
|
1003
|
-
availableFromUtc?: number;
|
|
1004
|
-
availableToUtc?: number;
|
|
1005
|
-
langs?: string[];
|
|
1006
|
-
createdAt?: string;
|
|
1007
|
-
positions?: PositionView[];
|
|
1008
|
-
education?: EducationView[];
|
|
1009
|
-
skills?: SkillView[];
|
|
1010
|
-
certifications?: CertificationView[];
|
|
1011
|
-
projects?: ProjectView[];
|
|
1012
|
-
volunteering?: VolunteeringView[];
|
|
1013
|
-
involvement?: InvolvementView[];
|
|
1014
|
-
publications?: PublicationView[];
|
|
1015
|
-
courses?: CourseView[];
|
|
1016
|
-
presentations?: PresentationView[];
|
|
1017
|
-
presentationDeliveries?: PresentationDeliveryView[];
|
|
1018
|
-
honors?: HonorView[];
|
|
1019
|
-
languages?: LanguageView[];
|
|
1020
|
-
externalAccounts?: ExternalAccountView[];
|
|
1021
|
-
atfundContribute?: AtfundLinkView;
|
|
1022
|
-
followersCount?: number;
|
|
1023
|
-
followingCount?: number;
|
|
1024
|
-
connectionsCount?: number;
|
|
1025
|
-
metInPersonCount?: number;
|
|
1026
|
-
atprotoFollowersCount?: number;
|
|
1027
|
-
blueskyVerified?: boolean;
|
|
1028
|
-
blueskyVerifiedAt?: string;
|
|
1029
|
-
activeApps?: ActiveAppView[];
|
|
1030
|
-
pdsProvider?: PdsProviderInfo;
|
|
1031
|
-
claimed?: boolean;
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
/**
|
|
1035
|
-
* Adult-content gating for Bluesky activity items.
|
|
1036
|
-
*
|
|
1037
|
-
* Bluesky's official moderation labeler attaches content labels to
|
|
1038
|
-
* `app.bsky.feed.defs#postView.labels`. The four sex-and-violence labels
|
|
1039
|
-
* below are the ones we hide by default on Sifa: media is replaced with an
|
|
1040
|
-
* `<AdultContentWarning>` placeholder card in sifa-web. Authenticated
|
|
1041
|
-
* viewers can reveal per-card; anonymous viewers cannot.
|
|
1042
|
-
*
|
|
1043
|
-
* The list mirrors Bluesky's own globalLabelStrings; if the official set
|
|
1044
|
-
* grows (e.g. a new `extreme-violence` label), update this constant.
|
|
1045
|
-
*
|
|
1046
|
-
* Why a constant + predicate live in the SDK: the same logic needs to run
|
|
1047
|
-
* in sifa-web today and sifa-app tomorrow, and the API only forwards the
|
|
1048
|
-
* raw labels — the hide decision is a client concern.
|
|
1049
|
-
*/
|
|
1050
|
-
declare const ADULT_CONTENT_LABELS: readonly ["porn", "sexual", "nudity", "graphic-media"];
|
|
1051
|
-
type AdultContentLabel = (typeof ADULT_CONTENT_LABELS)[number];
|
|
1052
|
-
/**
|
|
1053
|
-
* A single label entry as emitted by `app.bsky.feed.defs#postView.labels`.
|
|
1054
|
-
* Matches `com.atproto.label.defs#label` (the on-wire shape after the AppView
|
|
1055
|
-
* resolves a `postView`). `neg: true` marks a retraction.
|
|
1056
|
-
*/
|
|
1057
|
-
interface ActivityLabel {
|
|
1058
|
-
val: string;
|
|
1059
|
-
src: string;
|
|
1060
|
-
uri: string;
|
|
1061
|
-
cts?: string;
|
|
1062
|
-
neg?: boolean;
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* Return true if the item carries at least one adult-content label that is
|
|
1066
|
-
* not negated. Items without a `labels` field (every non-Bluesky source,
|
|
1067
|
-
* legacy responses) are treated as safe.
|
|
1068
|
-
*/
|
|
1069
|
-
declare function hasAdultContent(item: {
|
|
1070
|
-
labels?: ActivityLabel[];
|
|
1071
|
-
}): boolean;
|
|
1072
|
-
|
|
1073
|
-
/**
|
|
1074
|
-
* The buckets a repo data-management UI shows instead of raw collections.
|
|
1075
|
-
*
|
|
1076
|
-
* "id.sifa.profile.presentationDelivery" means nothing to someone who has never
|
|
1077
|
-
* heard of a lexicon. Grouping is the whole difference between a developer tool
|
|
1078
|
-
* and something a user can act on, so it lives here rather than in one app: the
|
|
1079
|
-
* web settings page and a future native app must agree on what a bucket holds,
|
|
1080
|
-
* or the same repo reads differently depending where you look at it.
|
|
1081
|
-
*
|
|
1082
|
-
* Ids only, no display strings -- copy is translated at the surface.
|
|
1083
|
-
*/
|
|
1084
|
-
type RepoGroupId = 'profile-basics' | 'work-history' | 'education' | 'skills-endorsements' | 'projects' | 'publications-talks' | 'people' | 'meetings' | 'other';
|
|
1085
|
-
interface RepoGroupDefinition {
|
|
1086
|
-
id: RepoGroupId;
|
|
1087
|
-
/** Collections this bucket claims, in the order a UI should list them. */
|
|
1088
|
-
collections: readonly string[];
|
|
1089
|
-
}
|
|
1090
|
-
/**
|
|
1091
|
-
* Ordered so the buckets a user recognises come first and the machinery they
|
|
1092
|
-
* never think about (consents, access grants) comes last.
|
|
1093
|
-
*
|
|
1094
|
-
* `other` is deliberately absent: it is not a claim over a fixed set, it is
|
|
1095
|
-
* where anything unmapped lands. See {@link repoGroupForCollection}.
|
|
1096
|
-
*/
|
|
1097
|
-
declare const SIFA_REPO_GROUPS: readonly RepoGroupDefinition[];
|
|
1098
|
-
/**
|
|
1099
|
-
* Which bucket a collection belongs to, or `other` when we have not mapped it.
|
|
1100
|
-
*
|
|
1101
|
-
* Unmapped falls through to a visible bucket rather than being filtered out. A
|
|
1102
|
-
* lexicon we mint later would otherwise be invisible on the one page whose job
|
|
1103
|
-
* is to show everything in the repo -- the user would be told their data is
|
|
1104
|
-
* accounted for while some of it was silently omitted.
|
|
1105
|
-
*/
|
|
1106
|
-
declare function repoGroupForCollection(collection: string): RepoGroupId;
|
|
1107
|
-
|
|
1108
|
-
/**
|
|
1109
|
-
* One line of text identifying a record to the person who wrote it.
|
|
1110
|
-
*
|
|
1111
|
-
* Split into parts rather than one joined string: joining needs a connective
|
|
1112
|
-
* ("Senior Engineer at Acme") and a connective is copy, which is translated at
|
|
1113
|
-
* the surface. Every value here comes straight from the user's own record, so
|
|
1114
|
-
* the SDK contributes no language of its own.
|
|
1115
|
-
*/
|
|
1116
|
-
interface RepoRecordLabel {
|
|
1117
|
-
/** The record's own identifying text, or the collection leaf when it has none. */
|
|
1118
|
-
primary: string;
|
|
1119
|
-
/** Employer, institution, event, or publisher, when the record names one. */
|
|
1120
|
-
secondary?: string;
|
|
1121
|
-
/** The date the record is about, not when it was written. May be partial ("2021-03"). */
|
|
1122
|
-
date?: string;
|
|
1123
|
-
/**
|
|
1124
|
-
* The person a record is about, for records whose meaning is a relationship
|
|
1125
|
-
* rather than text: endorsements, follows, confirmations, attestations.
|
|
1126
|
-
*
|
|
1127
|
-
* Kept out of {@link primary} so a surface can resolve it to a handle and
|
|
1128
|
-
* avatar without parsing a DID back out of display text.
|
|
1129
|
-
*/
|
|
1130
|
-
subjectDid?: string;
|
|
1131
|
-
/**
|
|
1132
|
-
* Handle and display name for {@link subjectDid}, when a surface resolved it.
|
|
1133
|
-
*
|
|
1134
|
-
* Records whose whole meaning is a relationship -- follows, meetings,
|
|
1135
|
-
* endorsements -- carry only a DID. A page listing 33 of them shows 33
|
|
1136
|
-
* identical rows and a column of did:plc: strings, which is unusable for
|
|
1137
|
-
* deciding which one to remove. Resolution has to be batched by the caller,
|
|
1138
|
-
* so the SDK leaves room for the answer rather than fetching it.
|
|
1139
|
-
*/
|
|
1140
|
-
subjectHandle?: string;
|
|
1141
|
-
subjectName?: string;
|
|
1142
|
-
/**
|
|
1143
|
-
* Set when the record carried no readable text and {@link primary} is the
|
|
1144
|
-
* collection leaf rather than the user's own data.
|
|
1145
|
-
*
|
|
1146
|
-
* A surface must substitute its own wording for these -- a row reading
|
|
1147
|
-
* "follow" or "location" tells the reader nothing about which record they
|
|
1148
|
-
* are about to delete. The flag exists because the leaf is indistinguishable
|
|
1149
|
-
* from real content once it is a string: a headline that genuinely says
|
|
1150
|
-
* "location" must not be relabelled.
|
|
1151
|
-
*/
|
|
1152
|
-
isFallback?: true;
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
* Describe one record from the user's repo in terms they will recognise.
|
|
1156
|
-
*
|
|
1157
|
-
* Never throws and never returns an empty primary. This runs over whatever is
|
|
1158
|
-
* actually in the repo, including records written by older versions of Sifa and
|
|
1159
|
-
* records hand-edited elsewhere. A page that crashes on one malformed record
|
|
1160
|
-
* would hide the rest, which is exactly the data the user came to manage.
|
|
1161
|
-
*/
|
|
1162
|
-
declare function describeSifaRecord(collection: string, value: unknown): RepoRecordLabel;
|
|
1163
|
-
|
|
1164
|
-
/** One record in the user's repo, reduced to what a management UI needs. */
|
|
1165
|
-
interface RepoRecordSummary {
|
|
1166
|
-
/** Full AT-URI, the stable identity of the record. */
|
|
1167
|
-
uri: string;
|
|
1168
|
-
/** Record key, the part a delete request names. */
|
|
1169
|
-
rkey: string;
|
|
1170
|
-
collection: string;
|
|
1171
|
-
label: RepoRecordLabel;
|
|
1172
|
-
/** When the record was written, from its own `createdAt`. Absent if it has none. */
|
|
1173
|
-
createdAt?: string;
|
|
1174
|
-
}
|
|
1175
|
-
/** One bucket of the inventory. Buckets the user has no records in are omitted. */
|
|
1176
|
-
interface RepoCollectionGroup {
|
|
1177
|
-
id: RepoGroupId;
|
|
1178
|
-
/** Collections in this bucket the user actually has records in. */
|
|
1179
|
-
collections: string[];
|
|
1180
|
-
recordCount: number;
|
|
1181
|
-
records: RepoRecordSummary[];
|
|
1182
|
-
}
|
|
1183
|
-
/**
|
|
1184
|
-
* What is in the user's repo under id.sifa.*, as their PDS reports it.
|
|
1185
|
-
*
|
|
1186
|
-
* Read from the PDS rather than the AppView. This is the one surface whose
|
|
1187
|
-
* entire purpose is to say what the user owns, so an index that has drifted --
|
|
1188
|
-
* lagging the firehose, or holding records deleted elsewhere -- would be
|
|
1189
|
-
* lying about the thing the page exists to answer.
|
|
1190
|
-
*/
|
|
1191
|
-
interface RepoInventory {
|
|
1192
|
-
did: string;
|
|
1193
|
-
/** When the PDS was read, so a UI can say how fresh this is. */
|
|
1194
|
-
fetchedAt: string;
|
|
1195
|
-
groups: RepoCollectionGroup[];
|
|
1196
|
-
totalRecords: number;
|
|
1197
|
-
/**
|
|
1198
|
-
* Collections found in the repo that could not be listed. Their records are
|
|
1199
|
-
* missing from `groups`, so a UI must not present the inventory as complete.
|
|
1200
|
-
*/
|
|
1201
|
-
unreadableCollections?: string[];
|
|
1202
|
-
}
|
|
1203
|
-
/** What happened to one record in a delete request. */
|
|
1204
|
-
type RepoDeleteOutcome =
|
|
1205
|
-
/** The PDS confirmed the record is gone. */
|
|
1206
|
-
'deleted'
|
|
1207
|
-
/** The delete was attempted and the record is still there. */
|
|
1208
|
-
| 'remaining'
|
|
1209
|
-
/** We could not establish either way. Not the same as `remaining`, and never success. */
|
|
1210
|
-
| 'unknown';
|
|
1211
|
-
interface RepoDeleteRecordResult {
|
|
1212
|
-
rkey: string;
|
|
1213
|
-
outcome: RepoDeleteOutcome;
|
|
1214
|
-
}
|
|
1215
|
-
/**
|
|
1216
|
-
* Result of a delete request.
|
|
1217
|
-
*
|
|
1218
|
-
* Carries no success flag of its own. The transport adds one meaning "the
|
|
1219
|
-
* request was accepted", which is not the same question: a request can be
|
|
1220
|
-
* accepted and still leave four of five records in place. What actually
|
|
1221
|
-
* happened to the data is in `results`, per record, and callers report that.
|
|
1222
|
-
*/
|
|
1223
|
-
interface RepoDeleteResult {
|
|
1224
|
-
collection: string;
|
|
1225
|
-
results: RepoDeleteRecordResult[];
|
|
1226
|
-
/**
|
|
1227
|
-
* Set when the current OAuth grant cannot delete this collection, in which
|
|
1228
|
-
* case nothing was attempted. `scope` is the value to request.
|
|
1229
|
-
*
|
|
1230
|
-
* Present instead of a failure so a UI sends the user to consent rather than
|
|
1231
|
-
* telling them the delete failed for no stated reason.
|
|
1232
|
-
*/
|
|
1233
|
-
needsScopeUpgrade?: {
|
|
1234
|
-
scope: string;
|
|
1235
|
-
collections: string[];
|
|
1236
|
-
};
|
|
1237
|
-
}
|
|
1238
|
-
|
|
1239
|
-
export { type ProfileCourse as $, type AdultContentLabel as A, type EndorsementData as B, type CoSpeaker as C, type DurationView as D, type ExternalAccount as E, type ExternalAccountKeytraceClaim as F, type ExternalAccountView as G, type FeedItem as H, type HonorView as I, type IndustryDomain as J, type InvolvementLinkView as K, type LocationValue as L, type InvolvementView as M, type LanguageProficiency as N, type LanguageView as O, type ProfileView as P, type OrgAddressView as Q, type RepoDeleteResult as R, type SkillSuggestion as S, type OrgFloorVerdict as T, type OrgLinkView as U, type OrgProfileView as V, PROJECT_ROLES as W, type PositionView as X, type PresentationDeliveryView as Y, type PresentationLinkView as Z, type PresentationView as _, type ActivityLabel as a, type ProfileIndustry as a0, type ProfileInvolvementLink as a1, type ProfileLocation as a2, type ProfileLocationView as a3, type ProfileOverrideSource as a4, type ProfilePresentation as a5, type ProfileVolunteering as a6, type ProjectMemberCard as a7, type ProjectMemberView as a8, type ProjectRole as a9, type ProjectView as aa, type PublicationContributor as ab, type PublicationView as ac, type RecognizedEntity as ad, type RepoCollectionGroup as ae, type RepoDeleteOutcome as af, type RepoDeleteRecordResult as ag, type RepoGroupDefinition as ah, type RepoGroupId as ai, type RepoRecordLabel as aj, type RepoRecordSummary as ak, SIFA_REPO_GROUPS as al, type SkillRef as am, type SkillView as an, type TrustStat as ao, type VerifiedAccount as ap, type VolunteeringView as aq, describeSifaRecord as ar, hasAdultContent as as, repoGroupForCollection as at, type RepoInventory as b, type ProfileSkill as c, type ProfilePresentationDelivery as d, type PdsProviderInfo as e, type Profile as f, type AccountFacetMode as g, type ProfilePosition as h, type ProfileCertification as i, type ProfileEducation as j, type ProfileHonor as k, type ProfileLanguage as l, type ProfileProject as m, type ProfilePublication as n, type ProfileInvolvement as o, ADULT_CONTENT_LABELS as p, type ActiveApp as q, type ActiveAppView as r, type ActorCard as s, type AtfundLinkView as t, type CertificationView as u, type CoSpeakerView as v, type ContributorView as w, type CourseView as x, type EducationView as y, type Endorsement as z };
|
|
731
|
+
export { type AccountFacetMode as A, type ProfileOverrideSource as B, type CoSpeaker as C, type ProfilePresentation as D, type ExternalAccount as E, type FeedItem as F, type ProfileVolunteering as G, type ProjectMemberCard as H, type ProjectRole as I, type PublicationContributor as J, type SkillRef as K, type LocationValue as L, type OrgAddressView as O, type PresentationLinkView as P, type RecognizedEntity as R, type SkillSuggestion as S, type TrustStat as T, type VerifiedAccount as V, type PdsProviderInfo as a, type ProfileSkill as b, type ProfilePresentationDelivery as c, type Profile as d, type ProfilePosition as e, type ProfileCertification as f, type ProfileEducation as g, type ProfileHonor as h, type ProfileLanguage as i, type ProfileProject as j, type ProfilePublication as k, type ProfileInvolvement as l, type ActiveApp as m, type ActorCard as n, type Endorsement as o, type EndorsementData 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 ProfileCourse as w, type ProfileIndustry as x, type ProfileInvolvementLink as y, type ProfileLocation as z };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-
|
|
2
|
-
import {
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-GI1GVjZw.cjs';
|
|
2
|
+
import { d as Profile, e as ProfilePosition, K as SkillRef } from './index-DMyroYoB.cjs';
|
|
3
|
+
import { P as ProfileView } from './types-BiBx2Utr.cjs';
|
|
3
4
|
import { i as EntitySearchResponse, k as EntitySearchResult, c as EntityMintDomainResponse, g as EntityResolveDomainResponse, m as EntitySelectRequest, o as EntitySelectResponse } from './feed-dOSy_48Z.cjs';
|
|
4
|
-
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-
|
|
5
|
+
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-Bqj3TDVd.cjs';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Read the aggregated profile for a handle or DID.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-
|
|
2
|
-
import {
|
|
1
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-66bQLHJd.js';
|
|
2
|
+
import { d as Profile, e as ProfilePosition, K as SkillRef } from './index-DMyroYoB.js';
|
|
3
|
+
import { P as ProfileView } from './types-BkRDvKTp.js';
|
|
3
4
|
import { i as EntitySearchResponse, k as EntitySearchResult, c as EntityMintDomainResponse, g as EntityResolveDomainResponse, m as EntitySelectRequest, o as EntitySelectResponse } from './feed-dOSy_48Z.js';
|
|
4
|
-
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-
|
|
5
|
+
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-YZXjMymn.js';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Read the aggregated profile for a handle or DID.
|
package/dist/index.cjs
CHANGED
|
@@ -2378,6 +2378,32 @@ function countryCodeToFlag(code) {
|
|
|
2378
2378
|
return String.fromCodePoint(a - 65 + 127462, b - 65 + 127462);
|
|
2379
2379
|
}
|
|
2380
2380
|
|
|
2381
|
+
// src/format/location-segments.ts
|
|
2382
|
+
function clean(value) {
|
|
2383
|
+
const trimmed = value?.trim();
|
|
2384
|
+
return trimmed ? trimmed : null;
|
|
2385
|
+
}
|
|
2386
|
+
function locationSegments(loc, options = {}) {
|
|
2387
|
+
if (!loc) return [];
|
|
2388
|
+
const ordered = [
|
|
2389
|
+
{ kind: "locality", value: clean(loc.locality ?? loc.city) },
|
|
2390
|
+
{ kind: "region", value: clean(loc.region) },
|
|
2391
|
+
{ kind: "country", value: clean(loc.country) }
|
|
2392
|
+
];
|
|
2393
|
+
const segments = [];
|
|
2394
|
+
for (const { kind, value } of ordered) {
|
|
2395
|
+
if (value === null) continue;
|
|
2396
|
+
const previous = segments[segments.length - 1];
|
|
2397
|
+
if (previous && previous.label.toLowerCase() === value.toLowerCase()) continue;
|
|
2398
|
+
segments.push({
|
|
2399
|
+
kind,
|
|
2400
|
+
label: value,
|
|
2401
|
+
searchHref: kind === "country" && options.searchable !== false ? `/search?${new URLSearchParams({ country: value }).toString()}` : null
|
|
2402
|
+
});
|
|
2403
|
+
}
|
|
2404
|
+
return segments;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2381
2407
|
// src/format/pds-utils.ts
|
|
2382
2408
|
var BSKY_PROFILE_BASE = "https://bsky.app/profile/";
|
|
2383
2409
|
var PDS_PROVIDERS = [
|
|
@@ -2659,27 +2685,27 @@ function meetsContrastAA(foreground, background) {
|
|
|
2659
2685
|
}
|
|
2660
2686
|
|
|
2661
2687
|
// src/import/presentation-csv.ts
|
|
2662
|
-
function
|
|
2688
|
+
function clean2(value) {
|
|
2663
2689
|
return (value ?? "").trim();
|
|
2664
2690
|
}
|
|
2665
2691
|
function parsePresentationDuration(input) {
|
|
2666
|
-
const numbers = (
|
|
2692
|
+
const numbers = (clean2(input).match(/\d+/g) ?? []).map((n) => Number.parseInt(n, 10)).filter((n) => Number.isInteger(n) && n > 0);
|
|
2667
2693
|
const min = numbers.at(0);
|
|
2668
2694
|
if (min === void 0) return void 0;
|
|
2669
2695
|
const max = numbers.at(1);
|
|
2670
2696
|
return max !== void 0 && max >= min ? { minMinutes: min, maxMinutes: max } : { minMinutes: min };
|
|
2671
2697
|
}
|
|
2672
2698
|
function durationFromMinutes(minRaw, maxRaw) {
|
|
2673
|
-
const min = Number.parseInt(
|
|
2699
|
+
const min = Number.parseInt(clean2(minRaw), 10);
|
|
2674
2700
|
if (!Number.isInteger(min) || min < 1) return void 0;
|
|
2675
|
-
const max = Number.parseInt(
|
|
2701
|
+
const max = Number.parseInt(clean2(maxRaw), 10);
|
|
2676
2702
|
return Number.isInteger(max) && max >= min ? { minMinutes: min, maxMinutes: max } : { minMinutes: min };
|
|
2677
2703
|
}
|
|
2678
2704
|
function parseIntendedAudiences(input, delimiter = ";") {
|
|
2679
|
-
return
|
|
2705
|
+
return clean2(input).split(delimiter).map((s) => s.trim()).filter(Boolean);
|
|
2680
2706
|
}
|
|
2681
2707
|
function stripHtmlToText(input) {
|
|
2682
|
-
const text =
|
|
2708
|
+
const text = clean2(input).replace(/<\s*br\s*\/?>/gi, "\n").replace(/<\/\s*(p|div|li|h[1-6])\s*>/gi, "\n").replace(/<[^>]*>/g, "").replace(/ /gi, " ").replace(/&/gi, "&").replace(/</gi, "<").replace(/>/gi, ">").replace(/"/gi, '"').replace(/�*39;|'/gi, "'");
|
|
2683
2709
|
return text.replace(/[ \t]+/g, " ").replace(/ *\n */g, "\n").replace(/\n{3,}/g, "\n\n").trim();
|
|
2684
2710
|
}
|
|
2685
2711
|
var ROLE_TOKENS = {
|
|
@@ -2691,7 +2717,7 @@ var ROLE_TOKENS = {
|
|
|
2691
2717
|
host: "id.sifa.defs#host"
|
|
2692
2718
|
};
|
|
2693
2719
|
function normalizePresentationRole(value) {
|
|
2694
|
-
const v =
|
|
2720
|
+
const v = clean2(value).toLowerCase();
|
|
2695
2721
|
if (!v) return void 0;
|
|
2696
2722
|
if (v.startsWith("id.sifa.defs#")) return v;
|
|
2697
2723
|
const exact = ROLE_TOKENS[v];
|
|
@@ -2716,14 +2742,14 @@ var MODE_FRAGMENTS = {
|
|
|
2716
2742
|
hybrid: "#hybrid"
|
|
2717
2743
|
};
|
|
2718
2744
|
function normalizePresentationMode(value) {
|
|
2719
|
-
const v =
|
|
2745
|
+
const v = clean2(value).toLowerCase();
|
|
2720
2746
|
if (!v) return void 0;
|
|
2721
2747
|
if (v.startsWith("community.lexicon.calendar.event#")) return v;
|
|
2722
2748
|
const fragment = MODE_FRAGMENTS[v];
|
|
2723
2749
|
return fragment ? `community.lexicon.calendar.event${fragment}` : void 0;
|
|
2724
2750
|
}
|
|
2725
2751
|
function link(uri, type) {
|
|
2726
|
-
const u =
|
|
2752
|
+
const u = clean2(uri);
|
|
2727
2753
|
return u ? { uri: u, type } : void 0;
|
|
2728
2754
|
}
|
|
2729
2755
|
function presentationCsvRowToRecord(row) {
|
|
@@ -2735,12 +2761,12 @@ function presentationCsvRowToRecord(row) {
|
|
|
2735
2761
|
link(row.recording_url, "id.sifa.defs#linkRecording"),
|
|
2736
2762
|
link(row.writeup_url, "id.sifa.defs#linkWriteup")
|
|
2737
2763
|
].filter((l) => l !== void 0);
|
|
2738
|
-
const record = { title:
|
|
2764
|
+
const record = { title: clean2(row.title) };
|
|
2739
2765
|
if (description) record.description = description;
|
|
2740
2766
|
if (duration) record.duration = duration;
|
|
2741
2767
|
if (intendedAudiences.length) record.intendedAudiences = intendedAudiences;
|
|
2742
2768
|
if (links.length) record.links = links;
|
|
2743
|
-
return { key:
|
|
2769
|
+
return { key: clean2(row.presentation_key) || void 0, record };
|
|
2744
2770
|
}
|
|
2745
2771
|
function presentationDeliveryCsvRowToRecord(row) {
|
|
2746
2772
|
const links = [
|
|
@@ -2748,10 +2774,10 @@ function presentationDeliveryCsvRowToRecord(row) {
|
|
|
2748
2774
|
link(row.recording_url, "id.sifa.defs#linkRecording")
|
|
2749
2775
|
].filter((l) => l !== void 0);
|
|
2750
2776
|
const record = {};
|
|
2751
|
-
const title =
|
|
2752
|
-
const eventName =
|
|
2753
|
-
const date =
|
|
2754
|
-
const location =
|
|
2777
|
+
const title = clean2(row.title);
|
|
2778
|
+
const eventName = clean2(row.event_name);
|
|
2779
|
+
const date = clean2(row.date);
|
|
2780
|
+
const location = clean2(row.location);
|
|
2755
2781
|
const role = normalizePresentationRole(row.role);
|
|
2756
2782
|
const mode = normalizePresentationMode(row.mode);
|
|
2757
2783
|
if (title) record.title = title;
|
|
@@ -2761,7 +2787,7 @@ function presentationDeliveryCsvRowToRecord(row) {
|
|
|
2761
2787
|
if (location) record.location = location;
|
|
2762
2788
|
if (mode) record.mode = mode;
|
|
2763
2789
|
if (links.length) record.links = links;
|
|
2764
|
-
return { presentationKey:
|
|
2790
|
+
return { presentationKey: clean2(row.presentation_key) || void 0, record };
|
|
2765
2791
|
}
|
|
2766
2792
|
|
|
2767
2793
|
// src/cards/app-url-patterns.ts
|
|
@@ -5598,7 +5624,7 @@ function describeSifaRecord(collection, value) {
|
|
|
5598
5624
|
}
|
|
5599
5625
|
|
|
5600
5626
|
// src/index.ts
|
|
5601
|
-
var SIFA_SDK_VERSION = "0.12.
|
|
5627
|
+
var SIFA_SDK_VERSION = "0.12.58";
|
|
5602
5628
|
|
|
5603
5629
|
exports.ACTIVITY_TIERS = ACTIVITY_TIERS;
|
|
5604
5630
|
exports.ACTIVITY_VERBS = ACTIVITY_VERBS;
|
|
@@ -5783,6 +5809,7 @@ exports.isVisibleActivityItem = isVisibleActivityItem;
|
|
|
5783
5809
|
exports.languageTagSchema = languageTagSchema;
|
|
5784
5810
|
exports.lexiconDateExtractor = lexiconDateExtractor;
|
|
5785
5811
|
exports.limitCombiningMarks = limitCombiningMarks;
|
|
5812
|
+
exports.locationSegments = locationSegments;
|
|
5786
5813
|
exports.looksLikeDomain = looksLikeDomain;
|
|
5787
5814
|
exports.makeGraphFollowRecordSchema = makeGraphFollowRecordSchema;
|
|
5788
5815
|
exports.maxGraphemes = maxGraphemes;
|