Fix compile

This commit is contained in:
Andras Schmelczer 2025-03-27 21:27:14 +00:00
parent 06ca180425
commit 78ba74b844
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -245,6 +245,44 @@ export class SyncService {
});
}
public async getAll(
since?: VaultUpdateId
): Promise<components["schemas"]["FetchLatestDocumentsResponse"]> {
return this.withRetries(async () => {
const { vaultName } = this.settings.getSettings();
const response = await this.client.GET(
"/vaults/{vault_id}/documents",
{
params: {
path: {
vault_id: vaultName
},
header: {
authorization: `Bearer ${this.settings.getSettings().token}`
},
query: {
since_update_id: since
}
}
}
);
const { error } = response;
if (error) {
throw new Error(
`Failed to get documents: ${SyncService.formatError(response.error)}`
);
}
this.logger.debug(
`Got ${response.data.latestDocuments.length} document metadata`
);
return response.data;
});
}
public async checkConnection(): Promise<CheckConnectionResult> {
try {
const response = await this.pingClient.GET("/ping", {