@atproto/api 0.20.35 → 0.20.37

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 (56) hide show
  1. package/CHANGELOG.md +27 -2
  2. package/dist/agent.d.ts +4 -1
  3. package/dist/agent.d.ts.map +1 -1
  4. package/dist/agent.js +6 -2
  5. package/dist/agent.js.map +1 -1
  6. package/dist/atp-agent.d.ts.map +1 -1
  7. package/dist/atp-agent.js.map +1 -1
  8. package/dist/client/lexicons.d.ts +60 -8
  9. package/dist/client/lexicons.d.ts.map +1 -1
  10. package/dist/client/lexicons.js +30 -4
  11. package/dist/client/lexicons.js.map +1 -1
  12. package/dist/client/types/app/bsky/actor/defs.d.ts +5 -0
  13. package/dist/client/types/app/bsky/actor/defs.d.ts.map +1 -1
  14. package/dist/client/types/app/bsky/actor/defs.js.map +1 -1
  15. package/dist/client/types/app/bsky/ageassurance/defs.d.ts.map +1 -1
  16. package/dist/client/types/app/bsky/ageassurance/defs.js.map +1 -1
  17. package/dist/client/types/app/bsky/draft/defs.d.ts.map +1 -1
  18. package/dist/client/types/app/bsky/draft/defs.js.map +1 -1
  19. package/dist/client/types/app/bsky/feed/defs.d.ts.map +1 -1
  20. package/dist/client/types/app/bsky/feed/defs.js.map +1 -1
  21. package/dist/client/types/app/bsky/graph/muteActor.d.ts +4 -0
  22. package/dist/client/types/app/bsky/graph/muteActor.d.ts.map +1 -1
  23. package/dist/client/types/app/bsky/graph/muteActor.js.map +1 -1
  24. package/dist/client/types/app/bsky/unspecced/defs.d.ts +5 -1
  25. package/dist/client/types/app/bsky/unspecced/defs.d.ts.map +1 -1
  26. package/dist/client/types/app/bsky/unspecced/defs.js.map +1 -1
  27. package/dist/client/types/chat/bsky/convo/defs.d.ts.map +1 -1
  28. package/dist/client/types/chat/bsky/convo/defs.js.map +1 -1
  29. package/dist/client/types/chat/bsky/group/createGroup.d.ts +1 -0
  30. package/dist/client/types/chat/bsky/group/createGroup.d.ts.map +1 -1
  31. package/dist/client/types/chat/bsky/group/createGroup.js.map +1 -1
  32. package/dist/client/types/com/atproto/repo/applyWrites.d.ts.map +1 -1
  33. package/dist/client/types/com/atproto/repo/applyWrites.js.map +1 -1
  34. package/dist/client/types/com/atproto/sync/defs.d.ts.map +1 -1
  35. package/dist/client/types/com/atproto/sync/defs.js.map +1 -1
  36. package/dist/client/types/com/atproto/temp/checkHandleAvailability.d.ts.map +1 -1
  37. package/dist/client/types/com/atproto/temp/checkHandleAvailability.js.map +1 -1
  38. package/dist/client/types/tools/ozone/moderation/defs.d.ts.map +1 -1
  39. package/dist/client/types/tools/ozone/moderation/defs.js.map +1 -1
  40. package/dist/client/types/tools/ozone/moderation/queryEvents.d.ts.map +1 -1
  41. package/dist/client/types/tools/ozone/moderation/queryEvents.js.map +1 -1
  42. package/dist/client/types/tools/ozone/moderation/queryStatuses.d.ts.map +1 -1
  43. package/dist/client/types/tools/ozone/moderation/queryStatuses.js.map +1 -1
  44. package/dist/client/types/tools/ozone/queue/createQueue.d.ts.map +1 -1
  45. package/dist/client/types/tools/ozone/queue/createQueue.js.map +1 -1
  46. package/dist/client/types/tools/ozone/queue/defs.d.ts.map +1 -1
  47. package/dist/client/types/tools/ozone/queue/defs.js.map +1 -1
  48. package/dist/client/types/tools/ozone/report/defs.d.ts.map +1 -1
  49. package/dist/client/types/tools/ozone/report/defs.js.map +1 -1
  50. package/dist/client/types/tools/ozone/report/queryReports.d.ts.map +1 -1
  51. package/dist/client/types/tools/ozone/report/queryReports.js.map +1 -1
  52. package/dist/moderation/types.d.ts.map +1 -1
  53. package/dist/moderation/types.js.map +1 -1
  54. package/dist/types.d.ts.map +1 -1
  55. package/dist/types.js.map +1 -1
  56. package/package.json +7 -7
@@ -1 +1 @@
1
- {"version":3,"file":"atp-agent.js","sourceRoot":"","sources":["../src/atp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,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AAC,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAA;AAC3D,CAAC","sourcesContent":["import { getPdsEndpoint, isValidDidDoc } from '@atproto/common-web'\nimport {\n type ErrorResponseBody,\n type Gettable,\n ResponseType,\n XRPCError,\n XrpcClient,\n errorResponseBody,\n} from '@atproto/xrpc'\nimport { Agent } from './agent.js'\nimport {\n type ComAtprotoServerCreateAccount,\n type ComAtprotoServerCreateSession,\n type ComAtprotoServerGetSession,\n ComAtprotoServerNS,\n type ComAtprotoServerRefreshSession,\n} from './client/index.js'\nimport { schemas } from './client/lexicons.js'\nimport type { SessionManager } from './session-manager.js'\nimport type {\n AtpAgentLoginOpts,\n AtpPersistSessionHandler,\n AtpSessionData,\n} from './types.js'\n\nconst ReadableStream = globalThis.ReadableStream as\n | typeof globalThis.ReadableStream\n | undefined\n\nexport type AtpAgentOptions = {\n service: string | URL\n persistSession?: AtpPersistSessionHandler\n fetch?: typeof globalThis.fetch\n headers?: Iterable<[string, Gettable<null | string>]>\n}\n\n/**\n * A wrapper around the {@link Agent} class that uses credential based session\n * management. This class also exposes most of the session management methods\n * directly.\n *\n * This class will be deprecated in the near future. Use {@link Agent} directly\n * with a {@link CredentialSession} instead:\n *\n * ```ts\n * const session = new CredentialSession({\n * service: new URL('https://example.com'),\n * })\n *\n * const agent = new Agent(session)\n * ```\n */\nexport class AtpAgent extends Agent {\n readonly sessionManager: CredentialSession\n\n constructor(options: AtpAgentOptions | CredentialSession) {\n const sessionManager =\n options instanceof CredentialSession\n ? options\n : new CredentialSession(\n new URL(options.service),\n options.fetch,\n options.persistSession,\n )\n\n super(sessionManager)\n\n // This assignment is already being done in the super constructor, but we\n // need to do it here to make TypeScript happy.\n this.sessionManager = sessionManager\n\n if (!(options instanceof CredentialSession) && options.headers) {\n for (const [key, value] of options.headers) {\n this.setHeader(key, value)\n }\n }\n }\n\n clone(): AtpAgent {\n return this.copyInto(new AtpAgent(this.sessionManager))\n }\n\n get session() {\n return this.sessionManager.session\n }\n\n get hasSession() {\n return this.sessionManager.hasSession\n }\n\n get serviceUrl() {\n return this.sessionManager.serviceUrl\n }\n\n get pdsUrl() {\n return this.sessionManager.pdsUrl\n }\n\n get dispatchUrl() {\n return this.sessionManager.dispatchUrl\n }\n\n /** @deprecated use {@link serviceUrl} instead */\n get service() {\n return this.serviceUrl\n }\n\n get persistSession() {\n throw new Error(\n 'Cannot set persistSession directly. \"persistSession\" is defined through the constructor and will be invoked automatically when session data changes.',\n )\n }\n\n set persistSession(v: unknown) {\n throw new Error(\n 'Cannot set persistSession directly. \"persistSession\" must be defined in the constructor and can no longer be changed.',\n )\n }\n\n /** @deprecated use {@link AtpAgent.serviceUrl} instead */\n getServiceUrl() {\n return this.serviceUrl\n }\n\n async resumeSession(\n session: AtpSessionData,\n ): Promise<ComAtprotoServerGetSession.Response> {\n return this.sessionManager.resumeSession(session)\n }\n\n async createAccount(\n data: ComAtprotoServerCreateAccount.InputSchema,\n opts?: ComAtprotoServerCreateAccount.CallOptions,\n ): Promise<ComAtprotoServerCreateAccount.Response> {\n return this.sessionManager.createAccount(data, opts)\n }\n\n async login(\n opts: AtpAgentLoginOpts,\n ): Promise<ComAtprotoServerCreateSession.Response> {\n return this.sessionManager.login(opts)\n }\n\n async logout(): Promise<void> {\n return this.sessionManager.logout()\n }\n}\n\n/**\n * Credentials (username / password) based session manager. Instances of this\n * class will typically be used as the session manager for an {@link AtpAgent}.\n * They can also be used with an {@link XrpcClient}, if you want to use you\n * own Lexicons.\n */\nexport class CredentialSession implements SessionManager {\n public pdsUrl?: URL // The PDS URL, driven by the did doc\n public session?: AtpSessionData\n public refreshSessionPromise?: Promise<ComAtprotoServerRefreshSession.Response>\n\n /**\n * Private {@link ComAtprotoServerNS} used to perform session management API\n * calls on the service endpoint. Calls performed by this agent will not be\n * authenticated using the user's session to allow proper manual configuration\n * of the headers when performing session management operations.\n */\n protected server = new ComAtprotoServerNS(\n // Note that the use of the codegen \"schemas\" (to instantiate `this.api`),\n // as well as the use of `ComAtprotoServerNS` will cause this class to\n // reference (way) more code than it actually needs. It is not possible,\n // with the current state of the codegen, to generate a client that only\n // includes the methods that are actually used by this class. This is a\n // known limitation that should be addressed in a future version of the\n // codegen.\n new XrpcClient((url, init) => {\n return (0, this.fetch)(new URL(url, this.serviceUrl), init)\n }, schemas),\n )\n\n constructor(\n public readonly serviceUrl: URL,\n public fetch = globalThis.fetch,\n protected readonly persistSession?: AtpPersistSessionHandler,\n ) {}\n\n get did() {\n return this.session?.did\n }\n\n get dispatchUrl() {\n return this.pdsUrl || this.serviceUrl\n }\n\n get hasSession() {\n return !!this.session\n }\n\n /**\n * Sets a WhatWG \"fetch()\" function to be used for making HTTP requests.\n */\n setFetch(fetch = globalThis.fetch) {\n this.fetch = fetch\n }\n\n async fetchHandler(url: string, init?: RequestInit): Promise<Response> {\n // wait for any active session-refreshes to finish\n await this.refreshSessionPromise\n\n const initialUri = new URL(url, this.dispatchUrl)\n const initialReq = new Request(initialUri, init)\n\n const initialToken = this.session?.accessJwt\n if (!initialToken || initialReq.headers.has('authorization')) {\n return (0, this.fetch)(initialReq)\n }\n\n initialReq.headers.set('authorization', `Bearer ${initialToken}`)\n const initialRes = await (0, this.fetch)(initialReq)\n\n if (!this.session?.refreshJwt) {\n return initialRes\n }\n const isExpiredToken =\n initialRes.status === 401 ||\n (await isErrorResponse(initialRes, [400], ['ExpiredToken']))\n\n if (!isExpiredToken) {\n return initialRes\n }\n\n try {\n await this.refreshSession()\n } catch {\n return initialRes\n }\n\n if (init?.signal?.aborted) {\n return initialRes\n }\n\n // The stream was already consumed. We cannot retry the request. A solution\n // would be to tee() the input stream but that would bufferize the entire\n // stream in memory which can lead to memory starvation. Instead, we will\n // return the original response and let the calling code handle retries.\n if (ReadableStream && init?.body instanceof ReadableStream) {\n return initialRes\n }\n\n // Return initial \"ExpiredToken\" response if the session was not refreshed.\n const updatedToken = this.session?.accessJwt\n if (!updatedToken || updatedToken === initialToken) {\n return initialRes\n }\n\n // Make sure the initial request is cancelled to avoid leaking resources\n // (NodeJS 👀): https://undici.nodejs.org/#/?id=garbage-collection\n await initialRes.body?.cancel()\n\n // We need to re-compute the URI in case the PDS endpoint has changed\n const updatedUri = new URL(url, this.dispatchUrl)\n const updatedReq = new Request(updatedUri, init)\n\n updatedReq.headers.set('authorization', `Bearer ${updatedToken}`)\n\n return await (0, this.fetch)(updatedReq)\n }\n\n /**\n * Create a new account and hydrate its session in this agent.\n */\n async createAccount(\n data: ComAtprotoServerCreateAccount.InputSchema,\n opts?: ComAtprotoServerCreateAccount.CallOptions,\n ): Promise<ComAtprotoServerCreateAccount.Response> {\n // Clear any existing session\n this.session = undefined\n this.refreshSessionPromise = undefined\n\n try {\n const res = await this.server.createAccount(data, opts)\n this.session = {\n accessJwt: res.data.accessJwt,\n refreshJwt: res.data.refreshJwt,\n handle: res.data.handle,\n did: res.data.did,\n email: data.email,\n emailConfirmed: false,\n emailAuthFactor: false,\n active: true,\n }\n this.persistSession?.('create', this.session)\n this._updateApiEndpoint(res.data.didDoc)\n return res\n } catch (e) {\n this.session = undefined\n this.persistSession?.('create-failed', undefined)\n throw e\n }\n }\n\n /**\n * Start a new session with this agent.\n */\n async login(\n opts: AtpAgentLoginOpts,\n ): Promise<ComAtprotoServerCreateSession.Response> {\n // Clear any existing session\n this.session = undefined\n this.refreshSessionPromise = undefined\n\n try {\n const res = await this.server.createSession({\n identifier: opts.identifier,\n password: opts.password,\n authFactorToken: opts.authFactorToken,\n allowTakendown: opts.allowTakendown,\n })\n\n if (this.session) {\n throw new Error('Concurrent login detected')\n }\n\n this.session = {\n accessJwt: res.data.accessJwt,\n refreshJwt: res.data.refreshJwt,\n handle: res.data.handle,\n did: res.data.did,\n email: res.data.email,\n emailConfirmed: res.data.emailConfirmed,\n emailAuthFactor: res.data.emailAuthFactor,\n active: res.data.active ?? true,\n status: res.data.status,\n }\n this._updateApiEndpoint(res.data.didDoc)\n this.persistSession?.('create', this.session)\n return res\n } catch (e) {\n this.session = undefined\n this.persistSession?.('create-failed', undefined)\n throw e\n }\n }\n\n async logout(): Promise<void> {\n if (this.session) {\n try {\n await this.server.deleteSession(undefined, {\n headers: {\n authorization: `Bearer ${this.session.refreshJwt}`,\n },\n })\n } catch {\n // Ignore errors\n } finally {\n this.session = undefined\n this.persistSession?.('expired', undefined)\n }\n }\n }\n\n /**\n * Resume a pre-existing session with this agent.\n *\n * @note that a rejected promise from this method indicates a failure to\n * refresh the session after resuming it but does not indicate a failure to\n * set the session itself. In case of rejection, check the presence of\n * {@link CredentialSession.session} after calling this method to ensure the\n * session was set.\n */\n async resumeSession(\n session: AtpSessionData,\n ): Promise<ComAtprotoServerRefreshSession.Response> {\n // Protect against multiple calls to resumeSession that would trigger a\n // refresh for the same session simultaneously.\n // Ideally, this check would be based on a session identifier, but since\n // we don't have one, we will just check the refresh token.\n if (session.refreshJwt !== this.session?.refreshJwt) {\n // Set the current session, and discard any pending refresh operation..\n this.session = session\n this.refreshSessionPromise = undefined\n }\n\n // Ensure that the session is still valid by forcing a refresh. This will\n // also ensure that persistSession handler is called.\n const result = await this.refreshSession()\n\n // Fool-proofing: another concurrent operation may have replaced the session\n // while we were waiting for the refresh to complete.\n if (session.did !== this.session?.did) {\n throw new Error('DID mismatch on resumeSession')\n }\n\n return result\n }\n\n /**\n * Internal helper to refresh sessions\n * - Wraps the actual implementation in a promise-guard to ensure only\n * one refresh is attempted at a time.\n */\n async refreshSession(): Promise<ComAtprotoServerRefreshSession.Response> {\n if (!this.session) {\n throw new Error('Unexpected state: no session to refresh')\n }\n\n // Do not refresh if we already have a refresh in progress\n if (this.refreshSessionPromise) return this.refreshSessionPromise\n\n const promise = this._refreshSessionInner().finally(() => {\n if (this.refreshSessionPromise === promise) {\n this.refreshSessionPromise = undefined\n }\n })\n\n this.refreshSessionPromise = promise\n\n return promise\n }\n\n /**\n * Internal helper to refresh sessions (actual behavior)\n */\n private async _refreshSessionInner(): Promise<ComAtprotoServerRefreshSession.Response> {\n const { session } = this\n\n // Should never happen\n if (!session) throw new Error('No session to refresh')\n\n try {\n const res = await this.server.refreshSession(undefined, {\n headers: { authorization: `Bearer ${session.refreshJwt}` },\n })\n\n const { data } = res\n\n // Something is very wrong if the DID changes during a refresh\n if (data.did !== session.did) {\n throw new XRPCError(\n ResponseType.InvalidRequest,\n 'Invalid session',\n 'InvalidDID',\n )\n }\n\n // Historically, refreshSession did not return all the fields from\n // getSession. In particular, email, emailConfirmed and emailAuthFactor\n // were missing. Similarly, some servers might not return the didDoc in\n // refreshSession. We fetch them via getSession if missing, allowing to\n // ensure that we are always talking with the right PDS.\n if (data.emailConfirmed == null || data.didDoc == null) {\n try {\n const res = await this.server.getSession(undefined, {\n headers: { authorization: `Bearer ${data.accessJwt}` },\n })\n\n // Fool proofing (should always match)\n if (res.data.did === data.did) {\n Object.assign(data, res.data)\n }\n } catch {\n // Noop, we'll keep the current values we have\n }\n }\n\n // protect against concurrent session updates\n if (this.session !== session) {\n return Promise.reject(new Error('Concurrent session update detected'))\n }\n\n // succeeded, update the session\n this.session = {\n did: data.did,\n accessJwt: data.accessJwt,\n refreshJwt: data.refreshJwt,\n handle: data.handle ?? session.handle,\n email: data.email ?? session.email,\n emailConfirmed: data.emailConfirmed ?? session.emailConfirmed,\n emailAuthFactor: data.emailAuthFactor ?? session.emailAuthFactor,\n active: data.active ?? session.active ?? true,\n status: data.status,\n }\n\n this._updateApiEndpoint(res.data.didDoc)\n this.persistSession?.('update', this.session)\n\n return res\n } catch (err) {\n // protect against concurrent session updates\n if (this.session === session) {\n if (\n err instanceof XRPCError &&\n (err.status === 401 ||\n err.error === 'InvalidDID' ||\n ['ExpiredToken', 'InvalidToken'].includes(err.error))\n ) {\n // failed due to a bad refresh token\n this.session = undefined\n this.persistSession?.('expired', undefined)\n } else {\n // Assume the problem is transient and the session can be reused later.\n this.session = session\n this.persistSession?.('network-error', session)\n }\n }\n\n throw err\n }\n }\n\n /**\n * Helper to update the pds endpoint dynamically.\n *\n * The session methods (create, resume, refresh) may respond with the user's\n * did document which contains the user's canonical PDS endpoint. That endpoint\n * may differ from the endpoint used to contact the server. We capture that\n * PDS endpoint and update the client to use that given endpoint for future\n * requests. (This helps ensure smooth migrations between PDSes, especially\n * when the PDSes are operated by a single org.)\n */\n private _updateApiEndpoint(didDoc: unknown) {\n const endpoint = isValidDidDoc(didDoc) ? getPdsEndpoint(didDoc) : undefined\n if (endpoint) {\n this.pdsUrl = new URL(endpoint)\n } else {\n // If the did doc is invalid (or missing), we clear the pdsUrl (should\n // never happen). This is fine if the auth server and PDS are the same\n // service, or if the auth server will proxy requests to the right PDS\n // (which is the case for Bluesky's \"entryway\").\n this.pdsUrl = undefined\n }\n }\n}\n\nfunction isErrorObject(v: unknown): v is ErrorResponseBody {\n return errorResponseBody.safeParse(v).success\n}\n\nasync function isErrorResponse(\n response: Response,\n status: number[],\n errorNames: string[],\n): Promise<boolean> {\n if (!status.includes(response.status)) return false\n // Some engines (react-native 👀) don't expose a response.body property...\n // if (!response.body) return false\n try {\n const json = await peekJson(response, 10 * 1024)\n return isErrorObject(json) && (errorNames as any[]).includes(json.error)\n } catch (err) {\n return false\n }\n}\n\nasync function peekJson(\n response: Response,\n maxSize = Infinity,\n): Promise<unknown> {\n if (extractType(response) !== 'application/json') throw new Error('Not JSON')\n if (extractLength(response) > maxSize) throw new Error('Response too large')\n return response.clone().json()\n}\n\nfunction extractLength({ headers }: Response) {\n return headers.get('Content-Length')\n ? Number(headers.get('Content-Length'))\n : NaN\n}\n\nfunction extractType({ headers }: Response) {\n return headers.get('Content-Type')?.split(';')[0]?.trim()\n}\n"]}
1
+ {"version":3,"file":"atp-agent.js","sourceRoot":"","sources":["../src/atp-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnE,OAAO,EAGL,YAAY,EACZ,SAAS,EACT,UAAU,EACV,iBAAiB,GAClB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE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C","sourcesContent":["import { getPdsEndpoint, isValidDidDoc } from '@atproto/common-web'\nimport {\n type ErrorResponseBody,\n type Gettable,\n ResponseType,\n XRPCError,\n XrpcClient,\n errorResponseBody,\n} from '@atproto/xrpc'\nimport { Agent } from './agent.js'\nimport {\n type ComAtprotoServerCreateAccount,\n type ComAtprotoServerCreateSession,\n type ComAtprotoServerGetSession,\n ComAtprotoServerNS,\n type ComAtprotoServerRefreshSession,\n} from './client/index.js'\nimport { schemas } from './client/lexicons.js'\nimport type { SessionManager } from './session-manager.js'\nimport type {\n AtpAgentLoginOpts,\n AtpPersistSessionHandler,\n AtpSessionData,\n} from './types.js'\n\nconst ReadableStream = globalThis.ReadableStream as\n typeof globalThis.ReadableStream | undefined\n\nexport type AtpAgentOptions = {\n service: string | URL\n persistSession?: AtpPersistSessionHandler\n fetch?: typeof globalThis.fetch\n headers?: Iterable<[string, Gettable<null | string>]>\n}\n\n/**\n * A wrapper around the {@link Agent} class that uses credential based session\n * management. This class also exposes most of the session management methods\n * directly.\n *\n * This class will be deprecated in the near future. Use {@link Agent} directly\n * with a {@link CredentialSession} instead:\n *\n * ```ts\n * const session = new CredentialSession({\n * service: new URL('https://example.com'),\n * })\n *\n * const agent = new Agent(session)\n * ```\n */\nexport class AtpAgent extends Agent {\n readonly sessionManager: CredentialSession\n\n constructor(options: AtpAgentOptions | CredentialSession) {\n const sessionManager =\n options instanceof CredentialSession\n ? options\n : new CredentialSession(\n new URL(options.service),\n options.fetch,\n options.persistSession,\n )\n\n super(sessionManager)\n\n // This assignment is already being done in the super constructor, but we\n // need to do it here to make TypeScript happy.\n this.sessionManager = sessionManager\n\n if (!(options instanceof CredentialSession) && options.headers) {\n for (const [key, value] of options.headers) {\n this.setHeader(key, value)\n }\n }\n }\n\n clone(): AtpAgent {\n return this.copyInto(new AtpAgent(this.sessionManager))\n }\n\n get session() {\n return this.sessionManager.session\n }\n\n get hasSession() {\n return this.sessionManager.hasSession\n }\n\n get serviceUrl() {\n return this.sessionManager.serviceUrl\n }\n\n get pdsUrl() {\n return this.sessionManager.pdsUrl\n }\n\n get dispatchUrl() {\n return this.sessionManager.dispatchUrl\n }\n\n /** @deprecated use {@link serviceUrl} instead */\n get service() {\n return this.serviceUrl\n }\n\n get persistSession() {\n throw new Error(\n 'Cannot set persistSession directly. \"persistSession\" is defined through the constructor and will be invoked automatically when session data changes.',\n )\n }\n\n set persistSession(v: unknown) {\n throw new Error(\n 'Cannot set persistSession directly. \"persistSession\" must be defined in the constructor and can no longer be changed.',\n )\n }\n\n /** @deprecated use {@link AtpAgent.serviceUrl} instead */\n getServiceUrl() {\n return this.serviceUrl\n }\n\n async resumeSession(\n session: AtpSessionData,\n ): Promise<ComAtprotoServerGetSession.Response> {\n return this.sessionManager.resumeSession(session)\n }\n\n async createAccount(\n data: ComAtprotoServerCreateAccount.InputSchema,\n opts?: ComAtprotoServerCreateAccount.CallOptions,\n ): Promise<ComAtprotoServerCreateAccount.Response> {\n return this.sessionManager.createAccount(data, opts)\n }\n\n async login(\n opts: AtpAgentLoginOpts,\n ): Promise<ComAtprotoServerCreateSession.Response> {\n return this.sessionManager.login(opts)\n }\n\n async logout(): Promise<void> {\n return this.sessionManager.logout()\n }\n}\n\n/**\n * Credentials (username / password) based session manager. Instances of this\n * class will typically be used as the session manager for an {@link AtpAgent}.\n * They can also be used with an {@link XrpcClient}, if you want to use you\n * own Lexicons.\n */\nexport class CredentialSession implements SessionManager {\n public pdsUrl?: URL // The PDS URL, driven by the did doc\n public session?: AtpSessionData\n public refreshSessionPromise?: Promise<ComAtprotoServerRefreshSession.Response>\n\n /**\n * Private {@link ComAtprotoServerNS} used to perform session management API\n * calls on the service endpoint. Calls performed by this agent will not be\n * authenticated using the user's session to allow proper manual configuration\n * of the headers when performing session management operations.\n */\n protected server = new ComAtprotoServerNS(\n // Note that the use of the codegen \"schemas\" (to instantiate `this.api`),\n // as well as the use of `ComAtprotoServerNS` will cause this class to\n // reference (way) more code than it actually needs. It is not possible,\n // with the current state of the codegen, to generate a client that only\n // includes the methods that are actually used by this class. This is a\n // known limitation that should be addressed in a future version of the\n // codegen.\n new XrpcClient((url, init) => {\n return (0, this.fetch)(new URL(url, this.serviceUrl), init)\n }, schemas),\n )\n\n constructor(\n public readonly serviceUrl: URL,\n public fetch = globalThis.fetch,\n protected readonly persistSession?: AtpPersistSessionHandler,\n ) {}\n\n get did() {\n return this.session?.did\n }\n\n get dispatchUrl() {\n return this.pdsUrl || this.serviceUrl\n }\n\n get hasSession() {\n return !!this.session\n }\n\n /**\n * Sets a WhatWG \"fetch()\" function to be used for making HTTP requests.\n */\n setFetch(fetch = globalThis.fetch) {\n this.fetch = fetch\n }\n\n async fetchHandler(url: string, init?: RequestInit): Promise<Response> {\n // wait for any active session-refreshes to finish\n await this.refreshSessionPromise\n\n const initialUri = new URL(url, this.dispatchUrl)\n const initialReq = new Request(initialUri, init)\n\n const initialToken = this.session?.accessJwt\n if (!initialToken || initialReq.headers.has('authorization')) {\n return (0, this.fetch)(initialReq)\n }\n\n initialReq.headers.set('authorization', `Bearer ${initialToken}`)\n const initialRes = await (0, this.fetch)(initialReq)\n\n if (!this.session?.refreshJwt) {\n return initialRes\n }\n const isExpiredToken =\n initialRes.status === 401 ||\n (await isErrorResponse(initialRes, [400], ['ExpiredToken']))\n\n if (!isExpiredToken) {\n return initialRes\n }\n\n try {\n await this.refreshSession()\n } catch {\n return initialRes\n }\n\n if (init?.signal?.aborted) {\n return initialRes\n }\n\n // The stream was already consumed. We cannot retry the request. A solution\n // would be to tee() the input stream but that would bufferize the entire\n // stream in memory which can lead to memory starvation. Instead, we will\n // return the original response and let the calling code handle retries.\n if (ReadableStream && init?.body instanceof ReadableStream) {\n return initialRes\n }\n\n // Return initial \"ExpiredToken\" response if the session was not refreshed.\n const updatedToken = this.session?.accessJwt\n if (!updatedToken || updatedToken === initialToken) {\n return initialRes\n }\n\n // Make sure the initial request is cancelled to avoid leaking resources\n // (NodeJS 👀): https://undici.nodejs.org/#/?id=garbage-collection\n await initialRes.body?.cancel()\n\n // We need to re-compute the URI in case the PDS endpoint has changed\n const updatedUri = new URL(url, this.dispatchUrl)\n const updatedReq = new Request(updatedUri, init)\n\n updatedReq.headers.set('authorization', `Bearer ${updatedToken}`)\n\n return await (0, this.fetch)(updatedReq)\n }\n\n /**\n * Create a new account and hydrate its session in this agent.\n */\n async createAccount(\n data: ComAtprotoServerCreateAccount.InputSchema,\n opts?: ComAtprotoServerCreateAccount.CallOptions,\n ): Promise<ComAtprotoServerCreateAccount.Response> {\n // Clear any existing session\n this.session = undefined\n this.refreshSessionPromise = undefined\n\n try {\n const res = await this.server.createAccount(data, opts)\n this.session = {\n accessJwt: res.data.accessJwt,\n refreshJwt: res.data.refreshJwt,\n handle: res.data.handle,\n did: res.data.did,\n email: data.email,\n emailConfirmed: false,\n emailAuthFactor: false,\n active: true,\n }\n this.persistSession?.('create', this.session)\n this._updateApiEndpoint(res.data.didDoc)\n return res\n } catch (e) {\n this.session = undefined\n this.persistSession?.('create-failed', undefined)\n throw e\n }\n }\n\n /**\n * Start a new session with this agent.\n */\n async login(\n opts: AtpAgentLoginOpts,\n ): Promise<ComAtprotoServerCreateSession.Response> {\n // Clear any existing session\n this.session = undefined\n this.refreshSessionPromise = undefined\n\n try {\n const res = await this.server.createSession({\n identifier: opts.identifier,\n password: opts.password,\n authFactorToken: opts.authFactorToken,\n allowTakendown: opts.allowTakendown,\n })\n\n if (this.session) {\n throw new Error('Concurrent login detected')\n }\n\n this.session = {\n accessJwt: res.data.accessJwt,\n refreshJwt: res.data.refreshJwt,\n handle: res.data.handle,\n did: res.data.did,\n email: res.data.email,\n emailConfirmed: res.data.emailConfirmed,\n emailAuthFactor: res.data.emailAuthFactor,\n active: res.data.active ?? true,\n status: res.data.status,\n }\n this._updateApiEndpoint(res.data.didDoc)\n this.persistSession?.('create', this.session)\n return res\n } catch (e) {\n this.session = undefined\n this.persistSession?.('create-failed', undefined)\n throw e\n }\n }\n\n async logout(): Promise<void> {\n if (this.session) {\n try {\n await this.server.deleteSession(undefined, {\n headers: {\n authorization: `Bearer ${this.session.refreshJwt}`,\n },\n })\n } catch {\n // Ignore errors\n } finally {\n this.session = undefined\n this.persistSession?.('expired', undefined)\n }\n }\n }\n\n /**\n * Resume a pre-existing session with this agent.\n *\n * @note that a rejected promise from this method indicates a failure to\n * refresh the session after resuming it but does not indicate a failure to\n * set the session itself. In case of rejection, check the presence of\n * {@link CredentialSession.session} after calling this method to ensure the\n * session was set.\n */\n async resumeSession(\n session: AtpSessionData,\n ): Promise<ComAtprotoServerRefreshSession.Response> {\n // Protect against multiple calls to resumeSession that would trigger a\n // refresh for the same session simultaneously.\n // Ideally, this check would be based on a session identifier, but since\n // we don't have one, we will just check the refresh token.\n if (session.refreshJwt !== this.session?.refreshJwt) {\n // Set the current session, and discard any pending refresh operation..\n this.session = session\n this.refreshSessionPromise = undefined\n }\n\n // Ensure that the session is still valid by forcing a refresh. This will\n // also ensure that persistSession handler is called.\n const result = await this.refreshSession()\n\n // Fool-proofing: another concurrent operation may have replaced the session\n // while we were waiting for the refresh to complete.\n if (session.did !== this.session?.did) {\n throw new Error('DID mismatch on resumeSession')\n }\n\n return result\n }\n\n /**\n * Internal helper to refresh sessions\n * - Wraps the actual implementation in a promise-guard to ensure only\n * one refresh is attempted at a time.\n */\n async refreshSession(): Promise<ComAtprotoServerRefreshSession.Response> {\n if (!this.session) {\n throw new Error('Unexpected state: no session to refresh')\n }\n\n // Do not refresh if we already have a refresh in progress\n if (this.refreshSessionPromise) return this.refreshSessionPromise\n\n const promise = this._refreshSessionInner().finally(() => {\n if (this.refreshSessionPromise === promise) {\n this.refreshSessionPromise = undefined\n }\n })\n\n this.refreshSessionPromise = promise\n\n return promise\n }\n\n /**\n * Internal helper to refresh sessions (actual behavior)\n */\n private async _refreshSessionInner(): Promise<ComAtprotoServerRefreshSession.Response> {\n const { session } = this\n\n // Should never happen\n if (!session) throw new Error('No session to refresh')\n\n try {\n const res = await this.server.refreshSession(undefined, {\n headers: { authorization: `Bearer ${session.refreshJwt}` },\n })\n\n const { data } = res\n\n // Something is very wrong if the DID changes during a refresh\n if (data.did !== session.did) {\n throw new XRPCError(\n ResponseType.InvalidRequest,\n 'Invalid session',\n 'InvalidDID',\n )\n }\n\n // Historically, refreshSession did not return all the fields from\n // getSession. In particular, email, emailConfirmed and emailAuthFactor\n // were missing. Similarly, some servers might not return the didDoc in\n // refreshSession. We fetch them via getSession if missing, allowing to\n // ensure that we are always talking with the right PDS.\n if (data.emailConfirmed == null || data.didDoc == null) {\n try {\n const res = await this.server.getSession(undefined, {\n headers: { authorization: `Bearer ${data.accessJwt}` },\n })\n\n // Fool proofing (should always match)\n if (res.data.did === data.did) {\n Object.assign(data, res.data)\n }\n } catch {\n // Noop, we'll keep the current values we have\n }\n }\n\n // protect against concurrent session updates\n if (this.session !== session) {\n return Promise.reject(new Error('Concurrent session update detected'))\n }\n\n // succeeded, update the session\n this.session = {\n did: data.did,\n accessJwt: data.accessJwt,\n refreshJwt: data.refreshJwt,\n handle: data.handle ?? session.handle,\n email: data.email ?? session.email,\n emailConfirmed: data.emailConfirmed ?? session.emailConfirmed,\n emailAuthFactor: data.emailAuthFactor ?? session.emailAuthFactor,\n active: data.active ?? session.active ?? true,\n status: data.status,\n }\n\n this._updateApiEndpoint(res.data.didDoc)\n this.persistSession?.('update', this.session)\n\n return res\n } catch (err) {\n // protect against concurrent session updates\n if (this.session === session) {\n if (\n err instanceof XRPCError &&\n (err.status === 401 ||\n err.error === 'InvalidDID' ||\n ['ExpiredToken', 'InvalidToken'].includes(err.error))\n ) {\n // failed due to a bad refresh token\n this.session = undefined\n this.persistSession?.('expired', undefined)\n } else {\n // Assume the problem is transient and the session can be reused later.\n this.session = session\n this.persistSession?.('network-error', session)\n }\n }\n\n throw err\n }\n }\n\n /**\n * Helper to update the pds endpoint dynamically.\n *\n * The session methods (create, resume, refresh) may respond with the user's\n * did document which contains the user's canonical PDS endpoint. That endpoint\n * may differ from the endpoint used to contact the server. We capture that\n * PDS endpoint and update the client to use that given endpoint for future\n * requests. (This helps ensure smooth migrations between PDSes, especially\n * when the PDSes are operated by a single org.)\n */\n private _updateApiEndpoint(didDoc: unknown) {\n const endpoint = isValidDidDoc(didDoc) ? getPdsEndpoint(didDoc) : undefined\n if (endpoint) {\n this.pdsUrl = new URL(endpoint)\n } else {\n // If the did doc is invalid (or missing), we clear the pdsUrl (should\n // never happen). This is fine if the auth server and PDS are the same\n // service, or if the auth server will proxy requests to the right PDS\n // (which is the case for Bluesky's \"entryway\").\n this.pdsUrl = undefined\n }\n }\n}\n\nfunction isErrorObject(v: unknown): v is ErrorResponseBody {\n return errorResponseBody.safeParse(v).success\n}\n\nasync function isErrorResponse(\n response: Response,\n status: number[],\n errorNames: string[],\n): Promise<boolean> {\n if (!status.includes(response.status)) return false\n // Some engines (react-native 👀) don't expose a response.body property...\n // if (!response.body) return false\n try {\n const json = await peekJson(response, 10 * 1024)\n return isErrorObject(json) && (errorNames as any[]).includes(json.error)\n } catch (err) {\n return false\n }\n}\n\nasync function peekJson(\n response: Response,\n maxSize = Infinity,\n): Promise<unknown> {\n if (extractType(response) !== 'application/json') throw new Error('Not JSON')\n if (extractLength(response) > maxSize) throw new Error('Response too large')\n return response.clone().json()\n}\n\nfunction extractLength({ headers }: Response) {\n return headers.get('Content-Length')\n ? Number(headers.get('Content-Length'))\n : NaN\n}\n\nfunction extractType({ headers }: Response) {\n return headers.get('Content-Type')?.split(';')[0]?.trim()\n}\n"]}
@@ -294,6 +294,15 @@ export declare const schemaDict: {
294
294
  readonly properties: {
295
295
  readonly muted: {
296
296
  readonly type: 'boolean';
297
+ readonly description: 'Whether the account is fully muted, directly or via a mutelist. False when the mute is scoped to specific kinds; see mutedOnlyReposts and mutedOnlyQuoteposts.';
298
+ };
299
+ readonly mutedOnlyReposts: {
300
+ readonly type: 'boolean';
301
+ readonly description: "Whether the account's reposts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false.";
302
+ };
303
+ readonly mutedOnlyQuoteposts: {
304
+ readonly type: 'boolean';
305
+ readonly description: "Whether the account's quote posts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false.";
297
306
  };
298
307
  readonly mutedByList: {
299
308
  readonly type: 'ref';
@@ -6125,7 +6134,7 @@ export declare const schemaDict: {
6125
6134
  readonly defs: {
6126
6135
  readonly main: {
6127
6136
  readonly type: 'query';
6128
- readonly description: 'Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.';
6137
+ readonly description: 'Enumerates accounts that the requesting account (actor) currently has fully muted. Mutes scoped to specific kinds of content (only reposts, only quote posts) are not included. Responses may contain more items than the requested limit. Requires auth.';
6129
6138
  readonly parameters: {
6130
6139
  readonly type: 'params';
6131
6140
  readonly properties: {
@@ -6519,7 +6528,7 @@ export declare const schemaDict: {
6519
6528
  readonly defs: {
6520
6529
  readonly main: {
6521
6530
  readonly type: 'procedure';
6522
- readonly description: 'Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.';
6531
+ readonly description: 'Creates a mute relationship for the specified account. If a mute already exists for the account, it is updated in place: the stored scope is replaced with the scope in this request. Mutes are private in Bluesky. Requires auth.';
6523
6532
  readonly input: {
6524
6533
  readonly encoding: 'application/json';
6525
6534
  readonly schema: {
@@ -6530,6 +6539,14 @@ export declare const schemaDict: {
6530
6539
  readonly type: 'string';
6531
6540
  readonly format: 'at-identifier';
6532
6541
  };
6542
+ readonly onlyReposts: {
6543
+ readonly type: 'boolean';
6544
+ readonly description: "Restrict the mute to the account's reposts. When any 'only' scope is set, just the scoped content is muted; when none are set, the account is fully muted. Repeat calls replace the stored scope rather than adding to it.";
6545
+ };
6546
+ readonly onlyQuoteposts: {
6547
+ readonly type: 'boolean';
6548
+ readonly description: "Restrict the mute to the account's quote posts. See onlyReposts.";
6549
+ };
6533
6550
  };
6534
6551
  };
6535
6552
  };
@@ -7927,7 +7944,15 @@ export declare const schemaDict: {
7927
7944
  };
7928
7945
  readonly opThread: {
7929
7946
  readonly type: 'boolean';
7930
- readonly description: 'This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread.';
7947
+ readonly description: 'This post is part of a contiguous thread by the OP from the thread root. Sub-threads by OP deeper in the tree are not considered an OP thread.';
7948
+ };
7949
+ readonly opThreadPostIndex: {
7950
+ readonly type: 'integer';
7951
+ readonly description: 'The 1-indexed position of this post within the contiguous OP thread. Only present when this post is part of the OP thread (see `opThread`).';
7952
+ };
7953
+ readonly opThreadPostCount: {
7954
+ readonly type: 'integer';
7955
+ readonly description: 'The total number of posts in the contiguous OP thread that this post belongs to. Only present when this post is part of the OP thread (see `opThread`).';
7931
7956
  };
7932
7957
  readonly hiddenByThreadgate: {
7933
7958
  readonly type: 'boolean';
@@ -12050,7 +12075,8 @@ export declare const schemaDict: {
12050
12075
  readonly properties: {
12051
12076
  readonly members: {
12052
12077
  readonly type: 'array';
12053
- readonly maxLength: 49;
12078
+ readonly description: "The members to add to the group. The owner is automatically added. Implementations may enforce a lower maximum than the 10,000-item schema limit; Bluesky currently supports up to 100 total members. If the owner is included in this list, the list may contain up to the implementation's total member limit. Otherwise, it may contain one fewer.";
12079
+ readonly maxLength: 10000;
12054
12080
  readonly items: {
12055
12081
  readonly type: 'string';
12056
12082
  readonly format: 'did';
@@ -24817,6 +24843,15 @@ export declare const schemas: ({
24817
24843
  readonly properties: {
24818
24844
  readonly muted: {
24819
24845
  readonly type: 'boolean';
24846
+ readonly description: 'Whether the account is fully muted, directly or via a mutelist. False when the mute is scoped to specific kinds; see mutedOnlyReposts and mutedOnlyQuoteposts.';
24847
+ };
24848
+ readonly mutedOnlyReposts: {
24849
+ readonly type: 'boolean';
24850
+ readonly description: "Whether the account's reposts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false.";
24851
+ };
24852
+ readonly mutedOnlyQuoteposts: {
24853
+ readonly type: 'boolean';
24854
+ readonly description: "Whether the account's quote posts are muted. Scoped mutes are exclusive with muted: this can be true while muted is false. If muted is true, this will be false.";
24820
24855
  };
24821
24856
  readonly mutedByList: {
24822
24857
  readonly type: 'ref';
@@ -30569,7 +30604,7 @@ export declare const schemas: ({
30569
30604
  readonly defs: {
30570
30605
  readonly main: {
30571
30606
  readonly type: 'query';
30572
- readonly description: 'Enumerates accounts that the requesting account (actor) currently has muted. Requires auth.';
30607
+ readonly description: 'Enumerates accounts that the requesting account (actor) currently has fully muted. Mutes scoped to specific kinds of content (only reposts, only quote posts) are not included. Responses may contain more items than the requested limit. Requires auth.';
30573
30608
  readonly parameters: {
30574
30609
  readonly type: 'params';
30575
30610
  readonly properties: {
@@ -30954,7 +30989,7 @@ export declare const schemas: ({
30954
30989
  readonly defs: {
30955
30990
  readonly main: {
30956
30991
  readonly type: 'procedure';
30957
- readonly description: 'Creates a mute relationship for the specified account. Mutes are private in Bluesky. Requires auth.';
30992
+ readonly description: 'Creates a mute relationship for the specified account. If a mute already exists for the account, it is updated in place: the stored scope is replaced with the scope in this request. Mutes are private in Bluesky. Requires auth.';
30958
30993
  readonly input: {
30959
30994
  readonly encoding: 'application/json';
30960
30995
  readonly schema: {
@@ -30965,6 +31000,14 @@ export declare const schemas: ({
30965
31000
  readonly type: 'string';
30966
31001
  readonly format: 'at-identifier';
30967
31002
  };
31003
+ readonly onlyReposts: {
31004
+ readonly type: 'boolean';
31005
+ readonly description: "Restrict the mute to the account's reposts. When any 'only' scope is set, just the scoped content is muted; when none are set, the account is fully muted. Repeat calls replace the stored scope rather than adding to it.";
31006
+ };
31007
+ readonly onlyQuoteposts: {
31008
+ readonly type: 'boolean';
31009
+ readonly description: "Restrict the mute to the account's quote posts. See onlyReposts.";
31010
+ };
30968
31011
  };
30969
31012
  };
30970
31013
  };
@@ -32336,7 +32379,15 @@ export declare const schemas: ({
32336
32379
  };
32337
32380
  readonly opThread: {
32338
32381
  readonly type: 'boolean';
32339
- readonly description: 'This post is part of a contiguous thread by the OP from the thread root. Many different OP threads can happen in the same thread.';
32382
+ readonly description: 'This post is part of a contiguous thread by the OP from the thread root. Sub-threads by OP deeper in the tree are not considered an OP thread.';
32383
+ };
32384
+ readonly opThreadPostIndex: {
32385
+ readonly type: 'integer';
32386
+ readonly description: 'The 1-indexed position of this post within the contiguous OP thread. Only present when this post is part of the OP thread (see `opThread`).';
32387
+ };
32388
+ readonly opThreadPostCount: {
32389
+ readonly type: 'integer';
32390
+ readonly description: 'The total number of posts in the contiguous OP thread that this post belongs to. Only present when this post is part of the OP thread (see `opThread`).';
32340
32391
  };
32341
32392
  readonly hiddenByThreadgate: {
32342
32393
  readonly type: 'boolean';
@@ -36393,7 +36444,8 @@ export declare const schemas: ({
36393
36444
  readonly properties: {
36394
36445
  readonly members: {
36395
36446
  readonly type: 'array';
36396
- readonly maxLength: 49;
36447
+ readonly description: "The members to add to the group. The owner is automatically added. Implementations may enforce a lower maximum than the 10,000-item schema limit; Bluesky currently supports up to 100 total members. If the owner is included in this list, the list may contain up to the implementation's total member limit. Otherwise, it may contain one fewer.";
36448
+ readonly maxLength: 10000;
36397
36449
  readonly items: {
36398
36450
  readonly type: 'string';
36399
36451
  readonly format: 'did';