@skyware/labeler
Version:
A lightweight alternative to Ozone for operating an atproto labeler.
28 lines (27 loc) • 1.71 kB
TypeScript
import "@atcute/bluesky/lexicons";
import { ComAtprotoLabelDefs } from "@atcute/client/lexicons";
import { LoginCredentials } from "./util.js";
/**
* Declare the labels this labeler will apply. Necessary for users to be able to configure what they see.
* @param credentials The credentials of the labeler account.
* @param labelDefinitions The label definitions to declare. You can learn about the definition format [here](https://docs.bsky.app/docs/advanced-guides/moderation#custom-label-values).
* @param overwriteExisting Whether to overwrite the existing label definitions if they already exist.
*/
export declare function declareLabeler(credentials: LoginCredentials, labelDefinitions: Array<ComAtprotoLabelDefs.LabelValueDefinition>, overwriteExisting?: boolean): Promise<void>;
/**
* Get the label definitions currently declared by the labeler.
* @param credentials The credentials of the labeler account.
* @returns The label definitions.
*/
export declare function getLabelerLabelDefinitions(credentials: LoginCredentials): Promise<Array<ComAtprotoLabelDefs.LabelValueDefinition> | null>;
/**
* Set the label definitions for this labeler account.
* @param credentials The credentials of the labeler account.
* @param labelDefinitions The label definitions to set.
*/
export declare function setLabelerLabelDefinitions(credentials: LoginCredentials, labelDefinitions: Array<ComAtprotoLabelDefs.LabelValueDefinition>): Promise<void>;
/**
* Delete the labeler declaration for this account, removing all label definitions.
* @param credentials The credentials of the labeler account.
*/
export declare function deleteLabelerDeclaration(credentials: LoginCredentials): Promise<void>;