UNPKG

backendless-console-sdk

Version:

Backendless Console SDK for Node.js and browser

102 lines (101 loc) 5.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _urls = require("./urls"); var _default = function _default(req) { return { getUsersRegs: function getUsersRegs(appId) { return req.get("".concat((0, _urls.appConsole)(appId), "/userregistration")); }, updateUsersRegs: function updateUsersRegs(appId, data) { return req.put("".concat((0, _urls.appConsole)(appId), "/userregistration"), data); }, getUsersLogin: function getUsersLogin(appId) { return req.get("".concat((0, _urls.appConsole)(appId), "/userlogin")); }, logoutAllUsers: function logoutAllUsers(appId) { return req.post("".concat((0, _urls.appConsole)(appId), "/userlogin/logout/all")); }, getUserSocialLogin: function getUserSocialLogin(provider) { return req.get("/console/social/oauth/".concat(provider, "/request_url")); }, updateUsersLogin: function updateUsersLogin(appId, data) { return req.post("".concat((0, _urls.appConsole)(appId), "/userlogin"), data); }, getUsersProps: function getUsersProps(appId) { return req.get("".concat((0, _urls.appConsole)(appId), "/userproperties")); }, updateUsersProps: function updateUsersProps(appId, data) { return req.put("".concat((0, _urls.appConsole)(appId), "/userproperties/").concat(data.name), data); }, updateSocialParams: function updateSocialParams(appId, param) { return req.post("".concat((0, _urls.appConsole)(appId), "/socialparams"), param); }, getOAuth1ProviderTemplates: function getOAuth1ProviderTemplates(appId) { return req.get("".concat((0, _urls.users)(appId), "/oauth1-templates")); }, getOAuth2ProviderTemplates: function getOAuth2ProviderTemplates(appId) { return req.get("".concat((0, _urls.users)(appId), "/oauth2-templates")); }, getOAuth1Providers: function getOAuth1Providers(appId) { return req.get("".concat((0, _urls.oauth1)(appId))); }, getOAuth2Providers: function getOAuth2Providers(appId) { return req.get("".concat((0, _urls.oauth2)(appId))); }, getOAuth1Provider: function getOAuth1Provider(appId, providerId) { return req.get("".concat((0, _urls.oauth1)(appId), "/").concat(providerId)); }, getOAuth2Provider: function getOAuth2Provider(appId, providerId) { return req.get("".concat((0, _urls.oauth2)(appId), "/").concat(providerId)); }, createOAuth2Provider: function createOAuth2Provider(appId, provider) { return req.post("".concat((0, _urls.oauth2)(appId)), provider); }, updateOAuth1Provider: function updateOAuth1Provider(appId, provider) { return req.put("".concat((0, _urls.oauth1)(appId), "/").concat(provider.id), provider); }, updateOAuth2Provider: function updateOAuth2Provider(appId, provider) { return req.put("".concat((0, _urls.oauth2)(appId), "/").concat(provider.id), provider); }, createOAuth1ProviderFromTemplate: function createOAuth1ProviderFromTemplate(appId, data) { return req.post("".concat((0, _urls.oauth1)(appId), "/create-from-template"), data); }, createOAuth2ProviderFromTemplate: function createOAuth2ProviderFromTemplate(appId, data) { return req.post("".concat((0, _urls.oauth2)(appId), "/create-from-template"), data); }, removeOAuth1Provider: function removeOAuth1Provider(appId, providerId) { return req["delete"]("".concat((0, _urls.oauth1)(appId), "/").concat(providerId)); }, removeOAuth2Provider: function removeOAuth2Provider(appId, providerId) { return req["delete"]("".concat((0, _urls.oauth2)(appId), "/").concat(providerId)); }, getOAuth1CallbackUrls: function getOAuth1CallbackUrls(appId, providerCode) { return req.get("".concat((0, _urls.oauth1)(appId), "/").concat(providerCode, "/callback-url")); }, getOAuth2CallbackUrls: function getOAuth2CallbackUrls(appId, providerCode) { return req.get("".concat((0, _urls.oauth2)(appId), "/").concat(providerCode, "/callback-url")); }, getAuth0Configuration: function getAuth0Configuration(appId) { return req.get("".concat((0, _urls.oauth0Config)(appId))); }, updateAuth0Configuration: function updateAuth0Configuration(appId, config) { return req.put("".concat((0, _urls.oauth0Config)(appId)), config); }, createAuth0ScopeBinding: function createAuth0ScopeBinding(appId, binding) { return req.post("".concat((0, _urls.oauth0Binding)(appId)), binding); }, updateAuth0ScopeBinding: function updateAuth0ScopeBinding(appId, binding) { return req.put("".concat((0, _urls.oauth0Binding)(appId), "/").concat(binding.id), binding); }, getAuth0ScopeBindings: function getAuth0ScopeBindings(appId) { return req.get("".concat((0, _urls.oauth0Binding)(appId))); }, deleteAuth0ScopeBinding: function deleteAuth0ScopeBinding(appId, bindingId) { return req["delete"]("".concat((0, _urls.oauth0Binding)(appId), "/").concat(bindingId)); } }; }; exports["default"] = _default;