@dvelop-sdk/task 3.0.0 → 3.0.4
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/lib/index.d.ts +3 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +5 -2
- package/lib/index.js.map +1 -1
- package/lib/internal.d.ts +1 -1
- package/lib/internal.d.ts.map +1 -1
- package/lib/internal.js +4 -4
- package/lib/internal.js.map +1 -1
- package/lib/tasks/complete-task/complete-task.d.ts +21 -0
- package/lib/tasks/complete-task/complete-task.d.ts.map +1 -1
- package/lib/tasks/complete-task/complete-task.js +9 -1
- package/lib/tasks/complete-task/complete-task.js.map +1 -1
- package/lib/tasks/create-task/create-task.d.ts +65 -4
- package/lib/tasks/create-task/create-task.d.ts.map +1 -1
- package/lib/tasks/create-task/create-task.js +42 -7
- package/lib/tasks/create-task/create-task.js.map +1 -1
- package/lib/tasks/delete-task/delete-task.d.ts +22 -1
- package/lib/tasks/delete-task/delete-task.d.ts.map +1 -1
- package/lib/tasks/delete-task/delete-task.js +10 -2
- package/lib/tasks/delete-task/delete-task.js.map +1 -1
- package/lib/tasks/get-task-count/get-task-count.d.ts +31 -0
- package/lib/tasks/get-task-count/get-task-count.d.ts.map +1 -0
- package/lib/tasks/{get-task/get-task.js → get-task-count/get-task-count.js} +22 -27
- package/lib/tasks/get-task-count/get-task-count.js.map +1 -0
- package/lib/tasks/update-task/update-task.d.ts +59 -4
- package/lib/tasks/update-task/update-task.d.ts.map +1 -1
- package/lib/tasks/update-task/update-task.js +23 -1
- package/lib/tasks/update-task/update-task.js.map +1 -1
- package/lib/utils/http.d.ts +22 -6
- package/lib/utils/http.d.ts.map +1 -1
- package/lib/utils/http.js +6 -6
- package/lib/utils/http.js.map +1 -1
- package/package.json +3 -10
- package/LICENSE +0 -201
- package/lib/tasks/get-task/get-task.d.ts +0 -44
- package/lib/tasks/get-task/get-task.d.ts.map +0 -1
- package/lib/tasks/get-task/get-task.js.map +0 -1
package/lib/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<img alt="license" src="https://img.shields.io/github/license/d-velop/dvelop-sdk-node?style=for-the-badge">
|
|
15
15
|
</a>
|
|
16
16
|
</br>
|
|
17
|
-
<p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/
|
|
17
|
+
<p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/taskapi/en">Task-App</a> in the d.velop cloud.</p>
|
|
18
18
|
<a href="https://d-velop.github.io/dvelop-sdk-node/modules/task.html"><strong>Explore the docs »</strong></a>
|
|
19
19
|
</br>
|
|
20
20
|
<a href="https://www.npmjs.com/package/@dvelop-sdk/task"><strong>Install via npm »</strong></a>
|
|
@@ -24,10 +24,11 @@
|
|
|
24
24
|
* @module task
|
|
25
25
|
*/
|
|
26
26
|
export { DvelopContext, BadInputError, UnauthorizedError, ForbiddenError, NotFoundError } from "@dvelop-sdk/core";
|
|
27
|
-
export { TaskError } from "./utils/http";
|
|
27
|
+
export { TaskValidation, InvalidTaskDefinitionError, TaskError } from "./utils/http";
|
|
28
28
|
export * as internals from "./internal";
|
|
29
29
|
export { CreateTaskParams, createTask } from "./tasks/create-task/create-task";
|
|
30
30
|
export { CompleteTaskParams, completeTask } from "./tasks/complete-task/complete-task";
|
|
31
31
|
export { DeleteTaskParams, deleteTask } from "./tasks/delete-task/delete-task";
|
|
32
|
+
export { getTaskCount } from "./tasks/get-task-count/get-task-count";
|
|
32
33
|
export { UpdateTaskParams, updateTask } from "./tasks/update-task/update-task";
|
|
33
34
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAClH,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,KAAK,SAAS,MAAM,YAAY,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
21
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
-
exports.updateTask = exports.deleteTask = exports.completeTask = exports.createTask = exports.internals = exports.TaskError = exports.NotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.BadInputError = void 0;
|
|
22
|
+
exports.updateTask = exports.getTaskCount = exports.deleteTask = exports.completeTask = exports.createTask = exports.internals = exports.TaskError = exports.InvalidTaskDefinitionError = exports.NotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.BadInputError = void 0;
|
|
23
23
|
/**
|
|
24
24
|
<div align="center">
|
|
25
25
|
<h1>@dvelop-sdk/task</h1>
|
|
@@ -36,7 +36,7 @@ exports.updateTask = exports.deleteTask = exports.completeTask = exports.createT
|
|
|
36
36
|
<img alt="license" src="https://img.shields.io/github/license/d-velop/dvelop-sdk-node?style=for-the-badge">
|
|
37
37
|
</a>
|
|
38
38
|
</br>
|
|
39
|
-
<p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/
|
|
39
|
+
<p>This package contains functionality for the <a href="https://developer.d-velop.de/documentation/taskapi/en">Task-App</a> in the d.velop cloud.</p>
|
|
40
40
|
<a href="https://d-velop.github.io/dvelop-sdk-node/modules/task.html"><strong>Explore the docs »</strong></a>
|
|
41
41
|
</br>
|
|
42
42
|
<a href="https://www.npmjs.com/package/@dvelop-sdk/task"><strong>Install via npm »</strong></a>
|
|
@@ -51,6 +51,7 @@ Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: fun
|
|
|
51
51
|
Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return core_1.ForbiddenError; } });
|
|
52
52
|
Object.defineProperty(exports, "NotFoundError", { enumerable: true, get: function () { return core_1.NotFoundError; } });
|
|
53
53
|
var http_1 = require("./utils/http");
|
|
54
|
+
Object.defineProperty(exports, "InvalidTaskDefinitionError", { enumerable: true, get: function () { return http_1.InvalidTaskDefinitionError; } });
|
|
54
55
|
Object.defineProperty(exports, "TaskError", { enumerable: true, get: function () { return http_1.TaskError; } });
|
|
55
56
|
exports.internals = __importStar(require("./internal"));
|
|
56
57
|
var create_task_1 = require("./tasks/create-task/create-task");
|
|
@@ -59,6 +60,8 @@ var complete_task_1 = require("./tasks/complete-task/complete-task");
|
|
|
59
60
|
Object.defineProperty(exports, "completeTask", { enumerable: true, get: function () { return complete_task_1.completeTask; } });
|
|
60
61
|
var delete_task_1 = require("./tasks/delete-task/delete-task");
|
|
61
62
|
Object.defineProperty(exports, "deleteTask", { enumerable: true, get: function () { return delete_task_1.deleteTask; } });
|
|
63
|
+
var get_task_count_1 = require("./tasks/get-task-count/get-task-count");
|
|
64
|
+
Object.defineProperty(exports, "getTaskCount", { enumerable: true, get: function () { return get_task_count_1.getTaskCount; } });
|
|
62
65
|
var update_task_1 = require("./tasks/update-task/update-task");
|
|
63
66
|
Object.defineProperty(exports, "updateTask", { enumerable: true, get: function () { return update_task_1.updateTask; } });
|
|
64
67
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,yCAAkH;AAA1F,qGAAA,aAAa,OAAA;AAAE,yGAAA,iBAAiB,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,qGAAA,aAAa,OAAA;AACvF,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,yCAAkH;AAA1F,qGAAA,aAAa,OAAA;AAAE,yGAAA,iBAAiB,OAAA;AAAE,sGAAA,cAAc,OAAA;AAAE,qGAAA,aAAa,OAAA;AACvF,qCAAqF;AAA5D,kHAAA,0BAA0B,OAAA;AAAE,iGAAA,SAAS,OAAA;AAC9D,wDAAwC;AAExC,+DAA+E;AAApD,yGAAA,UAAU,OAAA;AACrC,qEAAuF;AAA1D,6GAAA,YAAY,OAAA;AACzC,+DAA+E;AAApD,yGAAA,UAAU,OAAA;AACrC,wEAAqE;AAA5D,8GAAA,YAAY,OAAA;AACrB,+DAA+E;AAApD,yGAAA,UAAU,OAAA"}
|
package/lib/internal.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { _defaultHttpRequestFunctionFactory, _defaultHttpRequestFunction } from
|
|
|
2
2
|
export { _completeTaskFactory } from "./tasks/complete-task/complete-task";
|
|
3
3
|
export { _createTaskFactory, _createTaskDefaultTransformFunction } from "./tasks/create-task/create-task";
|
|
4
4
|
export { _deleteTaskFactory } from "./tasks/delete-task/delete-task";
|
|
5
|
-
export {
|
|
5
|
+
export { _getTaskCountFactory, _getTaskCountDefaultTransformFunction } from "./tasks/get-task-count/get-task-count";
|
|
6
6
|
export { _updateTaskFactory } from "./tasks/update-task/update-task";
|
|
7
7
|
//# sourceMappingURL=internal.d.ts.map
|
package/lib/internal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,mCAAmC,EAAE,MAAM,iCAAiC,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE/F,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,mCAAmC,EAAE,MAAM,iCAAiC,CAAC;AAC1G,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,qCAAqC,EAAE,MAAM,uCAAuC,CAAC;AACpH,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC"}
|
package/lib/internal.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports._updateTaskFactory = exports.
|
|
3
|
+
exports._updateTaskFactory = exports._getTaskCountDefaultTransformFunction = exports._getTaskCountFactory = exports._deleteTaskFactory = exports._createTaskDefaultTransformFunction = exports._createTaskFactory = exports._completeTaskFactory = exports._defaultHttpRequestFunction = exports._defaultHttpRequestFunctionFactory = void 0;
|
|
4
4
|
var http_1 = require("./utils/http");
|
|
5
5
|
Object.defineProperty(exports, "_defaultHttpRequestFunctionFactory", { enumerable: true, get: function () { return http_1._defaultHttpRequestFunctionFactory; } });
|
|
6
6
|
Object.defineProperty(exports, "_defaultHttpRequestFunction", { enumerable: true, get: function () { return http_1._defaultHttpRequestFunction; } });
|
|
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "_createTaskFactory", { enumerable: true, get: fu
|
|
|
11
11
|
Object.defineProperty(exports, "_createTaskDefaultTransformFunction", { enumerable: true, get: function () { return create_task_1._createTaskDefaultTransformFunction; } });
|
|
12
12
|
var delete_task_1 = require("./tasks/delete-task/delete-task");
|
|
13
13
|
Object.defineProperty(exports, "_deleteTaskFactory", { enumerable: true, get: function () { return delete_task_1._deleteTaskFactory; } });
|
|
14
|
-
var
|
|
15
|
-
Object.defineProperty(exports, "
|
|
16
|
-
Object.defineProperty(exports, "
|
|
14
|
+
var get_task_count_1 = require("./tasks/get-task-count/get-task-count");
|
|
15
|
+
Object.defineProperty(exports, "_getTaskCountFactory", { enumerable: true, get: function () { return get_task_count_1._getTaskCountFactory; } });
|
|
16
|
+
Object.defineProperty(exports, "_getTaskCountDefaultTransformFunction", { enumerable: true, get: function () { return get_task_count_1._getTaskCountDefaultTransformFunction; } });
|
|
17
17
|
var update_task_1 = require("./tasks/update-task/update-task");
|
|
18
18
|
Object.defineProperty(exports, "_updateTaskFactory", { enumerable: true, get: function () { return update_task_1._updateTaskFactory; } });
|
|
19
19
|
//# sourceMappingURL=internal.js.map
|
package/lib/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":";;;AAAA,qCAA+F;AAAtF,0HAAA,kCAAkC,OAAA;AAAE,mHAAA,2BAA2B,OAAA;AAExE,qEAA2E;AAAlE,qHAAA,oBAAoB,OAAA;AAC7B,+DAA0G;AAAjG,iHAAA,kBAAkB,OAAA;AAAE,kIAAA,mCAAmC,OAAA;AAChE,+DAAqE;AAA5D,iHAAA,kBAAkB,OAAA;AAC3B,
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../src/internal.ts"],"names":[],"mappings":";;;AAAA,qCAA+F;AAAtF,0HAAA,kCAAkC,OAAA;AAAE,mHAAA,2BAA2B,OAAA;AAExE,qEAA2E;AAAlE,qHAAA,oBAAoB,OAAA;AAC7B,+DAA0G;AAAjG,iHAAA,kBAAkB,OAAA;AAAE,kIAAA,mCAAmC,OAAA;AAChE,+DAAqE;AAA5D,iHAAA,kBAAkB,OAAA;AAC3B,wEAAoH;AAA3G,sHAAA,oBAAoB,OAAA;AAAE,uIAAA,qCAAqC,OAAA;AACpE,+DAAqE;AAA5D,iHAAA,kBAAkB,OAAA"}
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for the {@link completeTask}-function.
|
|
5
|
+
* @category Task
|
|
6
|
+
*/
|
|
2
7
|
export interface CompleteTaskParams {
|
|
8
|
+
/** Location-URI of the task. */
|
|
3
9
|
location: string;
|
|
4
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Factory for the {@link completeTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
13
|
+
* @typeparam T Return type of the {@link completeTask}-function. A corresponding transformFuntion has to be supplied.
|
|
14
|
+
* @internal
|
|
15
|
+
* @category Task
|
|
16
|
+
*/
|
|
17
|
+
export declare function _completeTaskFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: CompleteTaskParams) => T): (context: DvelopContext, params: CompleteTaskParams) => Promise<T>;
|
|
5
18
|
/**
|
|
6
19
|
* Complete a task.
|
|
7
20
|
*
|
|
8
21
|
* ```typescript
|
|
22
|
+
* import { completeTask } from "@dvelop-sdk/task";
|
|
23
|
+
*
|
|
24
|
+
* await completeTask({
|
|
25
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
26
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
27
|
+
* }, {
|
|
28
|
+
* location: "some/task/location"
|
|
29
|
+
* });
|
|
9
30
|
* ```
|
|
10
31
|
*
|
|
11
32
|
* @category Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complete-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/complete-task/complete-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"complete-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/complete-task/complete-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,KAAK,CAAC,GACnG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,KAAK,OAAO,CAAC,CAAC,CAAC,CAapE;AAED;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9F"}
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.completeTask = exports._completeTaskFactory = void 0;
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
|
-
* Factory for the {@link completeTask}-function. See
|
|
42
|
+
* Factory for the {@link completeTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
43
|
* @typeparam T Return type of the {@link completeTask}-function. A corresponding transformFuntion has to be supplied.
|
|
44
44
|
* @internal
|
|
45
45
|
* @category Task
|
|
@@ -70,6 +70,14 @@ exports._completeTaskFactory = _completeTaskFactory;
|
|
|
70
70
|
* Complete a task.
|
|
71
71
|
*
|
|
72
72
|
* ```typescript
|
|
73
|
+
* import { completeTask } from "@dvelop-sdk/task";
|
|
74
|
+
*
|
|
75
|
+
* await completeTask({
|
|
76
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
77
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
78
|
+
* }, {
|
|
79
|
+
* location: "some/task/location"
|
|
80
|
+
* });
|
|
73
81
|
* ```
|
|
74
82
|
*
|
|
75
83
|
* @category Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"complete-task.js","sourceRoot":"","sources":["../../../src/tasks/complete-task/complete-task.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;
|
|
1
|
+
{"version":3,"file":"complete-task.js","sourceRoot":"","sources":["../../../src/tasks/complete-task/complete-task.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAWzF;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,mBAA0F,EAC1F,iBAAoG;IAFtG,iBAgBC;IAZC,OAAO,UAAO,OAAsB,EAAE,MAA0B;;;;wBAE/B,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAChE,MAAM,EAAE,MAAM;wBACd,GAAG,EAAE,MAAM,CAAC,QAAQ;wBACpB,OAAO,EAAE,CAAC,YAAY,CAAC;wBACvB,IAAI,EAAE;4BACJ,QAAQ,EAAE,IAAI;yBACf;qBACF,CAAC,EAAA;;oBAPI,QAAQ,GAAiB,SAO7B;oBACF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAhBD,oDAgBC;AAED;;;;;;;;;;;;;;;GAeG;AACH,0BAA0B;AAC1B,SAAgB,YAAY,CAAC,OAAsB,EAAE,MAA0B;IAC7E,OAAO,oBAAoB,CAAC,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACvF,CAAC;AAFD,oCAEC"}
|
|
@@ -1,53 +1,114 @@
|
|
|
1
1
|
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for the {@link createTask}-function.
|
|
5
|
+
* @category Task
|
|
6
|
+
*/
|
|
2
7
|
export interface CreateTaskParams {
|
|
8
|
+
/** The subject of the task */
|
|
3
9
|
subject: string;
|
|
10
|
+
/** The recipients of the task. You can specify individual users as well as groups using IDs of the Identityprovider-App */
|
|
4
11
|
assignees: string[];
|
|
12
|
+
/** The correlation key ensures that only one task is created for this unique key. If a task already exists with the passed key, a new task will not be created. */
|
|
5
13
|
correlationKey?: string;
|
|
14
|
+
/** A descriptive text of the task */
|
|
6
15
|
description?: string;
|
|
16
|
+
/** Priority between 0 (low) and 100 (high) */
|
|
7
17
|
priority?: number;
|
|
18
|
+
/** Reminder date. If you transfer a date without a timestamp, the reminder date is the transferred date at 00:00:00. */
|
|
8
19
|
reminderDate?: Date;
|
|
20
|
+
/** Due date of the task. If you transfer a date without a timestamp, the due date is the transferred date at 00:00:00. */
|
|
9
21
|
dueDate?: Date;
|
|
22
|
+
/**
|
|
23
|
+
* Specify how long the task details should be kept after completing the task. Valid values are between 0 and 365 days. After this time has passed, the task details will be deleted automatically.
|
|
24
|
+
* The information is specified as a time span in days according to ISO-8601, e.g. P30D for 30 days. Specify the time span P0D if the task details should be deleted immediately after the task is completed. If you make no specification, 30 days are automatically assumed.
|
|
25
|
+
*/
|
|
10
26
|
retentionTime?: string;
|
|
27
|
+
/** The context of a task */
|
|
11
28
|
context?: {
|
|
29
|
+
/** A technical identifier for the context */
|
|
12
30
|
key?: string;
|
|
31
|
+
/** Type of the context */
|
|
13
32
|
type?: string;
|
|
33
|
+
/** Display name of the context */
|
|
14
34
|
name?: string;
|
|
15
35
|
};
|
|
36
|
+
/** Metadata for the task. See [the documentation](https://developer.d-velop.de/documentation/taskapi/en#creating-a-task) for further information */
|
|
16
37
|
metadata?: {
|
|
38
|
+
/** A technical identifier for the metadata-field */
|
|
17
39
|
key?: string;
|
|
40
|
+
/** Label of the metadata-field */
|
|
18
41
|
caption?: string;
|
|
42
|
+
/** Type of the metadata-field */
|
|
19
43
|
type?: "String" | "Number" | "Money" | "Date";
|
|
44
|
+
/** Value of the metadata field. Currently, only one value is allowed per metadata-field. */
|
|
20
45
|
values?: string;
|
|
21
46
|
}[];
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
47
|
+
/** DmsObject that references the task. */
|
|
48
|
+
dmsObject?: {
|
|
49
|
+
/** ID of the repository */
|
|
50
|
+
repositoryId: string;
|
|
51
|
+
/** ID of the DmsObject */
|
|
52
|
+
dmsObjectId: string;
|
|
53
|
+
};
|
|
54
|
+
/** Specifies if a notification should be sent to the task creator when the task is created. Default is true. */
|
|
26
55
|
sendCreationNotification?: boolean;
|
|
56
|
+
/** Specifies if a notification should be sent to the task creator when the task is completed. Default is false. */
|
|
27
57
|
sendCompletionNotification?: boolean;
|
|
58
|
+
/** Specifies if a notification should be sent to the task creator when the due date is exceeded. This option is only available if a dueDate is specified. Default is false. */
|
|
28
59
|
sendDueDateNotification?: boolean;
|
|
60
|
+
/** Links to the task */
|
|
29
61
|
_links?: {
|
|
62
|
+
/** This URI provides an editing dialog for the task. You can find further details in the section [Adding editing dialogs](https://developer.d-velop.de/documentation/taskapi/en#adding-editing-dialogs). */
|
|
30
63
|
form?: {
|
|
31
64
|
href: string;
|
|
32
65
|
};
|
|
66
|
+
/** This URI is called on completion of a task via the method POST. */
|
|
33
67
|
callback?: {
|
|
34
68
|
href: string;
|
|
35
69
|
};
|
|
70
|
+
/** This URI is displayed as an action in the user interface to display additional information for the user. */
|
|
36
71
|
attachment?: {
|
|
37
72
|
href: string;
|
|
38
73
|
};
|
|
74
|
+
/** This URI represents the process by which the task was initiated. The process is displayed in the user interface as a separate perspective for the task. To display completed tasks, the resource has to implement a HEAD request, if the resource is behind the same base address. */
|
|
39
75
|
process?: {
|
|
40
76
|
href: string;
|
|
41
77
|
};
|
|
78
|
+
/** This URI is called in case of updates to the task via the method POST. */
|
|
42
79
|
changeCallback?: {
|
|
43
80
|
href: string;
|
|
44
81
|
};
|
|
45
82
|
};
|
|
46
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* Default transform-function provided to the {@link createTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
86
|
+
* @internal
|
|
87
|
+
* @category Task
|
|
88
|
+
*/
|
|
89
|
+
export declare function _createTaskDefaultTransformFunction(response: HttpResponse, _: DvelopContext, __: CreateTaskParams): string;
|
|
90
|
+
/**
|
|
91
|
+
* Factory for the {@link createTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
92
|
+
* @typeparam T Return type of the {@link createTask}-function. A corresponding transformFuntion has to be supplied.
|
|
93
|
+
* @internal
|
|
94
|
+
* @category Task
|
|
95
|
+
*/
|
|
96
|
+
export declare function _createTaskFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: CreateTaskParams) => T, uuidGeneratorFunction?: () => string): (context: DvelopContext, params: CreateTaskParams) => Promise<T>;
|
|
47
97
|
/**
|
|
48
98
|
* Create a task.
|
|
49
99
|
*
|
|
50
100
|
* ```typescript
|
|
101
|
+
* import { createTask } from "@dvelop-sdk/task";
|
|
102
|
+
*
|
|
103
|
+
* const taskLocation = await createTask({
|
|
104
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
105
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
106
|
+
* }, {
|
|
107
|
+
* subject: "Cover up lab accident",
|
|
108
|
+
* assignees: ["XiFkyR35v2Y"]
|
|
109
|
+
* });
|
|
110
|
+
*
|
|
111
|
+
* console.log(taskLocation); // some/task/location
|
|
51
112
|
* ```
|
|
52
113
|
*
|
|
53
114
|
* @category Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/create-task/create-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"create-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/create-task/create-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAqB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,2HAA2H;IAC3H,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,mKAAmK;IACnK,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qCAAqC;I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AE,CAAC;QAC7B,+GAA+G;QAC/G,UAAU,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;SAAE,CAAC;QAC/B,yRAAyR;QACzR,OAAO,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;SAAE,CAAC;QAC5B,6EAA6E;QAC7E,cAAc,CAAC,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;SAAE,CAAC;KACpC,CAAA;CACF;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,EAAE,EAAE,EAAE,gBAAgB,GAAG,MAAM,CAE1H;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,KAAK,CAAC,EAClG,qBAAqB,CAAC,EAAE,MAAM,MAAM,GACnC,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,CAAC,CAkClE;AAED;;;;;;;;;;;;;;;;;;GAkBG;AAEH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAE5F"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
14
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
15
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -37,10 +48,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
48
|
};
|
|
38
49
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
50
|
exports.createTask = exports._createTaskFactory = exports._createTaskDefaultTransformFunction = void 0;
|
|
51
|
+
var core_1 = require("@dvelop-sdk/core");
|
|
40
52
|
var http_1 = require("../../utils/http");
|
|
41
|
-
var uuid_1 = require("uuid");
|
|
42
53
|
/**
|
|
43
|
-
* Default transform-function provided to the {@link createTask}-function.
|
|
54
|
+
* Default transform-function provided to the {@link createTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
44
55
|
* @internal
|
|
45
56
|
* @category Task
|
|
46
57
|
*/
|
|
@@ -49,7 +60,7 @@ function _createTaskDefaultTransformFunction(response, _, __) {
|
|
|
49
60
|
}
|
|
50
61
|
exports._createTaskDefaultTransformFunction = _createTaskDefaultTransformFunction;
|
|
51
62
|
/**
|
|
52
|
-
* Factory for the {@link createTask}-function. See
|
|
63
|
+
* Factory for the {@link createTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
53
64
|
* @typeparam T Return type of the {@link createTask}-function. A corresponding transformFuntion has to be supplied.
|
|
54
65
|
* @internal
|
|
55
66
|
* @category Task
|
|
@@ -57,18 +68,31 @@ exports._createTaskDefaultTransformFunction = _createTaskDefaultTransformFunctio
|
|
|
57
68
|
function _createTaskFactory(httpRequestFunction, transformFunction, uuidGeneratorFunction) {
|
|
58
69
|
var _this = this;
|
|
59
70
|
return function (context, params) { return __awaiter(_this, void 0, void 0, function () {
|
|
60
|
-
var response;
|
|
71
|
+
var task, response;
|
|
61
72
|
return __generator(this, function (_a) {
|
|
62
73
|
switch (_a.label) {
|
|
63
74
|
case 0:
|
|
75
|
+
task = __assign({}, params);
|
|
64
76
|
if (uuidGeneratorFunction && !params.correlationKey) {
|
|
65
|
-
|
|
77
|
+
task.correlationKey = uuidGeneratorFunction();
|
|
78
|
+
}
|
|
79
|
+
if (params.dueDate) {
|
|
80
|
+
task.dueDate = params.dueDate.toISOString();
|
|
81
|
+
}
|
|
82
|
+
if (params.reminderDate) {
|
|
83
|
+
task.reminderDate = params.reminderDate.toISOString();
|
|
84
|
+
}
|
|
85
|
+
if (params.dmsObject) {
|
|
86
|
+
task.dmsReferences = [{
|
|
87
|
+
repoId: params.dmsObject.repositoryId,
|
|
88
|
+
objectId: params.dmsObject.dmsObjectId
|
|
89
|
+
}];
|
|
66
90
|
}
|
|
67
91
|
return [4 /*yield*/, httpRequestFunction(context, {
|
|
68
92
|
method: "POST",
|
|
69
93
|
url: "/task",
|
|
70
94
|
follows: ["tasks"],
|
|
71
|
-
data:
|
|
95
|
+
data: task
|
|
72
96
|
})];
|
|
73
97
|
case 1:
|
|
74
98
|
response = _a.sent();
|
|
@@ -82,13 +106,24 @@ exports._createTaskFactory = _createTaskFactory;
|
|
|
82
106
|
* Create a task.
|
|
83
107
|
*
|
|
84
108
|
* ```typescript
|
|
109
|
+
* import { createTask } from "@dvelop-sdk/task";
|
|
110
|
+
*
|
|
111
|
+
* const taskLocation = await createTask({
|
|
112
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
113
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
114
|
+
* }, {
|
|
115
|
+
* subject: "Cover up lab accident",
|
|
116
|
+
* assignees: ["XiFkyR35v2Y"]
|
|
117
|
+
* });
|
|
118
|
+
*
|
|
119
|
+
* console.log(taskLocation); // some/task/location
|
|
85
120
|
* ```
|
|
86
121
|
*
|
|
87
122
|
* @category Task
|
|
88
123
|
*/
|
|
89
124
|
/* istanbul ignore next */
|
|
90
125
|
function createTask(context, params) {
|
|
91
|
-
return _createTaskFactory(http_1._defaultHttpRequestFunction, _createTaskDefaultTransformFunction,
|
|
126
|
+
return _createTaskFactory(http_1._defaultHttpRequestFunction, _createTaskDefaultTransformFunction, core_1.generateRequestId)(context, params);
|
|
92
127
|
}
|
|
93
128
|
exports.createTask = createTask;
|
|
94
129
|
//# sourceMappingURL=create-task.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-task.js","sourceRoot":"","sources":["../../../src/tasks/create-task/create-task.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-task.js","sourceRoot":"","sources":["../../../src/tasks/create-task/create-task.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAoE;AACpE,yCAAyF;AA2EzF;;;;GAIG;AACH,SAAgB,mCAAmC,CAAC,QAAsB,EAAE,CAAgB,EAAE,EAAoB;IAChH,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC;AAFD,kFAEC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,mBAA0F,EAC1F,iBAAkG,EAClG,qBAAoC;IAHtC,iBAsCC;IAhCC,OAAO,UAAO,OAAsB,EAAE,MAAwB;;;;;oBAEtD,IAAI,gBAAa,MAAM,CAAE,CAAC;oBAEhC,IAAI,qBAAqB,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE;wBACnD,IAAI,CAAC,cAAc,GAAG,qBAAqB,EAAE,CAAC;qBAC/C;oBAED,IAAI,MAAM,CAAC,OAAO,EAAE;wBAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;qBAC7C;oBAED,IAAI,MAAM,CAAC,YAAY,EAAE;wBACvB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;qBACvD;oBAED,IAAI,MAAM,CAAC,SAAS,EAAE;wBACpB,IAAI,CAAC,aAAa,GAAG,CAAC;gCACpB,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,YAAY;gCACrC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW;6BACvC,CAAC,CAAC;qBACJ;oBAE8B,qBAAM,mBAAmB,CAAC,OAAO,EAAE;4BAChE,MAAM,EAAE,MAAM;4BACd,GAAG,EAAE,OAAO;4BACZ,OAAO,EAAE,CAAC,OAAO,CAAC;4BAClB,IAAI,EAAE,IAAI;yBACX,CAAC,EAAA;;oBALI,QAAQ,GAAiB,SAK7B;oBAEF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAtCD,gDAsCC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,0BAA0B;AAC1B,SAAgB,UAAU,CAAC,OAAsB,EAAE,MAAwB;IACzE,OAAO,kBAAkB,CAAC,kCAA2B,EAAE,mCAAmC,EAAE,wBAAiB,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAClI,CAAC;AAFD,gCAEC"}
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for the {@link deleteTask}-function.
|
|
5
|
+
* @category Task
|
|
6
|
+
*/
|
|
2
7
|
export interface DeleteTaskParams {
|
|
8
|
+
/** Location-URI of the task. */
|
|
3
9
|
location: string;
|
|
4
10
|
}
|
|
5
11
|
/**
|
|
6
|
-
*
|
|
12
|
+
* Factory for the {@link deleteTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
13
|
+
* @typeparam T Return type of the {@link deleteTask}-function. A corresponding transformFuntion has to be supplied.
|
|
14
|
+
* @internal
|
|
15
|
+
* @category Task
|
|
16
|
+
*/
|
|
17
|
+
export declare function _deleteTaskFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: DeleteTaskParams) => T): (context: DvelopContext, params: DeleteTaskParams) => Promise<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Mark task as completed.
|
|
7
20
|
*
|
|
8
21
|
* ```typescript
|
|
22
|
+
* import { deleteTask } from "@dvelop-sdk/task";
|
|
23
|
+
*
|
|
24
|
+
* await deleteTask({
|
|
25
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
26
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
27
|
+
* }, {
|
|
28
|
+
* location: "some/task/location"
|
|
29
|
+
* });
|
|
9
30
|
* ```
|
|
10
31
|
*
|
|
11
32
|
* @category Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/delete-task/delete-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"delete-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/delete-task/delete-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,KAAK,CAAC,GACjG,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,CAAC,CASlE;AAED;;;;;;;;;;;;;;;GAeG;AAEH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1F"}
|
|
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
39
39
|
exports.deleteTask = exports._deleteTaskFactory = void 0;
|
|
40
40
|
var http_1 = require("../../utils/http");
|
|
41
41
|
/**
|
|
42
|
-
* Factory for the {@link deleteTask}-function. See
|
|
42
|
+
* Factory for the {@link deleteTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
43
43
|
* @typeparam T Return type of the {@link deleteTask}-function. A corresponding transformFuntion has to be supplied.
|
|
44
44
|
* @internal
|
|
45
45
|
* @category Task
|
|
@@ -63,9 +63,17 @@ function _deleteTaskFactory(httpRequestFunction, transformFunction) {
|
|
|
63
63
|
}
|
|
64
64
|
exports._deleteTaskFactory = _deleteTaskFactory;
|
|
65
65
|
/**
|
|
66
|
-
*
|
|
66
|
+
* Mark task as completed.
|
|
67
67
|
*
|
|
68
68
|
* ```typescript
|
|
69
|
+
* import { deleteTask } from "@dvelop-sdk/task";
|
|
70
|
+
*
|
|
71
|
+
* await deleteTask({
|
|
72
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
73
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
74
|
+
* }, {
|
|
75
|
+
* location: "some/task/location"
|
|
76
|
+
* });
|
|
69
77
|
* ```
|
|
70
78
|
*
|
|
71
79
|
* @category Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delete-task.js","sourceRoot":"","sources":["../../../src/tasks/delete-task/delete-task.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;
|
|
1
|
+
{"version":3,"file":"delete-task.js","sourceRoot":"","sources":["../../../src/tasks/delete-task/delete-task.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAWzF;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,mBAA0F,EAC1F,iBAAkG;IAFpG,iBAYC;IARC,OAAO,UAAO,OAAsB,EAAE,MAAwB;;;;wBAE7B,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAChE,MAAM,EAAE,QAAQ;wBAChB,GAAG,EAAE,MAAM,CAAC,QAAQ;qBACrB,CAAC,EAAA;;oBAHI,QAAQ,GAAiB,SAG7B;oBACF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AAZD,gDAYC;AAED;;;;;;;;;;;;;;;GAeG;AACH,0BAA0B;AAC1B,SAAgB,UAAU,CAAC,OAAsB,EAAE,MAAwB;IACzE,OAAO,kBAAkB,CAAC,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACrF,CAAC;AAFD,gCAEC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
|
+
/**
|
|
4
|
+
* Default transform-function provided to the {@link getTaskCount}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
5
|
+
* @internal
|
|
6
|
+
* @category Task
|
|
7
|
+
*/
|
|
8
|
+
export declare function _getTaskCountDefaultTransformFunction(response: HttpResponse, _: DvelopContext): number;
|
|
9
|
+
/**
|
|
10
|
+
* Factory for the {@link getTaskCount}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
11
|
+
* @typeparam T Return type of the {@link getTaskCount}-function. A corresponding transformFuntion has to be supplied.
|
|
12
|
+
* @internal
|
|
13
|
+
* @category Task
|
|
14
|
+
*/
|
|
15
|
+
export declare function _getTaskCountFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext) => T): (context: DvelopContext) => Promise<T>;
|
|
16
|
+
/**
|
|
17
|
+
* Create a task.
|
|
18
|
+
*
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { getTaskCount } from "@dvelop-sdk/task";
|
|
21
|
+
*
|
|
22
|
+
* await getTaskCount({
|
|
23
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
24
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* @category Task
|
|
29
|
+
*/
|
|
30
|
+
export declare function getTaskCount(context: DvelopContext): Promise<number>;
|
|
31
|
+
//# sourceMappingURL=get-task-count.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-task-count.d.ts","sourceRoot":"","sources":["../../../src/tasks/get-task-count/get-task-count.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,YAAY,EAA+B,MAAM,kBAAkB,CAAC;AAEzF;;;;GAIG;AACH,wBAAgB,qCAAqC,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,EAAE,aAAa,GAAG,MAAM,CAEtG;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,mBAAmB,EAAE,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,YAAY,CAAC,EAC1F,iBAAiB,EAAE,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,KAAK,CAAC,GACvE,CAAC,OAAO,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,CASxC;AAED;;;;;;;;;;;;;GAaG;AAEH,wBAAgB,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAEpE"}
|
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -47,52 +36,58 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
36
|
}
|
|
48
37
|
};
|
|
49
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
exports.
|
|
39
|
+
exports.getTaskCount = exports._getTaskCountFactory = exports._getTaskCountDefaultTransformFunction = void 0;
|
|
51
40
|
var http_1 = require("../../utils/http");
|
|
52
41
|
/**
|
|
53
|
-
* Default transform-function provided to the {@link
|
|
42
|
+
* Default transform-function provided to the {@link getTaskCount}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
54
43
|
* @internal
|
|
55
44
|
* @category Task
|
|
56
45
|
*/
|
|
57
|
-
function
|
|
58
|
-
return
|
|
46
|
+
function _getTaskCountDefaultTransformFunction(response, _) {
|
|
47
|
+
return response.data.count;
|
|
59
48
|
}
|
|
60
|
-
exports.
|
|
49
|
+
exports._getTaskCountDefaultTransformFunction = _getTaskCountDefaultTransformFunction;
|
|
61
50
|
/**
|
|
62
|
-
* Factory for the {@link
|
|
63
|
-
* @typeparam T Return type of the {@link
|
|
51
|
+
* Factory for the {@link getTaskCount}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
52
|
+
* @typeparam T Return type of the {@link getTaskCount}-function. A corresponding transformFuntion has to be supplied.
|
|
64
53
|
* @internal
|
|
65
54
|
* @category Task
|
|
66
55
|
*/
|
|
67
|
-
function
|
|
56
|
+
function _getTaskCountFactory(httpRequestFunction, transformFunction) {
|
|
68
57
|
var _this = this;
|
|
69
|
-
return function (context
|
|
58
|
+
return function (context) { return __awaiter(_this, void 0, void 0, function () {
|
|
70
59
|
var response;
|
|
71
60
|
return __generator(this, function (_a) {
|
|
72
61
|
switch (_a.label) {
|
|
73
62
|
case 0: return [4 /*yield*/, httpRequestFunction(context, {
|
|
74
63
|
method: "GET",
|
|
75
|
-
|
|
64
|
+
follows: ["count", "all"]
|
|
76
65
|
})];
|
|
77
66
|
case 1:
|
|
78
67
|
response = _a.sent();
|
|
79
|
-
return [2 /*return*/, transformFunction(response, context
|
|
68
|
+
return [2 /*return*/, transformFunction(response, context)];
|
|
80
69
|
}
|
|
81
70
|
});
|
|
82
71
|
}); };
|
|
83
72
|
}
|
|
84
|
-
exports.
|
|
73
|
+
exports._getTaskCountFactory = _getTaskCountFactory;
|
|
85
74
|
/**
|
|
86
75
|
* Create a task.
|
|
87
76
|
*
|
|
88
77
|
* ```typescript
|
|
78
|
+
* import { getTaskCount } from "@dvelop-sdk/task";
|
|
79
|
+
*
|
|
80
|
+
* await getTaskCount({
|
|
81
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
82
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
83
|
+
* });
|
|
89
84
|
* ```
|
|
90
85
|
*
|
|
91
86
|
* @category Task
|
|
92
87
|
*/
|
|
93
88
|
/* istanbul ignore next */
|
|
94
|
-
function
|
|
95
|
-
return
|
|
89
|
+
function getTaskCount(context) {
|
|
90
|
+
return _getTaskCountFactory(http_1._defaultHttpRequestFunction, _getTaskCountDefaultTransformFunction)(context);
|
|
96
91
|
}
|
|
97
|
-
exports.
|
|
98
|
-
//# sourceMappingURL=get-task.js.map
|
|
92
|
+
exports.getTaskCount = getTaskCount;
|
|
93
|
+
//# sourceMappingURL=get-task-count.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-task-count.js","sourceRoot":"","sources":["../../../src/tasks/get-task-count/get-task-count.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AAEzF;;;;GAIG;AACH,SAAgB,qCAAqC,CAAC,QAAsB,EAAE,CAAgB;IAC5F,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC;AAC7B,CAAC;AAFD,sFAEC;AAED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAClC,mBAA0F,EAC1F,iBAAwE;IAF1E,iBAYC;IARC,OAAO,UAAO,OAAsB;;;;wBAEH,qBAAM,mBAAmB,CAAC,OAAO,EAAE;wBAChE,MAAM,EAAE,KAAK;wBACb,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC;qBAC1B,CAAC,EAAA;;oBAHI,QAAQ,GAAiB,SAG7B;oBACF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAC;;;SAC7C,CAAC;AACJ,CAAC;AAZD,oDAYC;AAED;;;;;;;;;;;;;GAaG;AACH,0BAA0B;AAC1B,SAAgB,YAAY,CAAC,OAAsB;IACjD,OAAO,oBAAoB,CAAC,kCAA2B,EAAE,qCAAqC,CAAC,CAAC,OAAO,CAAC,CAAC;AAC3G,CAAC;AAFD,oCAEC"}
|
|
@@ -1,54 +1,109 @@
|
|
|
1
1
|
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
+
import { HttpConfig, HttpResponse } from "../../utils/http";
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for the {@link updateTask}-function.
|
|
5
|
+
* @category Task
|
|
6
|
+
*/
|
|
2
7
|
export interface UpdateTaskParams {
|
|
8
|
+
/** Location-URI of the task */
|
|
3
9
|
location: string;
|
|
10
|
+
/** The subject of the task */
|
|
4
11
|
subject?: string;
|
|
12
|
+
/** The recipients of the task. You can specify individual users as well as groups using IDs of the Identityprovider-App */
|
|
5
13
|
assignees?: string[];
|
|
14
|
+
/** The correlation key ensures that only one task is created for this unique key. If a task already exists with the passed key, a new task will not be created. */
|
|
6
15
|
correlationKey?: string;
|
|
16
|
+
/** A descriptive text of the task */
|
|
7
17
|
description?: string;
|
|
18
|
+
/** Priority between 0 (low) and 100 (high) */
|
|
8
19
|
priority?: number;
|
|
20
|
+
/** Reminder date. If you transfer a date without a timestamp, the reminder date is the transferred date at 00:00:00. */
|
|
9
21
|
reminderDate?: Date;
|
|
22
|
+
/** Due date of the task. If you transfer a date without a timestamp, the due date is the transferred date at 00:00:00. */
|
|
10
23
|
dueDate?: Date;
|
|
24
|
+
/**
|
|
25
|
+
* Specify how long the task details should be kept after completing the task. Valid values are between 0 and 365 days. After this time has passed, the task details will be deleted automatically.
|
|
26
|
+
* The information is specified as a time span in days according to ISO-8601, e.g. P30D for 30 days. Specify the time span P0D if the task details should be deleted immediately after the task is completed. If you make no specification, 30 days are automatically assumed.
|
|
27
|
+
*/
|
|
11
28
|
retentionTime?: string;
|
|
29
|
+
/** The context of a task */
|
|
12
30
|
context?: {
|
|
31
|
+
/** A technical identifier for the context */
|
|
13
32
|
key?: string;
|
|
33
|
+
/** Type of the context */
|
|
14
34
|
type?: string;
|
|
35
|
+
/** Display name of the context */
|
|
15
36
|
name?: string;
|
|
16
37
|
};
|
|
38
|
+
/** Metadata for the task. See [the documentation](https://developer.d-velop.de/documentation/taskapi/en#creating-a-task) for further information */
|
|
17
39
|
metadata?: {
|
|
40
|
+
/** A technical identifier for the metadata-field */
|
|
18
41
|
key?: string;
|
|
42
|
+
/** Label of the metadata-field */
|
|
19
43
|
caption?: string;
|
|
44
|
+
/** Type of the metadata-field */
|
|
20
45
|
type?: "String" | "Number" | "Money" | "Date";
|
|
46
|
+
/** Value of the metadata field. Currently, only one value is allowed per metadata-field. */
|
|
21
47
|
values?: string;
|
|
22
48
|
}[];
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
49
|
+
/** DmsObject that references the task */
|
|
50
|
+
dmsObject?: {
|
|
51
|
+
/** ID of the repository */
|
|
52
|
+
repositoryId: string;
|
|
53
|
+
/** ID of the DmsObject */
|
|
54
|
+
dmsObjectId: string;
|
|
55
|
+
};
|
|
56
|
+
/** Specifies if a notification should be sent to the task creator when the task is created. Default is true. */
|
|
27
57
|
sendCreationNotification?: boolean;
|
|
58
|
+
/** Specifies if a notification should be sent to the task creator when the task is completed. Default is false. */
|
|
28
59
|
sendCompletionNotification?: boolean;
|
|
60
|
+
/** Specifies if a notification should be sent to the task creator when the due date is exceeded. This option is only available if a dueDate is specified. Default is false. */
|
|
29
61
|
sendDueDateNotification?: boolean;
|
|
62
|
+
/** Links to the task */
|
|
30
63
|
_links?: {
|
|
64
|
+
/** This URI provides an editing dialog for the task. You can find further details in the section [Adding editing dialogs](https://developer.d-velop.de/documentation/taskapi/en#adding-editing-dialogs). */
|
|
31
65
|
form?: {
|
|
32
66
|
href: string;
|
|
33
67
|
};
|
|
68
|
+
/** This URI is called on completion of a task via the method POST. */
|
|
34
69
|
callback?: {
|
|
35
70
|
href: string;
|
|
36
71
|
};
|
|
72
|
+
/** This URI is displayed as an action in the user interface to display additional information for the user. */
|
|
37
73
|
attachment?: {
|
|
38
74
|
href: string;
|
|
39
75
|
};
|
|
76
|
+
/** This URI represents the process by which the task was initiated. The process is displayed in the user interface as a separate perspective for the task. To display completed tasks, the resource has to implement a HEAD request, if the resource is behind the same base address. */
|
|
40
77
|
process?: {
|
|
41
78
|
href: string;
|
|
42
79
|
};
|
|
80
|
+
/** This URI is called in case of updates to the task via the method POST. */
|
|
43
81
|
changeCallback?: {
|
|
44
82
|
href: string;
|
|
45
83
|
};
|
|
46
84
|
};
|
|
47
85
|
}
|
|
86
|
+
/**
|
|
87
|
+
* Factory for the {@link updateTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
88
|
+
* @typeparam T Return type of the {@link updateTask}-function. A corresponding transformFuntion has to be supplied.
|
|
89
|
+
* @internal
|
|
90
|
+
* @category Task
|
|
91
|
+
*/
|
|
92
|
+
export declare function _updateTaskFactory<T>(httpRequestFunction: (context: DvelopContext, config: HttpConfig) => Promise<HttpResponse>, transformFunction: (response: HttpResponse, context: DvelopContext, params: UpdateTaskParams) => T): (context: DvelopContext, params: UpdateTaskParams) => Promise<T>;
|
|
48
93
|
/**
|
|
49
94
|
* Update a task.
|
|
50
95
|
*
|
|
51
96
|
* ```typescript
|
|
97
|
+
* import { updateTask } from "@dvelop-sdk/task";
|
|
98
|
+
*
|
|
99
|
+
* await updateTask({
|
|
100
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
101
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
102
|
+
* }, {
|
|
103
|
+
* location: "some/task/location",
|
|
104
|
+
* description: "Try harder! Bribe some people if you must.",
|
|
105
|
+
* dueDate: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 5)) // due in 5 days
|
|
106
|
+
* });
|
|
52
107
|
* ```
|
|
53
108
|
*
|
|
54
109
|
* @category Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/update-task/update-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"update-task.d.ts","sourceRoot":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__esModule", { value: true });
|
|
|
50
50
|
exports.updateTask = exports._updateTaskFactory = void 0;
|
|
51
51
|
var http_1 = require("../../utils/http");
|
|
52
52
|
/**
|
|
53
|
-
* Factory for the {@link updateTask}-function. See
|
|
53
|
+
* Factory for the {@link updateTask}-function. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
54
54
|
* @typeparam T Return type of the {@link updateTask}-function. A corresponding transformFuntion has to be supplied.
|
|
55
55
|
* @internal
|
|
56
56
|
* @category Task
|
|
@@ -63,6 +63,18 @@ function _updateTaskFactory(httpRequestFunction, transformFunction) {
|
|
|
63
63
|
switch (_a.label) {
|
|
64
64
|
case 0:
|
|
65
65
|
task = __assign(__assign({}, params), { location: null });
|
|
66
|
+
if (params.dueDate) {
|
|
67
|
+
task.dueDate = params.dueDate.toISOString();
|
|
68
|
+
}
|
|
69
|
+
if (params.reminderDate) {
|
|
70
|
+
task.reminderDate = params.reminderDate.toISOString();
|
|
71
|
+
}
|
|
72
|
+
if (params.dmsObject) {
|
|
73
|
+
task.dmsReferences = [{
|
|
74
|
+
repoId: params.dmsObject.repositoryId,
|
|
75
|
+
objectId: params.dmsObject.dmsObjectId
|
|
76
|
+
}];
|
|
77
|
+
}
|
|
66
78
|
return [4 /*yield*/, httpRequestFunction(context, {
|
|
67
79
|
method: "PATCH",
|
|
68
80
|
url: params.location,
|
|
@@ -80,6 +92,16 @@ exports._updateTaskFactory = _updateTaskFactory;
|
|
|
80
92
|
* Update a task.
|
|
81
93
|
*
|
|
82
94
|
* ```typescript
|
|
95
|
+
* import { updateTask } from "@dvelop-sdk/task";
|
|
96
|
+
*
|
|
97
|
+
* await updateTask({
|
|
98
|
+
* systemBaseUri: "https://umbrella-corp.d-velop.cloud",
|
|
99
|
+
* authSessionId: "dQw4w9WgXcQ"
|
|
100
|
+
* }, {
|
|
101
|
+
* location: "some/task/location",
|
|
102
|
+
* description: "Try harder! Bribe some people if you must.",
|
|
103
|
+
* dueDate: new Date(new Date().getTime() + (1000 * 60 * 60 * 24 * 5)) // due in 5 days
|
|
104
|
+
* });
|
|
83
105
|
* ```
|
|
84
106
|
*
|
|
85
107
|
* @category Task
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-task.js","sourceRoot":"","sources":["../../../src/tasks/update-task/update-task.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;
|
|
1
|
+
{"version":3,"file":"update-task.js","sourceRoot":"","sources":["../../../src/tasks/update-task/update-task.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAyF;AA6EzF;;;;;GAKG;AACH,SAAgB,kBAAkB,CAChC,mBAA0F,EAC1F,iBAAkG;IAFpG,iBA+BC;IA1BC,OAAO,UAAO,OAAsB,EAAE,MAAwB;;;;;oBAEtD,IAAI,yBAAa,MAAM,GAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAE,CAAC;oBAEvD,IAAI,MAAM,CAAC,OAAO,EAAE;wBAClB,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;qBAC7C;oBAED,IAAI,MAAM,CAAC,YAAY,EAAE;wBACvB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC;qBACvD;oBAED,IAAI,MAAM,CAAC,SAAS,EAAE;wBACpB,IAAI,CAAC,aAAa,GAAG,CAAC;gCACpB,MAAM,EAAE,MAAM,CAAC,SAAS,CAAC,YAAY;gCACrC,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,WAAW;6BACvC,CAAC,CAAC;qBACJ;oBAE8B,qBAAM,mBAAmB,CAAC,OAAO,EAAE;4BAChE,MAAM,EAAE,OAAO;4BACf,GAAG,EAAE,MAAM,CAAC,QAAQ;4BACpB,IAAI,EAAE,IAAI;yBACX,CAAC,EAAA;;oBAJI,QAAQ,GAAiB,SAI7B;oBACF,sBAAO,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,EAAC;;;SACrD,CAAC;AACJ,CAAC;AA/BD,gDA+BC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,0BAA0B;AAC1B,SAAgB,UAAU,CAAC,OAAsB,EAAE,MAAwB;IACzE,OAAO,kBAAkB,CAAC,kCAA2B,EAAE,cAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACrF,CAAC;AAFD,gCAEC"}
|
package/lib/utils/http.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BadInputError, DvelopSdkError } from "@dvelop-sdk/core";
|
|
1
|
+
import { DvelopContext, DvelopHttpRequestConfig, DvelopHttpResponse, DvelopHttpClient, BadInputError, DvelopSdkError } from "@dvelop-sdk/core";
|
|
2
2
|
export { DvelopHttpRequestConfig as HttpConfig, DvelopHttpResponse as HttpResponse } from "@dvelop-sdk/core";
|
|
3
3
|
/**
|
|
4
|
-
* Generic Error for
|
|
4
|
+
* Generic Error for task-package.
|
|
5
5
|
* @category Error
|
|
6
6
|
*/
|
|
7
7
|
export declare class TaskError extends DvelopSdkError {
|
|
@@ -9,7 +9,11 @@ export declare class TaskError extends DvelopSdkError {
|
|
|
9
9
|
originalError?: Error | undefined;
|
|
10
10
|
constructor(message: string, originalError?: Error | undefined);
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Validation for task
|
|
14
|
+
* @category Error
|
|
15
|
+
*/
|
|
16
|
+
export interface TaskValidation {
|
|
13
17
|
invalidTaskDefinition: boolean;
|
|
14
18
|
missingSubject: boolean;
|
|
15
19
|
invalidSubject: boolean;
|
|
@@ -30,12 +34,24 @@ interface TaskValidation {
|
|
|
30
34
|
invalidDmsReferences: boolean;
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
33
|
-
*
|
|
34
|
-
* @category Error
|
|
35
|
-
*/
|
|
37
|
+
* Indicates an invalid task-definition. See ```validation```-property for more information.
|
|
38
|
+
* @category Error
|
|
39
|
+
*/
|
|
36
40
|
export declare class InvalidTaskDefinitionError extends BadInputError {
|
|
37
41
|
validation: TaskValidation;
|
|
38
42
|
originalError?: Error | undefined;
|
|
39
43
|
constructor(validation: TaskValidation, originalError?: Error | undefined);
|
|
40
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Factory used to create the default httpRequestFunction. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
47
|
+
* @internal
|
|
48
|
+
* @category Http
|
|
49
|
+
*/
|
|
50
|
+
export declare function _defaultHttpRequestFunctionFactory(httpClient: DvelopHttpClient): (context: DvelopContext, config: DvelopHttpRequestConfig) => Promise<DvelopHttpResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Default httpRequestFunction used in task-package.
|
|
53
|
+
* @internal
|
|
54
|
+
* @category Http
|
|
55
|
+
*/
|
|
56
|
+
export declare function _defaultHttpRequestFunction(context: DvelopContext, config: DvelopHttpRequestConfig): Promise<DvelopHttpResponse>;
|
|
41
57
|
//# sourceMappingURL=http.d.ts.map
|
package/lib/utils/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,gBAAgB,EAAkC,aAAa,EAAoD,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACjO,OAAO,EAAE,uBAAuB,IAAI,UAAU,EAAE,kBAAkB,IAAI,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAG7G;;;EAGE;AAEF,qBAAa,SAAU,SAAQ,cAAc;IAExB,OAAO,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: true });
|
|
|
54
54
|
exports._defaultHttpRequestFunction = exports._defaultHttpRequestFunctionFactory = exports.InvalidTaskDefinitionError = exports.TaskError = void 0;
|
|
55
55
|
var core_1 = require("@dvelop-sdk/core");
|
|
56
56
|
/**
|
|
57
|
-
* Generic Error for
|
|
57
|
+
* Generic Error for task-package.
|
|
58
58
|
* @category Error
|
|
59
59
|
*/
|
|
60
60
|
/* istanbul ignore next */
|
|
@@ -72,9 +72,9 @@ var TaskError = /** @class */ (function (_super) {
|
|
|
72
72
|
}(core_1.DvelopSdkError));
|
|
73
73
|
exports.TaskError = TaskError;
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
76
|
-
* @category Error
|
|
77
|
-
*/
|
|
75
|
+
* Indicates an invalid task-definition. See ```validation```-property for more information.
|
|
76
|
+
* @category Error
|
|
77
|
+
*/
|
|
78
78
|
var InvalidTaskDefinitionError = /** @class */ (function (_super) {
|
|
79
79
|
__extends(InvalidTaskDefinitionError, _super);
|
|
80
80
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -89,7 +89,7 @@ var InvalidTaskDefinitionError = /** @class */ (function (_super) {
|
|
|
89
89
|
}(core_1.BadInputError));
|
|
90
90
|
exports.InvalidTaskDefinitionError = InvalidTaskDefinitionError;
|
|
91
91
|
/**
|
|
92
|
-
* Factory used to create the default httpRequestFunction.
|
|
92
|
+
* Factory used to create the default httpRequestFunction. See [Advanced Topics](https://github.com/d-velop/dvelop-sdk-node#advanced-topics) for more information.
|
|
93
93
|
* @internal
|
|
94
94
|
* @category Http
|
|
95
95
|
*/
|
|
@@ -135,7 +135,7 @@ function _defaultHttpRequestFunctionFactory(httpClient) {
|
|
|
135
135
|
}
|
|
136
136
|
exports._defaultHttpRequestFunctionFactory = _defaultHttpRequestFunctionFactory;
|
|
137
137
|
/**
|
|
138
|
-
* Default httpRequestFunction used in
|
|
138
|
+
* Default httpRequestFunction used in task-package.
|
|
139
139
|
* @internal
|
|
140
140
|
* @category Http
|
|
141
141
|
*/
|
package/lib/utils/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAiO;AAIjO;;;EAGE;AACF,0BAA0B;AAC1B;IAA+B,6BAAc;IAC3C,0CAA0C;IAC1C,mBAAmB,OAAe,EAAS,aAAqB;QAAhE,YACE,kBAAM,OAAO,CAAC,SAEf;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAAS,mBAAa,GAAb,aAAa,CAAQ;QAE9D,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;;IACnD,CAAC;IACH,gBAAC;AAAD,CAAC,AAND,CAA+B,qBAAc,GAM5C;AANY,8BAAS;
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,yCAAiO;AAIjO;;;EAGE;AACF,0BAA0B;AAC1B;IAA+B,6BAAc;IAC3C,0CAA0C;IAC1C,mBAAmB,OAAe,EAAS,aAAqB;QAAhE,YACE,kBAAM,OAAO,CAAC,SAEf;QAHkB,aAAO,GAAP,OAAO,CAAQ;QAAS,mBAAa,GAAb,aAAa,CAAQ;QAE9D,MAAM,CAAC,cAAc,CAAC,KAAI,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;;IACnD,CAAC;IACH,gBAAC;AAAD,CAAC,AAND,CAA+B,qBAAc,GAM5C;AANY,8BAAS;AAiCtB;;;GAGG;AACH;IAAgD,8CAAa;IAC3D,0CAA0C;IAC1C,oCAAmB,UAA0B,EAAS,aAAqB;QAA3E,YACE,kBAAM,4EAA4E,EAAE,aAAa,CAAC,SAEnG;QAHkB,gBAAU,GAAV,UAAU,CAAgB;QAAS,mB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CAAC;qBACvH;;;;;SAEJ,CAAC;AACJ,CAAC;AAlCD,gFAkCC;AAED;;;;GAIG;AACH,0BAA0B;AAC1B,SAAsB,2BAA2B,CAAC,OAAsB,EAAE,MAA+B;;;YACvG,sBAAO,kCAAkC,CAAC,qCAA8B,EAAE,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,EAAC;;;CAC9F;AAFD,kEAEC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvelop-sdk/task",
|
|
3
3
|
"description": "This package contains functionality for the Task-App in the d.velop cloud.",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.4",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -20,13 +20,6 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@dvelop-sdk/
|
|
24
|
-
|
|
25
|
-
"axios": "^0.21.4",
|
|
26
|
-
"uuid": "^8.3.2"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@types/uuid": "^8.3.0"
|
|
30
|
-
},
|
|
31
|
-
"gitHead": "0a3970080a611f6fb9b8f29ce2fb895726b5789d"
|
|
23
|
+
"@dvelop-sdk/core": "^2.0.0"
|
|
24
|
+
}
|
|
32
25
|
}
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DvelopContext } from "@dvelop-sdk/core";
|
|
2
|
-
export interface GetTaskParams {
|
|
3
|
-
location: string;
|
|
4
|
-
}
|
|
5
|
-
export interface Task {
|
|
6
|
-
id: string;
|
|
7
|
-
location: string;
|
|
8
|
-
subject: string;
|
|
9
|
-
assignees: string[];
|
|
10
|
-
correlationKey: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
priority?: number;
|
|
13
|
-
reminderDate?: Date;
|
|
14
|
-
dueDate?: Date;
|
|
15
|
-
retentionTime?: string;
|
|
16
|
-
context?: {
|
|
17
|
-
key?: string;
|
|
18
|
-
type?: string;
|
|
19
|
-
name?: string;
|
|
20
|
-
};
|
|
21
|
-
metadata?: {
|
|
22
|
-
key?: string;
|
|
23
|
-
caption?: string;
|
|
24
|
-
type?: "String" | "Number" | "Money" | "Date";
|
|
25
|
-
values?: string;
|
|
26
|
-
}[];
|
|
27
|
-
dmsReferences?: {
|
|
28
|
-
repoId?: string;
|
|
29
|
-
objectId?: string;
|
|
30
|
-
}[];
|
|
31
|
-
sendCreationNotification?: boolean;
|
|
32
|
-
sendCompletionNotification?: boolean;
|
|
33
|
-
sendDueDateNotification?: boolean;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Create a task.
|
|
37
|
-
*
|
|
38
|
-
* ```typescript
|
|
39
|
-
* ```
|
|
40
|
-
*
|
|
41
|
-
* @category Task
|
|
42
|
-
*/
|
|
43
|
-
export declare function getTask(context: DvelopContext, params: GetTaskParams): Promise<Task>;
|
|
44
|
-
//# sourceMappingURL=get-task.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-task.d.ts","sourceRoot":"","sources":["../../../src/tasks/get-task/get-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,I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