"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const querystring_1 = require("querystring");
const sdk_1 = require("../sdk");
var Users;
(function (Users) {
    function adminLogin(email, password) {
        const scopes = ['manage_orders', 'manage_products', 'manage_customers'];
        const config = sdk_1.getConfig();
        return sdk_1.authenticatedFormRequest({
            uri: `${config.authHost}/oauth/token`,
            method: sdk_1.methods.POST,
            body: querystring_1.stringify({
                scope: scopes.map(scope => `${scope}:${config.projectKey}`).join(' '),
                grant_type: 'password',
                username: email,
                password: password
            })
        });
    }
    Users.adminLogin = adminLogin;
})(Users = exports.Users || (exports.Users = {}));
//# sourceMappingURL=users.js.map