JavaScript
import { createCognitioClient } from "@cognitio/sdk
const client = createCognitioClient()
await client.event.subscribe({
...
}){
"type": "project.updated",
"properties": {
"id": "<string>",
"worktree": "<string>",
"time": {
"created": 123,
"updated": 123,
"initialized": 123
},
"sandboxes": [
"<string>"
],
"vcs": "git",
"name": "<string>",
"icon": {
"url": "<string>",
"override": "<string>",
"color": "<string>"
},
"commands": {
"start": "<string>"
}
}
}API Reference
Subscribe to events
Get events
GET
/
event
JavaScript
import { createCognitioClient } from "@cognitio/sdk
const client = createCognitioClient()
await client.event.subscribe({
...
}){
"type": "project.updated",
"properties": {
"id": "<string>",
"worktree": "<string>",
"time": {
"created": 123,
"updated": 123,
"initialized": 123
},
"sandboxes": [
"<string>"
],
"vcs": "git",
"name": "<string>",
"icon": {
"url": "<string>",
"override": "<string>",
"color": "<string>"
},
"commands": {
"start": "<string>"
}
}
}Response
200 - text/event-stream
Event stream
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
- Option 36
- Option 37
- Option 38
- Option 39
- Option 40
- Option 41
- Option 42
- Option 43
- Option 44
- Option 45
- Option 46
- Option 47
- Option 48
- Option 49
- Option 50
- Option 51
- Option 52
- Option 53
- Option 54
- Option 55
- Option 56
- Option 57
- Option 58
- Option 59
- Option 60
- Option 61