"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseFunctions = void 0;
const async_retry_1 = __importDefault(require("async-retry"));
class BaseFunctions {
    client;
    constructor(client) {
        this.client = client;
    }
    async request(query, ...variablesAndRequestHeaders) {
        return (0, async_retry_1.default)(async () => {
            return this.client.request(query, ...variablesAndRequestHeaders);
        }, {
            retries: 5,
            minTimeout: 1000,
            randomize: true,
            factor: 2,
        });
    }
}
exports.BaseFunctions = BaseFunctions;
