@singi-labs/sifa-sdk 0.12.91 → 0.13.0
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.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -1
- package/dist/index.d.ts +29 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/{network-map-GfIVEYpr.d.ts → network-map-CC9Dito-.d.ts} +95 -3
- package/dist/{network-map-y6U7m-hX.d.cts → network-map-D223f7DM.d.cts} +95 -3
- package/dist/{org-ClDqS3CM.d.cts → org-DCHb1xhw.d.cts} +36 -1
- package/dist/{org-GlACA06R.d.ts → org-zMZg_r7v.d.ts} +36 -1
- package/dist/query/fetchers/index.cjs +71 -0
- package/dist/query/fetchers/index.cjs.map +1 -1
- package/dist/query/fetchers/index.d.cts +3 -3
- package/dist/query/fetchers/index.d.ts +3 -3
- package/dist/query/fetchers/index.js +68 -1
- package/dist/query/fetchers/index.js.map +1 -1
- package/dist/query/hooks/index.cjs +33 -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 +33 -1
- package/dist/query/hooks/index.js.map +1 -1
- package/dist/query/index.cjs +80 -0
- package/dist/query/index.cjs.map +1 -1
- package/dist/query/index.d.cts +5 -5
- package/dist/query/index.d.ts +5 -5
- package/dist/query/index.js +76 -1
- package/dist/query/index.js.map +1 -1
- package/dist/{use-org-notification-emails-DGzW9MH6.d.ts → use-org-notification-emails-Bt-h3SAB.d.ts} +9 -2
- package/dist/{use-org-notification-emails-B-oGiDHo.d.cts → use-org-notification-emails-ByAvxb0x.d.cts} +9 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as Profile, d as ProfilePosition, S as SkillRef } from './index-jNyd5QP7.js';
|
|
2
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-
|
|
1
|
+
import { c as Profile, d as ProfilePosition, S as SkillRef, w as PresentationLinkView } from './index-jNyd5QP7.js';
|
|
2
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-zMZg_r7v.js';
|
|
3
3
|
import { n as ProfileView } from './types-8JaS6abh.js';
|
|
4
4
|
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-8fapqzHv.js';
|
|
5
5
|
import { j as EntitySearchResponse, E as EntitySearchResult, d as EntityMintDomainResponse, h as EntityResolveDomainResponse, m as EntitySelectRequest, o as EntitySelectResponse } from './feed-BMm9Pkew.js';
|
|
@@ -237,6 +237,98 @@ declare function revealMarqueDomain(config: SifaApiConfig, domain: string, optio
|
|
|
237
237
|
/** Make a previously-revealed Marque domain owner-only again. */
|
|
238
238
|
declare function unrevealMarqueDomain(config: SifaApiConfig, domain: string, options?: ApiFetchOptions): Promise<WriteResult>;
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Which claim a listed speaker makes about a topic. Phase 1 has no confirmed
|
|
242
|
+
* data, so groups are named by the CLAIM, never a "proven" label:
|
|
243
|
+
* - `spoke_about_it` — has a topic-matching delivery (or, with a topic set,
|
|
244
|
+
* a matching presentation plus at least one delivery)
|
|
245
|
+
* - `skilled` — holds the matching canonical skill but has no matching talk
|
|
246
|
+
* (only appears when a topic is supplied)
|
|
247
|
+
* - `open_to_speaking` — opted in but has never delivered (only appears when
|
|
248
|
+
* no topic is supplied)
|
|
249
|
+
*/
|
|
250
|
+
type SpeakerGroup = 'spoke_about_it' | 'skilled' | 'open_to_speaking';
|
|
251
|
+
/** One person in the speaker directory. Everyone listed has opted in. */
|
|
252
|
+
interface SpeakerCard {
|
|
253
|
+
did: string;
|
|
254
|
+
handle: string;
|
|
255
|
+
displayName: string | null;
|
|
256
|
+
avatar: string | null;
|
|
257
|
+
headline: string | null;
|
|
258
|
+
currentRole: string | null;
|
|
259
|
+
currentCompany: string | null;
|
|
260
|
+
deliveryCount: number;
|
|
261
|
+
group: SpeakerGroup;
|
|
262
|
+
matchedTopics: string[];
|
|
263
|
+
/**
|
|
264
|
+
* Self-reported event names from the speaker's own presentationDelivery
|
|
265
|
+
* records — unconfirmed in Phase 1. `eventsSelfReported` is always true;
|
|
266
|
+
* the web layer labels these as such.
|
|
267
|
+
*/
|
|
268
|
+
recentEvents: string[];
|
|
269
|
+
eventsSelfReported: boolean;
|
|
270
|
+
}
|
|
271
|
+
interface SpeakersResponse {
|
|
272
|
+
speakers: SpeakerCard[];
|
|
273
|
+
}
|
|
274
|
+
/** The reusable talk, or a standalone delivery when it has no parent talk. */
|
|
275
|
+
interface TalkEvent {
|
|
276
|
+
eventName: string | null;
|
|
277
|
+
date: string | null;
|
|
278
|
+
}
|
|
279
|
+
/** Compact speaker card embedded in a talk row. */
|
|
280
|
+
interface TalkSpeaker {
|
|
281
|
+
did: string;
|
|
282
|
+
handle: string;
|
|
283
|
+
displayName: string | null;
|
|
284
|
+
avatar: string | null;
|
|
285
|
+
headline: string | null;
|
|
286
|
+
currentRole: string | null;
|
|
287
|
+
currentCompany: string | null;
|
|
288
|
+
}
|
|
289
|
+
interface TalkRow {
|
|
290
|
+
/**
|
|
291
|
+
* `presentation` = a reusable `id.sifa.profile.presentation` record.
|
|
292
|
+
* `delivery` = a standalone presentationDelivery with no parent presentation.
|
|
293
|
+
*/
|
|
294
|
+
kind: 'presentation' | 'delivery';
|
|
295
|
+
rkey: string;
|
|
296
|
+
title: string | null;
|
|
297
|
+
snippet: string | null;
|
|
298
|
+
links: PresentationLinkView[];
|
|
299
|
+
writeupUri: string | null;
|
|
300
|
+
speaker: TalkSpeaker;
|
|
301
|
+
events: TalkEvent[];
|
|
302
|
+
eventsSelfReported: boolean;
|
|
303
|
+
deliveryCount: number;
|
|
304
|
+
matchedTopics: string[];
|
|
305
|
+
}
|
|
306
|
+
interface TalksResponse {
|
|
307
|
+
talks: TalkRow[];
|
|
308
|
+
}
|
|
309
|
+
interface SpeakerDirectoryFilters {
|
|
310
|
+
/** Free-text topic (canonical skill name/slug/alias, talk title, or event). */
|
|
311
|
+
topic?: string;
|
|
312
|
+
/** Max rows to return; the API caps this at 50. */
|
|
313
|
+
limit?: number;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Speaker directory (Phase 1, read-only POC). Everyone returned has opted in to
|
|
317
|
+
* speaking; past deliveries are a ranking signal, not an inclusion path. An
|
|
318
|
+
* optional `topic` filters to people who hold the matching canonical skill,
|
|
319
|
+
* have a matching presentation, or have a matching delivery. Results come
|
|
320
|
+
* grouped and ordered by the API.
|
|
321
|
+
*
|
|
322
|
+
* Returns an empty list on any error so callers can render a graceful state.
|
|
323
|
+
*/
|
|
324
|
+
declare function fetchSpeakers(config: SifaApiConfig, filters?: SpeakerDirectoryFilters, options?: ApiFetchOptions): Promise<SpeakersResponse>;
|
|
325
|
+
/**
|
|
326
|
+
* Talk directory (Phase 1, read-only POC). Lists talks by opted-in speakers,
|
|
327
|
+
* delivered-first, then latest delivery date. Same optional `topic` filter as
|
|
328
|
+
* {@link fetchSpeakers}. Returns an empty list on any error.
|
|
329
|
+
*/
|
|
330
|
+
declare function fetchTalks(config: SifaApiConfig, filters?: SpeakerDirectoryFilters, options?: ApiFetchOptions): Promise<TalksResponse>;
|
|
331
|
+
|
|
240
332
|
/**
|
|
241
333
|
* Organization typeahead. Returns curated entities first, then the PDL crawl,
|
|
242
334
|
* deduped by domain. Empty input returns an empty result without a network call.
|
|
@@ -391,4 +483,4 @@ declare function checkNetworkMapJobStatus(config: SifaApiConfig, jobId: string,
|
|
|
391
483
|
*/
|
|
392
484
|
declare function fetchNetworkMap(config: SifaApiConfig, options?: ApiFetchOptions): Promise<NetworkMapResponse | null>;
|
|
393
485
|
|
|
394
|
-
export {
|
|
486
|
+
export { unhideKeytraceClaim as $, fetchGetProfileView as A, fetchNetworkMap as B, fetchNetworkStreamCount as C, type DismissEndorsementInput as D, fetchPendingEndorsements as E, type FetchNetworkStreamCountOptions as F, fetchProfile as G, fetchProfileSummary as H, fetchReceivedEndorsements as I, fetchReciprocityCandidate as J, fetchSpeakers as K, fetchTalks as L, hideKeytraceClaim as M, type NetworkMapEdge as N, importSearchEntities as O, type PendingEndorsementsPage as P, initiateNetworkMapGeneration as Q, type ReceivedEndorsementsPage as R, type SpeakerCard as S, type TalkEvent as T, isNetworkMapResponse as U, linkSkillToPosition as V, mintEntityDomain as W, resolveEntityDomain as X, revealMarqueDomain as Y, selectEntity as Z, setPositionPrimary as _, type ReciprocityCandidate as a, unlinkSkillFromPosition as a0, unrevealMarqueDomain as a1, unsetPositionPrimary as a2, updateEducation as a3, updatePosition as a4, updateRecord as a5, type NetworkMapGenerationJob as b, type NetworkMapGraphData as c, type NetworkMapNode as d, type NetworkMapPendingJob as e, type NetworkMapResponse as f, type PendingEndorsement as g, type ReceivedEndorsement as h, type ReciprocitySkill as i, type SpeakerDirectoryFilters as j, type SpeakerGroup as k, type SpeakersResponse as l, type TalkRow as m, type TalkSpeaker as n, type TalksResponse as o, checkNetworkMapJobStatus as p, createEducation as q, createPosition as r, createRecord as s, deleteEducation as t, deletePosition as u, deleteRecord as v, dismissEndorsement as w, fetchAtFundLink as x, fetchEndorsementCount as y, fetchEntitySearch as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as Profile, d as ProfilePosition, S as SkillRef } from './index-jNyd5QP7.cjs';
|
|
2
|
-
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-
|
|
1
|
+
import { c as Profile, d as ProfilePosition, S as SkillRef, w as PresentationLinkView } from './index-jNyd5QP7.cjs';
|
|
2
|
+
import { S as SifaApiConfig, A as ApiFetchOptions, C as CreateResult, W as WriteResult } from './org-DCHb1xhw.cjs';
|
|
3
3
|
import { n as ProfileView } from './types-8wAWvS-T.cjs';
|
|
4
4
|
import { S as SummarizeProfileViewOptions, P as ProfileSummary } from './profile-summary-DY78IoL9.cjs';
|
|
5
5
|
import { j as EntitySearchResponse, E as EntitySearchResult, d as EntityMintDomainResponse, h as EntityResolveDomainResponse, m as EntitySelectRequest, o as EntitySelectResponse } from './feed-BMm9Pkew.cjs';
|
|
@@ -237,6 +237,98 @@ declare function revealMarqueDomain(config: SifaApiConfig, domain: string, optio
|
|
|
237
237
|
/** Make a previously-revealed Marque domain owner-only again. */
|
|
238
238
|
declare function unrevealMarqueDomain(config: SifaApiConfig, domain: string, options?: ApiFetchOptions): Promise<WriteResult>;
|
|
239
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Which claim a listed speaker makes about a topic. Phase 1 has no confirmed
|
|
242
|
+
* data, so groups are named by the CLAIM, never a "proven" label:
|
|
243
|
+
* - `spoke_about_it` — has a topic-matching delivery (or, with a topic set,
|
|
244
|
+
* a matching presentation plus at least one delivery)
|
|
245
|
+
* - `skilled` — holds the matching canonical skill but has no matching talk
|
|
246
|
+
* (only appears when a topic is supplied)
|
|
247
|
+
* - `open_to_speaking` — opted in but has never delivered (only appears when
|
|
248
|
+
* no topic is supplied)
|
|
249
|
+
*/
|
|
250
|
+
type SpeakerGroup = 'spoke_about_it' | 'skilled' | 'open_to_speaking';
|
|
251
|
+
/** One person in the speaker directory. Everyone listed has opted in. */
|
|
252
|
+
interface SpeakerCard {
|
|
253
|
+
did: string;
|
|
254
|
+
handle: string;
|
|
255
|
+
displayName: string | null;
|
|
256
|
+
avatar: string | null;
|
|
257
|
+
headline: string | null;
|
|
258
|
+
currentRole: string | null;
|
|
259
|
+
currentCompany: string | null;
|
|
260
|
+
deliveryCount: number;
|
|
261
|
+
group: SpeakerGroup;
|
|
262
|
+
matchedTopics: string[];
|
|
263
|
+
/**
|
|
264
|
+
* Self-reported event names from the speaker's own presentationDelivery
|
|
265
|
+
* records — unconfirmed in Phase 1. `eventsSelfReported` is always true;
|
|
266
|
+
* the web layer labels these as such.
|
|
267
|
+
*/
|
|
268
|
+
recentEvents: string[];
|
|
269
|
+
eventsSelfReported: boolean;
|
|
270
|
+
}
|
|
271
|
+
interface SpeakersResponse {
|
|
272
|
+
speakers: SpeakerCard[];
|
|
273
|
+
}
|
|
274
|
+
/** The reusable talk, or a standalone delivery when it has no parent talk. */
|
|
275
|
+
interface TalkEvent {
|
|
276
|
+
eventName: string | null;
|
|
277
|
+
date: string | null;
|
|
278
|
+
}
|
|
279
|
+
/** Compact speaker card embedded in a talk row. */
|
|
280
|
+
interface TalkSpeaker {
|
|
281
|
+
did: string;
|
|
282
|
+
handle: string;
|
|
283
|
+
displayName: string | null;
|
|
284
|
+
avatar: string | null;
|
|
285
|
+
headline: string | null;
|
|
286
|
+
currentRole: string | null;
|
|
287
|
+
currentCompany: string | null;
|
|
288
|
+
}
|
|
289
|
+
interface TalkRow {
|
|
290
|
+
/**
|
|
291
|
+
* `presentation` = a reusable `id.sifa.profile.presentation` record.
|
|
292
|
+
* `delivery` = a standalone presentationDelivery with no parent presentation.
|
|
293
|
+
*/
|
|
294
|
+
kind: 'presentation' | 'delivery';
|
|
295
|
+
rkey: string;
|
|
296
|
+
title: string | null;
|
|
297
|
+
snippet: string | null;
|
|
298
|
+
links: PresentationLinkView[];
|
|
299
|
+
writeupUri: string | null;
|
|
300
|
+
speaker: TalkSpeaker;
|
|
301
|
+
events: TalkEvent[];
|
|
302
|
+
eventsSelfReported: boolean;
|
|
303
|
+
deliveryCount: number;
|
|
304
|
+
matchedTopics: string[];
|
|
305
|
+
}
|
|
306
|
+
interface TalksResponse {
|
|
307
|
+
talks: TalkRow[];
|
|
308
|
+
}
|
|
309
|
+
interface SpeakerDirectoryFilters {
|
|
310
|
+
/** Free-text topic (canonical skill name/slug/alias, talk title, or event). */
|
|
311
|
+
topic?: string;
|
|
312
|
+
/** Max rows to return; the API caps this at 50. */
|
|
313
|
+
limit?: number;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Speaker directory (Phase 1, read-only POC). Everyone returned has opted in to
|
|
317
|
+
* speaking; past deliveries are a ranking signal, not an inclusion path. An
|
|
318
|
+
* optional `topic` filters to people who hold the matching canonical skill,
|
|
319
|
+
* have a matching presentation, or have a matching delivery. Results come
|
|
320
|
+
* grouped and ordered by the API.
|
|
321
|
+
*
|
|
322
|
+
* Returns an empty list on any error so callers can render a graceful state.
|
|
323
|
+
*/
|
|
324
|
+
declare function fetchSpeakers(config: SifaApiConfig, filters?: SpeakerDirectoryFilters, options?: ApiFetchOptions): Promise<SpeakersResponse>;
|
|
325
|
+
/**
|
|
326
|
+
* Talk directory (Phase 1, read-only POC). Lists talks by opted-in speakers,
|
|
327
|
+
* delivered-first, then latest delivery date. Same optional `topic` filter as
|
|
328
|
+
* {@link fetchSpeakers}. Returns an empty list on any error.
|
|
329
|
+
*/
|
|
330
|
+
declare function fetchTalks(config: SifaApiConfig, filters?: SpeakerDirectoryFilters, options?: ApiFetchOptions): Promise<TalksResponse>;
|
|
331
|
+
|
|
240
332
|
/**
|
|
241
333
|
* Organization typeahead. Returns curated entities first, then the PDL crawl,
|
|
242
334
|
* deduped by domain. Empty input returns an empty result without a network call.
|
|
@@ -391,4 +483,4 @@ declare function checkNetworkMapJobStatus(config: SifaApiConfig, jobId: string,
|
|
|
391
483
|
*/
|
|
392
484
|
declare function fetchNetworkMap(config: SifaApiConfig, options?: ApiFetchOptions): Promise<NetworkMapResponse | null>;
|
|
393
485
|
|
|
394
|
-
export {
|
|
486
|
+
export { unhideKeytraceClaim as $, fetchGetProfileView as A, fetchNetworkMap as B, fetchNetworkStreamCount as C, type DismissEndorsementInput as D, fetchPendingEndorsements as E, type FetchNetworkStreamCountOptions as F, fetchProfile as G, fetchProfileSummary as H, fetchReceivedEndorsements as I, fetchReciprocityCandidate as J, fetchSpeakers as K, fetchTalks as L, hideKeytraceClaim as M, type NetworkMapEdge as N, importSearchEntities as O, type PendingEndorsementsPage as P, initiateNetworkMapGeneration as Q, type ReceivedEndorsementsPage as R, type SpeakerCard as S, type TalkEvent as T, isNetworkMapResponse as U, linkSkillToPosition as V, mintEntityDomain as W, resolveEntityDomain as X, revealMarqueDomain as Y, selectEntity as Z, setPositionPrimary as _, type ReciprocityCandidate as a, unlinkSkillFromPosition as a0, unrevealMarqueDomain as a1, unsetPositionPrimary as a2, updateEducation as a3, updatePosition as a4, updateRecord as a5, type NetworkMapGenerationJob as b, type NetworkMapGraphData as c, type NetworkMapNode as d, type NetworkMapPendingJob as e, type NetworkMapResponse as f, type PendingEndorsement as g, type ReceivedEndorsement as h, type ReciprocitySkill as i, type SpeakerDirectoryFilters as j, type SpeakerGroup as k, type SpeakersResponse as l, type TalkRow as m, type TalkSpeaker as n, type TalksResponse as o, checkNetworkMapJobStatus as p, createEducation as q, createPosition as r, createRecord as s, deleteEducation as t, deletePosition as u, deleteRecord as v, dismissEndorsement as w, fetchAtFundLink as x, fetchEndorsementCount as y, fetchEntitySearch as z };
|
|
@@ -593,6 +593,37 @@ declare function fetchAppsRegistry(config: SifaApiConfig, options?: ApiFetchOpti
|
|
|
593
593
|
*/
|
|
594
594
|
declare function fetchHiddenApps(config: SifaApiConfig, options?: FetchHiddenAppsOptions): Promise<HiddenApp[]>;
|
|
595
595
|
|
|
596
|
+
/** One account attached to the current browser, for the account switcher. */
|
|
597
|
+
interface AccountSummary {
|
|
598
|
+
did: string;
|
|
599
|
+
handle: string | null;
|
|
600
|
+
displayName: string | null;
|
|
601
|
+
avatarUrl: string | null;
|
|
602
|
+
/** Whether this is the currently-active account. */
|
|
603
|
+
active: boolean;
|
|
604
|
+
}
|
|
605
|
+
interface FetchAccountsOptions extends ApiFetchOptions {
|
|
606
|
+
/**
|
|
607
|
+
* Pass the caller's `Cookie` header on Next.js RSC server-side calls.
|
|
608
|
+
* `credentials: 'include'` does NOT propagate browser cookies in RSC,
|
|
609
|
+
* so authenticated server fetches must forward the header explicitly.
|
|
610
|
+
*/
|
|
611
|
+
cookieHeader?: string;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Accounts attached to this browser (the account switcher). Requires an
|
|
615
|
+
* authenticated session. Returns `[]` on any error, including the
|
|
616
|
+
* unauthenticated case.
|
|
617
|
+
*/
|
|
618
|
+
declare function fetchAccounts(config: SifaApiConfig, options?: FetchAccountsOptions): Promise<AccountSummary[]>;
|
|
619
|
+
/**
|
|
620
|
+
* Make an already-attached account the active one. Keyed by DID (public); the
|
|
621
|
+
* server maps it to the browser's session id. Browser-only: the endpoint
|
|
622
|
+
* requires an Origin header, which browsers set automatically on POST. Callers
|
|
623
|
+
* typically reload the app afterwards to reset session-seeded state.
|
|
624
|
+
*/
|
|
625
|
+
declare function switchAccount(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<void>;
|
|
626
|
+
|
|
596
627
|
/** Profile entry returned by the search endpoint. */
|
|
597
628
|
interface ProfileSearchResult {
|
|
598
629
|
did?: string;
|
|
@@ -1532,6 +1563,10 @@ declare const sifaQueryKeys: {
|
|
|
1532
1563
|
readonly registry: () => readonly ["sifa", "apps", "registry"];
|
|
1533
1564
|
readonly hidden: () => readonly ["sifa", "apps", "hidden"];
|
|
1534
1565
|
};
|
|
1566
|
+
readonly auth: {
|
|
1567
|
+
readonly all: () => readonly ["sifa", "auth"];
|
|
1568
|
+
readonly accounts: () => readonly ["sifa", "auth", "accounts"];
|
|
1569
|
+
};
|
|
1535
1570
|
readonly activity: {
|
|
1536
1571
|
readonly all: () => readonly ["sifa", "activity"];
|
|
1537
1572
|
readonly heatmap: (handleOrDid: string, days: number) => readonly ["sifa", "activity", "heatmap", string, number];
|
|
@@ -1675,4 +1710,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
|
|
|
1675
1710
|
*/
|
|
1676
1711
|
declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
|
|
1677
1712
|
|
|
1678
|
-
export { type
|
|
1713
|
+
export { type HiddenItemType as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchMyGithubPullRequestsOptions as G, type FetchMyRoadmapVotesOptions as H, type FetchReactionStatusOptions as I, type FetchSuggestionsOptions as J, type FilterOptions as K, type FollowListPage as L, type FollowProfile as M, type FollowProfilePageResponse as N, type FollowUserResult as O, type FollowingResponse as P, type GetAdminReviewQueuesOptions as Q, type GithubPullRequest as R, type SifaApiConfig as S, type GivenConfirmation as T, HIDDEN_ITEM_SOURCES as U, HIDDEN_ITEM_TYPES as V, type WriteResult as W, type HeatmapDay as X, type HeatmapResponse as Y, type HiddenApp as Z, type HiddenItemSource as _, type ConfirmEndorsementInput as a, confirmEndorsement as a$, type HideProfileItemInput as a0, type ListFeatureAllowlistOptions as a1, type MyGithubPullRequestsResponse as a2, type OrgClaimBinding as a3, type OrgClaimResult as a4, type OrgDomainChallengeResult as a5, type OrgDomainVerifyResult as a6, type OrgNotificationEmailAddResult as a7, type OrgNotificationEmailRemoveResult as a8, type OrgProfileEcho as a9, type SearchFilters as aA, type SearchResponse as aB, type SifaQueryKey as aC, type SimilarProfile as aD, type SkillSearchResult as aE, type StatsResponse as aF, type SubCategoryBulkResult as aG, type SuggestionProfile as aH, type SuggestionsResponse as aI, type UpdateProfileOverrideInput as aJ, type UpdateProfileSelfInput as aK, type UploadAvatarResult as aL, type UploadPronunciationAudioResult as aM, type VerifyExternalAccountResult as aN, type WipePreview as aO, addFeatureAllowlist as aP, addOrgNotificationEmail as aQ, apiFetch as aR, apiFetchOrNull as aS, apiWrite as aT, apiWriteCreate as aU, bulkHideProfileItems as aV, bulkHideStandardPublications as aW, bulkUnhideProfileItems as aX, bulkUnhideStandardPublications as aY, castRoadmapVote as aZ, checkAppAccount as a_, type OrgProfileUpdateResult as aa, type PdsWipeOutcome as ab, type PendingConfirmation as ac, type PendingConfirmationsPage as ad, type ProfileIndustryInput as ae, type ProfileLocationAddress as af, type ProfileLocationInput as ag, type ProfileSearchResult as ah, type ProfileSelfLocation as ai, QUOTED_POSTS_BATCH_MAX as aj, type QuotedPostAuthor as ak, type QuotedPostImage as al, type QuotedPostResult as am, type QuotedPostView as an, type ReactionError as ao, type ReactionResult as ap, type ReactionStatus as aq, type RefreshOrcidPublicationsResult as ar, type RefreshPdsResult as as, type RepoDeleteInput as at, type ResetProfileResult as au, type ResolveQuotedPostsOptions as av, type RoadmapVoteError as aw, type RoadmapVoteResult as ax, type RoadmapVoter as ay, type RoadmapVotesResponse as az, type ConfirmEndorsementResult as b, submitOrgClaim as b$, createConfirmation as b0, createEndorsement as b1, createExternalAccount as b2, createProfileLocation as b3, createReaction as b4, createSkill as b5, deleteAccount as b6, deleteAvatarOverride as b7, deleteExternalAccount as b8, deleteNamePronunciationAudio as b9, fetchSuggestionCount as bA, fetchSuggestions as bB, fetchWipePreview as bC, followUser as bD, getAdminReviewQueues as bE, getBlueskySuggestions as bF, getFollowers as bG, getFollowing as bH, getFollowingFeed as bI, getMutuals as bJ, hideOrcidPublication as bK, hideProfileItem as bL, hideSifaPublication as bM, hideStandardPublication as bN, listFeatureAllowlist as bO, refreshOrcidPublications as bP, refreshPds as bQ, removeFeatureAllowlist as bR, removeOrgNotificationEmail as bS, repoExportUrl as bT, requestOrgDomainChallenge as bU, resetProfile as bV, resolveQuotedPosts as bW, retractRoadmapVote as bX, revokeConfirmation as bY, searchSkills as bZ, setExternalAccountPrimary as b_, deleteProfileLocation as ba, deleteReaction as bb, deleteRepoRecords as bc, deleteSkill as bd, dismissConfirmation as be, fetchAccounts as bf, fetchActivityFeed as bg, fetchActivityTeaser as bh, fetchAppsRegistry as bi, fetchExternalAccounts as bj, fetchFeaturedProfile as bk, fetchFollowing as bl, fetchGivenConfirmations as bm, fetchHeatmapData as bn, fetchHiddenApps as bo, fetchMyGithubPullRequests as bp, fetchMyRoadmapVotes as bq, fetchPendingConfirmations as br, fetchReactionStatus as bs, fetchRepoInventory as bt, fetchRoadmapVotes as bu, fetchSearchFilters as bv, fetchSearchProfiles as bw, fetchSimilarProfiles as bx, fetchSkillSuggestions as by, fetchStats as bz, type AccountCheckResult as c, switchAccount as c0, unfollowUser as c1, unhideOrcidPublication as c2, unhideProfileItem as c3, unhideSifaPublication as c4, unhideStandardPublication as c5, unsetExternalAccountPrimary as c6, updateExternalAccount as c7, updateOrgProfile as c8, updateProfileLocation as c9, updateProfileOverride as ca, updateProfileSelf as cb, updateSkill as cc, updateSkillSubCategories as cd, uploadAvatar as ce, uploadNamePronunciationAudio as cf, verifyExternalAccount as cg, verifyOrgDomain as ch, type CompanySearchFilters as ci, type CompanySearchResponse as cj, type CompanySearchResult as ck, fetchSearchCompanies as cl, type AccountSummary as d, type ActivityFeedResponse as e, type ActivityItem as f, type ActivityItemLinkHealth as g, type ActivityTeaserResponse as h, type AdminReviewQueues as i, ApiError as j, type AppRegistryEntry as k, type CastRoadmapVoteResult as l, type CheckAppAccountOptions as m, type ConfirmationInput as n, type ConfirmationSubjectInput as o, type CreateExternalAccountResult as p, type ExternalAccountInput as q, type FeaturedProfile as r, sifaQueryKeys as s, type FetchAccountsOptions as t, type FetchActivityFeedOptions as u, type FetchActivityTeaserOptions as v, type FetchFollowListOptions as w, type FetchFollowProfilePageOptions as x, type FetchFollowingFeedOptions as y, type FetchHiddenAppsOptions as z };
|
|
@@ -593,6 +593,37 @@ declare function fetchAppsRegistry(config: SifaApiConfig, options?: ApiFetchOpti
|
|
|
593
593
|
*/
|
|
594
594
|
declare function fetchHiddenApps(config: SifaApiConfig, options?: FetchHiddenAppsOptions): Promise<HiddenApp[]>;
|
|
595
595
|
|
|
596
|
+
/** One account attached to the current browser, for the account switcher. */
|
|
597
|
+
interface AccountSummary {
|
|
598
|
+
did: string;
|
|
599
|
+
handle: string | null;
|
|
600
|
+
displayName: string | null;
|
|
601
|
+
avatarUrl: string | null;
|
|
602
|
+
/** Whether this is the currently-active account. */
|
|
603
|
+
active: boolean;
|
|
604
|
+
}
|
|
605
|
+
interface FetchAccountsOptions extends ApiFetchOptions {
|
|
606
|
+
/**
|
|
607
|
+
* Pass the caller's `Cookie` header on Next.js RSC server-side calls.
|
|
608
|
+
* `credentials: 'include'` does NOT propagate browser cookies in RSC,
|
|
609
|
+
* so authenticated server fetches must forward the header explicitly.
|
|
610
|
+
*/
|
|
611
|
+
cookieHeader?: string;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Accounts attached to this browser (the account switcher). Requires an
|
|
615
|
+
* authenticated session. Returns `[]` on any error, including the
|
|
616
|
+
* unauthenticated case.
|
|
617
|
+
*/
|
|
618
|
+
declare function fetchAccounts(config: SifaApiConfig, options?: FetchAccountsOptions): Promise<AccountSummary[]>;
|
|
619
|
+
/**
|
|
620
|
+
* Make an already-attached account the active one. Keyed by DID (public); the
|
|
621
|
+
* server maps it to the browser's session id. Browser-only: the endpoint
|
|
622
|
+
* requires an Origin header, which browsers set automatically on POST. Callers
|
|
623
|
+
* typically reload the app afterwards to reset session-seeded state.
|
|
624
|
+
*/
|
|
625
|
+
declare function switchAccount(config: SifaApiConfig, did: string, options?: ApiFetchOptions): Promise<void>;
|
|
626
|
+
|
|
596
627
|
/** Profile entry returned by the search endpoint. */
|
|
597
628
|
interface ProfileSearchResult {
|
|
598
629
|
did?: string;
|
|
@@ -1532,6 +1563,10 @@ declare const sifaQueryKeys: {
|
|
|
1532
1563
|
readonly registry: () => readonly ["sifa", "apps", "registry"];
|
|
1533
1564
|
readonly hidden: () => readonly ["sifa", "apps", "hidden"];
|
|
1534
1565
|
};
|
|
1566
|
+
readonly auth: {
|
|
1567
|
+
readonly all: () => readonly ["sifa", "auth"];
|
|
1568
|
+
readonly accounts: () => readonly ["sifa", "auth", "accounts"];
|
|
1569
|
+
};
|
|
1535
1570
|
readonly activity: {
|
|
1536
1571
|
readonly all: () => readonly ["sifa", "activity"];
|
|
1537
1572
|
readonly heatmap: (handleOrDid: string, days: number) => readonly ["sifa", "activity", "heatmap", string, number];
|
|
@@ -1675,4 +1710,4 @@ declare function addOrgNotificationEmail(config: SifaApiConfig, body: OrgNotific
|
|
|
1675
1710
|
*/
|
|
1676
1711
|
declare function removeOrgNotificationEmail(config: SifaApiConfig, body: OrgNotificationEmailRequestInput, options?: Omit<ApiFetchOptions, 'method' | 'body'>): Promise<WriteResult & Partial<OrgNotificationEmailRemoveResult>>;
|
|
1677
1712
|
|
|
1678
|
-
export { type
|
|
1713
|
+
export { type HiddenItemType as $, type ApiFetchOptions as A, type BulkHideProfileItemInput as B, type CreateResult as C, type DeleteAccountResult as D, type EndorsementInput as E, type FeatureAllowlistResponse as F, type FetchMyGithubPullRequestsOptions as G, type FetchMyRoadmapVotesOptions as H, type FetchReactionStatusOptions as I, type FetchSuggestionsOptions as J, type FilterOptions as K, type FollowListPage as L, type FollowProfile as M, type FollowProfilePageResponse as N, type FollowUserResult as O, type FollowingResponse as P, type GetAdminReviewQueuesOptions as Q, type GithubPullRequest as R, type SifaApiConfig as S, type GivenConfirmation as T, HIDDEN_ITEM_SOURCES as U, HIDDEN_ITEM_TYPES as V, type WriteResult as W, type HeatmapDay as X, type HeatmapResponse as Y, type HiddenApp as Z, type HiddenItemSource as _, type ConfirmEndorsementInput as a, confirmEndorsement as a$, type HideProfileItemInput as a0, type ListFeatureAllowlistOptions as a1, type MyGithubPullRequestsResponse as a2, type OrgClaimBinding as a3, type OrgClaimResult as a4, type OrgDomainChallengeResult as a5, type OrgDomainVerifyResult as a6, type OrgNotificationEmailAddResult as a7, type OrgNotificationEmailRemoveResult as a8, type OrgProfileEcho as a9, type SearchFilters as aA, type SearchResponse as aB, type SifaQueryKey as aC, type SimilarProfile as aD, type SkillSearchResult as aE, type StatsResponse as aF, type SubCategoryBulkResult as aG, type SuggestionProfile as aH, type SuggestionsResponse as aI, type UpdateProfileOverrideInput as aJ, type UpdateProfileSelfInput as aK, type UploadAvatarResult as aL, type UploadPronunciationAudioResult as aM, type VerifyExternalAccountResult as aN, type WipePreview as aO, addFeatureAllowlist as aP, addOrgNotificationEmail as aQ, apiFetch as aR, apiFetchOrNull as aS, apiWrite as aT, apiWriteCreate as aU, bulkHideProfileItems as aV, bulkHideStandardPublications as aW, bulkUnhideProfileItems as aX, bulkUnhideStandardPublications as aY, castRoadmapVote as aZ, checkAppAccount as a_, type OrgProfileUpdateResult as aa, type PdsWipeOutcome as ab, type PendingConfirmation as ac, type PendingConfirmationsPage as ad, type ProfileIndustryInput as ae, type ProfileLocationAddress as af, type ProfileLocationInput as ag, type ProfileSearchResult as ah, type ProfileSelfLocation as ai, QUOTED_POSTS_BATCH_MAX as aj, type QuotedPostAuthor as ak, type QuotedPostImage as al, type QuotedPostResult as am, type QuotedPostView as an, type ReactionError as ao, type ReactionResult as ap, type ReactionStatus as aq, type RefreshOrcidPublicationsResult as ar, type RefreshPdsResult as as, type RepoDeleteInput as at, type ResetProfileResult as au, type ResolveQuotedPostsOptions as av, type RoadmapVoteError as aw, type RoadmapVoteResult as ax, type RoadmapVoter as ay, type RoadmapVotesResponse as az, type ConfirmEndorsementResult as b, submitOrgClaim as b$, createConfirmation as b0, createEndorsement as b1, createExternalAccount as b2, createProfileLocation as b3, createReaction as b4, createSkill as b5, deleteAccount as b6, deleteAvatarOverride as b7, deleteExternalAccount as b8, deleteNamePronunciationAudio as b9, fetchSuggestionCount as bA, fetchSuggestions as bB, fetchWipePreview as bC, followUser as bD, getAdminReviewQueues as bE, getBlueskySuggestions as bF, getFollowers as bG, getFollowing as bH, getFollowingFeed as bI, getMutuals as bJ, hideOrcidPublication as bK, hideProfileItem as bL, hideSifaPublication as bM, hideStandardPublication as bN, listFeatureAllowlist as bO, refreshOrcidPublications as bP, refreshPds as bQ, removeFeatureAllowlist as bR, removeOrgNotificationEmail as bS, repoExportUrl as bT, requestOrgDomainChallenge as bU, resetProfile as bV, resolveQuotedPosts as bW, retractRoadmapVote as bX, revokeConfirmation as bY, searchSkills as bZ, setExternalAccountPrimary as b_, deleteProfileLocation as ba, deleteReaction as bb, deleteRepoRecords as bc, deleteSkill as bd, dismissConfirmation as be, fetchAccounts as bf, fetchActivityFeed as bg, fetchActivityTeaser as bh, fetchAppsRegistry as bi, fetchExternalAccounts as bj, fetchFeaturedProfile as bk, fetchFollowing as bl, fetchGivenConfirmations as bm, fetchHeatmapData as bn, fetchHiddenApps as bo, fetchMyGithubPullRequests as bp, fetchMyRoadmapVotes as bq, fetchPendingConfirmations as br, fetchReactionStatus as bs, fetchRepoInventory as bt, fetchRoadmapVotes as bu, fetchSearchFilters as bv, fetchSearchProfiles as bw, fetchSimilarProfiles as bx, fetchSkillSuggestions as by, fetchStats as bz, type AccountCheckResult as c, switchAccount as c0, unfollowUser as c1, unhideOrcidPublication as c2, unhideProfileItem as c3, unhideSifaPublication as c4, unhideStandardPublication as c5, unsetExternalAccountPrimary as c6, updateExternalAccount as c7, updateOrgProfile as c8, updateProfileLocation as c9, updateProfileOverride as ca, updateProfileSelf as cb, updateSkill as cc, updateSkillSubCategories as cd, uploadAvatar as ce, uploadNamePronunciationAudio as cf, verifyExternalAccount as cg, verifyOrgDomain as ch, type CompanySearchFilters as ci, type CompanySearchResponse as cj, type CompanySearchResult as ck, fetchSearchCompanies as cl, type AccountSummary as d, type ActivityFeedResponse as e, type ActivityItem as f, type ActivityItemLinkHealth as g, type ActivityTeaserResponse as h, type AdminReviewQueues as i, ApiError as j, type AppRegistryEntry as k, type CastRoadmapVoteResult as l, type CheckAppAccountOptions as m, type ConfirmationInput as n, type ConfirmationSubjectInput as o, type CreateExternalAccountResult as p, type ExternalAccountInput as q, type FeaturedProfile as r, sifaQueryKeys as s, type FetchAccountsOptions as t, type FetchActivityFeedOptions as u, type FetchActivityTeaserOptions as v, type FetchFollowListOptions as w, type FetchFollowProfilePageOptions as x, type FetchFollowingFeedOptions as y, type FetchHiddenAppsOptions as z };
|
|
@@ -661,6 +661,30 @@ async function fetchHiddenApps(config, options = {}) {
|
|
|
661
661
|
}
|
|
662
662
|
}
|
|
663
663
|
|
|
664
|
+
// src/query/fetchers/accounts.ts
|
|
665
|
+
async function fetchAccounts(config, options = {}) {
|
|
666
|
+
const headers = { ...options.headers ?? {} };
|
|
667
|
+
if (options.cookieHeader) headers.cookie = options.cookieHeader;
|
|
668
|
+
try {
|
|
669
|
+
const data = await apiFetch(config, "/api/auth/accounts", {
|
|
670
|
+
credentials: "include",
|
|
671
|
+
...options,
|
|
672
|
+
headers
|
|
673
|
+
});
|
|
674
|
+
return data.accounts;
|
|
675
|
+
} catch {
|
|
676
|
+
return [];
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
async function switchAccount(config, did, options = {}) {
|
|
680
|
+
await apiFetch(config, "/oauth/switch", {
|
|
681
|
+
method: "POST",
|
|
682
|
+
body: { did },
|
|
683
|
+
credentials: "include",
|
|
684
|
+
...options
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
|
|
664
688
|
// src/query/fetchers/search.ts
|
|
665
689
|
var EMPTY_SEARCH = { profiles: [], total: 0, limit: 20, offset: 0 };
|
|
666
690
|
var EMPTY_FILTERS = { countries: [], industries: [], apps: [], openTo: [] };
|
|
@@ -731,6 +755,43 @@ async function searchSkills(config, query, limit = 10, options = {}) {
|
|
|
731
755
|
}
|
|
732
756
|
}
|
|
733
757
|
|
|
758
|
+
// src/query/fetchers/speakers.ts
|
|
759
|
+
var EMPTY_SPEAKERS = { speakers: [] };
|
|
760
|
+
var EMPTY_TALKS = { talks: [] };
|
|
761
|
+
function buildParams(filters) {
|
|
762
|
+
const params = new URLSearchParams();
|
|
763
|
+
const topic = filters.topic?.trim();
|
|
764
|
+
if (topic) params.set("topic", topic);
|
|
765
|
+
if (filters.limit !== void 0) params.set("limit", String(filters.limit));
|
|
766
|
+
return params;
|
|
767
|
+
}
|
|
768
|
+
async function fetchSpeakers(config, filters = {}, options = {}) {
|
|
769
|
+
const params = buildParams(filters);
|
|
770
|
+
const query = params.toString();
|
|
771
|
+
const path = query ? `/api/speakers?${query}` : "/api/speakers";
|
|
772
|
+
try {
|
|
773
|
+
return await apiFetch(config, path, {
|
|
774
|
+
cache: "no-store",
|
|
775
|
+
...options
|
|
776
|
+
});
|
|
777
|
+
} catch {
|
|
778
|
+
return EMPTY_SPEAKERS;
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
async function fetchTalks(config, filters = {}, options = {}) {
|
|
782
|
+
const params = buildParams(filters);
|
|
783
|
+
const query = params.toString();
|
|
784
|
+
const path = query ? `/api/talks?${query}` : "/api/talks";
|
|
785
|
+
try {
|
|
786
|
+
return await apiFetch(config, path, {
|
|
787
|
+
cache: "no-store",
|
|
788
|
+
...options
|
|
789
|
+
});
|
|
790
|
+
} catch {
|
|
791
|
+
return EMPTY_TALKS;
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
734
795
|
// src/query/fetchers/discovery.ts
|
|
735
796
|
async function fetchSimilarProfiles(config, did, opts = {}) {
|
|
736
797
|
const limit = opts.limit ?? 5;
|
|
@@ -1572,6 +1633,12 @@ var sifaQueryKeys = {
|
|
|
1572
1633
|
registry: () => ["sifa", "apps", "registry"],
|
|
1573
1634
|
hidden: () => ["sifa", "apps", "hidden"]
|
|
1574
1635
|
},
|
|
1636
|
+
auth: {
|
|
1637
|
+
all: () => ["sifa", "auth"],
|
|
1638
|
+
// Session-scoped: the AppView reads the account list from the browser's
|
|
1639
|
+
// cookies, so there is only ever one list per client.
|
|
1640
|
+
accounts: () => ["sifa", "auth", "accounts"]
|
|
1641
|
+
},
|
|
1575
1642
|
activity: {
|
|
1576
1643
|
all: () => ["sifa", "activity"],
|
|
1577
1644
|
heatmap: (handleOrDid, days) => ["sifa", "activity", "heatmap", handleOrDid, days],
|
|
@@ -1807,6 +1874,7 @@ exports.deleteRepoRecords = deleteRepoRecords;
|
|
|
1807
1874
|
exports.deleteSkill = deleteSkill;
|
|
1808
1875
|
exports.dismissConfirmation = dismissConfirmation;
|
|
1809
1876
|
exports.dismissEndorsement = dismissEndorsement;
|
|
1877
|
+
exports.fetchAccounts = fetchAccounts;
|
|
1810
1878
|
exports.fetchActivityFeed = fetchActivityFeed;
|
|
1811
1879
|
exports.fetchActivityTeaser = fetchActivityTeaser;
|
|
1812
1880
|
exports.fetchAppsRegistry = fetchAppsRegistry;
|
|
@@ -1838,9 +1906,11 @@ exports.fetchSearchFilters = fetchSearchFilters;
|
|
|
1838
1906
|
exports.fetchSearchProfiles = fetchSearchProfiles;
|
|
1839
1907
|
exports.fetchSimilarProfiles = fetchSimilarProfiles;
|
|
1840
1908
|
exports.fetchSkillSuggestions = fetchSkillSuggestions;
|
|
1909
|
+
exports.fetchSpeakers = fetchSpeakers;
|
|
1841
1910
|
exports.fetchStats = fetchStats;
|
|
1842
1911
|
exports.fetchSuggestionCount = fetchSuggestionCount;
|
|
1843
1912
|
exports.fetchSuggestions = fetchSuggestions;
|
|
1913
|
+
exports.fetchTalks = fetchTalks;
|
|
1844
1914
|
exports.fetchWipePreview = fetchWipePreview;
|
|
1845
1915
|
exports.followUser = followUser;
|
|
1846
1916
|
exports.getAdminReviewQueues = getAdminReviewQueues;
|
|
@@ -1876,6 +1946,7 @@ exports.setExternalAccountPrimary = setExternalAccountPrimary;
|
|
|
1876
1946
|
exports.setPositionPrimary = setPositionPrimary;
|
|
1877
1947
|
exports.sifaQueryKeys = sifaQueryKeys;
|
|
1878
1948
|
exports.submitOrgClaim = submitOrgClaim;
|
|
1949
|
+
exports.switchAccount = switchAccount;
|
|
1879
1950
|
exports.unfollowUser = unfollowUser;
|
|
1880
1951
|
exports.unhideKeytraceClaim = unhideKeytraceClaim;
|
|
1881
1952
|
exports.unhideOrcidPublication = unhideOrcidPublication;
|