Skip to content

Latest commit

 

History

History
909 lines (638 loc) · 68.1 KB

README.md

File metadata and controls

909 lines (638 loc) · 68.1 KB

Admin

(admin)

Overview

Available Operations

  • disableInviteCodes - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Disable some set of codes and/or all codes associated with a set of users.

  • getAccountInfo - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Get details about an account.

  • getSubjectStatus - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Get the service-specific admin status of a subject (account, record, or blob).

  • sendEmail - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Send email to a user's account email address.

  • updateAccountEmail - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Administrative action to update an account's email.

  • updateAccountHandle - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Administrative action to update an account's handle.

  • updateAccountPassword - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Update the password for a user account as an administrator.

  • updateSubjectStatus - This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Update the service-specific admin status of a subject (account, record, or blob).

disableInviteCodes

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Disable some set of codes and/or all codes associated with a set of users.

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  await bluesky.admin.disableInviteCodes();


}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminDisableInviteCodes } from "@speakeasy-api/bluesky/funcs/adminDisableInviteCodes.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminDisableInviteCodes(bluesky);

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Mutation hook for triggering the API call.
  useAdminDisableInviteCodesMutation
} from "@speakeasy-api/bluesky/react-query/adminDisableInviteCodes.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminDisableInviteCodesRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminDisableInviteCodesResponseBody 400 application/json
errors.ComAtprotoAdminDisableInviteCodesAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*

getAccountInfo

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Get details about an account.

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const result = await bluesky.admin.getAccountInfo({
    did: "<id>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminGetAccountInfo } from "@speakeasy-api/bluesky/funcs/adminGetAccountInfo.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminGetAccountInfo(bluesky, {
    did: "<id>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Query hooks for fetching data.
  useAdminGetAccountInfo,
  useAdminGetAccountInfoSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchAdminGetAccountInfo,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateAdminGetAccountInfo,
  invalidateAllAdminGetAccountInfo,
} from "@speakeasy-api/bluesky/react-query/adminGetAccountInfo.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminGetAccountInfoRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<components.ComAtprotoAdminDefsAccountView>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminGetAccountInfoResponseBody 400 application/json
errors.ComAtprotoAdminGetAccountInfoAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*

getSubjectStatus

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Get the service-specific admin status of a subject (account, record, or blob).

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const result = await bluesky.admin.getSubjectStatus();

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminGetSubjectStatus } from "@speakeasy-api/bluesky/funcs/adminGetSubjectStatus.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminGetSubjectStatus(bluesky);

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Query hooks for fetching data.
  useAdminGetSubjectStatus,
  useAdminGetSubjectStatusSuspense,

  // Utility for prefetching data during server-side rendering and in React
  // Server Components that will be immediately available to client components
  // using the hooks.
  prefetchAdminGetSubjectStatus,
  
  // Utilities to invalidate the query cache for this query in response to
  // mutations and other user actions.
  invalidateAdminGetSubjectStatus,
  invalidateAllAdminGetSubjectStatus,
} from "@speakeasy-api/bluesky/react-query/adminGetSubjectStatus.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminGetSubjectStatusRequest ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ComAtprotoAdminGetSubjectStatusResponseBody>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminGetSubjectStatusResponseBody 400 application/json
errors.ComAtprotoAdminGetSubjectStatusAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*

sendEmail

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Send email to a user's account email address.

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const result = await bluesky.admin.sendEmail({
    recipientDid: "<id>",
    content: "<value>",
    senderDid: "<id>",
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminSendEmail } from "@speakeasy-api/bluesky/funcs/adminSendEmail.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminSendEmail(bluesky, {
    recipientDid: "<id>",
    content: "<value>",
    senderDid: "<id>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Mutation hook for triggering the API call.
  useAdminSendEmailMutation
} from "@speakeasy-api/bluesky/react-query/adminSendEmail.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminSendEmailRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ComAtprotoAdminSendEmailResponseBody>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminSendEmailResponseBody 400 application/json
errors.ComAtprotoAdminSendEmailAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*

updateAccountEmail

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Administrative action to update an account's email.

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  await bluesky.admin.updateAccountEmail({
    account: "<value>",
    email: "[email protected]",
  });


}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminUpdateAccountEmail } from "@speakeasy-api/bluesky/funcs/adminUpdateAccountEmail.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminUpdateAccountEmail(bluesky, {
    account: "<value>",
    email: "[email protected]",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Mutation hook for triggering the API call.
  useAdminUpdateAccountEmailMutation
} from "@speakeasy-api/bluesky/react-query/adminUpdateAccountEmail.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminUpdateAccountEmailRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminUpdateAccountEmailResponseBody 400 application/json
errors.ComAtprotoAdminUpdateAccountEmailAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*

updateAccountHandle

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Administrative action to update an account's handle.

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  await bluesky.admin.updateAccountHandle({
    did: "<id>",
    handle: "<value>",
  });


}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminUpdateAccountHandle } from "@speakeasy-api/bluesky/funcs/adminUpdateAccountHandle.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminUpdateAccountHandle(bluesky, {
    did: "<id>",
    handle: "<value>",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Mutation hook for triggering the API call.
  useAdminUpdateAccountHandleMutation
} from "@speakeasy-api/bluesky/react-query/adminUpdateAccountHandle.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminUpdateAccountHandleRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminUpdateAccountHandleResponseBody 400 application/json
errors.ComAtprotoAdminUpdateAccountHandleAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*

updateAccountPassword

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Update the password for a user account as an administrator.

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  await bluesky.admin.updateAccountPassword({
    did: "<id>",
    password: "YrVgrflEZmXzy2v",
  });


}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminUpdateAccountPassword } from "@speakeasy-api/bluesky/funcs/adminUpdateAccountPassword.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminUpdateAccountPassword(bluesky, {
    did: "<id>",
    password: "YrVgrflEZmXzy2v",
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Mutation hook for triggering the API call.
  useAdminUpdateAccountPasswordMutation
} from "@speakeasy-api/bluesky/react-query/adminUpdateAccountPassword.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminUpdateAccountPasswordRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<void>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminUpdateAccountPasswordResponseBody 400 application/json
errors.ComAtprotoAdminUpdateAccountPasswordAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*

updateSubjectStatus

This endpoint is part of the atproto PDS management APIs. Requests usually require admin authentication and are made directly to the PDS instance.

To learn more about calling atproto API endpoints like this one, see the API Hosts and Auth guide.

Update the service-specific admin status of a subject (account, record, or blob).

Example Usage

import { Bluesky } from "@speakeasy-api/bluesky";

const bluesky = new Bluesky({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const result = await bluesky.admin.updateSubjectStatus({
    subject: {
      did: "<id>",
      cid: "<id>",
    },
  });

  // Handle the result
  console.log(result);
}

run();

Standalone function

The standalone function version of this method:

import { BlueskyCore } from "@speakeasy-api/bluesky/core.js";
import { adminUpdateSubjectStatus } from "@speakeasy-api/bluesky/funcs/adminUpdateSubjectStatus.js";

// Use `BlueskyCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const bluesky = new BlueskyCore({
  bearer: process.env["BLUESKY_BEARER"] ?? "",
});

async function run() {
  const res = await adminUpdateSubjectStatus(bluesky, {
    subject: {
      did: "<id>",
      cid: "<id>",
    },
  });

  if (!res.ok) {
    throw res.error;
  }

  const { value: result } = res;

  // Handle the result
  console.log(result);
}

run();

React hooks and utilities

This method can be used in React components through the following hooks and associated utilities.

Check out this guide for information about each of the utilities below and how to get started using React hooks.

import {
  // Mutation hook for triggering the API call.
  useAdminUpdateSubjectStatusMutation
} from "@speakeasy-api/bluesky/react-query/adminUpdateSubjectStatus.js";

Parameters

Parameter Type Required Description
request operations.ComAtprotoAdminUpdateSubjectStatusRequestBody ✔️ The request object to use for the request.
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retries RetryConfig Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.ComAtprotoAdminUpdateSubjectStatusResponseBody>

Errors

Error Type Status Code Content Type
errors.ComAtprotoAdminUpdateSubjectStatusResponseBody 400 application/json
errors.ComAtprotoAdminUpdateSubjectStatusAdminResponseBody 401 application/json
errors.Unauthorized 403, 407, 511 application/json
errors.NotFound 404, 501, 505 application/json
errors.Timeout 408, 504 application/json
errors.BadRequest 413, 414, 415, 422, 431, 510 application/json
errors.RateLimited 429 application/json
errors.InternalServerError 500, 502, 503, 506, 507, 508 application/json
errors.APIError 4XX, 5XX */*