import { Model } from "./model"; import { StateInfo } from "./interfaces"; import { NotesListArgs, NotesCreateArgs, NotesUpdateArgs, NotesRevertArgs } from "./argumentTypes"; export declare class Notes extends Model { /** * Calls to parent class constructor with state_info. * @param stateInfo - A dictionary containing a user-agent, rate-limiter, and username/API key if logged in. */ constructor(stateInfo: StateInfo); /** * Gathers a list of notes, as filtered through parameters. * @param {string} [body_matches] - optional; query string to match the note body against. Permits wildcards, e.g. "horse*" * @param {number} [post_id] - optional; the ID number of the post to which the note corresponds. * @param {[string]} [post_tags_match] - optional; a list of strings representing tags the note's corresponding post should match. Permits wildcards, e.g. "horse*" * @param {string} [creator_name] - optional; the username of the note's creator * @param {number} [creator_id] - optional; the ID number of the note's creator * @param {boolean} [is_active] - optional; true if the note is active, false if not * @param {number} [limit] - optional; the number of notes to return. limited to a maximum of 1,000; calls over 1,000 will simply return 1,000 results. * @returns a dictionary of information about the note, e.g. it's ID, created_at, updated_at, etc. */ list: ({ body_matches, post_id, post_tags_match, creator_name, creator_id, is_active, limit, }: NotesListArgs) => Promise>; /** * Create a new note. All arguments are required. * @param {number} post_id - the ID number of the post to which the note corresponds * @param {number} x - x coordinate of the note's top-left corner, as measured in pixels from the top left corner of the post * @param {number} y - y coordinate of the note's top-left corner, as measured in pixels from the top left corner of the post * @param {number} width - the width of the note's box * @param {number} height - the height of the note's box * @param {string} body - the text body of the note * @returns a dictionary of information about the note, e.g. it's ID, created_at, updated_at, etc. */ create: ({ post_id, x, y, width, height, body, }: NotesCreateArgs) => Promise>; /** * Updates given information about a note, given it's ID. All arguments are required. * @param {number} note_id - the ID number of the note to update. * @param {number} x - x coordinate of the note's top-left corner, as measured in pixels from the top left corner of the post * @param {number} y - y coordinate of the note's top-left corner, as measured in pixels from the top left corner of the post * @param {number} width - the width of the note's box * @param {number} height - the height of the note's box * @param {string} body - the text body of the note * @returns a dictionary of information about the note, e.g. it's ID, created_at, updated_at, etc. */ update: ({ note_id, x, y, width, height, body, }: NotesUpdateArgs) => Promise>; /** * Given a note's ID, deletes the note. * @param {number} note_id - the ID number of the note to delete. */ delete: (note_id: number) => Promise; /** * Given a note's version_id, reverts the note to the state of that version. * @param {number} note_id - the ID number of the note * @param {number} version_id - the version number of the note */ revert: ({ note_id, version_id, }: NotesRevertArgs) => Promise>; }