"use strict";
var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const url_path_1 = __importDefault(require("../util/url-path"));
/**
 * Simple manager for interacting with all Sign Templates endpoints and actions.
 */
class SignTemplatesManager {
    /**
     * @param {BoxClient} client The Box API Client that is responsible for making calls to the API
     */
    constructor(client) {
        this.client = client;
    }
    /**
     * Get Box Sign template by ID
     *
     * Fetches details of a specific Box Sign template.
     * @param {object} options Options for the request
     * @param {string} options.template_id The ID of a Box Sign template.
     * @param {Function} [callback] Passed the result if successful, error otherwise
     * @returns {Promise<schemas.SignTemplate>} A promise resolving to the result or rejecting with an error
     */
    getById(options, callback) {
        const { template_id: templateId } = options, queryParams = __rest(options, ["template_id"]), apiPath = (0, url_path_1.default)('sign_templates', templateId), params = {
            qs: queryParams,
        };
        return this.client.wrapWithDefaultHandler(this.client.get)(apiPath, params, callback);
    }
    /**
     * List Box Sign templates
     *
     * Gets Box Sign templates created by a user.
     * @param {object} [options] Options for the request
     * @param {string} [options.marker] Defines the position marker at which to begin returning results. This is used when paginating using marker-based pagination. This requires `usemarker` to be set to `true`.
     * @param {number} [options.limit] The maximum number of items to return per page.
     * @param {Function} [callback] Passed the result if successful, error otherwise
     * @returns {Promise<schemas.SignTemplates>} A promise resolving to the result or rejecting with an error
     */
    getAll(options, callback) {
        const queryParams = __rest(options, []), apiPath = (0, url_path_1.default)('sign_templates'), params = {
            qs: queryParams,
        };
        return this.client.wrapWithDefaultHandler(this.client.get)(apiPath, params, callback);
    }
}
exports.default = SignTemplatesManager;
//# sourceMappingURL=sign-templates.generated.js.map