ShadowGit API
Shadow Git API
import { CodeBoltClient } from '@codebolt/clientsdk';
const client = new CodeBoltClient();
Quick Reference
| Method | Description |
|---|---|
checkpoint | Create a shadow git checkpoint |
cleanup | Clean up shadow git data |
diff | Get diff between shadow git checkpoints |
getCheckpoints | List all shadow git checkpoints |
initialize | Initialize shadow git tracking |
readFile | Read a file from a shadow git checkpoint |
restore | Restore to a previous shadow git checkpoint |
Methods
checkpoint
client.shadowGit.checkpoint(data?: ShadowGitCheckpointRequest): Promise<ShadowGitCheckpoint>
Create a shadow git checkpoint
| Parameter | Type | Required | Description |
|---|---|---|---|
data | ShadowGitCheckpointRequest | No |
Returns: Promise<ShadowGitCheckpoint>
cleanup
client.shadowGit.cleanup(data?: ShadowGitCleanupRequest): Promise<unknown>
Clean up shadow git data
| Parameter | Type | Required | Description |
|---|---|---|---|
data | ShadowGitCleanupRequest | No |
Returns: Promise<unknown>
diff
client.shadowGit.diff(data?: ShadowGitDiffRequest): Promise<unknown>
Get diff between shadow git checkpoints
| Parameter | Type | Required | Description |
|---|---|---|---|
data | ShadowGitDiffRequest | No |
Returns: Promise<unknown>
getCheckpoints
client.shadowGit.getCheckpoints(params?: Record<string, unknown>): Promise<ShadowGitCheckpoint[]>
List all shadow git checkpoints
| Parameter | Type | Required | Description |
|---|---|---|---|
params | Record<string, unknown> | No |
Returns: Promise<ShadowGitCheckpoint[]>
initialize
client.shadowGit.initialize(data?: ShadowGitInitializeRequest): Promise<unknown>
Initialize shadow git tracking
| Parameter | Type | Required | Description |
|---|---|---|---|
data | ShadowGitInitializeRequest | No |
Returns: Promise<unknown>
readFile
client.shadowGit.readFile(data: ShadowGitReadFileRequest): Promise<unknown>
Read a file from a shadow git checkpoint
| Parameter | Type | Required | Description |
|---|---|---|---|
data | ShadowGitReadFileRequest | Yes |
Returns: Promise<unknown>
restore
client.shadowGit.restore(data: ShadowGitRestoreRequest): Promise<unknown>
Restore to a previous shadow git checkpoint
| Parameter | Type | Required | Description |
|---|---|---|---|
data | ShadowGitRestoreRequest | Yes |
Returns: Promise<unknown>