1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const axios_1 = require("axios");
|
4 | class 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(orgId, integrationId) {
|
16 | try {
|
17 | const { data } = await this.client.post('integration-urls', { orgId, integrationId });
|
18 | return data.url;
|
19 | }
|
20 | catch (e) {
|
21 | throw e;
|
22 | }
|
23 | }
|
24 | }
|
25 | exports.IntegrationClient = IntegrationClient;
|