@twin.org/background-task-models 0.0.2-next.8 → 0.0.2-next.9
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.
|
@@ -67,10 +67,10 @@ export interface IBackgroundTaskConnector extends IComponent {
|
|
|
67
67
|
* @param sortProperty The property to sort by, defaults to dateCreated.
|
|
68
68
|
* @param sortDirection The order to sort by, defaults to ascending.
|
|
69
69
|
* @param cursor The cursor to get the next page of tasks.
|
|
70
|
-
* @param
|
|
70
|
+
* @param limit Limit the number of entities to return.
|
|
71
71
|
* @returns The list of tasks.
|
|
72
72
|
*/
|
|
73
|
-
query(taskType?: string, taskStatus?: TaskStatus, sortProperty?: "dateCreated" | "dateModified" | "dateCompleted" | "status", sortDirection?: SortDirection, cursor?: string,
|
|
73
|
+
query(taskType?: string, taskStatus?: TaskStatus, sortProperty?: "dateCreated" | "dateModified" | "dateCompleted" | "status", sortDirection?: SortDirection, cursor?: string, limit?: number): Promise<{
|
|
74
74
|
entities: IBackgroundTask[];
|
|
75
75
|
cursor?: string;
|
|
76
76
|
}>;
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @twin.org/background-task-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.9](https://github.com/twinfoundation/background-task/compare/background-task-models-v0.0.2-next.8...background-task-models-v0.0.2-next.9) (2025-10-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add validate-locales ([968cbf9](https://github.com/twinfoundation/background-task/commit/968cbf966fffb5060305e8b221fecc0b6c8105b9))
|
|
9
|
+
|
|
3
10
|
## [0.0.2-next.8](https://github.com/twinfoundation/background-task/compare/background-task-models-v0.0.2-next.7...background-task-models-v0.0.2-next.8) (2025-09-29)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -6,6 +6,14 @@ Interface describing a background task connector.
|
|
|
6
6
|
|
|
7
7
|
- `IComponent`
|
|
8
8
|
|
|
9
|
+
## Indexable
|
|
10
|
+
|
|
11
|
+
\[`key`: `string`\]: `any`
|
|
12
|
+
|
|
13
|
+
All methods are optional, so we introduce an index signature to allow
|
|
14
|
+
any additional properties or methods, which removes the TypeScript error where
|
|
15
|
+
the class has no properties in common with the type.
|
|
16
|
+
|
|
9
17
|
## Methods
|
|
10
18
|
|
|
11
19
|
### registerHandler()
|
|
@@ -236,7 +244,7 @@ Nothing.
|
|
|
236
244
|
|
|
237
245
|
### query()
|
|
238
246
|
|
|
239
|
-
> **query**(`taskType?`, `taskStatus?`, `sortProperty?`, `sortDirection?`, `cursor?`, `
|
|
247
|
+
> **query**(`taskType?`, `taskStatus?`, `sortProperty?`, `sortDirection?`, `cursor?`, `limit?`): `Promise`\<\{ `entities`: [`IBackgroundTask`](IBackgroundTask.md)\<`any`, `any`\>[]; `cursor?`: `string`; \}\>
|
|
240
248
|
|
|
241
249
|
Get a list of tasks.
|
|
242
250
|
|
|
@@ -272,11 +280,11 @@ The order to sort by, defaults to ascending.
|
|
|
272
280
|
|
|
273
281
|
The cursor to get the next page of tasks.
|
|
274
282
|
|
|
275
|
-
#####
|
|
283
|
+
##### limit?
|
|
276
284
|
|
|
277
285
|
`number`
|
|
278
286
|
|
|
279
|
-
|
|
287
|
+
Limit the number of entities to return.
|
|
280
288
|
|
|
281
289
|
#### Returns
|
|
282
290
|
|
|
@@ -6,6 +6,14 @@ Interface describing a task scheduler.
|
|
|
6
6
|
|
|
7
7
|
- `IComponent`
|
|
8
8
|
|
|
9
|
+
## Indexable
|
|
10
|
+
|
|
11
|
+
\[`key`: `string`\]: `any`
|
|
12
|
+
|
|
13
|
+
All methods are optional, so we introduce an index signature to allow
|
|
14
|
+
any additional properties or methods, which removes the TypeScript error where
|
|
15
|
+
the class has no properties in common with the type.
|
|
16
|
+
|
|
9
17
|
## Methods
|
|
10
18
|
|
|
11
19
|
### addTask()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/background-task-models",
|
|
3
|
-
"version": "0.0.2-next.
|
|
3
|
+
"version": "0.0.2-next.9",
|
|
4
4
|
"description": "Models which define the structure of the background task contracts and connectors",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -35,5 +35,24 @@
|
|
|
35
35
|
"dist/types",
|
|
36
36
|
"locales",
|
|
37
37
|
"docs"
|
|
38
|
-
]
|
|
38
|
+
],
|
|
39
|
+
"keywords": [
|
|
40
|
+
"twin",
|
|
41
|
+
"trade",
|
|
42
|
+
"iota",
|
|
43
|
+
"framework",
|
|
44
|
+
"blockchain",
|
|
45
|
+
"background-task",
|
|
46
|
+
"tasks",
|
|
47
|
+
"scheduling",
|
|
48
|
+
"jobs",
|
|
49
|
+
"async",
|
|
50
|
+
"models",
|
|
51
|
+
"types",
|
|
52
|
+
"schemas"
|
|
53
|
+
],
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "git+https://github.com/twinfoundation/background-task/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://twindev.org"
|
|
39
58
|
}
|