@singi-labs/sifa-sdk 0.18.22 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/dist/badge/index.cjs.map +1 -1
  2. package/dist/badge/index.js.map +1 -1
  3. package/dist/{feed-BMm9Pkew.d.cts → follow-profile-D1l6pulB.d.cts} +1 -190
  4. package/dist/{feed-BMm9Pkew.d.ts → follow-profile-D1l6pulB.d.ts} +1 -190
  5. package/dist/index.cjs +15 -1
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/index.d.cts +4 -4
  8. package/dist/index.d.ts +4 -4
  9. package/dist/index.js +15 -1
  10. package/dist/index.js.map +1 -1
  11. package/dist/{network-map-Dupds9nG.d.cts → network-map-BjHSH04a.d.cts} +2 -2
  12. package/dist/{network-map-Cwef6yhK.d.ts → network-map-C8-QWKFg.d.ts} +2 -2
  13. package/dist/{org-DgC4pecF.d.cts → org-DWQqPz9B.d.cts} +199 -192
  14. package/dist/{org-DC_71Ojb.d.ts → org-DsqCQ1bV.d.ts} +199 -192
  15. package/dist/{org-settings-CZ_tmAYl.d.cts → org-settings-BndD0dMQ.d.cts} +19 -0
  16. package/dist/{org-settings-CZ_tmAYl.d.ts → org-settings-BndD0dMQ.d.ts} +19 -0
  17. package/dist/{profile-investment-Bvulg_jG.d.cts → profile-investment-DSTOEvG-.d.cts} +196 -1
  18. package/dist/{profile-investment-Bvulg_jG.d.ts → profile-investment-DSTOEvG-.d.ts} +196 -1
  19. package/dist/query/fetchers/index.cjs +9 -9
  20. package/dist/query/fetchers/index.cjs.map +1 -1
  21. package/dist/query/fetchers/index.d.cts +5 -5
  22. package/dist/query/fetchers/index.d.ts +5 -5
  23. package/dist/query/fetchers/index.js +9 -9
  24. package/dist/query/fetchers/index.js.map +1 -1
  25. package/dist/query/hooks/index.cjs +11 -17
  26. package/dist/query/hooks/index.cjs.map +1 -1
  27. package/dist/query/hooks/index.d.cts +5 -5
  28. package/dist/query/hooks/index.d.ts +5 -5
  29. package/dist/query/hooks/index.js +11 -17
  30. package/dist/query/hooks/index.js.map +1 -1
  31. package/dist/query/index.cjs +12 -18
  32. package/dist/query/index.cjs.map +1 -1
  33. package/dist/query/index.d.cts +7 -7
  34. package/dist/query/index.d.ts +7 -7
  35. package/dist/query/index.js +12 -18
  36. package/dist/query/index.js.map +1 -1
  37. package/dist/schemas/index.cjs +14 -0
  38. package/dist/schemas/index.cjs.map +1 -1
  39. package/dist/schemas/index.d.cts +2 -2
  40. package/dist/schemas/index.d.ts +2 -2
  41. package/dist/schemas/index.js +14 -0
  42. package/dist/schemas/index.js.map +1 -1
  43. package/dist/schemas/write/index.cjs +77 -9
  44. package/dist/schemas/write/index.cjs.map +1 -1
  45. package/dist/schemas/write/index.d.cts +7 -1
  46. package/dist/schemas/write/index.d.ts +7 -1
  47. package/dist/schemas/write/index.js +77 -9
  48. package/dist/schemas/write/index.js.map +1 -1
  49. package/dist/{use-org-notification-emails-ZmOjvMh0.d.cts → use-org-notification-emails-CjllYpUI.d.cts} +27 -41
  50. package/dist/{use-org-notification-emails-CHU0JhlL.d.ts → use-org-notification-emails-DqwmoDre.d.ts} +27 -41
  51. package/package.json +1 -1
@@ -131,6 +131,12 @@ declare const OrgProfileRecordSchema: z.ZodObject<{
131
131
  name: z.ZodString;
132
132
  url: z.ZodString;
133
133
  }, z.core.$strip>>>;
134
+ industries: z.ZodOptional<z.ZodArray<z.ZodObject<{
135
+ industry: z.ZodString;
136
+ domain: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strip>>>;
138
+ founded: z.ZodOptional<z.ZodString>;
139
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
134
140
  personalProfileVisible: z.ZodOptional<z.ZodBoolean>;
135
141
  labels: z.ZodOptional<z.ZodObject<{
136
142
  $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
@@ -216,6 +222,195 @@ declare function makeGraphFollowRecordSchema(followerDid: string): z.ZodObject<{
216
222
  note: z.ZodOptional<z.ZodString>;
217
223
  }, z.core.$strip>;
218
224
 
225
+ /**
226
+ * Feed item from `GET /api/following/feed`. Discriminated on `source`:
227
+ *
228
+ * - `sifa`: a Sifa-native event (e.g. profile update, endorsement).
229
+ * - `atmosphere`: a curated creation event from another ATproto app
230
+ * (Barazo post, etc.). Payload is the hydrated `app.bsky.embed.*#view`
231
+ * shape, NOT the raw record (per memory `sifa-hydrated-view-embed-types`).
232
+ *
233
+ * Both variants share `actor`, `indexedAt`, and `id` (the materialized
234
+ * `feed_events.id` row identifier, used in the cursor).
235
+ */
236
+ declare const FeedActorSchema: z.ZodObject<{
237
+ did: z.ZodString;
238
+ handle: z.ZodString;
239
+ displayName: z.ZodOptional<z.ZodString>;
240
+ avatarUrl: z.ZodOptional<z.ZodString>;
241
+ }, z.core.$strip>;
242
+ type FeedActor = z.infer<typeof FeedActorSchema>;
243
+ /**
244
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
245
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
246
+ * Stream are two distinct surfaces with different data paths (Barazo API
247
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
248
+ * types are no longer consumed. Scheduled for removal in next major bump.
249
+ */
250
+ declare const SifaFeedItemSchema: z.ZodObject<{
251
+ id: z.ZodString;
252
+ actor: z.ZodObject<{
253
+ did: z.ZodString;
254
+ handle: z.ZodString;
255
+ displayName: z.ZodOptional<z.ZodString>;
256
+ avatarUrl: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>;
258
+ indexedAt: z.ZodString;
259
+ eventType: z.ZodString;
260
+ source: z.ZodLiteral<"sifa">;
261
+ appId: z.ZodOptional<z.ZodLiteral<"sifa">>;
262
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
263
+ }, z.core.$strip>;
264
+ /**
265
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
266
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
267
+ * Stream are two distinct surfaces with different data paths (Barazo API
268
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
269
+ * types are no longer consumed. Scheduled for removal in next major bump.
270
+ */
271
+ type SifaFeedItem = z.infer<typeof SifaFeedItemSchema>;
272
+ /**
273
+ * ATmosphere feed item. `payload` is intentionally permissive: it carries
274
+ * a hydrated `app.bsky.embed.*#view` shape that varies by source app. The
275
+ * AppView resolves the hydration; clients render via the existing
276
+ * embed-view union (mirrors `sifa-web/src/components/stream/`).
277
+ *
278
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
279
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
280
+ * Stream are two distinct surfaces with different data paths (Barazo API
281
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
282
+ * types are no longer consumed. Scheduled for removal in next major bump.
283
+ */
284
+ declare const AtmosphereFeedItemSchema: z.ZodObject<{
285
+ id: z.ZodString;
286
+ actor: z.ZodObject<{
287
+ did: z.ZodString;
288
+ handle: z.ZodString;
289
+ displayName: z.ZodOptional<z.ZodString>;
290
+ avatarUrl: z.ZodOptional<z.ZodString>;
291
+ }, z.core.$strip>;
292
+ indexedAt: z.ZodString;
293
+ eventType: z.ZodString;
294
+ source: z.ZodLiteral<"atmosphere">;
295
+ appId: z.ZodString;
296
+ uri: z.ZodOptional<z.ZodString>;
297
+ cid: z.ZodOptional<z.ZodString>;
298
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
299
+ }, z.core.$strip>;
300
+ /**
301
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
302
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
303
+ * Stream are two distinct surfaces with different data paths (Barazo API
304
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
305
+ * types are no longer consumed. Scheduled for removal in next major bump.
306
+ */
307
+ type AtmosphereFeedItem = z.infer<typeof AtmosphereFeedItemSchema>;
308
+ /**
309
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
310
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
311
+ * Stream are two distinct surfaces with different data paths (Barazo API
312
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
313
+ * types are no longer consumed. Scheduled for removal in next major bump.
314
+ */
315
+ declare const FollowFeedItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
316
+ id: z.ZodString;
317
+ actor: z.ZodObject<{
318
+ did: z.ZodString;
319
+ handle: z.ZodString;
320
+ displayName: z.ZodOptional<z.ZodString>;
321
+ avatarUrl: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strip>;
323
+ indexedAt: z.ZodString;
324
+ eventType: z.ZodString;
325
+ source: z.ZodLiteral<"sifa">;
326
+ appId: z.ZodOptional<z.ZodLiteral<"sifa">>;
327
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
328
+ }, z.core.$strip>, z.ZodObject<{
329
+ id: z.ZodString;
330
+ actor: z.ZodObject<{
331
+ did: z.ZodString;
332
+ handle: z.ZodString;
333
+ displayName: z.ZodOptional<z.ZodString>;
334
+ avatarUrl: z.ZodOptional<z.ZodString>;
335
+ }, z.core.$strip>;
336
+ indexedAt: z.ZodString;
337
+ eventType: z.ZodString;
338
+ source: z.ZodLiteral<"atmosphere">;
339
+ appId: z.ZodString;
340
+ uri: z.ZodOptional<z.ZodString>;
341
+ cid: z.ZodOptional<z.ZodString>;
342
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
343
+ }, z.core.$strip>], "source">;
344
+ /**
345
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
346
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
347
+ * Stream are two distinct surfaces with different data paths (Barazo API
348
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
349
+ * types are no longer consumed. Scheduled for removal in next major bump.
350
+ */
351
+ type FollowFeedItem = z.infer<typeof FollowFeedItemSchema>;
352
+ /**
353
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
354
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
355
+ * Stream are two distinct surfaces with different data paths (Barazo API
356
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
357
+ * types are no longer consumed. Scheduled for removal in next major bump.
358
+ */
359
+ declare const FollowFeedPageSchema: z.ZodObject<{
360
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
361
+ id: z.ZodString;
362
+ actor: z.ZodObject<{
363
+ did: z.ZodString;
364
+ handle: z.ZodString;
365
+ displayName: z.ZodOptional<z.ZodString>;
366
+ avatarUrl: z.ZodOptional<z.ZodString>;
367
+ }, z.core.$strip>;
368
+ indexedAt: z.ZodString;
369
+ eventType: z.ZodString;
370
+ source: z.ZodLiteral<"sifa">;
371
+ appId: z.ZodOptional<z.ZodLiteral<"sifa">>;
372
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
373
+ }, z.core.$strip>, z.ZodObject<{
374
+ id: z.ZodString;
375
+ actor: z.ZodObject<{
376
+ did: z.ZodString;
377
+ handle: z.ZodString;
378
+ displayName: z.ZodOptional<z.ZodString>;
379
+ avatarUrl: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strip>;
381
+ indexedAt: z.ZodString;
382
+ eventType: z.ZodString;
383
+ source: z.ZodLiteral<"atmosphere">;
384
+ appId: z.ZodString;
385
+ uri: z.ZodOptional<z.ZodString>;
386
+ cid: z.ZodOptional<z.ZodString>;
387
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
388
+ }, z.core.$strip>], "source">>;
389
+ cursor: z.ZodNullable<z.ZodString>;
390
+ }, z.core.$strip>;
391
+ /**
392
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
393
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
394
+ * Stream are two distinct surfaces with different data paths (Barazo API
395
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
396
+ * types are no longer consumed. Scheduled for removal in next major bump.
397
+ */
398
+ type FollowFeedPage = z.infer<typeof FollowFeedPageSchema>;
399
+ /**
400
+ * Composite feed cursor `(indexedAt DESC, source, id)`. Encoded as a
401
+ * URL-safe base64 string so it survives `URLSearchParams` round-trips
402
+ * without further encoding. Decoupling encode/decode from the API call
403
+ * lets consumers persist cursors (e.g. for "jump-back-here" UX) and
404
+ * lets us unit-test the format.
405
+ */
406
+ interface FeedCursor {
407
+ indexedAt: string;
408
+ source: 'sifa' | 'atmosphere';
409
+ id: string;
410
+ }
411
+ declare function encodeFeedCursor(cursor: FeedCursor): string;
412
+ declare function decodeFeedCursor(encoded: string): FeedCursor;
413
+
219
414
  /** Zod schema for `id.sifa.profile.certification` records. */
220
415
  declare const ProfileCertificationRecordSchema: z.ZodObject<{
221
416
  name: z.ZodString;
@@ -608,4 +803,4 @@ declare const ProfileInvestmentRecordSchema: z.ZodObject<{
608
803
  }, z.core.$loose>;
609
804
  type ProfileInvestmentRecord = z.infer<typeof ProfileInvestmentRecordSchema>;
610
805
 
611
- export { PublicationAuthorSchema as $, type ArtifactLink as A, type BlobRef as B, ProfileInvestmentRecordSchema as C, type ProfileInvolvementRecord as D, type EndorsementConfirmationRecord as E, ProfileInvolvementRecordSchema as F, type GraphFollowRecord as G, type ProfileLanguageRecord as H, InvestmentAmountSchema as I, ProfileLanguageRecordSchema as J, type ProfilePositionRecord as K, ProfilePositionRecordSchema as L, ProfilePresentationDeliveryRecordSchema as M, ProfilePresentationRecordSchema as N, type OrgProfileRecord as O, type PresentationDuration as P, type ProfileProjectRecord as Q, ProfileProjectRecordSchema as R, type ProfilePublicationRecord as S, ProfilePublicationRecordSchema as T, type ProfileSelfRecord as U, ProfileSelfRecordSchema as V, type ProfileSkillRecord as W, ProfileSkillRecordSchema as X, type ProfileVolunteeringRecord as Y, ProfileVolunteeringRecordSchema as Z, type PublicationAuthor as _, type ProfilePresentationDeliveryRecord as a, makeGraphFollowRecordSchema as a0, type ProfileInvestmentRecord as a1, type ProfilePresentationRecord as b, ArtifactLinkSchema as c, BlobRefSchema as d, EndorsementConfirmationRecordSchema as e, type EndorsementRecord as f, EndorsementRecordSchema as g, GraphFollowRecordSchema as h, type OrgEmploymentAttestationRecord as i, OrgEmploymentAttestationRecordSchema as j, OrgProfileRecordSchema as k, PROFILE_INVESTMENT_NSID as l, PROFILE_INVOLVEMENT_NSID as m, PresentationDurationSchema as n, type PresentationLink as o, PresentationLinkSchema as p, type ProfileCertificationRecord as q, ProfileCertificationRecordSchema as r, type ProfileCourseRecord as s, ProfileCourseRecordSchema as t, type ProfileEducationRecord as u, ProfileEducationRecordSchema as v, type ProfileExternalAccountRecord as w, ProfileExternalAccountRecordSchema as x, type ProfileHonorRecord as y, ProfileHonorRecordSchema as z };
806
+ export { type ProfilePublicationRecord as $, type ArtifactLink as A, type BlobRef as B, type ProfileCourseRecord as C, ProfileCourseRecordSchema as D, type EndorsementConfirmationRecord as E, type FeedActor as F, type GraphFollowRecord as G, type ProfileEducationRecord as H, InvestmentAmountSchema as I, ProfileEducationRecordSchema as J, type ProfileExternalAccountRecord as K, ProfileExternalAccountRecordSchema as L, type ProfileHonorRecord as M, ProfileHonorRecordSchema as N, type OrgProfileRecord as O, type PresentationDuration as P, ProfileInvestmentRecordSchema as Q, type ProfileInvolvementRecord as R, ProfileInvolvementRecordSchema as S, type ProfileLanguageRecord as T, ProfileLanguageRecordSchema as U, type ProfilePositionRecord as V, ProfilePositionRecordSchema as W, ProfilePresentationDeliveryRecordSchema as X, ProfilePresentationRecordSchema as Y, type ProfileProjectRecord as Z, ProfileProjectRecordSchema as _, type ProfilePresentationDeliveryRecord as a, ProfilePublicationRecordSchema as a0, type ProfileSelfRecord as a1, ProfileSelfRecordSchema as a2, type ProfileSkillRecord as a3, ProfileSkillRecordSchema as a4, type ProfileVolunteeringRecord as a5, ProfileVolunteeringRecordSchema as a6, type PublicationAuthor as a7, PublicationAuthorSchema as a8, type SifaFeedItem as a9, SifaFeedItemSchema as aa, decodeFeedCursor as ab, encodeFeedCursor as ac, makeGraphFollowRecordSchema as ad, type ProfileInvestmentRecord as ae, type ProfilePresentationRecord as b, ArtifactLinkSchema as c, type AtmosphereFeedItem as d, AtmosphereFeedItemSchema as e, BlobRefSchema as f, EndorsementConfirmationRecordSchema as g, type EndorsementRecord as h, EndorsementRecordSchema as i, FeedActorSchema as j, type FeedCursor as k, type FollowFeedItem as l, FollowFeedItemSchema as m, type FollowFeedPage as n, FollowFeedPageSchema as o, GraphFollowRecordSchema as p, type OrgEmploymentAttestationRecord as q, OrgEmploymentAttestationRecordSchema as r, OrgProfileRecordSchema as s, PROFILE_INVESTMENT_NSID as t, PROFILE_INVOLVEMENT_NSID as u, PresentationDurationSchema as v, type PresentationLink as w, PresentationLinkSchema as x, type ProfileCertificationRecord as y, ProfileCertificationRecordSchema as z };
@@ -131,6 +131,12 @@ declare const OrgProfileRecordSchema: z.ZodObject<{
131
131
  name: z.ZodString;
132
132
  url: z.ZodString;
133
133
  }, z.core.$strip>>>;
134
+ industries: z.ZodOptional<z.ZodArray<z.ZodObject<{
135
+ industry: z.ZodString;
136
+ domain: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strip>>>;
138
+ founded: z.ZodOptional<z.ZodString>;
139
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
134
140
  personalProfileVisible: z.ZodOptional<z.ZodBoolean>;
135
141
  labels: z.ZodOptional<z.ZodObject<{
136
142
  $type: z.ZodOptional<z.ZodLiteral<"com.atproto.label.defs#selfLabels">>;
@@ -216,6 +222,195 @@ declare function makeGraphFollowRecordSchema(followerDid: string): z.ZodObject<{
216
222
  note: z.ZodOptional<z.ZodString>;
217
223
  }, z.core.$strip>;
218
224
 
225
+ /**
226
+ * Feed item from `GET /api/following/feed`. Discriminated on `source`:
227
+ *
228
+ * - `sifa`: a Sifa-native event (e.g. profile update, endorsement).
229
+ * - `atmosphere`: a curated creation event from another ATproto app
230
+ * (Barazo post, etc.). Payload is the hydrated `app.bsky.embed.*#view`
231
+ * shape, NOT the raw record (per memory `sifa-hydrated-view-embed-types`).
232
+ *
233
+ * Both variants share `actor`, `indexedAt`, and `id` (the materialized
234
+ * `feed_events.id` row identifier, used in the cursor).
235
+ */
236
+ declare const FeedActorSchema: z.ZodObject<{
237
+ did: z.ZodString;
238
+ handle: z.ZodString;
239
+ displayName: z.ZodOptional<z.ZodString>;
240
+ avatarUrl: z.ZodOptional<z.ZodString>;
241
+ }, z.core.$strip>;
242
+ type FeedActor = z.infer<typeof FeedActorSchema>;
243
+ /**
244
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
245
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
246
+ * Stream are two distinct surfaces with different data paths (Barazo API
247
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
248
+ * types are no longer consumed. Scheduled for removal in next major bump.
249
+ */
250
+ declare const SifaFeedItemSchema: z.ZodObject<{
251
+ id: z.ZodString;
252
+ actor: z.ZodObject<{
253
+ did: z.ZodString;
254
+ handle: z.ZodString;
255
+ displayName: z.ZodOptional<z.ZodString>;
256
+ avatarUrl: z.ZodOptional<z.ZodString>;
257
+ }, z.core.$strip>;
258
+ indexedAt: z.ZodString;
259
+ eventType: z.ZodString;
260
+ source: z.ZodLiteral<"sifa">;
261
+ appId: z.ZodOptional<z.ZodLiteral<"sifa">>;
262
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
263
+ }, z.core.$strip>;
264
+ /**
265
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
266
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
267
+ * Stream are two distinct surfaces with different data paths (Barazo API
268
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
269
+ * types are no longer consumed. Scheduled for removal in next major bump.
270
+ */
271
+ type SifaFeedItem = z.infer<typeof SifaFeedItemSchema>;
272
+ /**
273
+ * ATmosphere feed item. `payload` is intentionally permissive: it carries
274
+ * a hydrated `app.bsky.embed.*#view` shape that varies by source app. The
275
+ * AppView resolves the hydration; clients render via the existing
276
+ * embed-view union (mirrors `sifa-web/src/components/stream/`).
277
+ *
278
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
279
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
280
+ * Stream are two distinct surfaces with different data paths (Barazo API
281
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
282
+ * types are no longer consumed. Scheduled for removal in next major bump.
283
+ */
284
+ declare const AtmosphereFeedItemSchema: z.ZodObject<{
285
+ id: z.ZodString;
286
+ actor: z.ZodObject<{
287
+ did: z.ZodString;
288
+ handle: z.ZodString;
289
+ displayName: z.ZodOptional<z.ZodString>;
290
+ avatarUrl: z.ZodOptional<z.ZodString>;
291
+ }, z.core.$strip>;
292
+ indexedAt: z.ZodString;
293
+ eventType: z.ZodString;
294
+ source: z.ZodLiteral<"atmosphere">;
295
+ appId: z.ZodString;
296
+ uri: z.ZodOptional<z.ZodString>;
297
+ cid: z.ZodOptional<z.ZodString>;
298
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
299
+ }, z.core.$strip>;
300
+ /**
301
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
302
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
303
+ * Stream are two distinct surfaces with different data paths (Barazo API
304
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
305
+ * types are no longer consumed. Scheduled for removal in next major bump.
306
+ */
307
+ type AtmosphereFeedItem = z.infer<typeof AtmosphereFeedItemSchema>;
308
+ /**
309
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
310
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
311
+ * Stream are two distinct surfaces with different data paths (Barazo API
312
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
313
+ * types are no longer consumed. Scheduled for removal in next major bump.
314
+ */
315
+ declare const FollowFeedItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
316
+ id: z.ZodString;
317
+ actor: z.ZodObject<{
318
+ did: z.ZodString;
319
+ handle: z.ZodString;
320
+ displayName: z.ZodOptional<z.ZodString>;
321
+ avatarUrl: z.ZodOptional<z.ZodString>;
322
+ }, z.core.$strip>;
323
+ indexedAt: z.ZodString;
324
+ eventType: z.ZodString;
325
+ source: z.ZodLiteral<"sifa">;
326
+ appId: z.ZodOptional<z.ZodLiteral<"sifa">>;
327
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
328
+ }, z.core.$strip>, z.ZodObject<{
329
+ id: z.ZodString;
330
+ actor: z.ZodObject<{
331
+ did: z.ZodString;
332
+ handle: z.ZodString;
333
+ displayName: z.ZodOptional<z.ZodString>;
334
+ avatarUrl: z.ZodOptional<z.ZodString>;
335
+ }, z.core.$strip>;
336
+ indexedAt: z.ZodString;
337
+ eventType: z.ZodString;
338
+ source: z.ZodLiteral<"atmosphere">;
339
+ appId: z.ZodString;
340
+ uri: z.ZodOptional<z.ZodString>;
341
+ cid: z.ZodOptional<z.ZodString>;
342
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
343
+ }, z.core.$strip>], "source">;
344
+ /**
345
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
346
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
347
+ * Stream are two distinct surfaces with different data paths (Barazo API
348
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
349
+ * types are no longer consumed. Scheduled for removal in next major bump.
350
+ */
351
+ type FollowFeedItem = z.infer<typeof FollowFeedItemSchema>;
352
+ /**
353
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
354
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
355
+ * Stream are two distinct surfaces with different data paths (Barazo API
356
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
357
+ * types are no longer consumed. Scheduled for removal in next major bump.
358
+ */
359
+ declare const FollowFeedPageSchema: z.ZodObject<{
360
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
361
+ id: z.ZodString;
362
+ actor: z.ZodObject<{
363
+ did: z.ZodString;
364
+ handle: z.ZodString;
365
+ displayName: z.ZodOptional<z.ZodString>;
366
+ avatarUrl: z.ZodOptional<z.ZodString>;
367
+ }, z.core.$strip>;
368
+ indexedAt: z.ZodString;
369
+ eventType: z.ZodString;
370
+ source: z.ZodLiteral<"sifa">;
371
+ appId: z.ZodOptional<z.ZodLiteral<"sifa">>;
372
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
373
+ }, z.core.$strip>, z.ZodObject<{
374
+ id: z.ZodString;
375
+ actor: z.ZodObject<{
376
+ did: z.ZodString;
377
+ handle: z.ZodString;
378
+ displayName: z.ZodOptional<z.ZodString>;
379
+ avatarUrl: z.ZodOptional<z.ZodString>;
380
+ }, z.core.$strip>;
381
+ indexedAt: z.ZodString;
382
+ eventType: z.ZodString;
383
+ source: z.ZodLiteral<"atmosphere">;
384
+ appId: z.ZodString;
385
+ uri: z.ZodOptional<z.ZodString>;
386
+ cid: z.ZodOptional<z.ZodString>;
387
+ payload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
388
+ }, z.core.$strip>], "source">>;
389
+ cursor: z.ZodNullable<z.ZodString>;
390
+ }, z.core.$strip>;
391
+ /**
392
+ * @deprecated The `/api/following/feed` surface was reverted (sifa-api#674).
393
+ * Per `decisions/activity-data-strategy.md` the Sifa Timeline + ATmosphere
394
+ * Stream are two distinct surfaces with different data paths (Barazo API
395
+ * for Timeline, live PDS reads + Valkey for Stream). These collapsed feed
396
+ * types are no longer consumed. Scheduled for removal in next major bump.
397
+ */
398
+ type FollowFeedPage = z.infer<typeof FollowFeedPageSchema>;
399
+ /**
400
+ * Composite feed cursor `(indexedAt DESC, source, id)`. Encoded as a
401
+ * URL-safe base64 string so it survives `URLSearchParams` round-trips
402
+ * without further encoding. Decoupling encode/decode from the API call
403
+ * lets consumers persist cursors (e.g. for "jump-back-here" UX) and
404
+ * lets us unit-test the format.
405
+ */
406
+ interface FeedCursor {
407
+ indexedAt: string;
408
+ source: 'sifa' | 'atmosphere';
409
+ id: string;
410
+ }
411
+ declare function encodeFeedCursor(cursor: FeedCursor): string;
412
+ declare function decodeFeedCursor(encoded: string): FeedCursor;
413
+
219
414
  /** Zod schema for `id.sifa.profile.certification` records. */
220
415
  declare const ProfileCertificationRecordSchema: z.ZodObject<{
221
416
  name: z.ZodString;
@@ -608,4 +803,4 @@ declare const ProfileInvestmentRecordSchema: z.ZodObject<{
608
803
  }, z.core.$loose>;
609
804
  type ProfileInvestmentRecord = z.infer<typeof ProfileInvestmentRecordSchema>;
610
805
 
611
- export { PublicationAuthorSchema as $, type ArtifactLink as A, type BlobRef as B, ProfileInvestmentRecordSchema as C, type ProfileInvolvementRecord as D, type EndorsementConfirmationRecord as E, ProfileInvolvementRecordSchema as F, type GraphFollowRecord as G, type ProfileLanguageRecord as H, InvestmentAmountSchema as I, ProfileLanguageRecordSchema as J, type ProfilePositionRecord as K, ProfilePositionRecordSchema as L, ProfilePresentationDeliveryRecordSchema as M, ProfilePresentationRecordSchema as N, type OrgProfileRecord as O, type PresentationDuration as P, type ProfileProjectRecord as Q, ProfileProjectRecordSchema as R, type ProfilePublicationRecord as S, ProfilePublicationRecordSchema as T, type ProfileSelfRecord as U, ProfileSelfRecordSchema as V, type ProfileSkillRecord as W, ProfileSkillRecordSchema as X, type ProfileVolunteeringRecord as Y, ProfileVolunteeringRecordSchema as Z, type PublicationAuthor as _, type ProfilePresentationDeliveryRecord as a, makeGraphFollowRecordSchema as a0, type ProfileInvestmentRecord as a1, type ProfilePresentationRecord as b, ArtifactLinkSchema as c, BlobRefSchema as d, EndorsementConfirmationRecordSchema as e, type EndorsementRecord as f, EndorsementRecordSchema as g, GraphFollowRecordSchema as h, type OrgEmploymentAttestationRecord as i, OrgEmploymentAttestationRecordSchema as j, OrgProfileRecordSchema as k, PROFILE_INVESTMENT_NSID as l, PROFILE_INVOLVEMENT_NSID as m, PresentationDurationSchema as n, type PresentationLink as o, PresentationLinkSchema as p, type ProfileCertificationRecord as q, ProfileCertificationRecordSchema as r, type ProfileCourseRecord as s, ProfileCourseRecordSchema as t, type ProfileEducationRecord as u, ProfileEducationRecordSchema as v, type ProfileExternalAccountRecord as w, ProfileExternalAccountRecordSchema as x, type ProfileHonorRecord as y, ProfileHonorRecordSchema as z };
806
+ export { type ProfilePublicationRecord as $, type ArtifactLink as A, type BlobRef as B, type ProfileCourseRecord as C, ProfileCourseRecordSchema as D, type EndorsementConfirmationRecord as E, type FeedActor as F, type GraphFollowRecord as G, type ProfileEducationRecord as H, InvestmentAmountSchema as I, ProfileEducationRecordSchema as J, type ProfileExternalAccountRecord as K, ProfileExternalAccountRecordSchema as L, type ProfileHonorRecord as M, ProfileHonorRecordSchema as N, type OrgProfileRecord as O, type PresentationDuration as P, ProfileInvestmentRecordSchema as Q, type ProfileInvolvementRecord as R, ProfileInvolvementRecordSchema as S, type ProfileLanguageRecord as T, ProfileLanguageRecordSchema as U, type ProfilePositionRecord as V, ProfilePositionRecordSchema as W, ProfilePresentationDeliveryRecordSchema as X, ProfilePresentationRecordSchema as Y, type ProfileProjectRecord as Z, ProfileProjectRecordSchema as _, type ProfilePresentationDeliveryRecord as a, ProfilePublicationRecordSchema as a0, type ProfileSelfRecord as a1, ProfileSelfRecordSchema as a2, type ProfileSkillRecord as a3, ProfileSkillRecordSchema as a4, type ProfileVolunteeringRecord as a5, ProfileVolunteeringRecordSchema as a6, type PublicationAuthor as a7, PublicationAuthorSchema as a8, type SifaFeedItem as a9, SifaFeedItemSchema as aa, decodeFeedCursor as ab, encodeFeedCursor as ac, makeGraphFollowRecordSchema as ad, type ProfileInvestmentRecord as ae, type ProfilePresentationRecord as b, ArtifactLinkSchema as c, type AtmosphereFeedItem as d, AtmosphereFeedItemSchema as e, BlobRefSchema as f, EndorsementConfirmationRecordSchema as g, type EndorsementRecord as h, EndorsementRecordSchema as i, FeedActorSchema as j, type FeedCursor as k, type FollowFeedItem as l, FollowFeedItemSchema as m, type FollowFeedPage as n, FollowFeedPageSchema as o, GraphFollowRecordSchema as p, type OrgEmploymentAttestationRecord as q, OrgEmploymentAttestationRecordSchema as r, OrgProfileRecordSchema as s, PROFILE_INVESTMENT_NSID as t, PROFILE_INVOLVEMENT_NSID as u, PresentationDurationSchema as v, type PresentationLink as w, PresentationLinkSchema as x, type ProfileCertificationRecord as y, ProfileCertificationRecordSchema as z };
@@ -1057,25 +1057,25 @@ async function getFollowing(config, handle, opts = {}) {
1057
1057
  return { follows: [], cursor: null };
1058
1058
  }
1059
1059
  }
1060
- async function getFollowingFeed(config, opts = {}) {
1060
+ var FOLLOWING_FEED_LXM = "id.sifa.feed.getFollowingFeed";
1061
+ async function fetchFollowingFeed(config, opts = {}) {
1061
1062
  const params = new URLSearchParams();
1062
- if (opts.cursor) params.set("cursor", opts.cursor);
1063
1063
  if (opts.limit) params.set("limit", String(opts.limit));
1064
- if (opts.categories && opts.categories.length > 0) {
1065
- params.set("categories", opts.categories.join(","));
1066
- }
1067
1064
  const qs = params.toString();
1068
1065
  const headers = { ...opts.headers ?? {} };
1069
1066
  if (opts.cookieHeader) headers.cookie = opts.cookieHeader;
1067
+ if (config.getAuthToken) {
1068
+ const token = await config.getAuthToken(FOLLOWING_FEED_LXM);
1069
+ if (token) headers.Authorization = `Bearer ${token}`;
1070
+ }
1070
1071
  try {
1071
- const res = await apiFetch(
1072
+ return await apiFetch(
1072
1073
  config,
1073
1074
  `/api/following/feed${qs ? `?${qs}` : ""}`,
1074
1075
  { credentials: "include", cache: "no-store", ...opts, headers }
1075
1076
  );
1076
- return { items: res.items ?? [], cursor: res.cursor ?? null };
1077
1077
  } catch {
1078
- return { items: [], cursor: null };
1078
+ return null;
1079
1079
  }
1080
1080
  }
1081
1081
 
@@ -2046,6 +2046,7 @@ exports.fetchEntitySearch = fetchEntitySearch;
2046
2046
  exports.fetchExternalAccounts = fetchExternalAccounts;
2047
2047
  exports.fetchFeaturedProfile = fetchFeaturedProfile;
2048
2048
  exports.fetchFollowing = fetchFollowing;
2049
+ exports.fetchFollowingFeed = fetchFollowingFeed;
2049
2050
  exports.fetchGetProfileView = fetchGetProfileView;
2050
2051
  exports.fetchGivenConfirmations = fetchGivenConfirmations;
2051
2052
  exports.fetchHeatmapData = fetchHeatmapData;
@@ -2083,7 +2084,6 @@ exports.getAdminReviewQueues = getAdminReviewQueues;
2083
2084
  exports.getBlueskySuggestions = getBlueskySuggestions;
2084
2085
  exports.getFollowers = getFollowers;
2085
2086
  exports.getFollowing = getFollowing;
2086
- exports.getFollowingFeed = getFollowingFeed;
2087
2087
  exports.getMutuals = getMutuals;
2088
2088
  exports.hideActivityItem = hideActivityItem;
2089
2089
  exports.hideKeytraceClaim = hideKeytraceClaim;