@recursiv/sdk 0.7.123 → 0.7.195

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.
@@ -1,6 +1,7 @@
1
1
  import type { HttpClient } from '../client.js';
2
2
  import type { CompassFilterMeta, DiscoveryLayout, PaginatedResponse, PaginationParams, SingleResponse, StoryOutlets } from '../types.js';
3
3
  import type { CuratorStoryPostsPage } from './curator.js';
4
+ import type { CategorySurface } from './discovery.js';
4
5
  import type { NativeWriteProtocol, SocialProtocolId } from '../social-protocol-ids.js';
5
6
  /** Canonical protocol operation names returned by the adapter registry. */
6
7
  export declare const PROTOCOL_CAPABILITY_OPERATIONS: readonly ["discover", "stream", "backfill", "search", "resolveIdentity", "fetchProfile", "fetchThread", "publish", "reply", "react", "repost", "follow", "delete", "health", "checkpoint"];
@@ -375,7 +376,7 @@ export interface HostedNostrIdentityProof {
375
376
  created_at: number;
376
377
  tags: string[][];
377
378
  }
378
- export type NativeNostrPrepareInput = {
379
+ export type NativeNostrPrepareInput = ({
379
380
  action: 'publish';
380
381
  content: string;
381
382
  /** Your own post in this app (sdk.posts) that this note copies, so deleting it can offer this copy. */
@@ -403,6 +404,13 @@ export type NativeNostrPrepareInput = {
403
404
  } | {
404
405
  action: 'delete';
405
406
  postId: string;
407
+ }) & {
408
+ /**
409
+ * A key Minds holds (`signing: 'server'`, 0.7.192): `true` once the member approved, and Minds signs the exact event
410
+ * and sends it in this call (the answer carries `receipt`). Without it a prepare is a preview for every key: nothing
411
+ * is signed, sent or deleted. Ignored for the member's own key, which they sign on their device as before.
412
+ */
413
+ send?: true;
406
414
  };
407
415
  export type NativeSocialProtocol = 'bluesky' | 'activitypub';
408
416
  export interface NativeSocialAccount {
@@ -435,7 +443,7 @@ export type NativeNetwork = 'activitypub' | 'atproto' | 'nostr';
435
443
  * for the setup budget (`retryAt`). `off`: the member turned it off (`reason: 'opted_out'`), it is not available to them
436
444
  * yet (`not_rolled_out`), or their profile is private (`private_profile`, AT Protocol and Nostr only; `setNetwork`
437
445
  * with `enabled: true` turns it on). `needs_action`: the member must act first (`age_band_required`,
438
- * `needs_verified_email`). `locked`: held off by a rule the member cannot change.
446
+ * `needs_verified_email`, `needs_atproto_grant`: `grantAtproto`). `locked`: held off by a rule the member cannot change.
439
447
  */
440
448
  export type NativeNetworkState = 'ready' | 'on' | 'pending' | 'off' | 'error' | 'locked' | 'needs_action';
441
449
  export interface NativeNetworkPresence {
@@ -447,8 +455,20 @@ export interface NativeNetworkPresence {
447
455
  mode: 'hosted' | 'managed' | 'attached';
448
456
  /** The member's address on the network, set up or not, when the server can say it. */
449
457
  handle: string | null;
450
- /** Which identity a one-tap like, repost, reply or follow uses when the member also linked an outside account. */
458
+ /**
459
+ * Which identity a one-tap like, repost, reply or follow without `identity` acts as now: the member's choice
460
+ * (`setEngageDefault`) when it can act, else `linked` while they have an account there linked before the cutover, else
461
+ * `native` while their native identity can act, else `linked` when they have a linked account (the fallback). When
462
+ * nothing can act, their choice, else `native`.
463
+ */
451
464
  engageDefault: 'native' | 'linked';
465
+ /**
466
+ * Where engageDefault comes from (0.7.191): the member's choice, their linked account, the default, or the fallback
467
+ * (the native identity cannot act, so a tap acts as the linked account whatever the member chose).
468
+ */
469
+ engageDefaultSource?: 'chosen' | 'linked_account' | 'default' | 'fallback';
470
+ /** Whether the member linked an outside account on this network (0.7.191; only `networks()` reports it). */
471
+ linked?: boolean;
452
472
  activatedAt: string | null;
453
473
  optedOutAt: string | null;
454
474
  removePast: boolean;
@@ -470,6 +490,137 @@ export interface SetNativeNetworkInput {
470
490
  /** Turning off: also remove what was already shared there (the Settings sheet checks this by default). */
471
491
  removePast?: boolean;
472
492
  }
493
+ /**
494
+ * A Minds step-up for "Get my AT Protocol password" (0.7.191): the member's password, or, for an account with no password, the
495
+ * code from `POST /settings/confirmation-code` with purpose `atproto_password`. Exactly one.
496
+ */
497
+ export type AtprotoPasswordClaimProof = {
498
+ password: string;
499
+ } | {
500
+ emailCode: string;
501
+ };
502
+ /** Where the reset code went: the member's verified email, masked (`o***@example.com`), and the account's handle. */
503
+ export interface AtprotoPasswordClaim {
504
+ handle: string;
505
+ sentTo: string;
506
+ }
507
+ /**
508
+ * What `grantAtproto` answers (0.7.191): the account's handle, and the member's AT Protocol presence after the grant
509
+ * (set up as "Set up now" would: `on`, unless the member turned the network off).
510
+ */
511
+ export interface AtprotoGrant {
512
+ handle: string;
513
+ presence: NativeNetworkPresence;
514
+ }
515
+ /** Which identity a one-tap action acts as (0.7.191): the member's own on that network, or an outside account they linked. */
516
+ export type EngageIdentity = 'native' | 'linked';
517
+ /** Who acted, on every engage answer. `handle` is the address on the network, null when the server cannot say it. */
518
+ export interface EngageActedAs {
519
+ network: NativeNetwork;
520
+ handle: string | null;
521
+ identity: EngageIdentity;
522
+ }
523
+ /**
524
+ * What a linked review adds (0.7.191): who acted, and `notice: 'engage_default_linked'` once, the first time a member who
525
+ * linked an account before acts as it while they also have a native identity there (say so, and link to Settings).
526
+ */
527
+ export interface EngageLinkedFields {
528
+ identity?: 'linked';
529
+ actedAs?: EngageActedAs | null;
530
+ notice?: 'engage_default_linked';
531
+ }
532
+ /** A native one-tap action the network was sent (200). A `failed` delivery with `retryable` may be tried again. */
533
+ export interface NativeEngageSent {
534
+ identity: 'native';
535
+ queued: false;
536
+ delivery: {
537
+ state: 'sent';
538
+ } | {
539
+ state: 'skipped';
540
+ code: string;
541
+ } | {
542
+ state: 'failed';
543
+ code: string;
544
+ retryable: boolean;
545
+ };
546
+ actedAs: EngageActedAs;
547
+ }
548
+ /**
549
+ * A native one-tap action kept while the member's identity there is set up (202). It is sent, in the order the member
550
+ * took their actions, once the identity is on; if it cannot be by `expiresAt` the member is notified. `retryAt`: when the
551
+ * setup budget frees, when that is known. List them with `pendingInteractions()`.
552
+ */
553
+ export interface NativeEngageQueued {
554
+ identity: 'native';
555
+ queued: true;
556
+ interactionId: string;
557
+ expiresAt: string;
558
+ retryAt: string | null;
559
+ actedAs: EngageActedAs;
560
+ }
561
+ /** An engage answer: the native action sent or queued, or the linked review to approve (submit) as before. */
562
+ export type EngageAnswer<Review> = NativeEngageSent | NativeEngageQueued | (Review & EngageLinkedFields & {
563
+ identity: 'linked';
564
+ });
565
+ /** One one-tap action waiting for the member's native identity (`pendingInteractions()`). */
566
+ export interface PendingNativeInteraction {
567
+ id: string;
568
+ network: NativeNetwork;
569
+ action: string;
570
+ target: string;
571
+ state: 'queued';
572
+ createdAt: string;
573
+ expiresAt: string;
574
+ }
575
+ /**
576
+ * A one-tap like, repost or follow (0.7.191). Without `identity` the server decides: the member's choice, their linked
577
+ * account when they had one, else their native identity. `accountId` names a linked account (identity `linked` only).
578
+ * `protocol` is a network the API writes to (NativeWriteProtocol): a Farcaster post can be read, not yet engaged with.
579
+ */
580
+ export interface EngageOneInput<Action extends string> {
581
+ protocol: NativeWriteProtocol;
582
+ nativeId: string;
583
+ clientMutationId: string;
584
+ action: Action;
585
+ identity?: EngageIdentity;
586
+ accountId?: string;
587
+ }
588
+ /**
589
+ * The step-up the Nostr key actions ask for: the account's password, or, for an account with no password, the code
590
+ * from `settings.requestConfirmationCode('nostr_key')` (sent to the account's own address). Five tries an hour.
591
+ */
592
+ export type NostrKeyStepUp = {
593
+ password: string;
594
+ emailCode?: never;
595
+ } | {
596
+ emailCode: string;
597
+ password?: never;
598
+ };
599
+ /** The member's managed Nostr key, to import into a signer on their device. Minds keeps its copy and keeps signing. */
600
+ export interface ManagedNostrKeyExport {
601
+ pubkey: string;
602
+ npub: string;
603
+ /** The private key (NIP-19). Show it to the member alone, once; never log, store or send it anywhere. */
604
+ nsec: string;
605
+ /** Their NIP-05 address, `name@<app host>`. */
606
+ handle: string;
607
+ }
608
+ /** What the member's signer signs (NIP-07) to show it holds the same key as their Nostr identity. */
609
+ export interface NostrRebindChallenge extends HostedNostrChallenge {
610
+ /** The identity's key: the signer must sign with this one. */
611
+ pubkey: string;
612
+ }
613
+ export interface NostrRebindResult {
614
+ mode: 'attached';
615
+ pubkey: string;
616
+ }
617
+ /** Minds deleted its copy of the key: from now on every Nostr action is signed on the member's device. */
618
+ export interface ManagedNostrCopyDeleted {
619
+ deleted: true;
620
+ mode: 'attached';
621
+ pubkey: string;
622
+ signing: 'device';
623
+ }
473
624
  export interface SocialSourceRef {
474
625
  /**
475
626
  * 0.7.87: any SOCIAL_PROTOCOL_IDS network, Farcaster (an FID, or a `<fid>:0x<hash>` CastId) before its reader serves a
@@ -1034,12 +1185,28 @@ export interface NativeNostrPrepared {
1034
1185
  textTruncated: boolean;
1035
1186
  relay: string;
1036
1187
  };
1188
+ /**
1189
+ * A key Minds holds (0.7.192): there is nothing to sign or submit. Without `send` this is the preview to show the
1190
+ * member (nothing was signed or sent); prepare again with `send: true` once they approve. With `send: true`, Minds
1191
+ * signed `event` and sent it in this call, and `receipt` says what the relay did.
1192
+ */
1193
+ signing?: 'server';
1194
+ receipt?: NativeNostrReceipt;
1037
1195
  }
1038
1196
  export interface NativeNostrAccount {
1039
1197
  enabled: boolean;
1040
1198
  identity: HostedProtocolIdentity | null;
1041
1199
  capabilities: Array<'publish_original_text' | 'request_own_post_deletion' | 'reply_text_note' | 'publish_linked_text' | 'quote' | 'like' | 'unlike' | 'repost' | 'unrepost' | 'follow' | 'unfollow'>;
1042
- signing?: 'client';
1200
+ /**
1201
+ * Who signs (0.7.192). `client`: the member's own key, on their device (NIP-07): prepare, sign the exact event, submit.
1202
+ * `server`: a key Minds holds for the member (`mode: 'managed'`): Minds signs. A prepare is a preview, and a prepare
1203
+ * with `send: true` signs and sends in the same call (answering the `receipt`); a like, repost or follow review needs
1204
+ * no `event` on submit, and the one-tap `engage*` methods with `identity: 'native'` act as it. `enabled` then follows
1205
+ * the member's Nostr presence: false, with no capabilities, while Nostr is not rolled out to them. For either key,
1206
+ * `like`, `repost` and `follow` (and their undos) are listed only while the app's review route for them is on.
1207
+ */
1208
+ signing?: 'client' | 'server';
1209
+ mode?: 'managed';
1043
1210
  }
1044
1211
  export interface NativeNostrPostState {
1045
1212
  postId: string;
@@ -1188,6 +1355,19 @@ export interface SocialProfilePage {
1188
1355
  items: SocialProfile[];
1189
1356
  cursor: string | null;
1190
1357
  }
1358
+ /**
1359
+ * One person a Nostr post's text names (SocialPost.mentions, 0.7.143): at most eight a post, in the order the text first
1360
+ * names them, each only when the server holds their signed metadata, it neither hides nor withholds them, and neither the
1361
+ * app's moderation nor the member's own blocks and mutes hide them (anyone else stays as the text writes them). Show `@displayName` in place of each of `references`, the exact `nostr:`
1362
+ * references in `text` naming this person (at most eight). `handle` is the NIP-05 name their domain confirmed, else
1363
+ * their npub; `pubkey` (hex) opens their profile (`protocol: 'nostr'`, `actor: pubkey`).
1364
+ */
1365
+ export interface SocialMention {
1366
+ pubkey: string;
1367
+ displayName: string;
1368
+ handle: string;
1369
+ references: string[];
1370
+ }
1191
1371
  /** Public source data read on demand; never a canonical Minds post ID. */
1192
1372
  export interface SocialPost {
1193
1373
  protocol: string;
@@ -1240,6 +1420,8 @@ export interface SocialPost {
1240
1420
  width?: number;
1241
1421
  height?: number;
1242
1422
  sensitive?: true;
1423
+ /** A video's length in whole seconds, where the source declares it (PeerTube; server 0.7.155). */
1424
+ durationSec?: number;
1243
1425
  }>;
1244
1426
  hasAdditionalContent: boolean;
1245
1427
  /**
@@ -1248,6 +1430,11 @@ export interface SocialPost {
1248
1430
  * (a Mastodon sensitive flag or content warning, a Bluesky label, a Nostr content-warning) is never returned at all.
1249
1431
  */
1250
1432
  sensitive?: boolean;
1433
+ /**
1434
+ * Nostr (0.7.143): the people the text names with NIP-27 references (`nostr:npub1…`, `nostr:nprofile1…`) that the server
1435
+ * can name (SocialMention). Absent when it names nobody the server can name, and on an older server.
1436
+ */
1437
+ mentions?: SocialMention[];
1251
1438
  /** At most one independently filtered quoted post. */
1252
1439
  quote?: {
1253
1440
  state: 'available';
@@ -1267,6 +1454,14 @@ export interface SocialPost {
1267
1454
  authorOptOut?: true;
1268
1455
  /** A bridge (Bridgy Fed, Mostr, a NIP-48 proxy tag) made this post from one on another network (SocialBridge). Present only on a copy read live. */
1269
1456
  bridge?: SocialBridge;
1457
+ /**
1458
+ * The Fediverse software that published the post, where the server knows it (0.7.155): `peertube` for a PeerTube
1459
+ * video read off its own instance. Its `author` is the video's channel (follow it as any Fediverse account) and its
1460
+ * one `media` entry is the video's stream, a progressive MP4 (never an HLS playlist: a plain video element plays it)
1461
+ * with the poster on the API's media proxy. Label it as the Fediverse, from PeerTube; play it in place, never open
1462
+ * `sourceUrl`.
1463
+ */
1464
+ software?: 'peertube';
1270
1465
  }
1271
1466
  export interface SocialPostSearch {
1272
1467
  items: SocialPost[];
@@ -1539,6 +1734,37 @@ export interface SocialRadar {
1539
1734
  compass_filter?: CompassFilterMeta;
1540
1735
  };
1541
1736
  }
1737
+ /**
1738
+ * A category's surface for a signed-out visitor (`getSharedCategorySurface`, 0.7.165; GET /protocols/public/:projectId/category):
1739
+ * the category's stories, its open-network posts and its clips, the three sections a member's `discovery.category()` reads
1740
+ * from the same server cache, never people or groups. Every visitor floor runs again on each read: stories lose tier-1,
1741
+ * held and blocked-instance members and show media only from outlets and members marked `visitorMedia`; network posts
1742
+ * keep their pictures (with their `width` and `height`) only where cleared for visitors (`visitorMedia: true`), lose a
1743
+ * post marked sensitive or on a blocked instance, and pass the safety and term floors; clips are the anonymous floor's
1744
+ * (never NSFW). A section that is short or failed says why in `reason` (`timeout`, `error`, `off`).
1745
+ */
1746
+ export interface SharedCategorySurface extends Omit<CategorySurface, 'people' | 'groups'> {
1747
+ /**
1748
+ * Present when `compass` named a filtering choice: what Hide politics left out of the three sections together (stories
1749
+ * by their `political` mark and theme, network posts and clips by their category, words and author), with
1750
+ * `basis: 'flags'` until the operator serves visitors the full filter; or `status: 'unavailable'` for a side or Mix,
1751
+ * which no section can apply (the sections are Everything's).
1752
+ */
1753
+ meta?: {
1754
+ compass_filter?: CompassFilterMeta;
1755
+ };
1756
+ }
1757
+ export interface SharedCategorySurfaceParams {
1758
+ /** A browse category the app serves (a network catalog's `categories`); any other is a 400 `categories_unavailable`. */
1759
+ category: string;
1760
+ /**
1761
+ * A visitor's Politics choice: `all` or `hide`; a side or Mix only where the app's catalog lists `compass_sides` for
1762
+ * visitors (`sharedNetworks`: the operator serves them the full filter), and it is a 400 `invalid_input` everywhere else.
1763
+ * No section carries a placement, so an accepted side or Mix answers Everything's sections with
1764
+ * `meta.compass_filter.status: 'unavailable'`, as the radar, the trends, the viral read and Watch answer it.
1765
+ */
1766
+ compass?: string;
1767
+ }
1542
1768
  export interface SocialRadarParams {
1543
1769
  category?: string;
1544
1770
  limit?: number;
@@ -1794,24 +2020,71 @@ export interface ViralReadResponse {
1794
2020
  export interface SocialReadOptions {
1795
2021
  retry?: boolean;
1796
2022
  }
2023
+ /**
2024
+ * `protocol: 'all'`: every network's reviewed famous accounts (AT Protocol, the Fediverse, Nostr) in one ranking, then
2025
+ * the provider-ranked ones. A network's own list (`protocol: 'bluesky'` and the rest) leads with that network's famous
2026
+ * accounts too.
2027
+ */
2028
+ export type SocialPopularProfilesProtocol = 'all' | 'bluesky' | 'activitypub' | 'nostr' | (string & {});
2029
+ export interface SocialPopularProfilesParams {
2030
+ protocol: SocialPopularProfilesProtocol;
2031
+ /** 1 to 50; the server's default is 25. */
2032
+ limit?: number;
2033
+ /** The previous page's `cursor`. A `protocol: 'all'` cursor holds its list across an hourly refresh for a few hours, then is refused (start again). */
2034
+ cursor?: string;
2035
+ /** `protocol: 'all'` only: one of the page's `categories` ('news', 'tech', 'sports' ...). */
2036
+ category?: string;
2037
+ /** The member's Politics choice, as Discover sends it: `hide` (Hide politics) leaves out political accounts; any other choice is the default mix. */
2038
+ compass?: string;
2039
+ }
2040
+ /** One popular account: the profile, the member's Minds subscription, and on `protocol: 'all'` its catalog category. */
2041
+ export interface SocialPopularProfile extends SocialProfile {
2042
+ /** `protocol: 'all'` only: the account's category in the reviewed catalog, null for a provider-ranked account. */
2043
+ category?: string | null;
2044
+ }
1797
2045
  /** Provider-ranked accounts. `source` says whether this page is the app's hourly index snapshot or a live read. */
1798
2046
  export interface SocialPopularProfiles {
1799
- items: SocialProfile[];
2047
+ items: SocialPopularProfile[];
1800
2048
  cursor: string | null;
2049
+ /** `protocol: 'all'` only: the categories `category` accepts, best known first. */
2050
+ categories?: string[];
1801
2051
  provenance: {
2052
+ /**
2053
+ * Who ranked the list: the network's provider, or, when the reviewed famous accounts lead it (`famous_accounts`),
2054
+ * the ranking in plain words (`fame and recent activity`, URL `urn:famous-accounts`, not a page): no company name,
2055
+ * so an app can show it as is.
2056
+ */
1802
2057
  provider: {
1803
2058
  name: string;
1804
2059
  url: string;
1805
2060
  };
1806
- /** The provider's own ranking label, never a Minds popularity score. */
2061
+ /**
2062
+ * The ranker's own label: the provider's (`suggested_users` ...), or `famous_accounts` when the platform's reviewed
2063
+ * catalog leads the list (always on `protocol: 'all'`); never a Minds popularity score.
2064
+ */
1807
2065
  ranking: string;
1808
2066
  fetchedAt: string;
1809
2067
  coverage: 'provider_ranked_window';
2068
+ /**
2069
+ * `famous_accounts` on a network's list (0.7.151): the provider ranking its other accounts come from, with that
2070
+ * provider's own label and read time. Absent when the provider ranked the whole list.
2071
+ */
2072
+ sources?: SocialPopularProfilesSource[];
1810
2073
  source: 'index' | 'live';
1811
2074
  /** Provider read time of the served snapshot; null for live reads. */
1812
2075
  snapshotAt: string | null;
1813
2076
  };
1814
2077
  }
2078
+ /** A provider ranking a platform-ranked list drew accounts from: its own label and read time. */
2079
+ export interface SocialPopularProfilesSource {
2080
+ provider: {
2081
+ name: string;
2082
+ url: string;
2083
+ };
2084
+ ranking: string;
2085
+ fetchedAt: string;
2086
+ coverage: 'provider_ranked_window';
2087
+ }
1815
2088
  export interface SocialConversation {
1816
2089
  focus: SocialPost;
1817
2090
  /** Oldest available ancestor first, ending with the immediate parent. */
@@ -1967,6 +2240,13 @@ export declare class ProtocolsResource {
1967
2240
  * failure throws. Cacheable for a minute by a shared cache.
1968
2241
  */
1969
2242
  getSharedViral(projectId: string, params?: ViralReadParams, options?: SocialReadOptions): Promise<SingleResponse<ViralReadResponse>>;
2243
+ /**
2244
+ * A category's stories, open-network posts and clips for a signed-out visitor, in one keyless read (SharedCategorySurface).
2245
+ * The answer is the same for every visitor of the app, category and Politics choice, and the URL carries nothing else,
2246
+ * so a shared cache may keep it for 30 s. Only `category` and `compass` are sent: the server refuses any other
2247
+ * parameter. An API that predates the route answers 401 `missing_api_key` (it falls through to the keyed routes) or 404.
2248
+ */
2249
+ getSharedCategorySurface(projectId: string, params: SharedCategorySurfaceParams, options?: SocialReadOptions): Promise<SingleResponse<SharedCategorySurface>>;
1970
2250
  publicNetworks(): Promise<SingleResponse<SocialNetwork[]>>;
1971
2251
  /** Query the live public network. It does not import users or posts. */
1972
2252
  searchPublicPosts(params: SearchPublicPostsParams): Promise<SingleResponse<SocialPostSearch>>;
@@ -2070,12 +2350,12 @@ export declare class ProtocolsResource {
2070
2350
  * no items; a 401 or 403 always throws (a session or key failure is never reported as off).
2071
2351
  */
2072
2352
  getPublicViral(params?: ViralReadParams, options?: SocialReadOptions): Promise<SingleResponse<ViralReadResponse>>;
2073
- /** Provider-ranked public accounts with explicit provenance; served from the app's index when a fresh snapshot exists. */
2074
- getPublicPopularProfiles(params: {
2075
- protocol: string;
2076
- limit?: number;
2077
- cursor?: string;
2078
- }): Promise<SingleResponse<SocialPopularProfiles>>;
2353
+ /**
2354
+ * Popular public accounts with explicit provenance; served from the app's index when a fresh snapshot exists.
2355
+ * `protocol: 'all'` reads the famous accounts of every network in one list, paged for infinite scroll, optionally
2356
+ * narrowed to a `category`; `compass: 'hide'` leaves political accounts out of any list.
2357
+ */
2358
+ getPublicPopularProfiles(params: SocialPopularProfilesParams): Promise<SingleResponse<SocialPopularProfiles>>;
2079
2359
  /** Read this connected account's current native following; never infer it from a public count. */
2080
2360
  nativeFollowState(input: NativeFollowSourceInput): Promise<SingleResponse<NativeFollowState>>;
2081
2361
  /**
@@ -2085,7 +2365,7 @@ export declare class ProtocolsResource {
2085
2365
  */
2086
2366
  nativeFollowStates(input: Omit<NativeFollowSourceInput, 'accountId'>): Promise<SingleResponse<NativeFollowStates>>;
2087
2367
  /** Prepare a follow/unfollow for explicit approval. Preserve the mutation ID after a lost response. */
2088
- prepareNativeFollow(input: NativeFollowPrepareInput): Promise<SingleResponse<NativeFollowReview>>;
2368
+ prepareNativeFollow(input: NativeFollowPrepareInput): Promise<SingleResponse<NativeFollowReview & EngageLinkedFields>>;
2089
2369
  /** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
2090
2370
  submitNativeFollow(id: string, input: {
2091
2371
  approve: true;
@@ -2096,7 +2376,7 @@ export declare class ProtocolsResource {
2096
2376
  /** Read this connected account's current native like; never infer it from a public count. */
2097
2377
  nativeLikeState(input: NativeLikeSourceInput): Promise<SingleResponse<NativeLikeState>>;
2098
2378
  /** Prepare a like/unlike for explicit approval. Preserve the mutation ID after a lost response. */
2099
- prepareNativeLike(input: NativeLikePrepareInput): Promise<SingleResponse<NativeLikeReview>>;
2379
+ prepareNativeLike(input: NativeLikePrepareInput): Promise<SingleResponse<NativeLikeReview & EngageLinkedFields>>;
2100
2380
  /** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
2101
2381
  submitNativeLike(id: string, input: {
2102
2382
  approve: true;
@@ -2107,7 +2387,7 @@ export declare class ProtocolsResource {
2107
2387
  /** Read this connected account's current native repost; never infer it from a public count. */
2108
2388
  nativeRepostState(input: NativeRepostSourceInput): Promise<SingleResponse<NativeRepostState>>;
2109
2389
  /** Prepare a repost/unrepost for explicit approval. Preserve the mutation ID after a lost response. */
2110
- prepareNativeRepost(input: NativeRepostPrepareInput): Promise<SingleResponse<NativeRepostReview>>;
2390
+ prepareNativeRepost(input: NativeRepostPrepareInput): Promise<SingleResponse<NativeRepostReview & EngageLinkedFields>>;
2111
2391
  /** Submit one approved action. Only Nostr supplies a public signed event. Automatic retries are disabled. */
2112
2392
  submitNativeRepost(id: string, input: {
2113
2393
  approve: true;
@@ -2116,7 +2396,7 @@ export declare class ProtocolsResource {
2116
2396
  /** Reconcile the saved action without sending another native write. */
2117
2397
  nativeRepostStatus(id: string): Promise<SingleResponse<NativeRepostReview>>;
2118
2398
  /** Prepare exact public text, reviewed images and an optional native quote for selected connected Bluesky/ActivityPub accounts. */
2119
- prepareNativePost(input: NativePostPrepareInput): Promise<SingleResponse<NativePostBatch>>;
2399
+ prepareNativePost(input: NativePostPrepareInput): Promise<SingleResponse<NativePostBatch & EngageLinkedFields>>;
2120
2400
  /** Explicitly approve selected deliveries; never auto-retry an uncertain write. */
2121
2401
  submitNativePost(id: string, input: {
2122
2402
  approve: true;
@@ -2159,7 +2439,7 @@ export declare class ProtocolsResource {
2159
2439
  }>;
2160
2440
  }>>;
2161
2441
  /** Prepare one exact shared reply preview. Keep the mutation ID across uncertain responses. */
2162
- prepareNativeReply(input: NativeReplyPrepareInput): Promise<SingleResponse<NativeReplyBatch>>;
2442
+ prepareNativeReply(input: NativeReplyPrepareInput): Promise<SingleResponse<NativeReplyBatch & EngageLinkedFields>>;
2163
2443
  /** Send only explicitly approved delivery IDs from this preview. Repeated submissions reconcile; they do not replay a write. */
2164
2444
  submitNativeReply(id: string, input: {
2165
2445
  approve: true;
@@ -2279,6 +2559,113 @@ export declare class ProtocolsResource {
2279
2559
  * `age_band_required`. Needs `users:write`.
2280
2560
  */
2281
2561
  setNetwork(network: NativeNetwork, input: SetNativeNetworkInput): Promise<SingleResponse<NativeNetworkActivation | NativeNetworkOff>>;
2562
+ /**
2563
+ * Which identity a one-tap action uses on a network when the member also linked an outside account there (0.7.191).
2564
+ * `linked` needs a linked account (409 `linked_account_required`); `native` needs the network on, ready or pending
2565
+ * (409 `native_network_off`) and a network that can send a tap as the member's identity (503
2566
+ * `native_network_unavailable`, reason `adapter_missing`, otherwise), and sets the identity up now when that is what the
2567
+ * choice needs. Needs `users:write`.
2568
+ */
2569
+ setEngageDefault(network: NativeNetwork, engageDefault: EngageIdentity): Promise<SingleResponse<{
2570
+ network: NativeNetwork;
2571
+ engageDefault: EngageIdentity;
2572
+ presence: NativeNetworkPresence | null;
2573
+ }>>;
2574
+ /**
2575
+ * "Get my AT Protocol password" (0.7.191): the PDS emails a reset code to the member's verified address, the one their hosted AT
2576
+ * Protocol account uses; Minds never holds or shows that password (it keeps only a revocable app password, which the
2577
+ * member can revoke from any AT Protocol app). Needs a step-up (403 `step_up_required` / `step_up_failed`). Other
2578
+ * refusals: 404 `no_identity`, 409 `needs_verified_email` or `email_changed`, 429 `rate_limited`. Needs `users:write`.
2579
+ * Never auto-retried.
2580
+ */
2581
+ claimAtprotoPassword(proof: AtprotoPasswordClaimProof): Promise<SingleResponse<AtprotoPasswordClaim>>;
2582
+ /**
2583
+ * "Let Minds act as your AT Protocol account" (0.7.191): the way back when AT Protocol reads `needs_action` with reason
2584
+ * `needs_atproto_grant` (an account made before Minds ran it natively) or `error` with `app_password_revoked`. The member
2585
+ * enters their AT Protocol account's password once (the main one, which `claimAtprotoPassword` lets them set, or a
2586
+ * non-privileged app password they made); Minds keeps only a new revocable app password and drops the password given.
2587
+ * Refusals: 403 `password_failed`, 400 `privileged_app_password` (one that can read direct messages), 409
2588
+ * `identity_mismatch`, 404 `no_identity`, 429 `rate_limited`. Needs `users:write`. Never auto-retried.
2589
+ */
2590
+ grantAtproto(input: {
2591
+ password: string;
2592
+ }): Promise<SingleResponse<AtprotoGrant>>;
2593
+ /** The member's one-tap actions waiting for their native identity to be set up, oldest first (0.7.191). Needs `users:read`. */
2594
+ pendingInteractions(): Promise<SingleResponse<{
2595
+ interactions: PendingNativeInteraction[];
2596
+ }>>;
2597
+ /**
2598
+ * One-tap like or unlike (0.7.191). A native answer is sent (`NativeEngageSent`) or queued (`NativeEngageQueued`, 202)
2599
+ * while the identity is set up; a linked answer is the review to submit with `submitNativeLike`, as before. Refusals:
2600
+ * 409 `native_network_off` (with `reason`), 409 `linked_account_required`, 429 `too_many_pending`, and 503
2601
+ * `native_network_unavailable` with reason `adapter_missing` while the network cannot send a tap as the member's identity
2602
+ * (a linked account acts instead when there is one; nothing is set up or queued). Keep
2603
+ * `clientMutationId` across retries: a retried tap is never sent twice, and once it expired unsent the retry answers
2604
+ * `delivery: { state: 'failed', code: 'interaction_expired' }` (a new tap takes a new id). The same id on a different
2605
+ * action, target or words is 409 `client_mutation_reused`. A tap whose identity went off before it was sent answers
2606
+ * `delivery: { state: 'failed', code: 'native_network_off' }`. Never auto-retried.
2607
+ */
2608
+ engageLike(input: EngageOneInput<'like' | 'unlike'>): Promise<SingleResponse<EngageAnswer<NativeLikeReview>>>;
2609
+ /** One-tap repost or unrepost (0.7.191); answers as `engageLike` does (linked: submit with `submitNativeRepost`). */
2610
+ engageRepost(input: EngageOneInput<'repost' | 'unrepost'>): Promise<SingleResponse<EngageAnswer<NativeRepostReview>>>;
2611
+ /** One-tap follow or unfollow (0.7.191); answers as `engageLike` does (linked: submit with `submitNativeFollow`). */
2612
+ engageFollow(input: EngageOneInput<'follow' | 'unfollow'>): Promise<SingleResponse<EngageAnswer<NativeFollowReview>>>;
2613
+ /**
2614
+ * A reply as the member's own identity on the parent's network, or (identity `linked`, or `accountIds`) the shared
2615
+ * reply review as `prepareNativeReply` (0.7.191). Answers as `engageLike` does. `media` takes only the member's own
2616
+ * Minds uploads, native or linked (400 `invalid_reply` otherwise; 422 `media_unsupported` for a GIF with other images
2617
+ * on ActivityPub).
2618
+ */
2619
+ engageReply(input: {
2620
+ clientMutationId: string;
2621
+ text: string;
2622
+ parent: {
2623
+ protocol: NativeWriteProtocol;
2624
+ nativeId: string;
2625
+ readRef?: string;
2626
+ };
2627
+ media?: NativeMediaInput[];
2628
+ identity?: EngageIdentity;
2629
+ accountIds?: string[];
2630
+ }): Promise<SingleResponse<EngageAnswer<NativeReplyBatch>>>;
2631
+ /**
2632
+ * A quote of a post as the member's own identity on its network, or (identity `linked`, or `accountIds`) the post
2633
+ * review as `prepareNativePost` (0.7.191). A post with no quote is never native: the member's posts in the app reach
2634
+ * their networks on their own (409 `native_post_from_app`). Answers as `engageLike` does.
2635
+ */
2636
+ engageQuote(input: {
2637
+ clientMutationId: string;
2638
+ text: string;
2639
+ quote: {
2640
+ protocol: NativeWriteProtocol;
2641
+ nativeId: string;
2642
+ };
2643
+ media?: NativeMediaInput[];
2644
+ identity?: EngageIdentity;
2645
+ accountIds?: string[];
2646
+ }): Promise<SingleResponse<EngageAnswer<NativePostBatch>>>;
2647
+ /**
2648
+ * Takes the member's managed Nostr key home, step 1: the key as an `nsec`, after a step-up (403 `step_up_required`
2649
+ * or `step_up_failed`, 429 `rate_limited`, 404 `no_managed_key`). Minds keeps its copy. Never retried. Needs
2650
+ * `users:write`.
2651
+ */
2652
+ exportNostrKey(stepUp: NostrKeyStepUp): Promise<SingleResponse<ManagedNostrKeyExport>>;
2653
+ /** Step 2a: a single-use challenge for the member's signer to sign with the same key (NIP-07, never published). */
2654
+ nostrRebindChallenge(): Promise<SingleResponse<NostrRebindChallenge>>;
2655
+ /**
2656
+ * Step 2b: the signed challenge. A signature from the identity's own key sets the mode to `attached` (409
2657
+ * `rebind_mismatch` for another key; 400 `invalid_proof`, `expired_proof` or `used_proof`). Minds still holds its copy.
2658
+ */
2659
+ rebindNostrKey(event: HostedNostrIdentityProof): Promise<SingleResponse<NostrRebindResult>>;
2660
+ /**
2661
+ * Step 3: after a step-up, and only once rebound (409 `rebind_required`), Minds deletes its encrypted copy of the
2662
+ * key. First it signs, with the copy, a takedown for everything it published with the key, kept so a post deletion,
2663
+ * "Remove what I already shared" or the account's deletion still takes Minds' notes down (409 `too_many_published`
2664
+ * when there is too much: the copy is kept). The NIP-05 address keeps the same key; every later Nostr action is a
2665
+ * signing request for the member's device. Not undoable by Minds: make sure their signer holds the key first. Never
2666
+ * retried.
2667
+ */
2668
+ deleteManagedNostrCopy(stepUp: NostrKeyStepUp): Promise<SingleResponse<ManagedNostrCopyDeleted>>;
2282
2669
  /** Current Minds-hosted ActivityPub state for this app user; never provisions. */
2283
2670
  federationIdentity(): Promise<SingleResponse<FederationIdentityView>>;
2284
2671
  /** Explicit opt-in; the platform provisions once and never rotates keys or re-enables a disabled identity on retry. */
@@ -2332,9 +2719,11 @@ export declare class ProtocolsResource {
2332
2719
  *
2333
2720
  * Failures to expect: `handle_unavailable` (409, taken or reserved; choose
2334
2721
  * another), `identity_conflict` (409, the member already has one),
2335
- * `creation_in_progress` (409), and the operator-side 503s
2336
- * `handle_dns_unavailable`, `handle_unresolvable`, `handle_unverified` and
2337
- * `hosted_server_unavailable`, which succeed unchanged once the operator is done.
2722
+ * `creation_in_progress` (409), `outbound_refused` (403, the server's one
2723
+ * outbound guard said no before the PDS was asked anything; nothing was
2724
+ * created), and the operator-side 503s `handle_dns_unavailable`,
2725
+ * `handle_unresolvable`, `handle_unverified` and `hosted_server_unavailable`,
2726
+ * which succeed unchanged once the operator is done.
2338
2727
  */
2339
2728
  createHostedIdentity(input: CreateHostedIdentityInput): Promise<SingleResponse<CreatedHostedProtocolIdentity>>;
2340
2729
  disconnectHostedIdentity(id: string): Promise<SingleResponse<{