strenghten of invoices
This commit is contained in:
@@ -15,7 +15,10 @@ use common::proto::komp_ac::accounting::{
|
||||
use common::proto::komp_ac::common::Empty;
|
||||
use common::proto::komp_ac::document_data::{
|
||||
GetDocumentRequest, GetDocumentResponse, GetDocumentVersionRequest, GetDocumentVersionResponse,
|
||||
GetDocumentsRequest, GetDocumentsResponse, SaveDocumentRequest, SaveDocumentResponse,
|
||||
GetDocumentsRequest, GetDocumentsResponse, GetTypstTemplateVersionRequest,
|
||||
GetTypstTemplateVersionResponse, ListEnabledTypstTemplatesRequest,
|
||||
ListTypstTemplatesRequest, ListTypstTemplatesResponse, RegisterTypstTemplateRequest,
|
||||
RegisterTypstTemplateResponse, SaveDocumentRequest, SaveDocumentResponse,
|
||||
UpdateDocumentRequest, UpdateDocumentResponse,
|
||||
document_data_service_client::DocumentDataServiceClient,
|
||||
};
|
||||
@@ -32,8 +35,9 @@ use common::proto::komp_ac::table_definition::{
|
||||
GetProfileDetailsRequest, GetProfileDetailsResponse, GetTableCatalogRequest,
|
||||
GetTableCatalogResponse, ListColumnTypesResponse, PostTableDefinitionRequest,
|
||||
ProfileTreeResponse, PutTableDefinitionRequest, PutTableDefinitionResponse,
|
||||
SetColumnPresentationRequest, SetColumnPresentationResponse, TableDefinitionResponse,
|
||||
table_definition_client::TableDefinitionClient,
|
||||
SetColumnFormVisibilityRequest, SetColumnFormVisibilityResponse,
|
||||
SetColumnPresentationRequest, SetColumnPresentationResponse,
|
||||
TableDefinitionResponse, table_definition_client::TableDefinitionClient,
|
||||
};
|
||||
use common::proto::komp_ac::table_script::{
|
||||
GetTableScriptsRequest, GetTableScriptsResponse, HydrateScriptDependenciesRequest,
|
||||
@@ -561,6 +565,19 @@ impl GrpcClient {
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn set_column_form_visibility(
|
||||
&mut self,
|
||||
request: SetColumnFormVisibilityRequest,
|
||||
) -> Result<SetColumnFormVisibilityResponse> {
|
||||
let tonic_request = self.authenticated_request(request)?;
|
||||
let response = self
|
||||
.table_definition_client
|
||||
.set_column_form_visibility(tonic_request)
|
||||
.await
|
||||
.context("gRPC SetColumnFormVisibility call failed")?;
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn post_table_script(
|
||||
&mut self,
|
||||
request: PostTableScriptRequest,
|
||||
@@ -941,6 +958,48 @@ impl GrpcClient {
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn list_enabled_typst_templates(
|
||||
&mut self,
|
||||
profile_name: String,
|
||||
) -> Result<ListTypstTemplatesResponse> {
|
||||
let request = self.authenticated_request(ListEnabledTypstTemplatesRequest {
|
||||
profile_name,
|
||||
})?;
|
||||
let response = self
|
||||
.document_data_client
|
||||
.list_enabled_typst_templates(request)
|
||||
.await
|
||||
.context("gRPC ListEnabledTypstTemplates call failed")?;
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn list_typst_templates(
|
||||
&mut self,
|
||||
search: String,
|
||||
limit: u32,
|
||||
) -> Result<ListTypstTemplatesResponse> {
|
||||
let request = self.authenticated_request(ListTypstTemplatesRequest { search, limit })?;
|
||||
let response = self
|
||||
.document_data_client
|
||||
.list_typst_templates(request)
|
||||
.await
|
||||
.context("gRPC ListTypstTemplates call failed")?;
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn register_typst_template(
|
||||
&mut self,
|
||||
request: RegisterTypstTemplateRequest,
|
||||
) -> Result<RegisterTypstTemplateResponse> {
|
||||
let request = self.authenticated_request(request)?;
|
||||
let response = self
|
||||
.document_data_client
|
||||
.register_typst_template(request)
|
||||
.await
|
||||
.context("gRPC RegisterTypstTemplate call failed")?;
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn update_document(
|
||||
&mut self,
|
||||
request: UpdateDocumentRequest,
|
||||
@@ -993,6 +1052,19 @@ impl GrpcClient {
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn get_typst_template_version(
|
||||
&mut self,
|
||||
request: GetTypstTemplateVersionRequest,
|
||||
) -> Result<GetTypstTemplateVersionResponse> {
|
||||
let request = self.authenticated_request(request)?;
|
||||
let response = self
|
||||
.document_data_client
|
||||
.get_typst_template_version(request)
|
||||
.await
|
||||
.context("gRPC GetTypstTemplateVersion call failed")?;
|
||||
Ok(response.into_inner())
|
||||
}
|
||||
|
||||
pub async fn search(
|
||||
&mut self,
|
||||
profile_name: String,
|
||||
|
||||
Reference in New Issue
Block a user