Skip to content

Commit 3b3c583

Browse files
committed
Nest data inside of CreateTaskResult.task
1 parent 6c315d9 commit 3b3c583

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

docs/specification/draft/basic/utilities/tasks.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,14 @@ To create a task, requestors send a request with the `task` field included in th
130130
"jsonrpc": "2.0",
131131
"id": 1,
132132
"result": {
133-
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
134-
"status": "working",
135-
"statusMessage": "The operation is now in progress.",
136-
"createdAt": "2025-11-25T10:30:00Z",
137-
"ttl": 60000,
138-
"pollInterval": 5000
133+
"task": {
134+
"taskId": "786512e2-9e0d-44bd-8f29-789f320fe840",
135+
"status": "working",
136+
"statusMessage": "The operation is now in progress.",
137+
"createdAt": "2025-11-25T10:30:00Z",
138+
"ttl": 60000,
139+
"pollInterval": 5000
140+
}
139141
}
140142
}
141143
```

docs/specification/draft/schema.mdx

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.json

Lines changed: 11 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,9 @@ export interface Task {
13401340
*
13411341
* @category `tasks`
13421342
*/
1343-
export type CreateTaskResult = Result & Task;
1343+
export interface CreateTaskResult extends Result {
1344+
task: Task;
1345+
}
13441346

13451347
/**
13461348
* A request to retrieve the state of a task.

0 commit comments

Comments
 (0)