@kineticdata/react 5.1.2 → 6.0.0
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/assets/task/icons/drag-handle.svg +3 -0
- package/assets/task/icons/plus_small.svg +2 -4
- package/lib/apis/agent/adapters.js +16 -12
- package/lib/apis/agent/bridges.js +54 -41
- package/lib/apis/agent/handlers.js +51 -38
- package/lib/apis/core/activity.js +19 -11
- package/lib/apis/core/attributeDefinitions.js +54 -46
- package/lib/apis/core/attributeDefinitions.test.js +47 -55
- package/lib/apis/core/authentication.js +58 -63
- package/lib/apis/core/backgroundJobs.js +38 -30
- package/lib/apis/core/bridgeModelAttributeMappings.js +42 -34
- package/lib/apis/core/bridgeModelAttributes.js +47 -37
- package/lib/apis/core/bridgeModelMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualificationMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualifications.js +42 -34
- package/lib/apis/core/bridgeModels.js +56 -46
- package/lib/apis/core/bridgeModels.test.js +64 -80
- package/lib/apis/core/bridgedresources.js +64 -72
- package/lib/apis/core/bridgedresources.test.js +33 -30
- package/lib/apis/core/categories.js +59 -52
- package/lib/apis/core/categories.test.js +36 -33
- package/lib/apis/core/fileResources.js +41 -33
- package/lib/apis/core/filestores.js +42 -34
- package/lib/apis/core/formTypes.js +50 -44
- package/lib/apis/core/forms.js +53 -49
- package/lib/apis/core/forms.test.js +60 -74
- package/lib/apis/core/kapps.js +45 -39
- package/lib/apis/core/kapps.test.js +45 -52
- package/lib/apis/core/logs.js +20 -16
- package/lib/apis/core/memberships.js +23 -20
- package/lib/apis/core/meta.js +31 -19
- package/lib/apis/core/notices.js +17 -9
- package/lib/apis/core/oauthClients.js +49 -45
- package/lib/apis/core/platformComponents.js +73 -57
- package/lib/apis/core/platformItems.js +22 -13
- package/lib/apis/core/profile.js +28 -21
- package/lib/apis/core/profile.test.js +20 -17
- package/lib/apis/core/securityPolicyDefinitions.js +48 -41
- package/lib/apis/core/securityPolicyDefinitions.test.js +50 -60
- package/lib/apis/core/space.js +23 -16
- package/lib/apis/core/space.test.js +31 -38
- package/lib/apis/core/submissions.js +213 -186
- package/lib/apis/core/submissions.test.js +39 -36
- package/lib/apis/core/teams.js +51 -44
- package/lib/apis/core/teams.test.js +42 -39
- package/lib/apis/core/translations.js +123 -130
- package/lib/apis/core/translations.test.js +278 -368
- package/lib/apis/core/users.js +56 -49
- package/lib/apis/core/users.test.js +42 -39
- package/lib/apis/core/version.js +20 -11
- package/lib/apis/core/webApis.js +42 -34
- package/lib/apis/core/webhooks.js +48 -41
- package/lib/apis/core/webhooks.test.js +50 -60
- package/lib/apis/core/webhooksJobs.js +30 -26
- package/lib/apis/core/workflows.js +52 -44
- package/lib/apis/http.js +89 -80
- package/lib/apis/http.test.js +37 -38
- package/lib/apis/index.js +506 -50
- package/lib/apis/system/index.js +228 -211
- package/lib/apis/task/index.js +280 -227
- package/lib/components/agent/bridge/BridgeForm.js +50 -50
- package/lib/components/agent/bridge/BridgeTable.js +12 -8
- package/lib/components/agent/filestore/FilestoreForm.js +49 -48
- package/lib/components/agent/filestore/FilestoreTable.js +12 -8
- package/lib/components/agent/handler/AgentHandlerForm.js +24 -27
- package/lib/components/agent/handler/AgentHandlerTable.js +12 -8
- package/lib/components/common/AttributeSelect.js +15 -9
- package/lib/components/common/BridgeSelect.js +48 -43
- package/lib/components/common/ComponentConfigContext.js +9 -2
- package/lib/components/common/ContentEditable.js +36 -60
- package/lib/components/common/FormSelect.js +70 -58
- package/lib/components/common/NodeSelect.js +23 -19
- package/lib/components/common/Scroller.js +24 -23
- package/lib/components/common/StaticSelect.js +57 -50
- package/lib/components/common/TableInput.js +54 -57
- package/lib/components/common/TeamSelect.js +42 -39
- package/lib/components/common/Typeahead.js +121 -138
- package/lib/components/common/UserSelect.js +42 -41
- package/lib/components/common/authentication/AuthInterceptor.js +15 -19
- package/lib/components/common/authentication/AuthInterceptor.test.js +46 -64
- package/lib/components/common/authentication/AuthenticationContainer.js +350 -454
- package/lib/components/common/authentication/RequestInterceptor.js +16 -19
- package/lib/components/common/code_input/CodeInput.js +92 -122
- package/lib/components/common/code_input/draftHelpers.js +96 -90
- package/lib/components/common/code_input/languageHelpers.js +49 -47
- package/lib/components/common/code_input/languageHelpers.test.js +21 -16
- package/lib/components/core/CoreFormModal.js +26 -24
- package/lib/components/core/CoreModal.js +37 -31
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +24 -23
- package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +18 -15
- package/lib/components/core/bridge_model/BridgeModelForm.js +27 -37
- package/lib/components/core/bridge_model/BridgeModelTable.js +12 -8
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +17 -16
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +25 -21
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +20 -20
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +27 -22
- package/lib/components/core/category/CategoryForm.js +22 -22
- package/lib/components/core/category/CategoryTable.js +15 -10
- package/lib/components/core/core_form/CoreForm.js +209 -285
- package/lib/components/core/core_form/CoreForm.test.js +12 -10
- package/lib/components/core/core_form/defaults/index.js +52 -44
- package/lib/components/core/core_form/globals.js +14 -5
- package/lib/components/core/field_definition/FieldDefinitionForm.js +23 -21
- package/lib/components/core/field_definition/FieldDefinitionTable.js +15 -10
- package/lib/components/core/file_resource/FileResourceForm.js +38 -37
- package/lib/components/core/file_resource/FileResourceTable.js +16 -12
- package/lib/components/core/form/FormForm.js +56 -61
- package/lib/components/core/form/FormTable.js +25 -22
- package/lib/components/core/form_type/FormTypeForm.js +14 -13
- package/lib/components/core/form_type/FormTypeTable.js +12 -8
- package/lib/components/core/i18n/I18n.js +54 -61
- package/lib/components/core/i18n/I18nContext.js +9 -2
- package/lib/components/core/i18n/I18nProvider.js +40 -43
- package/lib/components/core/i18n/Moment.js +40 -50
- package/lib/components/core/index_definition/IndexDefinitionForm.js +23 -24
- package/lib/components/core/index_definition/IndexDefinitionTable.js +19 -11
- package/lib/components/core/index_job/IndexJobTable.js +20 -15
- package/lib/components/core/kapp/KappForm.js +57 -58
- package/lib/components/core/kapp/KappTable.js +17 -12
- package/lib/components/core/log/LogTable.js +35 -33
- package/lib/components/core/oauth_client/OAuthClientForm.js +17 -17
- package/lib/components/core/oauth_client/OAuthClientTable.js +12 -8
- package/lib/components/core/platform_component/AgentComponentForm.js +15 -15
- package/lib/components/core/platform_component/AgentComponentTable.js +10 -5
- package/lib/components/core/platform_component/TaskComponentForm.js +14 -14
- package/lib/components/core/profile/ProfileForm.js +40 -39
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +28 -25
- package/lib/components/core/security_definition/SecurityDefinitionTable.js +18 -13
- package/lib/components/core/space/SpaceForm.js +79 -90
- package/lib/components/core/submission/DatastoreSubmissionFilters.js +39 -40
- package/lib/components/core/submission/DatastoreSubmissionTable.js +37 -34
- package/lib/components/core/submission/FormSubmissionFilters.js +79 -75
- package/lib/components/core/submission/FormSubmissionTable.js +27 -20
- package/lib/components/core/submission/KappSubmissionTable.js +30 -29
- package/lib/components/core/submission/SubmissionForm.js +126 -55
- package/lib/components/core/submission/SubmissionTable.js +24 -20
- package/lib/components/core/submission/helpers.js +37 -33
- package/lib/components/core/submission/helpers.test.js +69 -20
- package/lib/components/core/team/TeamForm.js +24 -21
- package/lib/components/core/team/TeamTable.js +16 -11
- package/lib/components/core/translation/ContextForm.js +13 -10
- package/lib/components/core/translation/ContextTable.js +13 -10
- package/lib/components/core/translation/EntryForm.js +27 -24
- package/lib/components/core/translation/EntryTable.js +19 -16
- package/lib/components/core/translation/LocaleForm.js +16 -13
- package/lib/components/core/translation/LocaleTable.js +12 -8
- package/lib/components/core/user/UserForm.js +38 -37
- package/lib/components/core/user/UserTable.js +19 -15
- package/lib/components/core/webapi/WebApiForm.js +49 -61
- package/lib/components/core/webapi/WebApiTable.js +14 -10
- package/lib/components/core/webhook/WebhookForm.js +33 -32
- package/lib/components/core/webhook/WebhookTable.js +22 -20
- package/lib/components/core/webhook_job/WebhookJobTable.js +19 -16
- package/lib/components/form/Form.helpers.js +102 -90
- package/lib/components/form/Form.js +467 -524
- package/lib/components/form/Form.models.js +38 -24
- package/lib/components/form/FormState.js +8 -5
- package/lib/components/form/KitchenSinkForm.js +135 -4
- package/lib/components/form/defaults/AttributesField.js +48 -59
- package/lib/components/form/defaults/CheckboxField.js +14 -6
- package/lib/components/form/defaults/CodeField.js +15 -7
- package/lib/components/form/defaults/FormButtons.js +12 -4
- package/lib/components/form/defaults/FormError.js +12 -4
- package/lib/components/form/defaults/FormField.js +15 -7
- package/lib/components/form/defaults/FormLayout.js +12 -4
- package/lib/components/form/defaults/FormMultiField.js +15 -7
- package/lib/components/form/defaults/PasswordField.js +14 -6
- package/lib/components/form/defaults/RadioField.js +15 -7
- package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +17 -9
- package/lib/components/form/defaults/SelectField.js +16 -8
- package/lib/components/form/defaults/SelectMultiField.js +15 -7
- package/lib/components/form/defaults/TableField.js +14 -6
- package/lib/components/form/defaults/TeamField.js +15 -7
- package/lib/components/form/defaults/TeamMultiField.js +15 -7
- package/lib/components/form/defaults/TextField.js +14 -6
- package/lib/components/form/defaults/TextMultiField.js +26 -28
- package/lib/components/form/defaults/UserField.js +15 -7
- package/lib/components/form/defaults/UserMultiField.js +15 -7
- package/lib/components/form/defaults/index.js +48 -41
- package/lib/components/form/tests/Form.test.js +568 -864
- package/lib/components/form/tests/components.js +15 -25
- package/lib/components/form/tests/helpers.test.js +35 -33
- package/lib/components/index.js +981 -135
- package/lib/components/system/SystemBackgroundTasksTable.js +14 -10
- package/lib/components/system/SystemFilestoreForm.js +28 -25
- package/lib/components/system/SystemForm.js +19 -16
- package/lib/components/system/SystemIngressForm.js +10 -9
- package/lib/components/system/SystemSecurityForm.js +17 -14
- package/lib/components/system/SystemSmtpForm.js +13 -13
- package/lib/components/system/SystemTaskAdapterForm.js +21 -17
- package/lib/components/system/SystemUserForm.js +15 -14
- package/lib/components/system/helpers.js +62 -60
- package/lib/components/system/helpers.test.js +16 -12
- package/lib/components/system/spaces/SystemSpaceForm.js +25 -24
- package/lib/components/system/spaces/SystemTenantForm.js +43 -40
- package/lib/components/system/spaces/SystemTenantTable.js +12 -8
- package/lib/components/table/Table.js +211 -224
- package/lib/components/table/Table.redux.js +292 -329
- package/lib/components/table/Table.redux.test.js +49 -47
- package/lib/components/table/Table.test.js +107 -132
- package/lib/components/table/defaults/BodyCell.js +12 -6
- package/lib/components/table/defaults/BodyRow.js +10 -4
- package/lib/components/table/defaults/BooleanFilter.js +17 -11
- package/lib/components/table/defaults/EmptyBodyRow.js +12 -6
- package/lib/components/table/defaults/FilterLayout.js +17 -11
- package/lib/components/table/defaults/Footer.js +11 -5
- package/lib/components/table/defaults/FooterCell.js +10 -4
- package/lib/components/table/defaults/FooterRow.js +10 -4
- package/lib/components/table/defaults/Header.js +10 -4
- package/lib/components/table/defaults/HeaderCell.js +16 -10
- package/lib/components/table/defaults/HeaderRow.js +10 -4
- package/lib/components/table/defaults/PaginationControl.js +18 -9
- package/lib/components/table/defaults/TableBody.js +10 -4
- package/lib/components/table/defaults/TableLayout.js +12 -6
- package/lib/components/table/defaults/TextFilter.js +16 -10
- package/lib/components/table/defaults/index.js +41 -33
- package/lib/components/task/builder/Connector.js +100 -111
- package/lib/components/task/builder/ConnectorForm.js +17 -11
- package/lib/components/task/builder/Node.js +101 -83
- package/lib/components/task/builder/NodeForm.js +30 -27
- package/lib/components/task/builder/NodeParametersForm.js +27 -24
- package/lib/components/task/builder/SvgCanvas.js +67 -96
- package/lib/components/task/builder/SvgText.js +19 -134
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +27 -22
- package/lib/components/task/builder/TreeBuilder.js +140 -115
- package/lib/components/task/builder/builder.redux.js +311 -326
- package/lib/components/task/builder/constants.js +94 -45
- package/lib/components/task/builder/helpers.js +184 -173
- package/lib/components/task/builder/helpers.test.js +20 -18
- package/lib/components/task/builder/models.js +121 -98
- package/lib/components/task/category/TaskCategoryForm.js +31 -29
- package/lib/components/task/category/TaskCategoryTable.js +12 -8
- package/lib/components/task/common/UsageTable.js +16 -12
- package/lib/components/task/engine/EngineSettingsForm.js +13 -11
- package/lib/components/task/errors/RunErrorTable.js +17 -13
- package/lib/components/task/errors/SystemErrorsTable.js +13 -9
- package/lib/components/task/handlers/HandlerForm.js +55 -55
- package/lib/components/task/handlers/HandlerTable.js +12 -8
- package/lib/components/task/handlers/MissingHandlerTable.js +12 -8
- package/lib/components/task/policy_rule/PolicyRuleForm.js +33 -32
- package/lib/components/task/policy_rule/PolicyRuleTable.js +12 -8
- package/lib/components/task/runs/CreateManualTriggerForm.js +17 -15
- package/lib/components/task/runs/RunTable.js +23 -20
- package/lib/components/task/runs/RunTaskTable.js +10 -6
- package/lib/components/task/sources/SourceForm.js +47 -47
- package/lib/components/task/sources/SourceTable.js +14 -11
- package/lib/components/task/triggers/TriggerTable.js +21 -18
- package/lib/components/task/workflows/LinkedWorkflowForm.js +48 -54
- package/lib/components/task/workflows/LinkedWorkflowTable.js +14 -10
- package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
- package/lib/components/task/workflows/WorkflowForm.js +49 -44
- package/lib/components/task/workflows/WorkflowTable.js +17 -14
- package/lib/helpers/SearchBuilder.js +73 -127
- package/lib/helpers/SearchBuilder.test.js +184 -175
- package/lib/helpers/index.js +116 -74
- package/lib/index.js +86 -38
- package/lib/reducer.js +11 -3
- package/lib/saga.js +42 -38
- package/lib/store.js +59 -35
- package/package.json +3 -28
- package/proxyhelper.js +105 -46
- package/assets/discussions/images/avi_128.png +0 -0
- package/assets/discussions/images/excel_128.png +0 -0
- package/assets/discussions/images/html_128.png +0 -0
- package/assets/discussions/images/illustrator_128.png +0 -0
- package/assets/discussions/images/indesign_128.png +0 -0
- package/assets/discussions/images/movie_128.png +0 -0
- package/assets/discussions/images/mpeg_128.png +0 -0
- package/assets/discussions/images/pdf_128.png +0 -0
- package/assets/discussions/images/photoshop_128.png +0 -0
- package/assets/discussions/images/powerpoint_128.png +0 -0
- package/assets/discussions/images/txt_128.png +0 -0
- package/assets/discussions/images/unknown_128.png +0 -0
- package/assets/discussions/images/word_128.png +0 -0
- package/assets/discussions/styles/_discussion.scss +0 -506
- package/lib/apis/discussions/index.js +0 -395
- package/lib/apis/socket/index.js +0 -77
- package/lib/apis/socket/socket.js +0 -350
- package/lib/apis/socket/socket.test.js +0 -90
- package/lib/apis/socket/timer.js +0 -45
- package/lib/apis/socket/timer.test.js +0 -51
- package/lib/apis/socket/topic.js +0 -185
- package/lib/apis/topics/index.js +0 -19
- package/lib/components/discussions/ChatInputForm.js +0 -424
- package/lib/components/discussions/DateBanner.js +0 -10
- package/lib/components/discussions/Discussion.js +0 -202
- package/lib/components/discussions/DiscussionForm.js +0 -227
- package/lib/components/discussions/InvitationForm.js +0 -107
- package/lib/components/discussions/MessageHistory.js +0 -110
- package/lib/components/discussions/MessagesByDate.js +0 -40
- package/lib/components/discussions/MessagesList.js +0 -30
- package/lib/components/discussions/MoreMessagesBanner.js +0 -26
- package/lib/components/discussions/ScrollHelper.js +0 -84
- package/lib/components/discussions/SystemMessage.js +0 -88
- package/lib/components/discussions/SystemMessageGroup.js +0 -15
- package/lib/components/discussions/UserMessage.js +0 -163
- package/lib/components/discussions/UserMessageGroup.js +0 -34
- package/lib/components/discussions/redux.js +0 -178
- package/lib/components/discussions/sagas.js +0 -500
- package/lib/helpers/discussions/canManage.js +0 -30
- package/lib/helpers/discussions/canManage.test.js +0 -69
- package/lib/helpers/discussions/generateSystemMessageContent.js +0 -131
- package/lib/helpers/discussions/generateSystemMessageContent.test.js +0 -450
- package/lib/models/discussions.js +0 -76
- package/lib/models/index.js +0 -1
package/lib/apis/task/index.js
CHANGED
|
@@ -1,23 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.validateSource = exports.updateTree = exports.updateTaskRun = exports.updateTaskCategory = exports.updateSource = exports.updateRunTaskResults = exports.updatePolicyRule = exports.updateHandler = exports.updateEngineSettings = exports.updateDeferredTask = exports.stopEngine = exports.startEngine = exports.resolveTaskErrors = exports.resolveSystemError = exports.importTree = exports.fetchUsage = exports.fetchTrees = exports.fetchTreeCounts = exports.fetchTree = exports.fetchTaskVersion = exports.fetchTaskTriggers = exports.fetchTaskRuns = exports.fetchTaskRunErrors = exports.fetchTaskRunError = exports.fetchTaskRun = exports.fetchTaskCategory = exports.fetchTaskCategories = exports.fetchSystemErrors = exports.fetchSystemError = exports.fetchSources = exports.fetchSourceAdapters = exports.fetchSource = exports.fetchPolicyRules = exports.fetchPolicyRule = exports.fetchMissingRoutines = exports.fetchMissingHandlers = exports.fetchHandlers = exports.fetchHandlerDurations = exports.fetchHandler = exports.fetchEngineStatus = exports.fetchEngineSettings = exports.fetchEngineLicense = exports.exportTree = exports.deleteTree = exports.deleteTaskCategory = exports.deleteSource = exports.deletePolicyRule = exports.deleteHandler = exports.createTree = exports.createTaskTrigger = exports.createTaskRun = exports.createTaskCategory = exports.createSource = exports.createPolicyRule = exports.createHandler = exports.completeDeferredTask = exports.cloneTree = exports.buildTreeId = void 0;
|
|
8
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
9
|
+
var _immutable = require("immutable");
|
|
10
|
+
var _http = require("../http");
|
|
11
|
+
var _helpers = require("../../helpers");
|
|
12
|
+
var buildTreeId = function buildTreeId(options) {
|
|
6
13
|
return options.definitionId ? options.definitionId : options.sourceName && options.sourceGroup ? "".concat(options.sourceName, " :: ").concat(options.sourceGroup, " :: ").concat(options.name) : options.name;
|
|
7
14
|
};
|
|
8
|
-
|
|
15
|
+
exports.buildTreeId = buildTreeId;
|
|
9
16
|
var generateNextPageToken = function generateNextPageToken(data) {
|
|
10
17
|
var offset = data.offset,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
18
|
+
limit = data.limit,
|
|
19
|
+
count = data.count,
|
|
20
|
+
more = data.more;
|
|
14
21
|
var nextPageToken = data.limit + data.offset;
|
|
15
22
|
return typeof more !== 'undefined' && more ? nextPageToken : offset >= 0 && limit && count ? offset + limit > count ? null : limit + offset : null;
|
|
16
23
|
};
|
|
17
|
-
|
|
18
|
-
export var fetchTrees = function fetchTrees() {
|
|
24
|
+
var fetchTrees = function fetchTrees() {
|
|
19
25
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
20
|
-
return
|
|
26
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees"), {
|
|
21
27
|
params: {
|
|
22
28
|
type: options.type,
|
|
23
29
|
limit: options.limit,
|
|
@@ -38,16 +44,15 @@ export var fetchTrees = function fetchTrees() {
|
|
|
38
44
|
trees: response.data.trees,
|
|
39
45
|
nextPageToken: generateNextPageToken(response.data)
|
|
40
46
|
};
|
|
41
|
-
})["catch"](handleErrors);
|
|
47
|
+
})["catch"](_http.handleErrors);
|
|
42
48
|
};
|
|
43
|
-
|
|
49
|
+
exports.fetchTrees = fetchTrees;
|
|
50
|
+
var fetchTree = function fetchTree() {
|
|
44
51
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
45
|
-
|
|
46
52
|
if (!options.guid) {
|
|
47
|
-
validateOptions('fetchTree', ['name'], options);
|
|
53
|
+
(0, _http.validateOptions)('fetchTree', ['name'], options);
|
|
48
54
|
}
|
|
49
|
-
|
|
50
|
-
return axios.get(options.guid ? "".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/guid/").concat(options.guid) : "".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(buildTreeId(options)), {
|
|
55
|
+
return _axios["default"].get(options.guid ? "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/guid/").concat(options.guid) : "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(buildTreeId(options)), {
|
|
51
56
|
params: {
|
|
52
57
|
include: options.include
|
|
53
58
|
}
|
|
@@ -55,13 +60,14 @@ export var fetchTree = function fetchTree() {
|
|
|
55
60
|
return {
|
|
56
61
|
tree: response.data
|
|
57
62
|
};
|
|
58
|
-
})["catch"](handleErrors);
|
|
63
|
+
})["catch"](_http.handleErrors);
|
|
59
64
|
};
|
|
60
|
-
|
|
65
|
+
exports.fetchTree = fetchTree;
|
|
66
|
+
var updateTree = function updateTree() {
|
|
61
67
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
62
|
-
validateOptions('updateTree', ['name', 'tree'], options);
|
|
68
|
+
(0, _http.validateOptions)('updateTree', ['name', 'tree'], options);
|
|
63
69
|
var id = buildTreeId(options);
|
|
64
|
-
return
|
|
70
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id), options.tree, {
|
|
65
71
|
params: {
|
|
66
72
|
include: options.include
|
|
67
73
|
}
|
|
@@ -69,34 +75,37 @@ export var updateTree = function updateTree() {
|
|
|
69
75
|
return {
|
|
70
76
|
tree: response.data.tree
|
|
71
77
|
};
|
|
72
|
-
})["catch"](handleErrors);
|
|
78
|
+
})["catch"](_http.handleErrors);
|
|
73
79
|
};
|
|
74
|
-
|
|
80
|
+
exports.updateTree = updateTree;
|
|
81
|
+
var createTree = function createTree() {
|
|
75
82
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
76
|
-
validateOptions('createTree', ['tree'], options);
|
|
77
|
-
return
|
|
83
|
+
(0, _http.validateOptions)('createTree', ['tree'], options);
|
|
84
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees"), options.tree, {
|
|
78
85
|
params: {
|
|
79
86
|
include: options.include
|
|
80
87
|
}
|
|
81
88
|
}).then(function (response) {
|
|
82
89
|
return response.data;
|
|
83
|
-
})["catch"](handleErrors);
|
|
90
|
+
})["catch"](_http.handleErrors);
|
|
84
91
|
};
|
|
85
|
-
|
|
92
|
+
exports.createTree = createTree;
|
|
93
|
+
var deleteTree = function deleteTree() {
|
|
86
94
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
87
|
-
validateOptions('deleteTree', ['name'], options);
|
|
95
|
+
(0, _http.validateOptions)('deleteTree', ['name'], options);
|
|
88
96
|
var id = buildTreeId(options);
|
|
89
|
-
return
|
|
97
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id)).then(function (response) {
|
|
90
98
|
return {
|
|
91
99
|
tree: response.data
|
|
92
100
|
};
|
|
93
|
-
})["catch"](handleErrors);
|
|
101
|
+
})["catch"](_http.handleErrors);
|
|
94
102
|
};
|
|
95
|
-
|
|
103
|
+
exports.deleteTree = deleteTree;
|
|
104
|
+
var cloneTree = function cloneTree() {
|
|
96
105
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
97
|
-
validateOptions('cloneTree', ['newName', 'name'], options);
|
|
106
|
+
(0, _http.validateOptions)('cloneTree', ['newName', 'name'], options);
|
|
98
107
|
var id = buildTreeId(options);
|
|
99
|
-
return
|
|
108
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/clone"), {
|
|
100
109
|
name: options.newName,
|
|
101
110
|
sourceName: options.newSourceName,
|
|
102
111
|
sourceGroup: options.newSourceGroup,
|
|
@@ -105,26 +114,27 @@ export var cloneTree = function cloneTree() {
|
|
|
105
114
|
return {
|
|
106
115
|
tree: response.data.tree
|
|
107
116
|
};
|
|
108
|
-
})["catch"](handleErrors);
|
|
117
|
+
})["catch"](_http.handleErrors);
|
|
109
118
|
};
|
|
110
|
-
|
|
119
|
+
exports.cloneTree = cloneTree;
|
|
120
|
+
var exportTree = function exportTree() {
|
|
111
121
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
112
|
-
validateOptions('exportTree', ['name'], options);
|
|
122
|
+
(0, _http.validateOptions)('exportTree', ['name'], options);
|
|
113
123
|
var id = buildTreeId(options);
|
|
114
|
-
return
|
|
124
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/export")).then(function (response) {
|
|
115
125
|
return {
|
|
116
126
|
tree: response.data
|
|
117
127
|
};
|
|
118
|
-
})["catch"](handleErrors);
|
|
128
|
+
})["catch"](_http.handleErrors);
|
|
119
129
|
};
|
|
120
|
-
|
|
130
|
+
exports.exportTree = exportTree;
|
|
131
|
+
var importTree = function importTree() {
|
|
121
132
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
122
133
|
var content = options.content,
|
|
123
|
-
|
|
124
|
-
|
|
134
|
+
contentUrl = options.contentUrl,
|
|
135
|
+
force = options.force;
|
|
125
136
|
var data;
|
|
126
137
|
var headers = {};
|
|
127
|
-
|
|
128
138
|
if (contentUrl) {
|
|
129
139
|
data = {
|
|
130
140
|
contentUrl: contentUrl
|
|
@@ -136,8 +146,7 @@ export var importTree = function importTree() {
|
|
|
136
146
|
'Content-Type': 'multipart/form-data'
|
|
137
147
|
};
|
|
138
148
|
}
|
|
139
|
-
|
|
140
|
-
return axios.post("".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/trees"), data, {
|
|
149
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees"), data, {
|
|
141
150
|
headers: headers,
|
|
142
151
|
params: {
|
|
143
152
|
force: force
|
|
@@ -146,20 +155,22 @@ export var importTree = function importTree() {
|
|
|
146
155
|
return {
|
|
147
156
|
tree: response.data
|
|
148
157
|
};
|
|
149
|
-
})["catch"](handleErrors);
|
|
158
|
+
})["catch"](_http.handleErrors);
|
|
150
159
|
};
|
|
151
|
-
|
|
160
|
+
exports.importTree = importTree;
|
|
161
|
+
var fetchTreeCounts = function fetchTreeCounts() {
|
|
152
162
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
153
163
|
var id = buildTreeId(options);
|
|
154
|
-
return
|
|
164
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/counts")).then(function (response) {
|
|
155
165
|
return {
|
|
156
166
|
counts: response.data
|
|
157
167
|
};
|
|
158
|
-
})["catch"](handleErrors);
|
|
168
|
+
})["catch"](_http.handleErrors);
|
|
159
169
|
};
|
|
160
|
-
|
|
170
|
+
exports.fetchTreeCounts = fetchTreeCounts;
|
|
171
|
+
var fetchSources = function fetchSources() {
|
|
161
172
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
162
|
-
return
|
|
173
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/sources"), {
|
|
163
174
|
params: {
|
|
164
175
|
include: options.include
|
|
165
176
|
}
|
|
@@ -167,12 +178,13 @@ export var fetchSources = function fetchSources() {
|
|
|
167
178
|
return {
|
|
168
179
|
sources: response.data.sourceRoots
|
|
169
180
|
};
|
|
170
|
-
})["catch"](handleErrors);
|
|
181
|
+
})["catch"](_http.handleErrors);
|
|
171
182
|
};
|
|
172
|
-
|
|
183
|
+
exports.fetchSources = fetchSources;
|
|
184
|
+
var fetchSource = function fetchSource() {
|
|
173
185
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
174
|
-
validateOptions('fetchSource', ['sourceName'], options);
|
|
175
|
-
return
|
|
186
|
+
(0, _http.validateOptions)('fetchSource', ['sourceName'], options);
|
|
187
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/sources/").concat(options.sourceName), {
|
|
176
188
|
params: {
|
|
177
189
|
include: options.include
|
|
178
190
|
}
|
|
@@ -180,12 +192,13 @@ export var fetchSource = function fetchSource() {
|
|
|
180
192
|
return {
|
|
181
193
|
source: response.data
|
|
182
194
|
};
|
|
183
|
-
})["catch"](handleErrors);
|
|
195
|
+
})["catch"](_http.handleErrors);
|
|
184
196
|
};
|
|
185
|
-
|
|
197
|
+
exports.fetchSource = fetchSource;
|
|
198
|
+
var updateSource = function updateSource() {
|
|
186
199
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
187
|
-
validateOptions('updateSource', ['sourceName', 'source'], options);
|
|
188
|
-
return
|
|
200
|
+
(0, _http.validateOptions)('updateSource', ['sourceName', 'source'], options);
|
|
201
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/sources/").concat(options.sourceName), options.source, {
|
|
189
202
|
params: {
|
|
190
203
|
include: options.include
|
|
191
204
|
}
|
|
@@ -193,26 +206,26 @@ export var updateSource = function updateSource() {
|
|
|
193
206
|
return {
|
|
194
207
|
source: response.data
|
|
195
208
|
};
|
|
196
|
-
})["catch"](handleErrors);
|
|
209
|
+
})["catch"](_http.handleErrors);
|
|
197
210
|
};
|
|
198
|
-
|
|
211
|
+
exports.updateSource = updateSource;
|
|
212
|
+
var deleteSource = function deleteSource() {
|
|
199
213
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
200
214
|
var sourceName = options.sourceName;
|
|
201
|
-
|
|
202
215
|
if (!sourceName) {
|
|
203
216
|
throw new Error('deleteSource failed! The option "sourceName" is required.');
|
|
204
217
|
}
|
|
205
|
-
|
|
206
|
-
return axios["delete"]("".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/sources/").concat(sourceName)).then(function (response) {
|
|
218
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/sources/").concat(sourceName)).then(function (response) {
|
|
207
219
|
return {
|
|
208
220
|
source: response.data
|
|
209
221
|
};
|
|
210
|
-
})["catch"](handleErrors);
|
|
222
|
+
})["catch"](_http.handleErrors);
|
|
211
223
|
};
|
|
212
|
-
|
|
224
|
+
exports.deleteSource = deleteSource;
|
|
225
|
+
var createSource = function createSource() {
|
|
213
226
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
214
|
-
validateOptions('createSource', ['source'], options);
|
|
215
|
-
return
|
|
227
|
+
(0, _http.validateOptions)('createSource', ['source'], options);
|
|
228
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/sources"), options.source, {
|
|
216
229
|
params: {
|
|
217
230
|
include: options.include
|
|
218
231
|
}
|
|
@@ -220,22 +233,24 @@ export var createSource = function createSource() {
|
|
|
220
233
|
return {
|
|
221
234
|
source: response.data
|
|
222
235
|
};
|
|
223
|
-
})["catch"](handleErrors);
|
|
236
|
+
})["catch"](_http.handleErrors);
|
|
224
237
|
};
|
|
225
|
-
|
|
238
|
+
exports.createSource = createSource;
|
|
239
|
+
var validateSource = function validateSource() {
|
|
226
240
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
227
|
-
validateOptions('validateSource', ['sourceName'], options);
|
|
228
|
-
return
|
|
241
|
+
(0, _http.validateOptions)('validateSource', ['sourceName'], options);
|
|
242
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/sources/").concat(options.sourceName, "/validate"), null, {
|
|
229
243
|
params: {
|
|
230
244
|
include: options.include
|
|
231
245
|
}
|
|
232
246
|
}).then(function (response) {
|
|
233
247
|
return response.data;
|
|
234
|
-
})["catch"](handleErrors);
|
|
248
|
+
})["catch"](_http.handleErrors);
|
|
235
249
|
};
|
|
236
|
-
|
|
250
|
+
exports.validateSource = validateSource;
|
|
251
|
+
var fetchSourceAdapters = function fetchSourceAdapters() {
|
|
237
252
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
238
|
-
return
|
|
253
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/meta/sourceAdapters"), {
|
|
239
254
|
params: {
|
|
240
255
|
include: options.include
|
|
241
256
|
}
|
|
@@ -243,30 +258,33 @@ export var fetchSourceAdapters = function fetchSourceAdapters() {
|
|
|
243
258
|
return {
|
|
244
259
|
sourceAdapters: response.data.sourceAdapters
|
|
245
260
|
};
|
|
246
|
-
})["catch"](handleErrors);
|
|
261
|
+
})["catch"](_http.handleErrors);
|
|
247
262
|
};
|
|
248
|
-
|
|
263
|
+
exports.fetchSourceAdapters = fetchSourceAdapters;
|
|
264
|
+
var updateDeferredTask = function updateDeferredTask() {
|
|
249
265
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
250
|
-
validateOptions('updateDeferredTask', ['token'], options);
|
|
251
|
-
return
|
|
266
|
+
(0, _http.validateOptions)('updateDeferredTask', ['token'], options);
|
|
267
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs/task/").concat(options.token), {
|
|
252
268
|
message: options.message || ''
|
|
253
269
|
}).then(function (response) {
|
|
254
270
|
return response.data;
|
|
255
|
-
})["catch"](handleErrors);
|
|
271
|
+
})["catch"](_http.handleErrors);
|
|
256
272
|
};
|
|
257
|
-
|
|
273
|
+
exports.updateDeferredTask = updateDeferredTask;
|
|
274
|
+
var completeDeferredTask = function completeDeferredTask() {
|
|
258
275
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
259
|
-
validateOptions('completeDeferredTask', ['token', 'results'], options);
|
|
260
|
-
return
|
|
276
|
+
(0, _http.validateOptions)('completeDeferredTask', ['token', 'results'], options);
|
|
277
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs/task/").concat(options.token), {
|
|
261
278
|
results: options.results,
|
|
262
279
|
message: options.message || ''
|
|
263
280
|
}).then(function (response) {
|
|
264
281
|
return response.data;
|
|
265
|
-
})["catch"](handleErrors);
|
|
282
|
+
})["catch"](_http.handleErrors);
|
|
266
283
|
};
|
|
267
|
-
|
|
284
|
+
exports.completeDeferredTask = completeDeferredTask;
|
|
285
|
+
var fetchTaskCategories = function fetchTaskCategories() {
|
|
268
286
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
269
|
-
return
|
|
287
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/categories"), {
|
|
270
288
|
params: {
|
|
271
289
|
include: options.include
|
|
272
290
|
}
|
|
@@ -274,12 +292,13 @@ export var fetchTaskCategories = function fetchTaskCategories() {
|
|
|
274
292
|
return {
|
|
275
293
|
categories: response.data.categories
|
|
276
294
|
};
|
|
277
|
-
})["catch"](handleErrors);
|
|
295
|
+
})["catch"](_http.handleErrors);
|
|
278
296
|
};
|
|
279
|
-
|
|
297
|
+
exports.fetchTaskCategories = fetchTaskCategories;
|
|
298
|
+
var createTaskCategory = function createTaskCategory() {
|
|
280
299
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
281
|
-
validateOptions('createTaskCategory', ['category'], options);
|
|
282
|
-
return
|
|
300
|
+
(0, _http.validateOptions)('createTaskCategory', ['category'], options);
|
|
301
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/categories"), options.category, {
|
|
283
302
|
params: {
|
|
284
303
|
include: options.include
|
|
285
304
|
}
|
|
@@ -287,12 +306,13 @@ export var createTaskCategory = function createTaskCategory() {
|
|
|
287
306
|
return {
|
|
288
307
|
category: response.data.category
|
|
289
308
|
};
|
|
290
|
-
})["catch"](handleErrors);
|
|
309
|
+
})["catch"](_http.handleErrors);
|
|
291
310
|
};
|
|
292
|
-
|
|
311
|
+
exports.createTaskCategory = createTaskCategory;
|
|
312
|
+
var fetchTaskCategory = function fetchTaskCategory() {
|
|
293
313
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
294
|
-
validateOptions('fetchTaskCategory', ['categoryName'], options);
|
|
295
|
-
return
|
|
314
|
+
(0, _http.validateOptions)('fetchTaskCategory', ['categoryName'], options);
|
|
315
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/categories/").concat(options.categoryName), {
|
|
296
316
|
params: {
|
|
297
317
|
include: options.include
|
|
298
318
|
}
|
|
@@ -300,12 +320,13 @@ export var fetchTaskCategory = function fetchTaskCategory() {
|
|
|
300
320
|
return {
|
|
301
321
|
category: response.data
|
|
302
322
|
};
|
|
303
|
-
})["catch"](handleErrors);
|
|
323
|
+
})["catch"](_http.handleErrors);
|
|
304
324
|
};
|
|
305
|
-
|
|
325
|
+
exports.fetchTaskCategory = fetchTaskCategory;
|
|
326
|
+
var deleteTaskCategory = function deleteTaskCategory() {
|
|
306
327
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
307
|
-
validateOptions('deleteTaskCategory', ['categoryName'], options);
|
|
308
|
-
return
|
|
328
|
+
(0, _http.validateOptions)('deleteTaskCategory', ['categoryName'], options);
|
|
329
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/categories/").concat(options.categoryName), {
|
|
309
330
|
params: {
|
|
310
331
|
include: options.include
|
|
311
332
|
}
|
|
@@ -313,12 +334,13 @@ export var deleteTaskCategory = function deleteTaskCategory() {
|
|
|
313
334
|
return {
|
|
314
335
|
category: response.data.category
|
|
315
336
|
};
|
|
316
|
-
})["catch"](handleErrors);
|
|
337
|
+
})["catch"](_http.handleErrors);
|
|
317
338
|
};
|
|
318
|
-
|
|
339
|
+
exports.deleteTaskCategory = deleteTaskCategory;
|
|
340
|
+
var updateTaskCategory = function updateTaskCategory() {
|
|
319
341
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
320
|
-
validateOptions('updateTaskCategory', ['categoryName', 'category'], options);
|
|
321
|
-
return
|
|
342
|
+
(0, _http.validateOptions)('updateTaskCategory', ['categoryName', 'category'], options);
|
|
343
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/categories/").concat(options.categoryName), options.category, {
|
|
322
344
|
params: {
|
|
323
345
|
include: options.include
|
|
324
346
|
}
|
|
@@ -326,11 +348,12 @@ export var updateTaskCategory = function updateTaskCategory() {
|
|
|
326
348
|
return {
|
|
327
349
|
category: response.data.category
|
|
328
350
|
};
|
|
329
|
-
})["catch"](handleErrors);
|
|
351
|
+
})["catch"](_http.handleErrors);
|
|
330
352
|
};
|
|
331
|
-
|
|
353
|
+
exports.updateTaskCategory = updateTaskCategory;
|
|
354
|
+
var fetchPolicyRules = function fetchPolicyRules() {
|
|
332
355
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
333
|
-
return
|
|
356
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/policyRules"), {
|
|
334
357
|
params: {
|
|
335
358
|
include: options.include,
|
|
336
359
|
type: options.type
|
|
@@ -339,12 +362,13 @@ export var fetchPolicyRules = function fetchPolicyRules() {
|
|
|
339
362
|
return {
|
|
340
363
|
policyRules: response.data.policyRules
|
|
341
364
|
};
|
|
342
|
-
})["catch"](handleErrors);
|
|
365
|
+
})["catch"](_http.handleErrors);
|
|
343
366
|
};
|
|
344
|
-
|
|
367
|
+
exports.fetchPolicyRules = fetchPolicyRules;
|
|
368
|
+
var createPolicyRule = function createPolicyRule() {
|
|
345
369
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
346
|
-
validateOptions('createPolicyRule', ['policy', 'policyType'], options);
|
|
347
|
-
return
|
|
370
|
+
(0, _http.validateOptions)('createPolicyRule', ['policy', 'policyType'], options);
|
|
371
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/policyRules/").concat(options.policyType), options.policy, {
|
|
348
372
|
params: {
|
|
349
373
|
include: options.include
|
|
350
374
|
}
|
|
@@ -352,12 +376,13 @@ export var createPolicyRule = function createPolicyRule() {
|
|
|
352
376
|
return {
|
|
353
377
|
policyRule: response.data.policyRule
|
|
354
378
|
};
|
|
355
|
-
})["catch"](handleErrors);
|
|
379
|
+
})["catch"](_http.handleErrors);
|
|
356
380
|
};
|
|
357
|
-
|
|
381
|
+
exports.createPolicyRule = createPolicyRule;
|
|
382
|
+
var fetchPolicyRule = function fetchPolicyRule() {
|
|
358
383
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
359
|
-
validateOptions('fetchPolicyRule', ['policyName', 'policyType'], options);
|
|
360
|
-
return
|
|
384
|
+
(0, _http.validateOptions)('fetchPolicyRule', ['policyName', 'policyType'], options);
|
|
385
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/policyRules/").concat(options.policyType, "/").concat(options.policyName), {
|
|
361
386
|
params: {
|
|
362
387
|
include: options.include
|
|
363
388
|
}
|
|
@@ -365,12 +390,13 @@ export var fetchPolicyRule = function fetchPolicyRule() {
|
|
|
365
390
|
return {
|
|
366
391
|
policyRule: response.data
|
|
367
392
|
};
|
|
368
|
-
})["catch"](handleErrors);
|
|
393
|
+
})["catch"](_http.handleErrors);
|
|
369
394
|
};
|
|
370
|
-
|
|
395
|
+
exports.fetchPolicyRule = fetchPolicyRule;
|
|
396
|
+
var deletePolicyRule = function deletePolicyRule() {
|
|
371
397
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
372
|
-
validateOptions('deletePolicyRule', ['policyName', 'policyType'], options);
|
|
373
|
-
return
|
|
398
|
+
(0, _http.validateOptions)('deletePolicyRule', ['policyName', 'policyType'], options);
|
|
399
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/policyRules/").concat(options.policyType, "/").concat(options.policyName), {
|
|
374
400
|
params: {
|
|
375
401
|
include: options.include
|
|
376
402
|
}
|
|
@@ -378,12 +404,13 @@ export var deletePolicyRule = function deletePolicyRule() {
|
|
|
378
404
|
return {
|
|
379
405
|
policyRule: response.data.policyRule
|
|
380
406
|
};
|
|
381
|
-
})["catch"](handleErrors);
|
|
407
|
+
})["catch"](_http.handleErrors);
|
|
382
408
|
};
|
|
383
|
-
|
|
409
|
+
exports.deletePolicyRule = deletePolicyRule;
|
|
410
|
+
var updatePolicyRule = function updatePolicyRule() {
|
|
384
411
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
385
|
-
validateOptions('updatePolicyRule', ['policyName', 'policy', 'policyType'], options);
|
|
386
|
-
return
|
|
412
|
+
(0, _http.validateOptions)('updatePolicyRule', ['policyName', 'policy', 'policyType'], options);
|
|
413
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/policyRules/").concat(options.policyType, "/").concat(options.policyName), options.policy, {
|
|
387
414
|
params: {
|
|
388
415
|
include: options.include
|
|
389
416
|
}
|
|
@@ -391,11 +418,12 @@ export var updatePolicyRule = function updatePolicyRule() {
|
|
|
391
418
|
return {
|
|
392
419
|
policyRule: response.data.policyRule
|
|
393
420
|
};
|
|
394
|
-
})["catch"](handleErrors);
|
|
421
|
+
})["catch"](_http.handleErrors);
|
|
395
422
|
};
|
|
396
|
-
|
|
423
|
+
exports.updatePolicyRule = updatePolicyRule;
|
|
424
|
+
var fetchSystemErrors = function fetchSystemErrors() {
|
|
397
425
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
398
|
-
return
|
|
426
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/systemErrors"), {
|
|
399
427
|
params: {
|
|
400
428
|
include: options.include
|
|
401
429
|
}
|
|
@@ -403,12 +431,13 @@ export var fetchSystemErrors = function fetchSystemErrors() {
|
|
|
403
431
|
return {
|
|
404
432
|
systemErrors: response.data.errors
|
|
405
433
|
};
|
|
406
|
-
})["catch"](handleErrors);
|
|
434
|
+
})["catch"](_http.handleErrors);
|
|
407
435
|
};
|
|
408
|
-
|
|
436
|
+
exports.fetchSystemErrors = fetchSystemErrors;
|
|
437
|
+
var fetchSystemError = function fetchSystemError() {
|
|
409
438
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
410
|
-
validateOptions('fetchSystemError', ['errorId'], options);
|
|
411
|
-
return
|
|
439
|
+
(0, _http.validateOptions)('fetchSystemError', ['errorId'], options);
|
|
440
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/systemErrors/").concat(options.errorId), {
|
|
412
441
|
params: {
|
|
413
442
|
include: options.include
|
|
414
443
|
}
|
|
@@ -416,23 +445,25 @@ export var fetchSystemError = function fetchSystemError() {
|
|
|
416
445
|
return {
|
|
417
446
|
systemError: response.data
|
|
418
447
|
};
|
|
419
|
-
})["catch"](handleErrors);
|
|
448
|
+
})["catch"](_http.handleErrors);
|
|
420
449
|
};
|
|
421
|
-
|
|
450
|
+
exports.fetchSystemError = fetchSystemError;
|
|
451
|
+
var resolveSystemError = function resolveSystemError() {
|
|
422
452
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
423
|
-
validateOptions('resolveSystemError', ['ids', 'resolution'], options);
|
|
424
|
-
return
|
|
453
|
+
(0, _http.validateOptions)('resolveSystemError', ['ids', 'resolution'], options);
|
|
454
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/systemErrors/resolve"), {
|
|
425
455
|
ids: options.ids,
|
|
426
456
|
resolution: options.resolution
|
|
427
457
|
}).then(function (response) {
|
|
428
458
|
return {
|
|
429
459
|
message: response.data.message
|
|
430
460
|
};
|
|
431
|
-
})["catch"](handleErrors);
|
|
461
|
+
})["catch"](_http.handleErrors);
|
|
432
462
|
};
|
|
433
|
-
|
|
463
|
+
exports.resolveSystemError = resolveSystemError;
|
|
464
|
+
var fetchHandlers = function fetchHandlers() {
|
|
434
465
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
435
|
-
return
|
|
466
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers"), {
|
|
436
467
|
params: {
|
|
437
468
|
include: options.include
|
|
438
469
|
}
|
|
@@ -440,12 +471,13 @@ export var fetchHandlers = function fetchHandlers() {
|
|
|
440
471
|
return {
|
|
441
472
|
handlers: response.data.handlers
|
|
442
473
|
};
|
|
443
|
-
})["catch"](handleErrors);
|
|
474
|
+
})["catch"](_http.handleErrors);
|
|
444
475
|
};
|
|
445
|
-
|
|
476
|
+
exports.fetchHandlers = fetchHandlers;
|
|
477
|
+
var fetchHandler = function fetchHandler() {
|
|
446
478
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
447
|
-
validateOptions('fetchHandler', ['definitionId'], options);
|
|
448
|
-
return
|
|
479
|
+
(0, _http.validateOptions)('fetchHandler', ['definitionId'], options);
|
|
480
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(options.definitionId), {
|
|
449
481
|
params: {
|
|
450
482
|
include: options.include
|
|
451
483
|
}
|
|
@@ -453,16 +485,16 @@ export var fetchHandler = function fetchHandler() {
|
|
|
453
485
|
return {
|
|
454
486
|
handler: response.data
|
|
455
487
|
};
|
|
456
|
-
})["catch"](handleErrors);
|
|
488
|
+
})["catch"](_http.handleErrors);
|
|
457
489
|
};
|
|
458
|
-
|
|
490
|
+
exports.fetchHandler = fetchHandler;
|
|
491
|
+
var createHandler = function createHandler() {
|
|
459
492
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
460
493
|
var packageUrl = options.packageUrl,
|
|
461
|
-
|
|
462
|
-
|
|
494
|
+
packageFile = options.packageFile,
|
|
495
|
+
force = options.force;
|
|
463
496
|
var data;
|
|
464
497
|
var headers = {};
|
|
465
|
-
|
|
466
498
|
if (packageUrl) {
|
|
467
499
|
data = {
|
|
468
500
|
packageUrl: packageUrl
|
|
@@ -474,8 +506,7 @@ export var createHandler = function createHandler() {
|
|
|
474
506
|
'Content-Type': 'multipart/form-data'
|
|
475
507
|
};
|
|
476
508
|
}
|
|
477
|
-
|
|
478
|
-
return axios.post("".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers"), data, {
|
|
509
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers"), data, {
|
|
479
510
|
headers: headers,
|
|
480
511
|
params: {
|
|
481
512
|
force: force
|
|
@@ -488,10 +519,11 @@ export var createHandler = function createHandler() {
|
|
|
488
519
|
};
|
|
489
520
|
});
|
|
490
521
|
};
|
|
491
|
-
|
|
522
|
+
exports.createHandler = createHandler;
|
|
523
|
+
var updateHandler = function updateHandler() {
|
|
492
524
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
493
|
-
validateOptions('updateHandler', ['definitionId', 'handler'], options);
|
|
494
|
-
return
|
|
525
|
+
(0, _http.validateOptions)('updateHandler', ['definitionId', 'handler'], options);
|
|
526
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(options.definitionId), options.handler, {
|
|
495
527
|
params: {
|
|
496
528
|
include: options.include
|
|
497
529
|
}
|
|
@@ -499,27 +531,27 @@ export var updateHandler = function updateHandler() {
|
|
|
499
531
|
return {
|
|
500
532
|
handler: response.data
|
|
501
533
|
};
|
|
502
|
-
})["catch"](handleErrors);
|
|
534
|
+
})["catch"](_http.handleErrors);
|
|
503
535
|
};
|
|
504
|
-
|
|
536
|
+
exports.updateHandler = updateHandler;
|
|
537
|
+
var deleteHandler = function deleteHandler() {
|
|
505
538
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
506
539
|
var definitionId = options.definitionId;
|
|
507
|
-
|
|
508
540
|
if (!definitionId) {
|
|
509
541
|
throw new Error('deleteHandler failed! The option "definitionId" is required.');
|
|
510
542
|
}
|
|
511
|
-
|
|
512
|
-
return axios["delete"]("".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(definitionId)).then(function (response) {
|
|
543
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(definitionId)).then(function (response) {
|
|
513
544
|
return {
|
|
514
545
|
handler: response.data
|
|
515
546
|
};
|
|
516
|
-
})["catch"](handleErrors);
|
|
547
|
+
})["catch"](_http.handleErrors);
|
|
517
548
|
};
|
|
518
|
-
|
|
549
|
+
exports.deleteHandler = deleteHandler;
|
|
550
|
+
var fetchUsage = function fetchUsage() {
|
|
519
551
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
520
552
|
var id = buildTreeId(options);
|
|
521
|
-
var path = options.usageType === 'handler' ? "".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(options.definitionId, "/usage") : "".concat(bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/usage");
|
|
522
|
-
return
|
|
553
|
+
var path = options.usageType === 'handler' ? "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(options.definitionId, "/usage") : "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/usage");
|
|
554
|
+
return _axios["default"].get(path, {
|
|
523
555
|
params: {
|
|
524
556
|
include: options.include
|
|
525
557
|
}
|
|
@@ -530,17 +562,19 @@ export var fetchUsage = function fetchUsage() {
|
|
|
530
562
|
totalRoutines: response.data.totalRoutines,
|
|
531
563
|
totalNodes: response.data.totalNodes
|
|
532
564
|
};
|
|
533
|
-
})["catch"](handleErrors);
|
|
565
|
+
})["catch"](_http.handleErrors);
|
|
534
566
|
};
|
|
535
|
-
|
|
567
|
+
exports.fetchUsage = fetchUsage;
|
|
568
|
+
var fetchHandlerDurations = function fetchHandlerDurations() {
|
|
536
569
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
537
|
-
return
|
|
570
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(options.definitionId, "/durations")).then(function (response) {
|
|
538
571
|
return response.data;
|
|
539
|
-
})["catch"](handleErrors);
|
|
572
|
+
})["catch"](_http.handleErrors);
|
|
540
573
|
};
|
|
541
|
-
|
|
574
|
+
exports.fetchHandlerDurations = fetchHandlerDurations;
|
|
575
|
+
var fetchMissingRoutines = function fetchMissingRoutines() {
|
|
542
576
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
543
|
-
return
|
|
577
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/missing"), {
|
|
544
578
|
params: {
|
|
545
579
|
include: options.include
|
|
546
580
|
}
|
|
@@ -548,11 +582,12 @@ export var fetchMissingRoutines = function fetchMissingRoutines() {
|
|
|
548
582
|
return {
|
|
549
583
|
missingRoutines: response.data.missingRoutines
|
|
550
584
|
};
|
|
551
|
-
})["catch"](handleErrors);
|
|
585
|
+
})["catch"](_http.handleErrors);
|
|
552
586
|
};
|
|
553
|
-
|
|
587
|
+
exports.fetchMissingRoutines = fetchMissingRoutines;
|
|
588
|
+
var fetchMissingHandlers = function fetchMissingHandlers() {
|
|
554
589
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
555
|
-
return
|
|
590
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/missing"), {
|
|
556
591
|
params: {
|
|
557
592
|
include: options.include
|
|
558
593
|
}
|
|
@@ -560,56 +595,63 @@ export var fetchMissingHandlers = function fetchMissingHandlers() {
|
|
|
560
595
|
return {
|
|
561
596
|
missingHandlers: response.data.missingHandlers
|
|
562
597
|
};
|
|
563
|
-
})["catch"](handleErrors);
|
|
598
|
+
})["catch"](_http.handleErrors);
|
|
564
599
|
};
|
|
565
|
-
|
|
600
|
+
exports.fetchMissingHandlers = fetchMissingHandlers;
|
|
601
|
+
var stopEngine = function stopEngine() {
|
|
566
602
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
567
|
-
return
|
|
603
|
+
return _axios["default"].post(options.spaceSlug ? "/app/system-coordinator/components/task/".concat(options.spaceSlug, "/app/api/v2/engine") : "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/engine"), {
|
|
568
604
|
action: 'stop',
|
|
569
605
|
asynchronous: options.asynchronous || 'false'
|
|
570
606
|
}).then(function (response) {
|
|
571
607
|
return response.data;
|
|
572
|
-
})["catch"](handleErrors);
|
|
608
|
+
})["catch"](_http.handleErrors);
|
|
573
609
|
};
|
|
574
|
-
|
|
610
|
+
exports.stopEngine = stopEngine;
|
|
611
|
+
var startEngine = function startEngine() {
|
|
575
612
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
576
|
-
return
|
|
613
|
+
return _axios["default"].post(options.spaceSlug ? "/app/system-coordinator/components/task/".concat(options.spaceSlug, "/app/api/v2/engine") : "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/engine"), {
|
|
577
614
|
action: 'start',
|
|
578
615
|
asynchronous: options.asynchronous || 'false'
|
|
579
616
|
}).then(function (response) {
|
|
580
617
|
return response.data;
|
|
581
|
-
})["catch"](handleErrors);
|
|
618
|
+
})["catch"](_http.handleErrors);
|
|
582
619
|
};
|
|
583
|
-
|
|
620
|
+
exports.startEngine = startEngine;
|
|
621
|
+
var fetchEngineStatus = function fetchEngineStatus() {
|
|
584
622
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
585
|
-
return
|
|
623
|
+
return _axios["default"].get(options.spaceSlug ? "/app/system-coordinator/components/task/".concat(options.spaceSlug, "/app/api/v2/engine") : "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/engine")).then(function (response) {
|
|
586
624
|
return response.data;
|
|
587
|
-
})["catch"](handleErrors);
|
|
625
|
+
})["catch"](_http.handleErrors);
|
|
588
626
|
};
|
|
589
|
-
|
|
590
|
-
|
|
627
|
+
exports.fetchEngineStatus = fetchEngineStatus;
|
|
628
|
+
var fetchEngineLicense = function fetchEngineLicense() {
|
|
629
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/config/license")).then(function (response) {
|
|
591
630
|
return response.data;
|
|
592
|
-
})["catch"](handleErrors);
|
|
631
|
+
})["catch"](_http.handleErrors);
|
|
593
632
|
};
|
|
594
|
-
|
|
633
|
+
exports.fetchEngineLicense = fetchEngineLicense;
|
|
634
|
+
var fetchEngineSettings = function fetchEngineSettings() {
|
|
595
635
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
596
|
-
return
|
|
636
|
+
return _axios["default"].get(options.spaceSlug ? "/app/system-coordinator/components/task/".concat(options.spaceSlug, "/app/api/v2/config/engine") : "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/config/engine")).then(function (response) {
|
|
597
637
|
return {
|
|
598
638
|
settings: response.data.properties
|
|
599
639
|
};
|
|
600
|
-
})["catch"](handleErrors);
|
|
640
|
+
})["catch"](_http.handleErrors);
|
|
601
641
|
};
|
|
602
|
-
|
|
642
|
+
exports.fetchEngineSettings = fetchEngineSettings;
|
|
643
|
+
var updateEngineSettings = function updateEngineSettings() {
|
|
603
644
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
604
|
-
return
|
|
645
|
+
return _axios["default"].put(options.spaceSlug ? "/app/system-coordinator/components/task/".concat(options.spaceSlug, "/app/api/v2/config/engine") : "".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/config/engine"), options.settings).then(function (response) {
|
|
605
646
|
return {
|
|
606
647
|
message: response.data.message
|
|
607
648
|
};
|
|
608
|
-
})["catch"](handleErrors);
|
|
649
|
+
})["catch"](_http.handleErrors);
|
|
609
650
|
};
|
|
610
|
-
|
|
651
|
+
exports.updateEngineSettings = updateEngineSettings;
|
|
652
|
+
var fetchTaskRuns = function fetchTaskRuns() {
|
|
611
653
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
612
|
-
return
|
|
654
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs"), {
|
|
613
655
|
params: {
|
|
614
656
|
type: options.type,
|
|
615
657
|
limit: options.limit,
|
|
@@ -628,7 +670,7 @@ export var fetchTaskRuns = function fetchTaskRuns() {
|
|
|
628
670
|
status: options.status || undefined,
|
|
629
671
|
orderBy: options.orderBy,
|
|
630
672
|
direction: options.direction,
|
|
631
|
-
count: get(options, 'count'),
|
|
673
|
+
count: (0, _immutable.get)(options, 'count'),
|
|
632
674
|
start: options.start || undefined,
|
|
633
675
|
end: options.end || undefined,
|
|
634
676
|
afterId: options.afterId || undefined,
|
|
@@ -641,12 +683,13 @@ export var fetchTaskRuns = function fetchTaskRuns() {
|
|
|
641
683
|
more: response.data.more,
|
|
642
684
|
nextPageToken: generateNextPageToken(response.data)
|
|
643
685
|
};
|
|
644
|
-
})["catch"](handleErrors);
|
|
686
|
+
})["catch"](_http.handleErrors);
|
|
645
687
|
};
|
|
646
|
-
|
|
688
|
+
exports.fetchTaskRuns = fetchTaskRuns;
|
|
689
|
+
var fetchTaskRun = function fetchTaskRun() {
|
|
647
690
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
648
|
-
validateOptions('fetchTaskRun', ['runId'], options);
|
|
649
|
-
return
|
|
691
|
+
(0, _http.validateOptions)('fetchTaskRun', ['runId'], options);
|
|
692
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs/").concat(options.runId), {
|
|
650
693
|
params: {
|
|
651
694
|
include: options.include
|
|
652
695
|
}
|
|
@@ -654,20 +697,22 @@ export var fetchTaskRun = function fetchTaskRun() {
|
|
|
654
697
|
return {
|
|
655
698
|
run: response.data
|
|
656
699
|
};
|
|
657
|
-
})["catch"](handleErrors);
|
|
700
|
+
})["catch"](_http.handleErrors);
|
|
658
701
|
};
|
|
659
|
-
|
|
702
|
+
exports.fetchTaskRun = fetchTaskRun;
|
|
703
|
+
var updateTaskRun = function updateTaskRun() {
|
|
660
704
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
661
|
-
validateOptions('updateTaskRun', ['runId', 'run'], options);
|
|
662
|
-
return
|
|
705
|
+
(0, _http.validateOptions)('updateTaskRun', ['runId', 'run'], options);
|
|
706
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs/").concat(options.runId), options.run, {
|
|
663
707
|
include: options.include
|
|
664
708
|
});
|
|
665
709
|
};
|
|
666
|
-
|
|
710
|
+
exports.updateTaskRun = updateTaskRun;
|
|
711
|
+
var createTaskRun = function createTaskRun() {
|
|
667
712
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
668
|
-
validateOptions('createTaskRun', ['run'], options);
|
|
713
|
+
(0, _http.validateOptions)('createTaskRun', ['run'], options);
|
|
669
714
|
var data = options.run.sourceData || options.run.sourceData === '' ? options.run.sourceData : options.run;
|
|
670
|
-
return
|
|
715
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs"), data, {
|
|
671
716
|
include: options.include,
|
|
672
717
|
params: {
|
|
673
718
|
sourceName: options.sourceName || undefined,
|
|
@@ -681,11 +726,12 @@ export var createTaskRun = function createTaskRun() {
|
|
|
681
726
|
return {
|
|
682
727
|
run: response.data
|
|
683
728
|
};
|
|
684
|
-
})["catch"](handleErrors);
|
|
729
|
+
})["catch"](_http.handleErrors);
|
|
685
730
|
};
|
|
686
|
-
|
|
731
|
+
exports.createTaskRun = createTaskRun;
|
|
732
|
+
var fetchTaskTriggers = function fetchTaskTriggers() {
|
|
687
733
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
688
|
-
return
|
|
734
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/triggers").concat(options.triggerStatus ? '/' + options.triggerStatus : ''), {
|
|
689
735
|
params: {
|
|
690
736
|
limit: options.limit,
|
|
691
737
|
include: options.include,
|
|
@@ -714,22 +760,24 @@ export var fetchTaskTriggers = function fetchTaskTriggers() {
|
|
|
714
760
|
nextPageToken: generateNextPageToken(response.data),
|
|
715
761
|
count: response.data.count
|
|
716
762
|
};
|
|
717
|
-
})["catch"](handleErrors);
|
|
763
|
+
})["catch"](_http.handleErrors);
|
|
718
764
|
};
|
|
719
|
-
|
|
765
|
+
exports.fetchTaskTriggers = fetchTaskTriggers;
|
|
766
|
+
var createTaskTrigger = function createTaskTrigger() {
|
|
720
767
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
721
|
-
validateOptions('createTaskTrigger', ['runId', 'nodeId'], options);
|
|
722
|
-
return
|
|
768
|
+
(0, _http.validateOptions)('createTaskTrigger', ['runId', 'nodeId'], options);
|
|
769
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs/").concat(options.runId, "/triggers"), {
|
|
723
770
|
nodeId: options.nodeId,
|
|
724
771
|
branchId: options.branchId || undefined,
|
|
725
772
|
loopIndex: options.loopIndex || undefined
|
|
726
773
|
}).then(function (response) {
|
|
727
774
|
return response.data;
|
|
728
|
-
})["catch"](handleErrors);
|
|
775
|
+
})["catch"](_http.handleErrors);
|
|
729
776
|
};
|
|
730
|
-
|
|
777
|
+
exports.createTaskTrigger = createTaskTrigger;
|
|
778
|
+
var fetchTaskRunErrors = function fetchTaskRunErrors() {
|
|
731
779
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
732
|
-
return
|
|
780
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/errors"), {
|
|
733
781
|
params: {
|
|
734
782
|
limit: options.limit,
|
|
735
783
|
include: options.include,
|
|
@@ -760,12 +808,13 @@ export var fetchTaskRunErrors = function fetchTaskRunErrors() {
|
|
|
760
808
|
count: response.data.count,
|
|
761
809
|
nextPageToken: generateNextPageToken(response.data)
|
|
762
810
|
};
|
|
763
|
-
})["catch"](handleErrors);
|
|
811
|
+
})["catch"](_http.handleErrors);
|
|
764
812
|
};
|
|
765
|
-
|
|
813
|
+
exports.fetchTaskRunErrors = fetchTaskRunErrors;
|
|
814
|
+
var fetchTaskRunError = function fetchTaskRunError() {
|
|
766
815
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
767
|
-
validateOptions('fetchTaskRunError', ['errorId'], options);
|
|
768
|
-
return
|
|
816
|
+
(0, _http.validateOptions)('fetchTaskRunError', ['errorId'], options);
|
|
817
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/errors/").concat(options.errorId), {
|
|
769
818
|
params: {
|
|
770
819
|
include: options.include
|
|
771
820
|
}
|
|
@@ -773,12 +822,13 @@ export var fetchTaskRunError = function fetchTaskRunError() {
|
|
|
773
822
|
return {
|
|
774
823
|
runError: response.data
|
|
775
824
|
};
|
|
776
|
-
})["catch"](handleErrors);
|
|
825
|
+
})["catch"](_http.handleErrors);
|
|
777
826
|
};
|
|
778
|
-
|
|
827
|
+
exports.fetchTaskRunError = fetchTaskRunError;
|
|
828
|
+
var updateRunTaskResults = function updateRunTaskResults() {
|
|
779
829
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
780
|
-
validateOptions('updateRunTaskResults', ['runId', 'taskId'], options);
|
|
781
|
-
return
|
|
830
|
+
(0, _http.validateOptions)('updateRunTaskResults', ['runId', 'taskId'], options);
|
|
831
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs/").concat(options.runId, "/tasks/").concat(options.taskId), {
|
|
782
832
|
deferredResults: options.deferredResults,
|
|
783
833
|
results: options.results,
|
|
784
834
|
message: options.message
|
|
@@ -788,12 +838,13 @@ export var updateRunTaskResults = function updateRunTaskResults() {
|
|
|
788
838
|
}
|
|
789
839
|
}).then(function (response) {
|
|
790
840
|
return response.data;
|
|
791
|
-
})["catch"](handleErrors);
|
|
841
|
+
})["catch"](_http.handleErrors);
|
|
792
842
|
};
|
|
793
|
-
|
|
843
|
+
exports.updateRunTaskResults = updateRunTaskResults;
|
|
844
|
+
var resolveTaskErrors = function resolveTaskErrors() {
|
|
794
845
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
795
|
-
validateOptions('resolveTaskErrors', ['ids', 'action', 'resolution'], options);
|
|
796
|
-
return
|
|
846
|
+
(0, _http.validateOptions)('resolveTaskErrors', ['ids', 'action', 'resolution'], options);
|
|
847
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/errors/resolve"), {
|
|
797
848
|
ids: options.ids,
|
|
798
849
|
action: options.action,
|
|
799
850
|
resolution: options.resolution,
|
|
@@ -804,12 +855,14 @@ export var resolveTaskErrors = function resolveTaskErrors() {
|
|
|
804
855
|
return {
|
|
805
856
|
message: response.data
|
|
806
857
|
};
|
|
807
|
-
})["catch"](handleErrors);
|
|
858
|
+
})["catch"](_http.handleErrors);
|
|
808
859
|
};
|
|
809
|
-
|
|
810
|
-
|
|
860
|
+
exports.resolveTaskErrors = resolveTaskErrors;
|
|
861
|
+
var fetchTaskVersion = function fetchTaskVersion() {
|
|
862
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/version")).then(function (response) {
|
|
811
863
|
return {
|
|
812
864
|
version: response.data
|
|
813
865
|
};
|
|
814
|
-
})["catch"](handleErrors);
|
|
815
|
-
};
|
|
866
|
+
})["catch"](_http.handleErrors);
|
|
867
|
+
};
|
|
868
|
+
exports.fetchTaskVersion = fetchTaskVersion;
|