UNPKG

@zendesk/zcli-core

Version:

ZCLI core libraries and services

18 lines (17 loc) 667 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getBaseUrl = exports.getDomain = exports.getSubdomain = void 0; const getSubdomain = async (auth) => { var _a; return (_a = (await auth.getLoggedInProfile())) === null || _a === void 0 ? void 0 : _a.subdomain; }; exports.getSubdomain = getSubdomain; const getDomain = async (auth) => { var _a; return (_a = (await auth.getLoggedInProfile())) === null || _a === void 0 ? void 0 : _a.domain; }; exports.getDomain = getDomain; const getBaseUrl = (subdomain, domain) => { return `https://${subdomain}.${domain || 'zendesk.com'}`; }; exports.getBaseUrl = getBaseUrl;