import { Listing } from '@devvit/protos';
import { Empty } from '@devvit/protos/types/google/protobuf/empty.js';
import { RedditAPI } from './RedditAPI.js';
export class PrivateMessages extends RedditAPI {
    async Block(request, metadata) {
        const response = await this._fetch('Block', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async CollapseMessage(request, metadata) {
        const response = await this._fetch('CollapseMessage', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async Compose(request, metadata) {
        const response = await this._fetch('Compose', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async DelMsg(request, metadata) {
        const response = await this._fetch('DelMsg', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async ReadAllMessages(request, metadata) {
        const response = await this._fetch('ReadAllMessages', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async ReadMessage(request, metadata) {
        const response = await this._fetch('ReadMessage', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async UnblockSubreddit(request, metadata) {
        const response = await this._fetch('UnblockSubreddit', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async UncollapseMessage(request, metadata) {
        const response = await this._fetch('UncollapseMessage', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async UnreadMessage(request, metadata) {
        const response = await this._fetch('UnreadMessage', request, metadata);
        this._decodeAndValidateResponseJSON(response);
        return Empty.fromPartial({});
    }
    async MessageWhere(request, metadata) {
        const response = await this._fetch('MessageWhere', request, metadata);
        return Listing.fromJSON(this._decodeAndValidateResponseJSON(response));
    }
}
