implement client grid and typst on the backend
This commit is contained in:
@@ -23,6 +23,10 @@ service TableDefinition {
|
||||
// by the user; templates do not provision tables merely by existing.
|
||||
rpc CreateInvoiceTemplateTable(CreateInvoiceTemplateTableRequest) returns (CreateInvoiceTemplateTableResponse);
|
||||
|
||||
// Applies the administrator-reviewed, explicitly typed table bundle and
|
||||
// exact komp_ac_fields bindings for an imported Typst template.
|
||||
rpc ApplyInvoiceTemplateTable(ApplyInvoiceTemplateTableRequest) returns (CreateInvoiceTemplateTableResponse);
|
||||
|
||||
// Appends new user-defined columns to an existing table.
|
||||
// Existing columns, links, and table logic are never changed by this call.
|
||||
rpc AddTableColumns(AddTableColumnsRequest) returns (TableDefinitionResponse);
|
||||
@@ -170,6 +174,46 @@ message CreateInvoiceTemplateTableRequest {
|
||||
repeated string row_display_columns = 3;
|
||||
}
|
||||
|
||||
message ApplyInvoiceTemplateTableRequest {
|
||||
string profile_name = 1;
|
||||
string template_name = 2;
|
||||
repeated InvoiceTemplateTableDefinition tables = 3;
|
||||
repeated InvoiceTemplateFieldBinding field_bindings = 4;
|
||||
|
||||
// The immutable version whose komp_ac_fields the administrator mapped.
|
||||
// Applying never silently switches to a newer version with a different
|
||||
// contract between inspection and submission.
|
||||
int64 template_version_id = 5;
|
||||
}
|
||||
|
||||
// One administrator-designed table in the template input bundle. The empty
|
||||
// collection_path is the root; a path ending in [] owns that repeated scope.
|
||||
// The nested table definition retains every normal table option, including
|
||||
// ACCOUNTING, generated aliases, ledgers, indexes, links and display columns.
|
||||
message InvoiceTemplateTableDefinition {
|
||||
string collection_path = 1;
|
||||
PostTableDefinitionRequest definition = 2;
|
||||
}
|
||||
|
||||
enum InvoiceTemplateAccountingRole {
|
||||
INVOICE_TEMPLATE_ACCOUNTING_ROLE_UNSPECIFIED = 0;
|
||||
INVOICE_TEMPLATE_ACCOUNTING_NAME = 1;
|
||||
INVOICE_TEMPLATE_ACCOUNTING_TAX_POINT_DATE = 2;
|
||||
INVOICE_TEMPLATE_ACCOUNTING_ACCOUNT = 3;
|
||||
INVOICE_TEMPLATE_ACCOUNTING_DEBIT = 4;
|
||||
INVOICE_TEMPLATE_ACCOUNTING_CREDIT = 5;
|
||||
}
|
||||
|
||||
// Maps one path from komp_ac_fields to one table column. A regular binding
|
||||
// names a declared column. An accounting binding names a semantic generated
|
||||
// role, so aliases and the order of Typst fields cannot change its meaning.
|
||||
message InvoiceTemplateFieldBinding {
|
||||
string field_path = 1;
|
||||
string collection_path = 2;
|
||||
string column_name = 3;
|
||||
InvoiceTemplateAccountingRole accounting_role = 4;
|
||||
}
|
||||
|
||||
// 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
|
||||
// collection and the generated table that owns those repeated rows.
|
||||
@@ -184,6 +228,7 @@ message GeneratedInvoiceTemplateTable {
|
||||
message CreateInvoiceTemplateTableResponse {
|
||||
bool success = 1;
|
||||
repeated GeneratedInvoiceTemplateTable tables = 2;
|
||||
int64 template_version_id = 3;
|
||||
}
|
||||
|
||||
// Defines append-only column additions for an existing table.
|
||||
|
||||
Reference in New Issue
Block a user