@enonic-types/lib-task 7.12.2 → 7.13.0-B1

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/task.d.ts +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/lib-task",
3
- "version": "7.12.2",
3
+ "version": "7.13.0-B1",
4
4
  "description": "Type definitions for lib-task.",
5
5
  "types": "task.d.ts",
6
6
  "files": [
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "homepage": "https://github.com/enonic/xp/tree/master#readme",
29
29
  "dependencies": {
30
- "@enonic-types/core": "7.12.2"
30
+ "@enonic-types/core": "7.13.0-B1"
31
31
  },
32
32
  "publishConfig": {
33
33
  "access": "public"
package/task.d.ts CHANGED
@@ -89,6 +89,7 @@ export interface SubmitNamedTaskParams<Config extends Record<string, unknown>> {
89
89
  export declare function submitNamed<Config extends Record<string, unknown> = Record<string, unknown>>(params: SubmitNamedTaskParams<Config>): string;
90
90
  export interface SubmitTaskParams<Config extends Record<string, unknown>> {
91
91
  descriptor: string;
92
+ name?: string;
92
93
  config?: Config;
93
94
  }
94
95
  /**
@@ -100,6 +101,7 @@ export interface SubmitTaskParams<Config extends Record<string, unknown>> {
100
101
  *
101
102
  * @param {object} params JSON with the parameters.
102
103
  * @param {string} params.descriptor Descriptor of the task to execute.
104
+ * @param {string} [params.name] Optional name of the task. If not specified, descriptor name will be used instead.
103
105
  * @param {object} [params.config] Configuration parameters to pass to the task to be executed.
104
106
  * The object must be valid according to the schema defined in the form of the task descriptor XML.
105
107
  * @returns {string} Id of the task that will be executed.
@@ -124,6 +126,7 @@ export interface TaskInfo {
124
126
  user: UserKey;
125
127
  startTime: string;
126
128
  progress: TaskProgress;
129
+ node: string;
127
130
  }
128
131
  /**
129
132
  * Returns the list of active tasks with their current state and progress details.
@@ -135,7 +138,7 @@ export interface TaskInfo {
135
138
  * @param {object} [params.state] Filter by task state ('WAITING' | 'RUNNING' | 'FINISHED' | 'FAILED').
136
139
  * @returns {TaskInfo[]} List with task information for every task.
137
140
  */
138
- export declare function list(params: ListTasksParams): TaskInfo[];
141
+ export declare function list(params?: ListTasksParams): TaskInfo[];
139
142
  /**
140
143
  * Returns the current state and progress details for the specified task.
141
144
  *