tianji-client-sdk
Version:
14 lines (13 loc) • 458 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.initOpenapiSDK = initOpenapiSDK;
const client_1 = require("./open/client");
function initOpenapiSDK(baseUrl, options) {
client_1.OpenAPI.BASE = baseUrl.endsWith('/open') ? baseUrl : `${baseUrl}/open`;
if (options?.apiKey) {
client_1.OpenAPI.TOKEN = options.apiKey;
}
if (options?.header) {
client_1.OpenAPI.HEADERS = options.header;
}
}