@trayio/tray-api 3.8.1-beta → 3.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -22,15 +22,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
26
|
exports.connectorDeploymentApiTest = void 0;
|
|
36
27
|
const fs = __importStar(require("fs"));
|
|
@@ -50,14 +41,14 @@ const connectorDeploymentApiTest = (deploymentClient) => {
|
|
|
50
41
|
it('should be defined', () => {
|
|
51
42
|
expect(deploymentClient).toBeDefined();
|
|
52
43
|
});
|
|
53
|
-
it('deploys a connector from source code', () =>
|
|
44
|
+
it('deploys a connector from source code', async () => {
|
|
54
45
|
const input = {
|
|
55
46
|
connectorName,
|
|
56
47
|
connectorVersion,
|
|
57
48
|
connectorSourceCode: sourceCode,
|
|
58
49
|
token: API_TOKEN,
|
|
59
50
|
};
|
|
60
|
-
const response =
|
|
51
|
+
const response = await deploymentClient.deployFromSourceCode(input);
|
|
61
52
|
expect(response).toEqual(Result_1.Result.success({
|
|
62
53
|
id: expect.any(String),
|
|
63
54
|
connectorName,
|
|
@@ -65,7 +56,7 @@ const connectorDeploymentApiTest = (deploymentClient) => {
|
|
|
65
56
|
deploymentStatus: ConnectorDeploymentApi_1.ConnectorDeploymentStatus.Deploying,
|
|
66
57
|
}));
|
|
67
58
|
// Extended timeout to 1 minute for connector code build & compile
|
|
68
|
-
}
|
|
59
|
+
}, 60000);
|
|
69
60
|
});
|
|
70
61
|
};
|
|
71
62
|
exports.connectorDeploymentApiTest = connectorDeploymentApiTest;
|
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.connectorPermissionsApiTest = void 0;
|
|
13
4
|
const Result_1 = require("@trayio/commons/result/Result");
|
|
@@ -19,41 +10,41 @@ const connectorPermissionsApiTest = (permissionsClient) => {
|
|
|
19
10
|
it('should be defined', () => {
|
|
20
11
|
expect(permissionsClient).toBeDefined();
|
|
21
12
|
});
|
|
22
|
-
it('shares a connector with given emails', () =>
|
|
13
|
+
it('shares a connector with given emails', async () => {
|
|
23
14
|
const input = {
|
|
24
15
|
connectorName,
|
|
25
16
|
connectorVersion,
|
|
26
17
|
emails: ['test.user@tray.io'],
|
|
27
18
|
token: API_TOKEN,
|
|
28
19
|
};
|
|
29
|
-
const response =
|
|
20
|
+
const response = await permissionsClient.shareWithEmails(input);
|
|
30
21
|
expect(response).toEqual(Result_1.Result.success({
|
|
31
22
|
message: expect.any(String),
|
|
32
23
|
}));
|
|
33
|
-
})
|
|
34
|
-
it('shares a connector with given workspace ID', () =>
|
|
24
|
+
});
|
|
25
|
+
it('shares a connector with given workspace ID', async () => {
|
|
35
26
|
const input = {
|
|
36
27
|
connectorName,
|
|
37
28
|
connectorVersion,
|
|
38
29
|
workspaceIds: ['workspace-id'],
|
|
39
30
|
token: API_TOKEN,
|
|
40
31
|
};
|
|
41
|
-
const response =
|
|
32
|
+
const response = await permissionsClient.shareWithWorkspaces(input);
|
|
42
33
|
expect(response).toEqual(Result_1.Result.success({
|
|
43
34
|
message: expect.any(String),
|
|
44
35
|
}));
|
|
45
|
-
})
|
|
46
|
-
it('lists emails that have access to a connector', () =>
|
|
36
|
+
});
|
|
37
|
+
it('lists emails that have access to a connector', async () => {
|
|
47
38
|
const input = {
|
|
48
39
|
connectorName,
|
|
49
40
|
connectorVersion,
|
|
50
41
|
token: API_TOKEN,
|
|
51
42
|
};
|
|
52
|
-
const response =
|
|
43
|
+
const response = await permissionsClient.listSharedEmails(input);
|
|
53
44
|
expect(response).toEqual(Result_1.Result.success({
|
|
54
45
|
emails: expect.any(Array),
|
|
55
46
|
}));
|
|
56
|
-
})
|
|
47
|
+
});
|
|
57
48
|
});
|
|
58
49
|
};
|
|
59
50
|
exports.connectorPermissionsApiTest = connectorPermissionsApiTest;
|