invoice + some table name thing

This commit is contained in:
Priec
2026-09-02 12:03:12 +02:00
parent 56a1e855f5
commit 8acc8867ac
7 changed files with 42 additions and 4 deletions

View File

@@ -129,6 +129,16 @@ message TypstTemplateVersion {
string created_at = 8; string created_at = 8;
string input_table_name = 9; string input_table_name = 9;
repeated string field_paths = 10; repeated string field_paths = 10;
repeated TypstTemplateFieldBinding field_bindings = 11;
}
// One profile-specific source mapping for an enabled template version.
message TypstTemplateFieldBinding {
string field_path = 1;
string collection_path = 2;
string column_name = 3;
string source_table_name = 4;
string source_column_name = 5;
} }
message GetTypstTemplateVersionResponse { message GetTypstTemplateVersionResponse {

View File

@@ -216,6 +216,11 @@ message InvoiceTemplateFieldBinding {
string collection_path = 2; string collection_path = 2;
string column_name = 3; string column_name = 3;
InvoiceTemplateAccountingRole accounting_role = 4; InvoiceTemplateAccountingRole accounting_role = 4;
// Optional source reached through column_name when that column is a LINK.
// Both names are empty for a value stored directly on the invoice table.
string source_table_name = 5;
string source_column_name = 6;
} }
// One physical dynamic table created for an invoice template scope. The root // One physical dynamic table created for an invoice template scope. The root

Binary file not shown.

View File

@@ -36,7 +36,7 @@ pub struct RegisterTypstTemplateRequest {
pub typst_compiler_version: ::prost::alloc::string::String, pub typst_compiler_version: ::prost::alloc::string::String,
} }
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterTypstTemplateResponse { pub struct RegisterTypstTemplateResponse {
#[prost(message, optional, tag = "1")] #[prost(message, optional, tag = "1")]
pub template_version: ::core::option::Option<TypstTemplateVersion>, pub template_version: ::core::option::Option<TypstTemplateVersion>,
@@ -174,7 +174,7 @@ pub struct GetTypstTemplateVersionRequest {
pub document_id: i64, pub document_id: i64,
} }
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct TypstTemplateVersion { pub struct TypstTemplateVersion {
#[prost(int64, tag = "1")] #[prost(int64, tag = "1")]
pub id: i64, pub id: i64,
@@ -196,9 +196,26 @@ pub struct TypstTemplateVersion {
pub input_table_name: ::prost::alloc::string::String, pub input_table_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "10")] #[prost(string, repeated, tag = "10")]
pub field_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, pub field_paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(message, repeated, tag = "11")]
pub field_bindings: ::prost::alloc::vec::Vec<TypstTemplateFieldBinding>,
} }
/// One profile-specific source mapping for an enabled template version.
#[derive(serde::Serialize, serde::Deserialize)] #[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct TypstTemplateFieldBinding {
#[prost(string, tag = "1")]
pub field_path: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub collection_path: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub column_name: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub source_table_name: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub source_column_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetTypstTemplateVersionResponse { pub struct GetTypstTemplateVersionResponse {
#[prost(message, optional, tag = "1")] #[prost(message, optional, tag = "1")]
pub template_version: ::core::option::Option<TypstTemplateVersion>, pub template_version: ::core::option::Option<TypstTemplateVersion>,

View File

@@ -157,6 +157,12 @@ pub struct InvoiceTemplateFieldBinding {
pub column_name: ::prost::alloc::string::String, pub column_name: ::prost::alloc::string::String,
#[prost(enumeration = "InvoiceTemplateAccountingRole", tag = "4")] #[prost(enumeration = "InvoiceTemplateAccountingRole", tag = "4")]
pub accounting_role: i32, pub accounting_role: i32,
/// Optional source reached through column_name when that column is a LINK.
/// Both names are empty for a value stored directly on the invoice table.
#[prost(string, tag = "5")]
pub source_table_name: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
pub source_column_name: ::prost::alloc::string::String,
} }
/// One physical dynamic table created for an invoice template scope. The root /// One physical dynamic table created for an invoice template scope. The root
/// has an empty collection_path and parent_table_name. Each \[\] scope names its /// has an empty collection_path and parent_table_name. Each \[\] scope names its

2
server

Submodule server updated: c37f2f902c...b9e560b185