"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.queryItems = exports.listProviders = exports.listInstalledProviders = void 0;
var wrapper = __importStar(require("./proto/proto-generated"));
var ItemsSelectionService = wrapper.wix.items_selection.spi_host.v1.ItemsSelectionService;
/** Returns list of installed app providers for a specific site */
function listInstalledProviders(payload) {
    var serviceArtifactId = 'com.wixpress.wixos.items-selection-service';
    var serviceProtoClass = ItemsSelectionService;
    var methodName = 'listInstalledProviders';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
exports.listInstalledProviders = listInstalledProviders;
/** Returns list of all existing providers */
function listProviders(payload) {
    var serviceArtifactId = 'com.wixpress.wixos.items-selection-service';
    var serviceProtoClass = ItemsSelectionService;
    var methodName = 'listProviders';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
exports.listProviders = listProviders;
/**
 * Retrieves a list of items that match the specified criteria.
 *
 * Returns:
 * - A list of items that match the search criteria.
 * - Metadata about the search results, such as the total number of items and pagination information.
 */
function queryItems(payload) {
    var serviceArtifactId = 'com.wixpress.wixos.items-selection-service';
    var serviceProtoClass = ItemsSelectionService;
    var methodName = 'queryItems';
    var requestData = payload;
    return {
        serviceProtoClass: serviceProtoClass,
        serviceArtifactId: serviceArtifactId,
        methodName: methodName,
        requestData: requestData,
    };
}
exports.queryItems = queryItems;
//# sourceMappingURL=rpc.impl.js.map