@stackfactor/client-api 1.1.134 → 1.1.135
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.
- package/.eslintrc.json +4 -3
- package/declarations/axios.d.ts +1 -0
- package/declarations/html2plaintext.d.ts +1 -0
- package/dist/actionNotifications.d.ts +7 -0
- package/dist/actionNotifications.d.ts.map +1 -0
- package/dist/actionNotifications.js +9 -10
- package/dist/actionNotifications.js.map +1 -0
- package/dist/address.d.ts +5 -0
- package/dist/address.d.ts.map +1 -0
- package/dist/address.js +5 -6
- package/dist/address.js.map +1 -0
- package/dist/aiAssistant.d.ts +9 -0
- package/dist/aiAssistant.d.ts.map +1 -0
- package/dist/aiAssistant.js +16 -17
- package/dist/aiAssistant.js.map +1 -0
- package/dist/avatar.d.ts +5 -0
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +4 -5
- package/dist/avatar.js.map +1 -0
- package/dist/axiosClient.d.ts +32 -0
- package/dist/axiosClient.d.ts.map +1 -0
- package/dist/axiosClient.js +17 -27
- package/dist/axiosClient.js.map +1 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +9 -10
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +70 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +2 -7
- package/dist/constants.js.map +1 -0
- package/dist/dashboard.d.ts +7 -0
- package/dist/dashboard.d.ts.map +1 -0
- package/dist/dashboard.js +9 -10
- package/dist/dashboard.js.map +1 -0
- package/dist/departmentTrainingPlans.d.ts +13 -0
- package/dist/departmentTrainingPlans.d.ts.map +1 -0
- package/dist/departmentTrainingPlans.js +16 -17
- package/dist/departmentTrainingPlans.js.map +1 -0
- package/dist/groups.d.ts +16 -0
- package/dist/groups.d.ts.map +1 -0
- package/dist/groups.js +27 -28
- package/dist/groups.js.map +1 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -77
- package/dist/index.js.map +1 -0
- package/dist/integration.d.ts +95 -0
- package/dist/integration.d.ts.map +1 -0
- package/dist/integration.js +62 -69
- package/dist/integration.js.map +1 -0
- package/dist/integrationConfiguration.d.ts +7 -0
- package/dist/integrationConfiguration.d.ts.map +1 -0
- package/dist/integrationConfiguration.js +10 -11
- package/dist/integrationConfiguration.js.map +1 -0
- package/dist/integrations/contentGenerator.d.ts +27 -0
- package/dist/integrations/contentGenerator.d.ts.map +1 -0
- package/dist/integrations/contentGenerator.js +12 -16
- package/dist/integrations/contentGenerator.js.map +1 -0
- package/dist/learningContent.d.ts +19 -0
- package/dist/learningContent.d.ts.map +1 -0
- package/dist/learningContent.js +30 -31
- package/dist/learningContent.js.map +1 -0
- package/dist/learningPath.d.ts +12 -0
- package/dist/learningPath.d.ts.map +1 -0
- package/dist/learningPath.js +19 -20
- package/dist/learningPath.js.map +1 -0
- package/dist/logger.d.ts +6 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +8 -9
- package/dist/logger.js.map +1 -0
- package/dist/microSkillsQuizes.d.ts +6 -0
- package/dist/microSkillsQuizes.d.ts.map +1 -0
- package/dist/microSkillsQuizes.js +8 -9
- package/dist/microSkillsQuizes.js.map +1 -0
- package/dist/quotas.d.ts +6 -0
- package/dist/quotas.d.ts.map +1 -0
- package/dist/quotas.js +7 -8
- package/dist/quotas.js.map +1 -0
- package/dist/role.d.ts +18 -0
- package/dist/role.d.ts.map +1 -0
- package/dist/role.js +32 -33
- package/dist/role.js.map +1 -0
- package/dist/roleTemplate.d.ts +13 -0
- package/dist/roleTemplate.d.ts.map +1 -0
- package/dist/roleTemplate.js +22 -23
- package/dist/roleTemplate.js.map +1 -0
- package/dist/security.d.ts +8 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +11 -12
- package/dist/security.js.map +1 -0
- package/dist/skill.d.ts +22 -0
- package/dist/skill.d.ts.map +1 -0
- package/dist/skill.js +40 -41
- package/dist/skill.js.map +1 -0
- package/dist/skillAssessmentTestingSession.d.ts +10 -0
- package/dist/skillAssessmentTestingSession.d.ts.map +1 -0
- package/dist/skillAssessmentTestingSession.js +15 -16
- package/dist/skillAssessmentTestingSession.js.map +1 -0
- package/dist/skillAssessments.d.ts +10 -0
- package/dist/skillAssessments.d.ts.map +1 -0
- package/dist/skillAssessments.js +15 -16
- package/dist/skillAssessments.js.map +1 -0
- package/dist/skillTemplate.d.ts +15 -0
- package/dist/skillTemplate.d.ts.map +1 -0
- package/dist/skillTemplate.js +26 -27
- package/dist/skillTemplate.js.map +1 -0
- package/dist/talentTransfromation.d.ts +8 -0
- package/dist/talentTransfromation.d.ts.map +1 -0
- package/dist/talentTransfromation.js +11 -12
- package/dist/talentTransfromation.js.map +1 -0
- package/dist/teams.d.ts +15 -0
- package/dist/teams.d.ts.map +1 -0
- package/dist/teams.js +25 -26
- package/dist/teams.js.map +1 -0
- package/dist/tenants.d.ts +6 -0
- package/dist/tenants.d.ts.map +1 -0
- package/dist/tenants.js +7 -8
- package/dist/tenants.js.map +1 -0
- package/dist/trainingPlans.d.ts +16 -0
- package/dist/trainingPlans.d.ts.map +1 -0
- package/dist/trainingPlans.js +19 -20
- package/dist/trainingPlans.js.map +1 -0
- package/dist/trainingPlansProficiencyLevels.d.ts +8 -0
- package/dist/trainingPlansProficiencyLevels.d.ts.map +1 -0
- package/dist/trainingPlansProficiencyLevels.js +9 -10
- package/dist/trainingPlansProficiencyLevels.js.map +1 -0
- package/dist/userInformation.d.ts +7 -0
- package/dist/userInformation.d.ts.map +1 -0
- package/dist/userInformation.js +9 -10
- package/dist/userInformation.js.map +1 -0
- package/dist/users.d.ts +31 -0
- package/dist/users.d.ts.map +1 -0
- package/dist/users.js +37 -39
- package/dist/users.js.map +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +8 -21
- package/dist/utils.js.map +1 -0
- package/package.json +15 -14
- package/src/lib/actionNotifications.ts +10 -9
- package/src/lib/address.ts +4 -3
- package/src/lib/aiAssistant.ts +24 -23
- package/src/lib/avatar.ts +3 -2
- package/src/lib/axiosClient.ts +20 -7
- package/src/lib/config.ts +10 -9
- package/src/lib/dashboard.ts +10 -9
- package/src/lib/departmentTrainingPlans.ts +28 -31
- package/src/lib/groups.ts +37 -36
- package/src/lib/integration.ts +55 -54
- package/src/lib/integrationConfiguration.ts +14 -13
- package/src/lib/integrations/contentGenerator.ts +9 -8
- package/src/lib/learningContent.ts +55 -54
- package/src/lib/learningPath.ts +31 -30
- package/src/lib/logger.ts +8 -7
- package/src/lib/microSkillsQuizes.ts +10 -9
- package/src/lib/quotas.ts +9 -8
- package/src/lib/role.ts +55 -54
- package/src/lib/roleTemplate.ts +36 -35
- package/src/lib/security.ts +13 -12
- package/src/lib/skill.ts +71 -70
- package/src/lib/skillAssessmentTestingSession.ts +24 -23
- package/src/lib/skillAssessments.ts +24 -23
- package/src/lib/skillTemplate.ts +44 -43
- package/src/lib/talentTransfromation.ts +14 -13
- package/src/lib/teams.ts +34 -33
- package/src/lib/tenants.ts +9 -8
- package/src/lib/trainingPlans.ts +36 -35
- package/src/lib/trainingPlansProficiencyLevels.ts +13 -12
- package/src/lib/userInformation.ts +12 -11
- package/src/lib/users.ts +71 -71
- package/src/lib/utils.ts +7 -16
- package/tsconfig.json +16 -5
- package/dist/exports.js +0 -77
- package/index.d.ts +0 -1
package/dist/index.js
CHANGED
|
@@ -1,77 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
exports.integration = integration_1.default;
|
|
36
|
-
const integrationConfiguration_1 = __importDefault(require("./integrationConfiguration"));
|
|
37
|
-
exports.integrationConfiguration = integrationConfiguration_1.default;
|
|
38
|
-
const groups_1 = __importDefault(require("./groups"));
|
|
39
|
-
exports.groups = groups_1.default;
|
|
40
|
-
const learningContent_1 = __importDefault(require("./learningContent"));
|
|
41
|
-
exports.learningContent = learningContent_1.default;
|
|
42
|
-
const learningPath_1 = __importDefault(require("./learningPath"));
|
|
43
|
-
exports.learningPath = learningPath_1.default;
|
|
44
|
-
const logger_1 = __importDefault(require("./logger"));
|
|
45
|
-
exports.logger = logger_1.default;
|
|
46
|
-
const microSkillsQuizes_1 = __importDefault(require("./microSkillsQuizes"));
|
|
47
|
-
exports.microSkillsQuizes = microSkillsQuizes_1.default;
|
|
48
|
-
const quotas_1 = __importDefault(require("./quotas"));
|
|
49
|
-
exports.quotas = quotas_1.default;
|
|
50
|
-
const role_1 = __importDefault(require("./role"));
|
|
51
|
-
exports.role = role_1.default;
|
|
52
|
-
const roleTemplate_1 = __importDefault(require("./roleTemplate"));
|
|
53
|
-
exports.roleTemplate = roleTemplate_1.default;
|
|
54
|
-
const security_1 = __importDefault(require("./security"));
|
|
55
|
-
exports.security = security_1.default;
|
|
56
|
-
const skill_1 = __importDefault(require("./skill"));
|
|
57
|
-
exports.skill = skill_1.default;
|
|
58
|
-
const skillAssessments_1 = __importDefault(require("./skillAssessments"));
|
|
59
|
-
exports.skillAssessment = skillAssessments_1.default;
|
|
60
|
-
const skillAssessmentTestingSession_1 = __importDefault(require("./skillAssessmentTestingSession"));
|
|
61
|
-
exports.skillAssessmentTestingSession = skillAssessmentTestingSession_1.default;
|
|
62
|
-
const skillTemplate_1 = __importDefault(require("./skillTemplate"));
|
|
63
|
-
exports.skillTemplate = skillTemplate_1.default;
|
|
64
|
-
const talentTransfromation_1 = __importDefault(require("./talentTransfromation"));
|
|
65
|
-
exports.talentTransfromation = talentTransfromation_1.default;
|
|
66
|
-
const teams_1 = __importDefault(require("./teams"));
|
|
67
|
-
exports.team = teams_1.default;
|
|
68
|
-
const tenants_1 = __importDefault(require("./tenants"));
|
|
69
|
-
exports.tenant = tenants_1.default;
|
|
70
|
-
const trainingPlans_1 = __importDefault(require("./trainingPlans"));
|
|
71
|
-
exports.trainingPlan = trainingPlans_1.default;
|
|
72
|
-
const trainingPlansProficiencyLevels_1 = __importDefault(require("./trainingPlansProficiencyLevels"));
|
|
73
|
-
exports.trainingPlanProficiencyLevel = trainingPlansProficiencyLevels_1.default;
|
|
74
|
-
const userInformation_1 = __importDefault(require("./userInformation"));
|
|
75
|
-
exports.userInformation = userInformation_1.default;
|
|
76
|
-
const users_1 = __importDefault(require("./users"));
|
|
77
|
-
exports.users = users_1.default;
|
|
1
|
+
import actionNotifications from "./actionNotifications";
|
|
2
|
+
import { client, errorToString, getErrorInformation, getErrorType, shouldReturnError, } from "./axiosClient";
|
|
3
|
+
import aiAssistant from "./aiAssistant";
|
|
4
|
+
import avatar from "./avatar";
|
|
5
|
+
import address from "./address";
|
|
6
|
+
import config from "./config";
|
|
7
|
+
import { DOCUMENT_VERSION, PERMISSIONS, PERMISSION_DESCRIPTIONS, RESPONSE_TYPE, } from "./constants";
|
|
8
|
+
import contentGenerator from "./integrations/contentGenerator";
|
|
9
|
+
import dashboard from "./dashboard";
|
|
10
|
+
import departmentTraingPlans from "./departmentTrainingPlans";
|
|
11
|
+
import integration from "./integration";
|
|
12
|
+
import integrationConfiguration from "./integrationConfiguration";
|
|
13
|
+
import groups from "./groups";
|
|
14
|
+
import learningContent from "./learningContent";
|
|
15
|
+
import learningPath from "./learningPath";
|
|
16
|
+
import logger from "./logger";
|
|
17
|
+
import microSkillsQuizes from "./microSkillsQuizes";
|
|
18
|
+
import quotas from "./quotas";
|
|
19
|
+
import role from "./role";
|
|
20
|
+
import roleTemplate from "./roleTemplate";
|
|
21
|
+
import security from "./security";
|
|
22
|
+
import skill from "./skill";
|
|
23
|
+
import skillAssessment from "./skillAssessments";
|
|
24
|
+
import skillAssessmentTestingSession from "./skillAssessmentTestingSession";
|
|
25
|
+
import skillTemplate from "./skillTemplate";
|
|
26
|
+
import talentTransfromation from "./talentTransfromation";
|
|
27
|
+
import team from "./teams";
|
|
28
|
+
import tenant from "./tenants";
|
|
29
|
+
import trainingPlan from "./trainingPlans";
|
|
30
|
+
import trainingPlanProficiencyLevel from "./trainingPlansProficiencyLevels";
|
|
31
|
+
import userInformation from "./userInformation";
|
|
32
|
+
import users from "./users";
|
|
33
|
+
export { actionNotifications, address, aiAssistant, avatar, client, config, contentGenerator, dashboard, errorToString, getErrorInformation, getErrorType, DOCUMENT_VERSION, integration, integrationConfiguration, departmentTraingPlans, groups, learningContent, learningPath, logger, microSkillsQuizes, PERMISSIONS, PERMISSION_DESCRIPTIONS, quotas, RESPONSE_TYPE, role, roleTemplate, security, shouldReturnError, skill, skillAssessment, skillAssessmentTestingSession, skillTemplate, talentTransfromation, team, tenant, trainingPlan, trainingPlanProficiencyLevel, userInformation, users, };
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,MAAM,EACN,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,uBAAuB,EACvB,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,gBAAgB,MAAM,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vB,MAAM,EACN,aAAa,EACb,IAAI,EACJ,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,KAAK,EACL,eAAe,EACf,6BAA6B,EAC7B,aAAa,EACb,oBAAoB,EACpB,IAAI,EACJ,MAAM,EACN,YAAY,EACZ,4BAA4B,EAC5B,eAAe,EACf,KAAK,GACN,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
interface ContentInformationResponse {
|
|
2
|
+
description: string;
|
|
3
|
+
duration: number;
|
|
4
|
+
icon: string;
|
|
5
|
+
title: string;
|
|
6
|
+
type: number;
|
|
7
|
+
internal: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Create integration and set information
|
|
11
|
+
* @param {Object} data The new integration information
|
|
12
|
+
* @param {String} token Authorization token
|
|
13
|
+
*/
|
|
14
|
+
export declare const createIntegration: (data: object, token: string) => Promise<object>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete integration
|
|
17
|
+
* @param {String} id The id of the integration to be deleted
|
|
18
|
+
* @param {String} token Authorization token
|
|
19
|
+
*/
|
|
20
|
+
export declare const deleteIntegration: (id: string, token: string) => Promise<object>;
|
|
21
|
+
/**
|
|
22
|
+
* Discard the integration draft changes
|
|
23
|
+
* @param {String} id The id of the role template to be deleted
|
|
24
|
+
* @param {String} token Authorization token
|
|
25
|
+
*/
|
|
26
|
+
export declare const discardIntegrationChanges: (id: string, token: string) => Promise<object>;
|
|
27
|
+
/**
|
|
28
|
+
* Get integration information
|
|
29
|
+
* @param {String} id The id of the integration
|
|
30
|
+
* @param {String} version The version of the integration to be received
|
|
31
|
+
* @param {String} token Authorization token
|
|
32
|
+
*/
|
|
33
|
+
export declare const getIntegrationInformationById: (id: string, version: string, token: string) => Promise<object>;
|
|
34
|
+
/**
|
|
35
|
+
* Get integrations list
|
|
36
|
+
* @param {Array<String>} filter The filter used to select the integration
|
|
37
|
+
* @param {String} type The type of the integration
|
|
38
|
+
* @param {String} version The version to be retrieved
|
|
39
|
+
* @param {Boolean} includeSupportedCapabilities If true, the supported capabilities will be included in the response
|
|
40
|
+
* @param {String} token Authorization token
|
|
41
|
+
*/
|
|
42
|
+
export declare const getIntegrationsList: (filter: string[], type: string, version: string, includeSupportedCapabilities: boolean, token: string) => Promise<object>;
|
|
43
|
+
/**
|
|
44
|
+
* Get content information by Url
|
|
45
|
+
* @param {String} url The training url
|
|
46
|
+
* @param {String} verb The verb
|
|
47
|
+
* @param {String} token Authorization token
|
|
48
|
+
*/
|
|
49
|
+
export declare const getContentInformationByUrl: (url: string, verb: string, token: string) => Promise<object>;
|
|
50
|
+
/**
|
|
51
|
+
* Get content information by url from the browser instead of the backend
|
|
52
|
+
* @param {String} url
|
|
53
|
+
* @returns {Promise<ContentInformationResponse>}
|
|
54
|
+
*/
|
|
55
|
+
export declare const getContentInformationByUrlFromBrowser: (url: string) => Promise<ContentInformationResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Get enabled content providers
|
|
58
|
+
* @param {String} userId
|
|
59
|
+
* @param {String} token Authorization token
|
|
60
|
+
*/
|
|
61
|
+
export declare const getEnabledContentProviders: (userId: string, token: string) => Promise<object>;
|
|
62
|
+
/**
|
|
63
|
+
* Publish integration
|
|
64
|
+
* @param {String} id The id of the integration to be published
|
|
65
|
+
* @param {String} token Authorization token
|
|
66
|
+
*/
|
|
67
|
+
export declare const publishIntegration: (id: string, token: string) => Promise<object>;
|
|
68
|
+
/**
|
|
69
|
+
* Set integration information
|
|
70
|
+
* @param {String} id The id of the integration to be updated
|
|
71
|
+
* @param {Object} data Data used to update the integration
|
|
72
|
+
* @param {String} token Authorization token
|
|
73
|
+
*/
|
|
74
|
+
export declare const setIntegrationInformation: (id: string, data: object, token: string) => Promise<object>;
|
|
75
|
+
/**
|
|
76
|
+
* Set default integration
|
|
77
|
+
* @param {String} id The id of the integration to be set as default
|
|
78
|
+
* @param {String} token Authorization token
|
|
79
|
+
*/
|
|
80
|
+
export declare const setDefaultIntegration: (id: string, token: string) => Promise<object>;
|
|
81
|
+
declare const _default: {
|
|
82
|
+
createIntegration: (data: object, token: string) => Promise<object>;
|
|
83
|
+
deleteIntegration: (id: string, token: string) => Promise<object>;
|
|
84
|
+
discardIntegrationChanges: (id: string, token: string) => Promise<object>;
|
|
85
|
+
getContentInformationByUrl: (url: string, verb: string, token: string) => Promise<object>;
|
|
86
|
+
getContentInformationByUrlFromBrowser: (url: string) => Promise<ContentInformationResponse>;
|
|
87
|
+
getEnabledContentProviders: (userId: string, token: string) => Promise<object>;
|
|
88
|
+
getIntegrationInformationById: (id: string, version: string, token: string) => Promise<object>;
|
|
89
|
+
getIntegrationsList: (filter: string[], type: string, version: string, includeSupportedCapabilities: boolean, token: string) => Promise<object>;
|
|
90
|
+
publishIntegration: (id: string, token: string) => Promise<object>;
|
|
91
|
+
setDefaultIntegration: (id: string, token: string) => Promise<object>;
|
|
92
|
+
setIntegrationInformation: (id: string, data: object, token: string) => Promise<object>;
|
|
93
|
+
};
|
|
94
|
+
export default _default;
|
|
95
|
+
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../src/lib/integration.ts"],"names":[],"mappings":"AAsBA,UAAU,0BAA0B;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,SACtB,MAAM,SACL,MAAM,KACZ,OAAO,CAAC,MAAM,CAgBhB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,OACxB,MAAM,SACH,MAAM,KACZ,OAAO,CAAC,MAAM,CAgBhB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,OAChC,MAAM,SACH,MAAM,K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AAM,KACZ,OAAO,CAAC,MAAM,CAAC;wCAjLZ,MAAM,WACD,MAAM,SACR,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;kCA2BR,MAAM,EAAE,QACV,MAAM,WACH,MAAM,gCACe,OAAO,SAC9B,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;6BAsKZ,MAAM,SACH,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;gCAyDZ,MAAM,SACH,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;oCAjCZ,MAAM,QACJ,MAAM,SACL,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;;AAiDlB,wBAYE"}
|
package/dist/integration.js
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.setDefaultIntegration = exports.setIntegrationInformation = exports.publishIntegration = exports.getEnabledContentProviders = exports.getContentInformationByUrlFromBrowser = exports.getContentInformationByUrl = exports.getIntegrationsList = exports.getIntegrationInformationById = exports.discardIntegrationChanges = exports.deleteIntegration = exports.createIntegration = void 0;
|
|
7
|
-
const axiosClient_1 = require("./axiosClient");
|
|
8
|
-
const axios_1 = __importDefault(require("axios"));
|
|
9
|
-
const node_html_parser_1 = __importDefault(require("node-html-parser"));
|
|
10
|
-
const html2plaintext_1 = __importDefault(require("html2plaintext"));
|
|
1
|
+
import { client, errorToString } from "./axiosClient";
|
|
2
|
+
import axiosLib from "axios";
|
|
3
|
+
import htmlParser from "node-html-parser";
|
|
4
|
+
import htmlToText from "html2plaintext";
|
|
11
5
|
/**
|
|
12
6
|
* Create integration and set information
|
|
13
7
|
* @param {Object} data The new integration information
|
|
14
8
|
* @param {String} token Authorization token
|
|
15
9
|
*/
|
|
16
|
-
const createIntegration = (data, token) => {
|
|
10
|
+
export const createIntegration = (data, token) => {
|
|
17
11
|
return new Promise((resolve, reject) => {
|
|
18
12
|
const requestData = {
|
|
19
13
|
data: data,
|
|
20
14
|
};
|
|
21
|
-
|
|
15
|
+
const confirmationRequest = client.put("api/v1/integrations/", requestData, {
|
|
22
16
|
headers: { authorization: token },
|
|
23
17
|
});
|
|
24
18
|
confirmationRequest
|
|
@@ -30,15 +24,14 @@ const createIntegration = (data, token) => {
|
|
|
30
24
|
});
|
|
31
25
|
});
|
|
32
26
|
};
|
|
33
|
-
exports.createIntegration = createIntegration;
|
|
34
27
|
/**
|
|
35
28
|
* Delete integration
|
|
36
29
|
* @param {String} id The id of the integration to be deleted
|
|
37
30
|
* @param {String} token Authorization token
|
|
38
31
|
*/
|
|
39
|
-
const deleteIntegration = (id, token) => {
|
|
32
|
+
export const deleteIntegration = (id, token) => {
|
|
40
33
|
return new Promise((resolve, reject) => {
|
|
41
|
-
const request =
|
|
34
|
+
const request = client.delete(`api/v1/integrations/`, {
|
|
42
35
|
headers: { authorization: token },
|
|
43
36
|
data: {
|
|
44
37
|
id: id,
|
|
@@ -53,16 +46,15 @@ const deleteIntegration = (id, token) => {
|
|
|
53
46
|
});
|
|
54
47
|
});
|
|
55
48
|
};
|
|
56
|
-
exports.deleteIntegration = deleteIntegration;
|
|
57
49
|
/**
|
|
58
50
|
* Discard the integration draft changes
|
|
59
51
|
* @param {String} id The id of the role template to be deleted
|
|
60
52
|
* @param {String} token Authorization token
|
|
61
53
|
*/
|
|
62
|
-
const discardIntegrationChanges = (id, token) => {
|
|
54
|
+
export const discardIntegrationChanges = (id, token) => {
|
|
63
55
|
return new Promise((resolve, reject) => {
|
|
64
56
|
const data = {};
|
|
65
|
-
const request =
|
|
57
|
+
const request = client.get(`api/v1/integrations/discard/${id}`, {
|
|
66
58
|
headers: { authorization: token },
|
|
67
59
|
data: data,
|
|
68
60
|
});
|
|
@@ -75,16 +67,15 @@ const discardIntegrationChanges = (id, token) => {
|
|
|
75
67
|
});
|
|
76
68
|
});
|
|
77
69
|
};
|
|
78
|
-
exports.discardIntegrationChanges = discardIntegrationChanges;
|
|
79
70
|
/**
|
|
80
71
|
* Get integration information
|
|
81
72
|
* @param {String} id The id of the integration
|
|
82
73
|
* @param {String} version The version of the integration to be received
|
|
83
74
|
* @param {String} token Authorization token
|
|
84
75
|
*/
|
|
85
|
-
const getIntegrationInformationById = (id, version, token) => {
|
|
76
|
+
export const getIntegrationInformationById = (id, version, token) => {
|
|
86
77
|
return new Promise((resolve, reject) => {
|
|
87
|
-
|
|
78
|
+
const confirmationRequest = client.get(`api/v1/integrations/${id}/${version}`, {
|
|
88
79
|
headers: { authorization: token },
|
|
89
80
|
});
|
|
90
81
|
confirmationRequest
|
|
@@ -96,7 +87,6 @@ const getIntegrationInformationById = (id, version, token) => {
|
|
|
96
87
|
});
|
|
97
88
|
});
|
|
98
89
|
};
|
|
99
|
-
exports.getIntegrationInformationById = getIntegrationInformationById;
|
|
100
90
|
/**
|
|
101
91
|
* Get integrations list
|
|
102
92
|
* @param {Array<String>} filter The filter used to select the integration
|
|
@@ -105,7 +95,7 @@ exports.getIntegrationInformationById = getIntegrationInformationById;
|
|
|
105
95
|
* @param {Boolean} includeSupportedCapabilities If true, the supported capabilities will be included in the response
|
|
106
96
|
* @param {String} token Authorization token
|
|
107
97
|
*/
|
|
108
|
-
const getIntegrationsList = (filter, type, version, includeSupportedCapabilities, token) => {
|
|
98
|
+
export const getIntegrationsList = (filter, type, version, includeSupportedCapabilities, token) => {
|
|
109
99
|
return new Promise((resolve, reject) => {
|
|
110
100
|
const requestData = {
|
|
111
101
|
includeSupportedCapabilities: includeSupportedCapabilities,
|
|
@@ -115,7 +105,7 @@ const getIntegrationsList = (filter, type, version, includeSupportedCapabilities
|
|
|
115
105
|
requestData.filter = filter;
|
|
116
106
|
if (type)
|
|
117
107
|
requestData.type = type;
|
|
118
|
-
|
|
108
|
+
const confirmationRequest = client.post(`api/v1/integrations`, requestData, {
|
|
119
109
|
headers: { authorization: token },
|
|
120
110
|
});
|
|
121
111
|
confirmationRequest
|
|
@@ -127,20 +117,19 @@ const getIntegrationsList = (filter, type, version, includeSupportedCapabilities
|
|
|
127
117
|
});
|
|
128
118
|
});
|
|
129
119
|
};
|
|
130
|
-
exports.getIntegrationsList = getIntegrationsList;
|
|
131
120
|
/**
|
|
132
121
|
* Get content information by Url
|
|
133
122
|
* @param {String} url The training url
|
|
134
123
|
* @param {String} verb The verb
|
|
135
124
|
* @param {String} token Authorization token
|
|
136
125
|
*/
|
|
137
|
-
const getContentInformationByUrl = (url, verb, token) => {
|
|
126
|
+
export const getContentInformationByUrl = (url, verb, token) => {
|
|
138
127
|
return new Promise((resolve, reject) => {
|
|
139
128
|
const requestData = {
|
|
140
129
|
url: url,
|
|
141
130
|
verb: verb,
|
|
142
131
|
};
|
|
143
|
-
|
|
132
|
+
const confirmationRequest = client.post(`api/v1/contentproviders/getcontentinformationbyurl`, requestData, {
|
|
144
133
|
headers: { authorization: token },
|
|
145
134
|
});
|
|
146
135
|
confirmationRequest
|
|
@@ -152,19 +141,18 @@ const getContentInformationByUrl = (url, verb, token) => {
|
|
|
152
141
|
});
|
|
153
142
|
});
|
|
154
143
|
};
|
|
155
|
-
exports.getContentInformationByUrl = getContentInformationByUrl;
|
|
156
144
|
/**
|
|
157
145
|
* Get content information by url from the browser instead of the backend
|
|
158
146
|
* @param {String} url
|
|
159
147
|
* @returns {Promise<ContentInformationResponse>}
|
|
160
148
|
*/
|
|
161
|
-
const getContentInformationByUrlFromBrowser = (url) => {
|
|
149
|
+
export const getContentInformationByUrlFromBrowser = (url) => {
|
|
162
150
|
return new Promise((resolve, reject) => {
|
|
163
|
-
|
|
164
|
-
|
|
151
|
+
const domain = new URL(url);
|
|
152
|
+
const instance = axiosLib.create({
|
|
165
153
|
baseURL: domain.origin,
|
|
166
154
|
});
|
|
167
|
-
|
|
155
|
+
const confirmationRequest = instance.get(domain.pathname, {
|
|
168
156
|
headers: {
|
|
169
157
|
"Access-Control-Allow-Origin": "*",
|
|
170
158
|
"Access-Control-Allow-Headers": "Authorization, Origin, X-Requested-With, Content-Type, Accept",
|
|
@@ -182,23 +170,32 @@ const getContentInformationByUrlFromBrowser = (url) => {
|
|
|
182
170
|
const words = text.trim().split(/\s+/).length;
|
|
183
171
|
return Math.ceil(words / wpm);
|
|
184
172
|
};
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
173
|
+
const document = htmlParser.parse(response.data);
|
|
174
|
+
const duration = getReadingTime(htmlToText(response.data));
|
|
175
|
+
const titleTag = document.querySelector("title");
|
|
176
|
+
const title = titleTag ? titleTag.rawText : "";
|
|
177
|
+
const description = "";
|
|
190
178
|
const descriptionEl = document.querySelector("meta");
|
|
191
179
|
try {
|
|
192
180
|
if (descriptionEl) {
|
|
193
181
|
const descriptionParentNode = descriptionEl.parentNode;
|
|
194
|
-
if (
|
|
182
|
+
if (descriptionEl) {
|
|
195
183
|
const descriptionChildNodes = descriptionParentNode.childNodes;
|
|
196
184
|
if (descriptionChildNodes) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
185
|
+
//TODO: Code needs fixing
|
|
186
|
+
// const descriptionRawAttr = descriptionChildNodes.find((element) => {
|
|
187
|
+
// return element.rawAttrs && element.rawAttrs.includes("description");
|
|
188
|
+
// });
|
|
189
|
+
// if (descriptionRawAttr) {
|
|
190
|
+
// const element = descriptionRawAttr as any; // Cast to any to access rawAttrs
|
|
191
|
+
// const descriptionContent = element.rawAttrs.substring(
|
|
192
|
+
// element.rawAttrs.indexOf("content=") + 8
|
|
193
|
+
// );
|
|
194
|
+
// description = descriptionContent.substring(
|
|
195
|
+
// 0,
|
|
196
|
+
// descriptionContent.length - 1
|
|
197
|
+
// );
|
|
198
|
+
// }
|
|
202
199
|
}
|
|
203
200
|
}
|
|
204
201
|
}
|
|
@@ -215,19 +212,18 @@ const getContentInformationByUrlFromBrowser = (url) => {
|
|
|
215
212
|
}
|
|
216
213
|
})
|
|
217
214
|
.catch((error) => {
|
|
218
|
-
reject(new Error(
|
|
215
|
+
reject(new Error(errorToString(error)));
|
|
219
216
|
});
|
|
220
217
|
});
|
|
221
218
|
};
|
|
222
|
-
exports.getContentInformationByUrlFromBrowser = getContentInformationByUrlFromBrowser;
|
|
223
219
|
/**
|
|
224
220
|
* Get enabled content providers
|
|
225
221
|
* @param {String} userId
|
|
226
222
|
* @param {String} token Authorization token
|
|
227
223
|
*/
|
|
228
|
-
const getEnabledContentProviders = (userId, token) => {
|
|
224
|
+
export const getEnabledContentProviders = (userId, token) => {
|
|
229
225
|
return new Promise((resolve, reject) => {
|
|
230
|
-
|
|
226
|
+
const confirmationRequest = client.get(`api/v1/contentproviders/getenabledcontentproviders/${userId}`, {
|
|
231
227
|
headers: { authorization: token },
|
|
232
228
|
});
|
|
233
229
|
confirmationRequest
|
|
@@ -239,15 +235,14 @@ const getEnabledContentProviders = (userId, token) => {
|
|
|
239
235
|
});
|
|
240
236
|
});
|
|
241
237
|
};
|
|
242
|
-
exports.getEnabledContentProviders = getEnabledContentProviders;
|
|
243
238
|
/**
|
|
244
239
|
* Publish integration
|
|
245
240
|
* @param {String} id The id of the integration to be published
|
|
246
241
|
* @param {String} token Authorization token
|
|
247
242
|
*/
|
|
248
|
-
const publishIntegration = (id, token) => {
|
|
243
|
+
export const publishIntegration = (id, token) => {
|
|
249
244
|
return new Promise((resolve, reject) => {
|
|
250
|
-
|
|
245
|
+
const confirmationRequest = client.post(`api/v1/integrations/publish/${id}`, {}, {
|
|
251
246
|
headers: { authorization: token },
|
|
252
247
|
});
|
|
253
248
|
confirmationRequest
|
|
@@ -259,19 +254,18 @@ const publishIntegration = (id, token) => {
|
|
|
259
254
|
});
|
|
260
255
|
});
|
|
261
256
|
};
|
|
262
|
-
exports.publishIntegration = publishIntegration;
|
|
263
257
|
/**
|
|
264
258
|
* Set integration information
|
|
265
259
|
* @param {String} id The id of the integration to be updated
|
|
266
260
|
* @param {Object} data Data used to update the integration
|
|
267
261
|
* @param {String} token Authorization token
|
|
268
262
|
*/
|
|
269
|
-
const setIntegrationInformation = (id, data, token) => {
|
|
263
|
+
export const setIntegrationInformation = (id, data, token) => {
|
|
270
264
|
return new Promise((resolve, reject) => {
|
|
271
265
|
const requestData = {
|
|
272
266
|
data: data,
|
|
273
267
|
};
|
|
274
|
-
|
|
268
|
+
const confirmationRequest = client.post(`api/v1/integrations/${id}`, requestData, {
|
|
275
269
|
headers: { authorization: token },
|
|
276
270
|
});
|
|
277
271
|
confirmationRequest
|
|
@@ -283,15 +277,14 @@ const setIntegrationInformation = (id, data, token) => {
|
|
|
283
277
|
});
|
|
284
278
|
});
|
|
285
279
|
};
|
|
286
|
-
exports.setIntegrationInformation = setIntegrationInformation;
|
|
287
280
|
/**
|
|
288
281
|
* Set default integration
|
|
289
282
|
* @param {String} id The id of the integration to be set as default
|
|
290
283
|
* @param {String} token Authorization token
|
|
291
284
|
*/
|
|
292
|
-
const setDefaultIntegration = (id, token) => {
|
|
285
|
+
export const setDefaultIntegration = (id, token) => {
|
|
293
286
|
return new Promise((resolve, reject) => {
|
|
294
|
-
|
|
287
|
+
const confirmationRequest = client.post(`api/v1/integrations/${id}/default`, "", {
|
|
295
288
|
headers: { authorization: token },
|
|
296
289
|
});
|
|
297
290
|
confirmationRequest
|
|
@@ -303,17 +296,17 @@ const setDefaultIntegration = (id, token) => {
|
|
|
303
296
|
});
|
|
304
297
|
});
|
|
305
298
|
};
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
setIntegrationInformation: exports.setIntegrationInformation,
|
|
299
|
+
export default {
|
|
300
|
+
createIntegration,
|
|
301
|
+
deleteIntegration,
|
|
302
|
+
discardIntegrationChanges,
|
|
303
|
+
getContentInformationByUrl,
|
|
304
|
+
getContentInformationByUrlFromBrowser,
|
|
305
|
+
getEnabledContentProviders,
|
|
306
|
+
getIntegrationInformationById,
|
|
307
|
+
getIntegrationsList,
|
|
308
|
+
publishIntegration,
|
|
309
|
+
setDefaultIntegration,
|
|
310
|
+
setIntegrationInformation,
|
|
319
311
|
};
|
|
312
|
+
//# sourceMappingURL=integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/lib/integration.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,QAAQ,MAAM,OAAO,CAAC;AAC7B,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,UAAU,MAAM,gBAAgB,CAAC;AA2BxC;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,IAAY,EACZ,KAAa,EACI,EAAE;IACnB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,WAAW,GAAoB;YACnC,IAAI,EAAE,IAAI;SACX,CAAC;QACF,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAsB,EAAE,WAAW,EAAE;YAC1E,OAAO,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;SAClC,CAAC,CAAC;QACH,mBAAmB;aAChB,IAAI,CAAC,CAAC,QAAwB,EAAE,EAAE;YACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAkB,EAAE,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,EAAU,EACV,KAAa,EACI,EAAE;IACnB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,M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QACrC,MAAM,mBAAmB,GAAG,MAAM,CAAC,IAAI,CACrC,uBAAuB,EAAE,UAAU,EACnC,EAAE,EACF;YACE,OAAO,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE;SAClC,CACF,CAAC;QACF,mBAAmB;aAChB,IAAI,CAAC,CAAC,QAAwB,EAAE,EAAE;YACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,KAAkB,EAAE,EAAE;YAC5B,MAAM,CAAC,KAAK,CAAC,CAAC;QAChB,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe;IACb,iBAAiB;IACjB,iBAAiB;IACjB,yBAAyB;IACzB,0BAA0B;IAC1B,qCAAqC;IACrC,0BAA0B;IAC1B,6BAA6B;IAC7B,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,yBAAyB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
getIntegrationsConfiguration: (ids: string[], type: number, token: string) => Promise<object>;
|
|
3
|
+
saveIntegrationConfiguration: (id: string, type: number, configuration: object, token: string) => Promise<object>;
|
|
4
|
+
testIntegrationConfiguration: (id: string, type: string, configuration: object, token: string) => Promise<object>;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=integrationConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrationConfiguration.d.ts","sourceRoot":"","sources":["../src/lib/integrationConfiguration.ts"],"names":[],"mappings":";wCAWO,MAAM,EAAE,QACP,MAAM,SACL,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;uCA8BZ,MAAM,QACJ,MAAM,iBACG,MAAM,SACd,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;uCAiCZ,MAAM,QACJ,MAAM,iBACG,MAAM,SACd,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC;;AAwBlB,wBAIE"}
|
|
@@ -1,19 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axiosClient_1 = require("./axiosClient");
|
|
1
|
+
import { client } from "./axiosClient";
|
|
4
2
|
/**
|
|
5
3
|
* Get the integration configuration
|
|
6
4
|
* @param {Array<String>} ids
|
|
7
5
|
* @param {Number} type
|
|
8
6
|
* @param {String} token Authorization token
|
|
9
|
-
* @returns {Promise<
|
|
7
|
+
* @returns {Promise<object>}
|
|
10
8
|
*/
|
|
11
9
|
const getIntegrationsConfiguration = (ids, type, token) => {
|
|
12
10
|
return new Promise((resolve, reject) => {
|
|
13
|
-
|
|
11
|
+
const requestData = { type: type };
|
|
14
12
|
if (ids)
|
|
15
13
|
requestData.ids = ids;
|
|
16
|
-
|
|
14
|
+
const confirmationRequest = client.post("api/v1/integrationsconfiguration", requestData, {
|
|
17
15
|
headers: { authorization: token },
|
|
18
16
|
});
|
|
19
17
|
confirmationRequest
|
|
@@ -31,7 +29,7 @@ const getIntegrationsConfiguration = (ids, type, token) => {
|
|
|
31
29
|
* @param {Number} type The type of configuration
|
|
32
30
|
* @param {Object} configuration Data used to update the integration configuration
|
|
33
31
|
* @param {String} token Authorization token
|
|
34
|
-
* @returns {Promise<
|
|
32
|
+
* @returns {Promise<object>}
|
|
35
33
|
*/
|
|
36
34
|
const saveIntegrationConfiguration = (id, type, configuration, token) => {
|
|
37
35
|
return new Promise((resolve, reject) => {
|
|
@@ -40,7 +38,7 @@ const saveIntegrationConfiguration = (id, type, configuration, token) => {
|
|
|
40
38
|
configuration: configuration,
|
|
41
39
|
type: type,
|
|
42
40
|
};
|
|
43
|
-
|
|
41
|
+
const confirmationRequest = client.put(`api/v1/integrationsconfiguration`, requestData, {
|
|
44
42
|
headers: { authorization: token },
|
|
45
43
|
});
|
|
46
44
|
confirmationRequest
|
|
@@ -58,7 +56,7 @@ const saveIntegrationConfiguration = (id, type, configuration, token) => {
|
|
|
58
56
|
* @param {String} type The type of configuration
|
|
59
57
|
* @param {Object} configuration Configuration to be tested
|
|
60
58
|
* @param {String} token Authorization token
|
|
61
|
-
* @returns {Promise<
|
|
59
|
+
* @returns {Promise<object>}
|
|
62
60
|
*/
|
|
63
61
|
const testIntegrationConfiguration = (id, type, configuration, token) => {
|
|
64
62
|
return new Promise((resolve, reject) => {
|
|
@@ -67,7 +65,7 @@ const testIntegrationConfiguration = (id, type, configuration, token) => {
|
|
|
67
65
|
configuration: configuration,
|
|
68
66
|
type: type,
|
|
69
67
|
};
|
|
70
|
-
|
|
68
|
+
const confirmationRequest = client.post(`api/v1/integrationsconfiguration/testConfiguration`, requestData, {
|
|
71
69
|
headers: { authorization: token },
|
|
72
70
|
});
|
|
73
71
|
confirmationRequest
|
|
@@ -79,8 +77,9 @@ const testIntegrationConfiguration = (id, type, configuration, token) => {
|
|
|
79
77
|
});
|
|
80
78
|
});
|
|
81
79
|
};
|
|
82
|
-
|
|
80
|
+
export default {
|
|
83
81
|
getIntegrationsConfiguration,
|
|
84
82
|
saveIntegrationConfiguration,
|
|
85
83
|
testIntegrationConfiguration,
|
|
86
84
|
};
|
|
85
|
+
//# sourceMappingURL=integrationConfiguration.js.map
|