UNPKG

708 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const axios_1 = require("axios");
4class IntegrationClient {
5 constructor(baseURL, authorization, version) {
6 const headers = {
7 Authorization: authorization,
8 ['BEARER-CLI-VERSION']: version
9 };
10 this.client = axios_1.default.create({
11 headers,
12 baseURL
13 });
14 }
15 async getIntegrationArchiveUploadUrl(buid) {
16 try {
17 const { data } = await this.client.post('integration-urls', { buid });
18 return data.url;
19 }
20 catch (e) {
21 throw e;
22 }
23 }
24}
25exports.IntegrationClient = IntegrationClient;