Skip to content

Commit 0de104d

Browse files
authored
Update SDK Documentation (#18)
1 parent 828a23c commit 0de104d

File tree

3 files changed

+457
-1
lines changed

3 files changed

+457
-1
lines changed

src/reference/sdks/backend/index.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ The SDK for the Findings service.
5050
5151
The SDK for metadata information about the plugin.
5252

53+
##### projects
54+
55+
> **projects**: [`ProjectsSDK`](index.md#projectssdk)
56+
57+
The SDK for the Projects service.
58+
5359
##### replay
5460

5561
> **replay**: [`ReplaySDK`](index.md#replaysdk)
@@ -1757,6 +1763,81 @@ The name of the replay session.
17571763

17581764
`string`
17591765

1766+
## Projects
1767+
1768+
### Project
1769+
1770+
> **Project**: `object`
1771+
1772+
A saved immutable Project.
1773+
1774+
#### Type declaration
1775+
1776+
##### getId()
1777+
1778+
The unique Caido [ID](index.md#id) of the project.
1779+
1780+
###### Returns
1781+
1782+
[`ID`](index.md#id)
1783+
1784+
##### getName()
1785+
1786+
The name of the project.
1787+
1788+
###### Returns
1789+
1790+
`string`
1791+
1792+
##### getStatus()
1793+
1794+
The status of the project.
1795+
1796+
###### Returns
1797+
1798+
[`ProjectStatus`](index.md#projectstatus)
1799+
1800+
##### getVersion()
1801+
1802+
The version of the project.
1803+
The format is `MAJOR.MINOR.PATCH`.
1804+
1805+
###### Returns
1806+
1807+
`string`
1808+
1809+
***
1810+
1811+
### ProjectsSDK
1812+
1813+
> **ProjectsSDK**: `object`
1814+
1815+
The SDK for the Projects service.
1816+
1817+
#### Type declaration
1818+
1819+
##### getCurrent()
1820+
1821+
Get the currently selected [Project](index.md#project) if any.
1822+
1823+
###### Returns
1824+
1825+
`Promise`\<`undefined` \| [`Project`](index.md#project)\>
1826+
1827+
###### Example
1828+
1829+
```js
1830+
await sdk.projects.getCurrent();
1831+
```
1832+
1833+
***
1834+
1835+
### ProjectStatus
1836+
1837+
> **ProjectStatus**: `"ready"` \| `"restoring"` \| `"error"`
1838+
1839+
A [Project](index.md#project) status.
1840+
17601841
## Shared
17611842

17621843
### Bytes

0 commit comments

Comments
 (0)