@singi-labs/sifa-sdk 0.12.50 → 0.12.52
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-10rMsh0Y.d.cts → index-B-BExLL4.d.cts} +27 -3
- package/dist/{index-CxZBzRTC.d.cts → index-B1F632lI.d.cts} +3 -3
- package/dist/{index-KQD7YLsb.d.ts → index-BeiqwDak.d.ts} +27 -3
- package/dist/{index-CatO6M_Y.d.ts → index-D9_yFc0m.d.ts} +3 -3
- package/dist/index.cjs +218 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +216 -30
- package/dist/index.js.map +1 -1
- package/dist/{org-8ysVY69a.d.ts → org-lRzEl8je.d.ts} +51 -3
- package/dist/{org-Be0SH7dO.d.cts → org-xybLlTXW.d.cts} +51 -3
- package/dist/{profile-summary-DyX9EJzZ.d.ts → profile-summary-elBg0fG6.d.ts} +1 -1
- package/dist/{profile-summary-DReI-P0i.d.cts → profile-summary-jUtrgYrA.d.cts} +1 -1
- package/dist/query/fetchers/index.cjs +24 -0
- 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 +22 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +44 -0
- 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 +43 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +48 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +7 -7
- package/dist/query/index.d.ts +7 -7
- package/dist/query/index.js +44 -1
- package/dist/query/index.js.map +1 -1
- package/dist/schemas/index.cjs +32 -28
- package/dist/schemas/index.cjs.map +1 -1
- package/dist/schemas/index.d.cts +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.js +32 -28
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/write/index.cjs +23 -17
- package/dist/schemas/write/index.cjs.map +1 -1
- package/dist/schemas/write/index.d.cts +9 -0
- package/dist/schemas/write/index.d.ts +9 -0
- package/dist/schemas/write/index.js +23 -17
- package/dist/schemas/write/index.js.map +1 -1
- package/dist/{shared-CqayM24g.d.cts → shared-B9ng04Kt.d.cts} +9 -0
- package/dist/{shared-CqayM24g.d.ts → shared-B9ng04Kt.d.ts} +9 -0
- package/dist/{adult-content-BUgP8bpf.d.cts → types-CmS4Argp.d.cts} +153 -1
- package/dist/{adult-content-BUgP8bpf.d.ts → types-CmS4Argp.d.ts} +153 -1
- package/package.json +1 -1
|
@@ -333,6 +333,10 @@ interface ProfileInvolvement {
|
|
|
333
333
|
*/
|
|
334
334
|
legacy?: boolean;
|
|
335
335
|
hidden?: boolean;
|
|
336
|
+
/** Other people named on this involvement, hydrated from the stored DIDs. */
|
|
337
|
+
collaborators?: ProjectMemberCard[];
|
|
338
|
+
/** AT-URI of the same involvement as recorded on another person's profile. */
|
|
339
|
+
sameAs?: string;
|
|
336
340
|
}
|
|
337
341
|
type LanguageProficiency = 'elementary' | 'limited_working' | 'professional_working' | 'full_professional' | 'native';
|
|
338
342
|
interface ProfileLanguage {
|
|
@@ -848,6 +852,10 @@ interface InvolvementView {
|
|
|
848
852
|
endedAt?: string;
|
|
849
853
|
links: InvolvementLinkView[];
|
|
850
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;
|
|
851
859
|
}
|
|
852
860
|
interface ContributorView {
|
|
853
861
|
name: string;
|
|
@@ -1062,4 +1070,148 @@ declare function hasAdultContent(item: {
|
|
|
1062
1070
|
labels?: ActivityLabel[];
|
|
1063
1071
|
}): boolean;
|
|
1064
1072
|
|
|
1065
|
-
|
|
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' | 'connections' | 'consents-access' | '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
|
+
/**
|
|
1133
|
+
* Describe one record from the user's repo in terms they will recognise.
|
|
1134
|
+
*
|
|
1135
|
+
* Never throws and never returns an empty primary. This runs over whatever is
|
|
1136
|
+
* actually in the repo, including records written by older versions of Sifa and
|
|
1137
|
+
* records hand-edited elsewhere. A page that crashes on one malformed record
|
|
1138
|
+
* would hide the rest, which is exactly the data the user came to manage.
|
|
1139
|
+
*/
|
|
1140
|
+
declare function describeSifaRecord(collection: string, value: unknown): RepoRecordLabel;
|
|
1141
|
+
|
|
1142
|
+
/** One record in the user's repo, reduced to what a management UI needs. */
|
|
1143
|
+
interface RepoRecordSummary {
|
|
1144
|
+
/** Full AT-URI, the stable identity of the record. */
|
|
1145
|
+
uri: string;
|
|
1146
|
+
/** Record key, the part a delete request names. */
|
|
1147
|
+
rkey: string;
|
|
1148
|
+
collection: string;
|
|
1149
|
+
label: RepoRecordLabel;
|
|
1150
|
+
/** When the record was written, from its own `createdAt`. Absent if it has none. */
|
|
1151
|
+
createdAt?: string;
|
|
1152
|
+
}
|
|
1153
|
+
/** One bucket of the inventory. Buckets the user has no records in are omitted. */
|
|
1154
|
+
interface RepoCollectionGroup {
|
|
1155
|
+
id: RepoGroupId;
|
|
1156
|
+
/** Collections in this bucket the user actually has records in. */
|
|
1157
|
+
collections: string[];
|
|
1158
|
+
recordCount: number;
|
|
1159
|
+
records: RepoRecordSummary[];
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* What is in the user's repo under id.sifa.*, as their PDS reports it.
|
|
1163
|
+
*
|
|
1164
|
+
* Read from the PDS rather than the AppView. This is the one surface whose
|
|
1165
|
+
* entire purpose is to say what the user owns, so an index that has drifted --
|
|
1166
|
+
* lagging the firehose, or holding records deleted elsewhere -- would be
|
|
1167
|
+
* lying about the thing the page exists to answer.
|
|
1168
|
+
*/
|
|
1169
|
+
interface RepoInventory {
|
|
1170
|
+
did: string;
|
|
1171
|
+
/** When the PDS was read, so a UI can say how fresh this is. */
|
|
1172
|
+
fetchedAt: string;
|
|
1173
|
+
groups: RepoCollectionGroup[];
|
|
1174
|
+
totalRecords: number;
|
|
1175
|
+
/**
|
|
1176
|
+
* Collections found in the repo that could not be listed. Their records are
|
|
1177
|
+
* missing from `groups`, so a UI must not present the inventory as complete.
|
|
1178
|
+
*/
|
|
1179
|
+
unreadableCollections?: string[];
|
|
1180
|
+
}
|
|
1181
|
+
/** What happened to one record in a delete request. */
|
|
1182
|
+
type RepoDeleteOutcome =
|
|
1183
|
+
/** The PDS confirmed the record is gone. */
|
|
1184
|
+
'deleted'
|
|
1185
|
+
/** The delete was attempted and the record is still there. */
|
|
1186
|
+
| 'remaining'
|
|
1187
|
+
/** We could not establish either way. Not the same as `remaining`, and never success. */
|
|
1188
|
+
| 'unknown';
|
|
1189
|
+
interface RepoDeleteRecordResult {
|
|
1190
|
+
rkey: string;
|
|
1191
|
+
outcome: RepoDeleteOutcome;
|
|
1192
|
+
}
|
|
1193
|
+
/**
|
|
1194
|
+
* Result of a delete request.
|
|
1195
|
+
*
|
|
1196
|
+
* Carries no success flag of its own. The transport adds one meaning "the
|
|
1197
|
+
* request was accepted", which is not the same question: a request can be
|
|
1198
|
+
* accepted and still leave four of five records in place. What actually
|
|
1199
|
+
* happened to the data is in `results`, per record, and callers report that.
|
|
1200
|
+
*/
|
|
1201
|
+
interface RepoDeleteResult {
|
|
1202
|
+
collection: string;
|
|
1203
|
+
results: RepoDeleteRecordResult[];
|
|
1204
|
+
/**
|
|
1205
|
+
* Set when the current OAuth grant cannot delete this collection, in which
|
|
1206
|
+
* case nothing was attempted. `scope` is the value to request.
|
|
1207
|
+
*
|
|
1208
|
+
* Present instead of a failure so a UI sends the user to consent rather than
|
|
1209
|
+
* telling them the delete failed for no stated reason.
|
|
1210
|
+
*/
|
|
1211
|
+
needsScopeUpgrade?: {
|
|
1212
|
+
scope: string;
|
|
1213
|
+
collections: string[];
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
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 };
|
package/package.json
CHANGED