@kineticdata/react 5.1.1 → 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 +61 -45
- package/lib/apis/core/bridgeModels.test.js +64 -80
- package/lib/apis/core/bridgedresources.js +64 -71
- package/lib/apis/core/bridgedresources.test.js +34 -31
- 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 -48
- 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 +30 -0
- 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 +220 -172
- package/lib/apis/core/submissions.test.js +81 -51
- 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 +64 -0
- package/lib/apis/http.js +89 -80
- package/lib/apis/http.test.js +37 -38
- package/lib/apis/index.js +506 -48
- package/lib/apis/system/index.js +228 -211
- package/lib/apis/task/index.js +283 -226
- 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 -133
- 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 +219 -225
- package/lib/components/table/Table.redux.js +298 -327
- 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 +28 -23
- package/lib/components/task/builder/TreeBuilder.js +140 -115
- package/lib/components/task/builder/builder.redux.js +322 -300
- 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 +133 -91
- 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 +249 -0
- package/lib/components/task/workflows/LinkedWorkflowTable.js +137 -0
- package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
- package/lib/components/task/workflows/WorkflowForm.js +61 -46
- 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 +4 -29
- package/proxyhelper.js +105 -47
- 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,13 +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
|
-
|
|
47
|
-
|
|
52
|
+
if (!options.guid) {
|
|
53
|
+
(0, _http.validateOptions)('fetchTree', ['name'], options);
|
|
54
|
+
}
|
|
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)), {
|
|
48
56
|
params: {
|
|
49
57
|
include: options.include
|
|
50
58
|
}
|
|
@@ -52,13 +60,14 @@ export var fetchTree = function fetchTree() {
|
|
|
52
60
|
return {
|
|
53
61
|
tree: response.data
|
|
54
62
|
};
|
|
55
|
-
})["catch"](handleErrors);
|
|
63
|
+
})["catch"](_http.handleErrors);
|
|
56
64
|
};
|
|
57
|
-
|
|
65
|
+
exports.fetchTree = fetchTree;
|
|
66
|
+
var updateTree = function updateTree() {
|
|
58
67
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
59
|
-
validateOptions('updateTree', ['name', 'tree'], options);
|
|
68
|
+
(0, _http.validateOptions)('updateTree', ['name', 'tree'], options);
|
|
60
69
|
var id = buildTreeId(options);
|
|
61
|
-
return
|
|
70
|
+
return _axios["default"].put("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id), options.tree, {
|
|
62
71
|
params: {
|
|
63
72
|
include: options.include
|
|
64
73
|
}
|
|
@@ -66,34 +75,37 @@ export var updateTree = function updateTree() {
|
|
|
66
75
|
return {
|
|
67
76
|
tree: response.data.tree
|
|
68
77
|
};
|
|
69
|
-
})["catch"](handleErrors);
|
|
78
|
+
})["catch"](_http.handleErrors);
|
|
70
79
|
};
|
|
71
|
-
|
|
80
|
+
exports.updateTree = updateTree;
|
|
81
|
+
var createTree = function createTree() {
|
|
72
82
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
73
|
-
validateOptions('createTree', ['tree'], options);
|
|
74
|
-
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, {
|
|
75
85
|
params: {
|
|
76
86
|
include: options.include
|
|
77
87
|
}
|
|
78
88
|
}).then(function (response) {
|
|
79
89
|
return response.data;
|
|
80
|
-
})["catch"](handleErrors);
|
|
90
|
+
})["catch"](_http.handleErrors);
|
|
81
91
|
};
|
|
82
|
-
|
|
92
|
+
exports.createTree = createTree;
|
|
93
|
+
var deleteTree = function deleteTree() {
|
|
83
94
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
84
|
-
validateOptions('deleteTree', ['name'], options);
|
|
95
|
+
(0, _http.validateOptions)('deleteTree', ['name'], options);
|
|
85
96
|
var id = buildTreeId(options);
|
|
86
|
-
return
|
|
97
|
+
return _axios["default"]["delete"]("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id)).then(function (response) {
|
|
87
98
|
return {
|
|
88
99
|
tree: response.data
|
|
89
100
|
};
|
|
90
|
-
})["catch"](handleErrors);
|
|
101
|
+
})["catch"](_http.handleErrors);
|
|
91
102
|
};
|
|
92
|
-
|
|
103
|
+
exports.deleteTree = deleteTree;
|
|
104
|
+
var cloneTree = function cloneTree() {
|
|
93
105
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
94
|
-
validateOptions('cloneTree', ['newName', 'name'], options);
|
|
106
|
+
(0, _http.validateOptions)('cloneTree', ['newName', 'name'], options);
|
|
95
107
|
var id = buildTreeId(options);
|
|
96
|
-
return
|
|
108
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/clone"), {
|
|
97
109
|
name: options.newName,
|
|
98
110
|
sourceName: options.newSourceName,
|
|
99
111
|
sourceGroup: options.newSourceGroup,
|
|
@@ -102,26 +114,27 @@ export var cloneTree = function cloneTree() {
|
|
|
102
114
|
return {
|
|
103
115
|
tree: response.data.tree
|
|
104
116
|
};
|
|
105
|
-
})["catch"](handleErrors);
|
|
117
|
+
})["catch"](_http.handleErrors);
|
|
106
118
|
};
|
|
107
|
-
|
|
119
|
+
exports.cloneTree = cloneTree;
|
|
120
|
+
var exportTree = function exportTree() {
|
|
108
121
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
109
|
-
validateOptions('exportTree', ['name'], options);
|
|
122
|
+
(0, _http.validateOptions)('exportTree', ['name'], options);
|
|
110
123
|
var id = buildTreeId(options);
|
|
111
|
-
return
|
|
124
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/export")).then(function (response) {
|
|
112
125
|
return {
|
|
113
126
|
tree: response.data
|
|
114
127
|
};
|
|
115
|
-
})["catch"](handleErrors);
|
|
128
|
+
})["catch"](_http.handleErrors);
|
|
116
129
|
};
|
|
117
|
-
|
|
130
|
+
exports.exportTree = exportTree;
|
|
131
|
+
var importTree = function importTree() {
|
|
118
132
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
119
133
|
var content = options.content,
|
|
120
|
-
|
|
121
|
-
|
|
134
|
+
contentUrl = options.contentUrl,
|
|
135
|
+
force = options.force;
|
|
122
136
|
var data;
|
|
123
137
|
var headers = {};
|
|
124
|
-
|
|
125
138
|
if (contentUrl) {
|
|
126
139
|
data = {
|
|
127
140
|
contentUrl: contentUrl
|
|
@@ -133,8 +146,7 @@ export var importTree = function importTree() {
|
|
|
133
146
|
'Content-Type': 'multipart/form-data'
|
|
134
147
|
};
|
|
135
148
|
}
|
|
136
|
-
|
|
137
|
-
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, {
|
|
138
150
|
headers: headers,
|
|
139
151
|
params: {
|
|
140
152
|
force: force
|
|
@@ -143,20 +155,22 @@ export var importTree = function importTree() {
|
|
|
143
155
|
return {
|
|
144
156
|
tree: response.data
|
|
145
157
|
};
|
|
146
|
-
})["catch"](handleErrors);
|
|
158
|
+
})["catch"](_http.handleErrors);
|
|
147
159
|
};
|
|
148
|
-
|
|
160
|
+
exports.importTree = importTree;
|
|
161
|
+
var fetchTreeCounts = function fetchTreeCounts() {
|
|
149
162
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
150
163
|
var id = buildTreeId(options);
|
|
151
|
-
return
|
|
164
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/").concat(id, "/counts")).then(function (response) {
|
|
152
165
|
return {
|
|
153
166
|
counts: response.data
|
|
154
167
|
};
|
|
155
|
-
})["catch"](handleErrors);
|
|
168
|
+
})["catch"](_http.handleErrors);
|
|
156
169
|
};
|
|
157
|
-
|
|
170
|
+
exports.fetchTreeCounts = fetchTreeCounts;
|
|
171
|
+
var fetchSources = function fetchSources() {
|
|
158
172
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
159
|
-
return
|
|
173
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/sources"), {
|
|
160
174
|
params: {
|
|
161
175
|
include: options.include
|
|
162
176
|
}
|
|
@@ -164,12 +178,13 @@ export var fetchSources = function fetchSources() {
|
|
|
164
178
|
return {
|
|
165
179
|
sources: response.data.sourceRoots
|
|
166
180
|
};
|
|
167
|
-
})["catch"](handleErrors);
|
|
181
|
+
})["catch"](_http.handleErrors);
|
|
168
182
|
};
|
|
169
|
-
|
|
183
|
+
exports.fetchSources = fetchSources;
|
|
184
|
+
var fetchSource = function fetchSource() {
|
|
170
185
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
171
|
-
validateOptions('fetchSource', ['sourceName'], options);
|
|
172
|
-
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), {
|
|
173
188
|
params: {
|
|
174
189
|
include: options.include
|
|
175
190
|
}
|
|
@@ -177,12 +192,13 @@ export var fetchSource = function fetchSource() {
|
|
|
177
192
|
return {
|
|
178
193
|
source: response.data
|
|
179
194
|
};
|
|
180
|
-
})["catch"](handleErrors);
|
|
195
|
+
})["catch"](_http.handleErrors);
|
|
181
196
|
};
|
|
182
|
-
|
|
197
|
+
exports.fetchSource = fetchSource;
|
|
198
|
+
var updateSource = function updateSource() {
|
|
183
199
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
184
|
-
validateOptions('updateSource', ['sourceName', 'source'], options);
|
|
185
|
-
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, {
|
|
186
202
|
params: {
|
|
187
203
|
include: options.include
|
|
188
204
|
}
|
|
@@ -190,26 +206,26 @@ export var updateSource = function updateSource() {
|
|
|
190
206
|
return {
|
|
191
207
|
source: response.data
|
|
192
208
|
};
|
|
193
|
-
})["catch"](handleErrors);
|
|
209
|
+
})["catch"](_http.handleErrors);
|
|
194
210
|
};
|
|
195
|
-
|
|
211
|
+
exports.updateSource = updateSource;
|
|
212
|
+
var deleteSource = function deleteSource() {
|
|
196
213
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
197
214
|
var sourceName = options.sourceName;
|
|
198
|
-
|
|
199
215
|
if (!sourceName) {
|
|
200
216
|
throw new Error('deleteSource failed! The option "sourceName" is required.');
|
|
201
217
|
}
|
|
202
|
-
|
|
203
|
-
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) {
|
|
204
219
|
return {
|
|
205
220
|
source: response.data
|
|
206
221
|
};
|
|
207
|
-
})["catch"](handleErrors);
|
|
222
|
+
})["catch"](_http.handleErrors);
|
|
208
223
|
};
|
|
209
|
-
|
|
224
|
+
exports.deleteSource = deleteSource;
|
|
225
|
+
var createSource = function createSource() {
|
|
210
226
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
211
|
-
validateOptions('createSource', ['source'], options);
|
|
212
|
-
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, {
|
|
213
229
|
params: {
|
|
214
230
|
include: options.include
|
|
215
231
|
}
|
|
@@ -217,22 +233,24 @@ export var createSource = function createSource() {
|
|
|
217
233
|
return {
|
|
218
234
|
source: response.data
|
|
219
235
|
};
|
|
220
|
-
})["catch"](handleErrors);
|
|
236
|
+
})["catch"](_http.handleErrors);
|
|
221
237
|
};
|
|
222
|
-
|
|
238
|
+
exports.createSource = createSource;
|
|
239
|
+
var validateSource = function validateSource() {
|
|
223
240
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
224
|
-
validateOptions('validateSource', ['sourceName'], options);
|
|
225
|
-
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, {
|
|
226
243
|
params: {
|
|
227
244
|
include: options.include
|
|
228
245
|
}
|
|
229
246
|
}).then(function (response) {
|
|
230
247
|
return response.data;
|
|
231
|
-
})["catch"](handleErrors);
|
|
248
|
+
})["catch"](_http.handleErrors);
|
|
232
249
|
};
|
|
233
|
-
|
|
250
|
+
exports.validateSource = validateSource;
|
|
251
|
+
var fetchSourceAdapters = function fetchSourceAdapters() {
|
|
234
252
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
235
|
-
return
|
|
253
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/meta/sourceAdapters"), {
|
|
236
254
|
params: {
|
|
237
255
|
include: options.include
|
|
238
256
|
}
|
|
@@ -240,30 +258,33 @@ export var fetchSourceAdapters = function fetchSourceAdapters() {
|
|
|
240
258
|
return {
|
|
241
259
|
sourceAdapters: response.data.sourceAdapters
|
|
242
260
|
};
|
|
243
|
-
})["catch"](handleErrors);
|
|
261
|
+
})["catch"](_http.handleErrors);
|
|
244
262
|
};
|
|
245
|
-
|
|
263
|
+
exports.fetchSourceAdapters = fetchSourceAdapters;
|
|
264
|
+
var updateDeferredTask = function updateDeferredTask() {
|
|
246
265
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
247
|
-
validateOptions('updateDeferredTask', ['token'], options);
|
|
248
|
-
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), {
|
|
249
268
|
message: options.message || ''
|
|
250
269
|
}).then(function (response) {
|
|
251
270
|
return response.data;
|
|
252
|
-
})["catch"](handleErrors);
|
|
271
|
+
})["catch"](_http.handleErrors);
|
|
253
272
|
};
|
|
254
|
-
|
|
273
|
+
exports.updateDeferredTask = updateDeferredTask;
|
|
274
|
+
var completeDeferredTask = function completeDeferredTask() {
|
|
255
275
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
256
|
-
validateOptions('completeDeferredTask', ['token', 'results'], options);
|
|
257
|
-
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), {
|
|
258
278
|
results: options.results,
|
|
259
279
|
message: options.message || ''
|
|
260
280
|
}).then(function (response) {
|
|
261
281
|
return response.data;
|
|
262
|
-
})["catch"](handleErrors);
|
|
282
|
+
})["catch"](_http.handleErrors);
|
|
263
283
|
};
|
|
264
|
-
|
|
284
|
+
exports.completeDeferredTask = completeDeferredTask;
|
|
285
|
+
var fetchTaskCategories = function fetchTaskCategories() {
|
|
265
286
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
266
|
-
return
|
|
287
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/categories"), {
|
|
267
288
|
params: {
|
|
268
289
|
include: options.include
|
|
269
290
|
}
|
|
@@ -271,12 +292,13 @@ export var fetchTaskCategories = function fetchTaskCategories() {
|
|
|
271
292
|
return {
|
|
272
293
|
categories: response.data.categories
|
|
273
294
|
};
|
|
274
|
-
})["catch"](handleErrors);
|
|
295
|
+
})["catch"](_http.handleErrors);
|
|
275
296
|
};
|
|
276
|
-
|
|
297
|
+
exports.fetchTaskCategories = fetchTaskCategories;
|
|
298
|
+
var createTaskCategory = function createTaskCategory() {
|
|
277
299
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
278
|
-
validateOptions('createTaskCategory', ['category'], options);
|
|
279
|
-
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, {
|
|
280
302
|
params: {
|
|
281
303
|
include: options.include
|
|
282
304
|
}
|
|
@@ -284,12 +306,13 @@ export var createTaskCategory = function createTaskCategory() {
|
|
|
284
306
|
return {
|
|
285
307
|
category: response.data.category
|
|
286
308
|
};
|
|
287
|
-
})["catch"](handleErrors);
|
|
309
|
+
})["catch"](_http.handleErrors);
|
|
288
310
|
};
|
|
289
|
-
|
|
311
|
+
exports.createTaskCategory = createTaskCategory;
|
|
312
|
+
var fetchTaskCategory = function fetchTaskCategory() {
|
|
290
313
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
291
|
-
validateOptions('fetchTaskCategory', ['categoryName'], options);
|
|
292
|
-
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), {
|
|
293
316
|
params: {
|
|
294
317
|
include: options.include
|
|
295
318
|
}
|
|
@@ -297,12 +320,13 @@ export var fetchTaskCategory = function fetchTaskCategory() {
|
|
|
297
320
|
return {
|
|
298
321
|
category: response.data
|
|
299
322
|
};
|
|
300
|
-
})["catch"](handleErrors);
|
|
323
|
+
})["catch"](_http.handleErrors);
|
|
301
324
|
};
|
|
302
|
-
|
|
325
|
+
exports.fetchTaskCategory = fetchTaskCategory;
|
|
326
|
+
var deleteTaskCategory = function deleteTaskCategory() {
|
|
303
327
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
304
|
-
validateOptions('deleteTaskCategory', ['categoryName'], options);
|
|
305
|
-
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), {
|
|
306
330
|
params: {
|
|
307
331
|
include: options.include
|
|
308
332
|
}
|
|
@@ -310,12 +334,13 @@ export var deleteTaskCategory = function deleteTaskCategory() {
|
|
|
310
334
|
return {
|
|
311
335
|
category: response.data.category
|
|
312
336
|
};
|
|
313
|
-
})["catch"](handleErrors);
|
|
337
|
+
})["catch"](_http.handleErrors);
|
|
314
338
|
};
|
|
315
|
-
|
|
339
|
+
exports.deleteTaskCategory = deleteTaskCategory;
|
|
340
|
+
var updateTaskCategory = function updateTaskCategory() {
|
|
316
341
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
317
|
-
validateOptions('updateTaskCategory', ['categoryName', 'category'], options);
|
|
318
|
-
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, {
|
|
319
344
|
params: {
|
|
320
345
|
include: options.include
|
|
321
346
|
}
|
|
@@ -323,11 +348,12 @@ export var updateTaskCategory = function updateTaskCategory() {
|
|
|
323
348
|
return {
|
|
324
349
|
category: response.data.category
|
|
325
350
|
};
|
|
326
|
-
})["catch"](handleErrors);
|
|
351
|
+
})["catch"](_http.handleErrors);
|
|
327
352
|
};
|
|
328
|
-
|
|
353
|
+
exports.updateTaskCategory = updateTaskCategory;
|
|
354
|
+
var fetchPolicyRules = function fetchPolicyRules() {
|
|
329
355
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
330
|
-
return
|
|
356
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/policyRules"), {
|
|
331
357
|
params: {
|
|
332
358
|
include: options.include,
|
|
333
359
|
type: options.type
|
|
@@ -336,12 +362,13 @@ export var fetchPolicyRules = function fetchPolicyRules() {
|
|
|
336
362
|
return {
|
|
337
363
|
policyRules: response.data.policyRules
|
|
338
364
|
};
|
|
339
|
-
})["catch"](handleErrors);
|
|
365
|
+
})["catch"](_http.handleErrors);
|
|
340
366
|
};
|
|
341
|
-
|
|
367
|
+
exports.fetchPolicyRules = fetchPolicyRules;
|
|
368
|
+
var createPolicyRule = function createPolicyRule() {
|
|
342
369
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
343
|
-
validateOptions('createPolicyRule', ['policy', 'policyType'], options);
|
|
344
|
-
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, {
|
|
345
372
|
params: {
|
|
346
373
|
include: options.include
|
|
347
374
|
}
|
|
@@ -349,12 +376,13 @@ export var createPolicyRule = function createPolicyRule() {
|
|
|
349
376
|
return {
|
|
350
377
|
policyRule: response.data.policyRule
|
|
351
378
|
};
|
|
352
|
-
})["catch"](handleErrors);
|
|
379
|
+
})["catch"](_http.handleErrors);
|
|
353
380
|
};
|
|
354
|
-
|
|
381
|
+
exports.createPolicyRule = createPolicyRule;
|
|
382
|
+
var fetchPolicyRule = function fetchPolicyRule() {
|
|
355
383
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
356
|
-
validateOptions('fetchPolicyRule', ['policyName', 'policyType'], options);
|
|
357
|
-
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), {
|
|
358
386
|
params: {
|
|
359
387
|
include: options.include
|
|
360
388
|
}
|
|
@@ -362,12 +390,13 @@ export var fetchPolicyRule = function fetchPolicyRule() {
|
|
|
362
390
|
return {
|
|
363
391
|
policyRule: response.data
|
|
364
392
|
};
|
|
365
|
-
})["catch"](handleErrors);
|
|
393
|
+
})["catch"](_http.handleErrors);
|
|
366
394
|
};
|
|
367
|
-
|
|
395
|
+
exports.fetchPolicyRule = fetchPolicyRule;
|
|
396
|
+
var deletePolicyRule = function deletePolicyRule() {
|
|
368
397
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
369
|
-
validateOptions('deletePolicyRule', ['policyName', 'policyType'], options);
|
|
370
|
-
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), {
|
|
371
400
|
params: {
|
|
372
401
|
include: options.include
|
|
373
402
|
}
|
|
@@ -375,12 +404,13 @@ export var deletePolicyRule = function deletePolicyRule() {
|
|
|
375
404
|
return {
|
|
376
405
|
policyRule: response.data.policyRule
|
|
377
406
|
};
|
|
378
|
-
})["catch"](handleErrors);
|
|
407
|
+
})["catch"](_http.handleErrors);
|
|
379
408
|
};
|
|
380
|
-
|
|
409
|
+
exports.deletePolicyRule = deletePolicyRule;
|
|
410
|
+
var updatePolicyRule = function updatePolicyRule() {
|
|
381
411
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
382
|
-
validateOptions('updatePolicyRule', ['policyName', 'policy', 'policyType'], options);
|
|
383
|
-
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, {
|
|
384
414
|
params: {
|
|
385
415
|
include: options.include
|
|
386
416
|
}
|
|
@@ -388,11 +418,12 @@ export var updatePolicyRule = function updatePolicyRule() {
|
|
|
388
418
|
return {
|
|
389
419
|
policyRule: response.data.policyRule
|
|
390
420
|
};
|
|
391
|
-
})["catch"](handleErrors);
|
|
421
|
+
})["catch"](_http.handleErrors);
|
|
392
422
|
};
|
|
393
|
-
|
|
423
|
+
exports.updatePolicyRule = updatePolicyRule;
|
|
424
|
+
var fetchSystemErrors = function fetchSystemErrors() {
|
|
394
425
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
395
|
-
return
|
|
426
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/systemErrors"), {
|
|
396
427
|
params: {
|
|
397
428
|
include: options.include
|
|
398
429
|
}
|
|
@@ -400,12 +431,13 @@ export var fetchSystemErrors = function fetchSystemErrors() {
|
|
|
400
431
|
return {
|
|
401
432
|
systemErrors: response.data.errors
|
|
402
433
|
};
|
|
403
|
-
})["catch"](handleErrors);
|
|
434
|
+
})["catch"](_http.handleErrors);
|
|
404
435
|
};
|
|
405
|
-
|
|
436
|
+
exports.fetchSystemErrors = fetchSystemErrors;
|
|
437
|
+
var fetchSystemError = function fetchSystemError() {
|
|
406
438
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
407
|
-
validateOptions('fetchSystemError', ['errorId'], options);
|
|
408
|
-
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), {
|
|
409
441
|
params: {
|
|
410
442
|
include: options.include
|
|
411
443
|
}
|
|
@@ -413,23 +445,25 @@ export var fetchSystemError = function fetchSystemError() {
|
|
|
413
445
|
return {
|
|
414
446
|
systemError: response.data
|
|
415
447
|
};
|
|
416
|
-
})["catch"](handleErrors);
|
|
448
|
+
})["catch"](_http.handleErrors);
|
|
417
449
|
};
|
|
418
|
-
|
|
450
|
+
exports.fetchSystemError = fetchSystemError;
|
|
451
|
+
var resolveSystemError = function resolveSystemError() {
|
|
419
452
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
420
|
-
validateOptions('resolveSystemError', ['ids', 'resolution'], options);
|
|
421
|
-
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"), {
|
|
422
455
|
ids: options.ids,
|
|
423
456
|
resolution: options.resolution
|
|
424
457
|
}).then(function (response) {
|
|
425
458
|
return {
|
|
426
459
|
message: response.data.message
|
|
427
460
|
};
|
|
428
|
-
})["catch"](handleErrors);
|
|
461
|
+
})["catch"](_http.handleErrors);
|
|
429
462
|
};
|
|
430
|
-
|
|
463
|
+
exports.resolveSystemError = resolveSystemError;
|
|
464
|
+
var fetchHandlers = function fetchHandlers() {
|
|
431
465
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
432
|
-
return
|
|
466
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers"), {
|
|
433
467
|
params: {
|
|
434
468
|
include: options.include
|
|
435
469
|
}
|
|
@@ -437,12 +471,13 @@ export var fetchHandlers = function fetchHandlers() {
|
|
|
437
471
|
return {
|
|
438
472
|
handlers: response.data.handlers
|
|
439
473
|
};
|
|
440
|
-
})["catch"](handleErrors);
|
|
474
|
+
})["catch"](_http.handleErrors);
|
|
441
475
|
};
|
|
442
|
-
|
|
476
|
+
exports.fetchHandlers = fetchHandlers;
|
|
477
|
+
var fetchHandler = function fetchHandler() {
|
|
443
478
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
444
|
-
validateOptions('fetchHandler', ['definitionId'], options);
|
|
445
|
-
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), {
|
|
446
481
|
params: {
|
|
447
482
|
include: options.include
|
|
448
483
|
}
|
|
@@ -450,16 +485,16 @@ export var fetchHandler = function fetchHandler() {
|
|
|
450
485
|
return {
|
|
451
486
|
handler: response.data
|
|
452
487
|
};
|
|
453
|
-
})["catch"](handleErrors);
|
|
488
|
+
})["catch"](_http.handleErrors);
|
|
454
489
|
};
|
|
455
|
-
|
|
490
|
+
exports.fetchHandler = fetchHandler;
|
|
491
|
+
var createHandler = function createHandler() {
|
|
456
492
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
457
493
|
var packageUrl = options.packageUrl,
|
|
458
|
-
|
|
459
|
-
|
|
494
|
+
packageFile = options.packageFile,
|
|
495
|
+
force = options.force;
|
|
460
496
|
var data;
|
|
461
497
|
var headers = {};
|
|
462
|
-
|
|
463
498
|
if (packageUrl) {
|
|
464
499
|
data = {
|
|
465
500
|
packageUrl: packageUrl
|
|
@@ -471,8 +506,7 @@ export var createHandler = function createHandler() {
|
|
|
471
506
|
'Content-Type': 'multipart/form-data'
|
|
472
507
|
};
|
|
473
508
|
}
|
|
474
|
-
|
|
475
|
-
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, {
|
|
476
510
|
headers: headers,
|
|
477
511
|
params: {
|
|
478
512
|
force: force
|
|
@@ -485,10 +519,11 @@ export var createHandler = function createHandler() {
|
|
|
485
519
|
};
|
|
486
520
|
});
|
|
487
521
|
};
|
|
488
|
-
|
|
522
|
+
exports.createHandler = createHandler;
|
|
523
|
+
var updateHandler = function updateHandler() {
|
|
489
524
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
490
|
-
validateOptions('updateHandler', ['definitionId', 'handler'], options);
|
|
491
|
-
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, {
|
|
492
527
|
params: {
|
|
493
528
|
include: options.include
|
|
494
529
|
}
|
|
@@ -496,27 +531,27 @@ export var updateHandler = function updateHandler() {
|
|
|
496
531
|
return {
|
|
497
532
|
handler: response.data
|
|
498
533
|
};
|
|
499
|
-
})["catch"](handleErrors);
|
|
534
|
+
})["catch"](_http.handleErrors);
|
|
500
535
|
};
|
|
501
|
-
|
|
536
|
+
exports.updateHandler = updateHandler;
|
|
537
|
+
var deleteHandler = function deleteHandler() {
|
|
502
538
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
503
539
|
var definitionId = options.definitionId;
|
|
504
|
-
|
|
505
540
|
if (!definitionId) {
|
|
506
541
|
throw new Error('deleteHandler failed! The option "definitionId" is required.');
|
|
507
542
|
}
|
|
508
|
-
|
|
509
|
-
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) {
|
|
510
544
|
return {
|
|
511
545
|
handler: response.data
|
|
512
546
|
};
|
|
513
|
-
})["catch"](handleErrors);
|
|
547
|
+
})["catch"](_http.handleErrors);
|
|
514
548
|
};
|
|
515
|
-
|
|
549
|
+
exports.deleteHandler = deleteHandler;
|
|
550
|
+
var fetchUsage = function fetchUsage() {
|
|
516
551
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
517
552
|
var id = buildTreeId(options);
|
|
518
|
-
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");
|
|
519
|
-
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, {
|
|
520
555
|
params: {
|
|
521
556
|
include: options.include
|
|
522
557
|
}
|
|
@@ -527,17 +562,19 @@ export var fetchUsage = function fetchUsage() {
|
|
|
527
562
|
totalRoutines: response.data.totalRoutines,
|
|
528
563
|
totalNodes: response.data.totalNodes
|
|
529
564
|
};
|
|
530
|
-
})["catch"](handleErrors);
|
|
565
|
+
})["catch"](_http.handleErrors);
|
|
531
566
|
};
|
|
532
|
-
|
|
567
|
+
exports.fetchUsage = fetchUsage;
|
|
568
|
+
var fetchHandlerDurations = function fetchHandlerDurations() {
|
|
533
569
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
534
|
-
return
|
|
570
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/").concat(options.definitionId, "/durations")).then(function (response) {
|
|
535
571
|
return response.data;
|
|
536
|
-
})["catch"](handleErrors);
|
|
572
|
+
})["catch"](_http.handleErrors);
|
|
537
573
|
};
|
|
538
|
-
|
|
574
|
+
exports.fetchHandlerDurations = fetchHandlerDurations;
|
|
575
|
+
var fetchMissingRoutines = function fetchMissingRoutines() {
|
|
539
576
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
540
|
-
return
|
|
577
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/trees/missing"), {
|
|
541
578
|
params: {
|
|
542
579
|
include: options.include
|
|
543
580
|
}
|
|
@@ -545,11 +582,12 @@ export var fetchMissingRoutines = function fetchMissingRoutines() {
|
|
|
545
582
|
return {
|
|
546
583
|
missingRoutines: response.data.missingRoutines
|
|
547
584
|
};
|
|
548
|
-
})["catch"](handleErrors);
|
|
585
|
+
})["catch"](_http.handleErrors);
|
|
549
586
|
};
|
|
550
|
-
|
|
587
|
+
exports.fetchMissingRoutines = fetchMissingRoutines;
|
|
588
|
+
var fetchMissingHandlers = function fetchMissingHandlers() {
|
|
551
589
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
552
|
-
return
|
|
590
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/handlers/missing"), {
|
|
553
591
|
params: {
|
|
554
592
|
include: options.include
|
|
555
593
|
}
|
|
@@ -557,56 +595,63 @@ export var fetchMissingHandlers = function fetchMissingHandlers() {
|
|
|
557
595
|
return {
|
|
558
596
|
missingHandlers: response.data.missingHandlers
|
|
559
597
|
};
|
|
560
|
-
})["catch"](handleErrors);
|
|
598
|
+
})["catch"](_http.handleErrors);
|
|
561
599
|
};
|
|
562
|
-
|
|
600
|
+
exports.fetchMissingHandlers = fetchMissingHandlers;
|
|
601
|
+
var stopEngine = function stopEngine() {
|
|
563
602
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
564
|
-
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"), {
|
|
565
604
|
action: 'stop',
|
|
566
605
|
asynchronous: options.asynchronous || 'false'
|
|
567
606
|
}).then(function (response) {
|
|
568
607
|
return response.data;
|
|
569
|
-
})["catch"](handleErrors);
|
|
608
|
+
})["catch"](_http.handleErrors);
|
|
570
609
|
};
|
|
571
|
-
|
|
610
|
+
exports.stopEngine = stopEngine;
|
|
611
|
+
var startEngine = function startEngine() {
|
|
572
612
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
573
|
-
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"), {
|
|
574
614
|
action: 'start',
|
|
575
615
|
asynchronous: options.asynchronous || 'false'
|
|
576
616
|
}).then(function (response) {
|
|
577
617
|
return response.data;
|
|
578
|
-
})["catch"](handleErrors);
|
|
618
|
+
})["catch"](_http.handleErrors);
|
|
579
619
|
};
|
|
580
|
-
|
|
620
|
+
exports.startEngine = startEngine;
|
|
621
|
+
var fetchEngineStatus = function fetchEngineStatus() {
|
|
581
622
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
582
|
-
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) {
|
|
583
624
|
return response.data;
|
|
584
|
-
})["catch"](handleErrors);
|
|
625
|
+
})["catch"](_http.handleErrors);
|
|
585
626
|
};
|
|
586
|
-
|
|
587
|
-
|
|
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) {
|
|
588
630
|
return response.data;
|
|
589
|
-
})["catch"](handleErrors);
|
|
631
|
+
})["catch"](_http.handleErrors);
|
|
590
632
|
};
|
|
591
|
-
|
|
633
|
+
exports.fetchEngineLicense = fetchEngineLicense;
|
|
634
|
+
var fetchEngineSettings = function fetchEngineSettings() {
|
|
592
635
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
593
|
-
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) {
|
|
594
637
|
return {
|
|
595
638
|
settings: response.data.properties
|
|
596
639
|
};
|
|
597
|
-
})["catch"](handleErrors);
|
|
640
|
+
})["catch"](_http.handleErrors);
|
|
598
641
|
};
|
|
599
|
-
|
|
642
|
+
exports.fetchEngineSettings = fetchEngineSettings;
|
|
643
|
+
var updateEngineSettings = function updateEngineSettings() {
|
|
600
644
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
601
|
-
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) {
|
|
602
646
|
return {
|
|
603
647
|
message: response.data.message
|
|
604
648
|
};
|
|
605
|
-
})["catch"](handleErrors);
|
|
649
|
+
})["catch"](_http.handleErrors);
|
|
606
650
|
};
|
|
607
|
-
|
|
651
|
+
exports.updateEngineSettings = updateEngineSettings;
|
|
652
|
+
var fetchTaskRuns = function fetchTaskRuns() {
|
|
608
653
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
609
|
-
return
|
|
654
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs"), {
|
|
610
655
|
params: {
|
|
611
656
|
type: options.type,
|
|
612
657
|
limit: options.limit,
|
|
@@ -625,7 +670,7 @@ export var fetchTaskRuns = function fetchTaskRuns() {
|
|
|
625
670
|
status: options.status || undefined,
|
|
626
671
|
orderBy: options.orderBy,
|
|
627
672
|
direction: options.direction,
|
|
628
|
-
count: get(options, 'count'),
|
|
673
|
+
count: (0, _immutable.get)(options, 'count'),
|
|
629
674
|
start: options.start || undefined,
|
|
630
675
|
end: options.end || undefined,
|
|
631
676
|
afterId: options.afterId || undefined,
|
|
@@ -635,14 +680,16 @@ export var fetchTaskRuns = function fetchTaskRuns() {
|
|
|
635
680
|
return {
|
|
636
681
|
runs: response.data.runs,
|
|
637
682
|
count: response.data.count,
|
|
683
|
+
more: response.data.more,
|
|
638
684
|
nextPageToken: generateNextPageToken(response.data)
|
|
639
685
|
};
|
|
640
|
-
})["catch"](handleErrors);
|
|
686
|
+
})["catch"](_http.handleErrors);
|
|
641
687
|
};
|
|
642
|
-
|
|
688
|
+
exports.fetchTaskRuns = fetchTaskRuns;
|
|
689
|
+
var fetchTaskRun = function fetchTaskRun() {
|
|
643
690
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
644
|
-
validateOptions('fetchTaskRun', ['runId'], options);
|
|
645
|
-
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), {
|
|
646
693
|
params: {
|
|
647
694
|
include: options.include
|
|
648
695
|
}
|
|
@@ -650,20 +697,22 @@ export var fetchTaskRun = function fetchTaskRun() {
|
|
|
650
697
|
return {
|
|
651
698
|
run: response.data
|
|
652
699
|
};
|
|
653
|
-
})["catch"](handleErrors);
|
|
700
|
+
})["catch"](_http.handleErrors);
|
|
654
701
|
};
|
|
655
|
-
|
|
702
|
+
exports.fetchTaskRun = fetchTaskRun;
|
|
703
|
+
var updateTaskRun = function updateTaskRun() {
|
|
656
704
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
657
|
-
validateOptions('updateTaskRun', ['runId', 'run'], options);
|
|
658
|
-
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, {
|
|
659
707
|
include: options.include
|
|
660
708
|
});
|
|
661
709
|
};
|
|
662
|
-
|
|
710
|
+
exports.updateTaskRun = updateTaskRun;
|
|
711
|
+
var createTaskRun = function createTaskRun() {
|
|
663
712
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
664
|
-
validateOptions('createTaskRun', ['run'], options);
|
|
713
|
+
(0, _http.validateOptions)('createTaskRun', ['run'], options);
|
|
665
714
|
var data = options.run.sourceData || options.run.sourceData === '' ? options.run.sourceData : options.run;
|
|
666
|
-
return
|
|
715
|
+
return _axios["default"].post("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/runs"), data, {
|
|
667
716
|
include: options.include,
|
|
668
717
|
params: {
|
|
669
718
|
sourceName: options.sourceName || undefined,
|
|
@@ -677,11 +726,12 @@ export var createTaskRun = function createTaskRun() {
|
|
|
677
726
|
return {
|
|
678
727
|
run: response.data
|
|
679
728
|
};
|
|
680
|
-
})["catch"](handleErrors);
|
|
729
|
+
})["catch"](_http.handleErrors);
|
|
681
730
|
};
|
|
682
|
-
|
|
731
|
+
exports.createTaskRun = createTaskRun;
|
|
732
|
+
var fetchTaskTriggers = function fetchTaskTriggers() {
|
|
683
733
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
684
|
-
return
|
|
734
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/triggers").concat(options.triggerStatus ? '/' + options.triggerStatus : ''), {
|
|
685
735
|
params: {
|
|
686
736
|
limit: options.limit,
|
|
687
737
|
include: options.include,
|
|
@@ -710,22 +760,24 @@ export var fetchTaskTriggers = function fetchTaskTriggers() {
|
|
|
710
760
|
nextPageToken: generateNextPageToken(response.data),
|
|
711
761
|
count: response.data.count
|
|
712
762
|
};
|
|
713
|
-
})["catch"](handleErrors);
|
|
763
|
+
})["catch"](_http.handleErrors);
|
|
714
764
|
};
|
|
715
|
-
|
|
765
|
+
exports.fetchTaskTriggers = fetchTaskTriggers;
|
|
766
|
+
var createTaskTrigger = function createTaskTrigger() {
|
|
716
767
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
717
|
-
validateOptions('createTaskTrigger', ['runId', 'nodeId'], options);
|
|
718
|
-
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"), {
|
|
719
770
|
nodeId: options.nodeId,
|
|
720
771
|
branchId: options.branchId || undefined,
|
|
721
772
|
loopIndex: options.loopIndex || undefined
|
|
722
773
|
}).then(function (response) {
|
|
723
774
|
return response.data;
|
|
724
|
-
})["catch"](handleErrors);
|
|
775
|
+
})["catch"](_http.handleErrors);
|
|
725
776
|
};
|
|
726
|
-
|
|
777
|
+
exports.createTaskTrigger = createTaskTrigger;
|
|
778
|
+
var fetchTaskRunErrors = function fetchTaskRunErrors() {
|
|
727
779
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
728
|
-
return
|
|
780
|
+
return _axios["default"].get("".concat(_helpers.bundle.spaceLocation(), "/app/components/task/app/api/v2/errors"), {
|
|
729
781
|
params: {
|
|
730
782
|
limit: options.limit,
|
|
731
783
|
include: options.include,
|
|
@@ -756,12 +808,13 @@ export var fetchTaskRunErrors = function fetchTaskRunErrors() {
|
|
|
756
808
|
count: response.data.count,
|
|
757
809
|
nextPageToken: generateNextPageToken(response.data)
|
|
758
810
|
};
|
|
759
|
-
})["catch"](handleErrors);
|
|
811
|
+
})["catch"](_http.handleErrors);
|
|
760
812
|
};
|
|
761
|
-
|
|
813
|
+
exports.fetchTaskRunErrors = fetchTaskRunErrors;
|
|
814
|
+
var fetchTaskRunError = function fetchTaskRunError() {
|
|
762
815
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
763
|
-
validateOptions('fetchTaskRunError', ['errorId'], options);
|
|
764
|
-
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), {
|
|
765
818
|
params: {
|
|
766
819
|
include: options.include
|
|
767
820
|
}
|
|
@@ -769,12 +822,13 @@ export var fetchTaskRunError = function fetchTaskRunError() {
|
|
|
769
822
|
return {
|
|
770
823
|
runError: response.data
|
|
771
824
|
};
|
|
772
|
-
})["catch"](handleErrors);
|
|
825
|
+
})["catch"](_http.handleErrors);
|
|
773
826
|
};
|
|
774
|
-
|
|
827
|
+
exports.fetchTaskRunError = fetchTaskRunError;
|
|
828
|
+
var updateRunTaskResults = function updateRunTaskResults() {
|
|
775
829
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
776
|
-
validateOptions('updateRunTaskResults', ['runId', 'taskId'], options);
|
|
777
|
-
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), {
|
|
778
832
|
deferredResults: options.deferredResults,
|
|
779
833
|
results: options.results,
|
|
780
834
|
message: options.message
|
|
@@ -784,12 +838,13 @@ export var updateRunTaskResults = function updateRunTaskResults() {
|
|
|
784
838
|
}
|
|
785
839
|
}).then(function (response) {
|
|
786
840
|
return response.data;
|
|
787
|
-
})["catch"](handleErrors);
|
|
841
|
+
})["catch"](_http.handleErrors);
|
|
788
842
|
};
|
|
789
|
-
|
|
843
|
+
exports.updateRunTaskResults = updateRunTaskResults;
|
|
844
|
+
var resolveTaskErrors = function resolveTaskErrors() {
|
|
790
845
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
791
|
-
validateOptions('resolveTaskErrors', ['ids', 'action', 'resolution'], options);
|
|
792
|
-
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"), {
|
|
793
848
|
ids: options.ids,
|
|
794
849
|
action: options.action,
|
|
795
850
|
resolution: options.resolution,
|
|
@@ -800,12 +855,14 @@ export var resolveTaskErrors = function resolveTaskErrors() {
|
|
|
800
855
|
return {
|
|
801
856
|
message: response.data
|
|
802
857
|
};
|
|
803
|
-
})["catch"](handleErrors);
|
|
858
|
+
})["catch"](_http.handleErrors);
|
|
804
859
|
};
|
|
805
|
-
|
|
806
|
-
|
|
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) {
|
|
807
863
|
return {
|
|
808
864
|
version: response.data
|
|
809
865
|
};
|
|
810
|
-
})["catch"](handleErrors);
|
|
811
|
-
};
|
|
866
|
+
})["catch"](_http.handleErrors);
|
|
867
|
+
};
|
|
868
|
+
exports.fetchTaskVersion = fetchTaskVersion;
|