using unified system

This commit is contained in:
Filipriec
2026-08-30 07:49:19 +02:00
parent 80d61760a2
commit 408187cb57
30 changed files with 2754 additions and 225 deletions

View File

@@ -1,4 +1,5 @@
// This file is @generated by prost-build.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct EnsureAccountRequest {
#[prost(string, tag = "1")]
@@ -12,6 +13,7 @@ pub struct EnsureAccountRequest {
#[prost(string, tag = "3")]
pub denomination_currency: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct Account {
#[prost(int64, tag = "1")]
@@ -26,6 +28,7 @@ pub struct Account {
#[prost(string, tag = "5")]
pub denomination_currency: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PostJournalRequest {
#[prost(string, tag = "1")]
@@ -57,6 +60,7 @@ pub struct PostJournalRequest {
#[prost(string, tag = "7")]
pub accounting_date: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct JournalLineInput {
#[prost(enumeration = "JournalSide", tag = "1")]
@@ -75,6 +79,7 @@ pub struct JournalLineInput {
super::exchange_rates::ExchangeRateSelection,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CloseJournalRequest {
#[prost(string, tag = "1")]
@@ -82,6 +87,7 @@ pub struct CloseJournalRequest {
#[prost(int64, tag = "2")]
pub journal_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReopenJournalRequest {
#[prost(string, tag = "1")]
@@ -89,6 +95,7 @@ pub struct ReopenJournalRequest {
#[prost(int64, tag = "2")]
pub journal_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetJournalRequest {
#[prost(string, tag = "1")]
@@ -100,11 +107,13 @@ pub struct GetJournalRequest {
#[prost(bool, tag = "3")]
pub include_deleted: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAccountingStatusRequest {
#[prost(string, tag = "1")]
pub profile_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SearchJournalsRequest {
#[prost(string, tag = "1")]
@@ -119,6 +128,7 @@ pub struct SearchJournalsRequest {
#[prost(string, tag = "4")]
pub page_token: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct JournalSummary {
#[prost(int64, tag = "1")]
@@ -144,6 +154,7 @@ pub struct JournalSummary {
#[prost(string, tag = "11")]
pub accounting_date: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchJournalsResponse {
#[prost(message, repeated, tag = "1")]
@@ -153,6 +164,7 @@ pub struct SearchJournalsResponse {
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountingStatus {
#[prost(bool, tag = "1")]
@@ -166,6 +178,7 @@ pub struct AccountingStatus {
#[prost(string, tag = "5")]
pub calculated_at: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListUnbalancedJournalsRequest {
#[prost(string, tag = "1")]
@@ -181,6 +194,7 @@ pub struct ListUnbalancedJournalsRequest {
#[prost(string, tag = "4")]
pub currency: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnbalancedJournalSummary {
#[prost(int64, tag = "1")]
@@ -210,6 +224,7 @@ pub struct UnbalancedJournalSummary {
#[prost(string, tag = "12")]
pub accounting_date: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListUnbalancedJournalsResponse {
#[prost(message, repeated, tag = "1")]
@@ -219,6 +234,7 @@ pub struct ListUnbalancedJournalsResponse {
#[prost(string, tag = "3")]
pub next_page_token: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct SoftDeleteJournalLineRequest {
#[prost(string, tag = "1")]
@@ -228,6 +244,7 @@ pub struct SoftDeleteJournalLineRequest {
#[prost(int64, tag = "3")]
pub journal_line_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CorrectJournalRequest {
#[prost(string, tag = "1")]
@@ -239,6 +256,7 @@ pub struct CorrectJournalRequest {
#[prost(message, repeated, tag = "3")]
pub corrections: ::prost::alloc::vec::Vec<JournalLineCorrection>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct JournalLineCorrection {
#[prost(int64, tag = "1")]
@@ -253,6 +271,7 @@ pub struct JournalLineCorrection {
#[prost(string, tag = "4")]
pub correction_reason: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct JournalLine {
#[prost(int64, tag = "1")]
@@ -296,6 +315,7 @@ pub struct JournalLine {
#[prost(int64, tag = "18")]
pub conversion_evidence_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Journal {
#[prost(int64, tag = "1")]
@@ -328,6 +348,7 @@ pub struct Journal {
#[prost(string, tag = "14")]
pub accounting_date: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ConfigureAccountingPeriodRequest {
#[prost(string, tag = "1")]
@@ -346,27 +367,32 @@ pub struct ConfigureAccountingPeriodRequest {
#[prost(string, tag = "6")]
pub period_end: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CloseAccountingPeriodRequest {
#[prost(int64, tag = "1")]
pub period_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ReopenAccountingPeriodRequest {
#[prost(int64, tag = "1")]
pub period_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ApproveProfileRequest {
#[prost(string, tag = "1")]
pub profile_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetProfileApprovalRequest {
#[prost(string, tag = "1")]
pub profile_name: ::prost::alloc::string::String,
}
/// Approval state of one profile's financial statement.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ProfileApproval {
#[prost(string, tag = "1")]
@@ -379,21 +405,25 @@ pub struct ProfileApproval {
#[prost(string, tag = "4")]
pub approved_by_user_id: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GetAccountingPeriodRequest {
#[prost(int64, tag = "1")]
pub period_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListAccountingPeriodsRequest {
#[prost(string, tag = "1")]
pub profile_name: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAccountingPeriodsResponse {
#[prost(message, repeated, tag = "1")]
pub periods: ::prost::alloc::vec::Vec<AccountingPeriod>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct AccountingPeriod {
#[prost(int64, tag = "1")]
@@ -415,11 +445,13 @@ pub struct AccountingPeriod {
#[prost(enumeration = "AccountingPeriodType", tag = "11")]
pub period_type: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListPeriodBalancesRequest {
#[prost(int64, tag = "1")]
pub period_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PeriodBalance {
#[prost(int64, tag = "1")]
@@ -439,6 +471,7 @@ pub struct PeriodBalance {
#[prost(string, tag = "7")]
pub closing_balance: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct PeriodDenominationBalance {
#[prost(int64, tag = "1")]
@@ -460,6 +493,7 @@ pub struct PeriodDenominationBalance {
#[prost(string, tag = "7")]
pub closing_quantity: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListPeriodBalancesResponse {
#[prost(message, repeated, tag = "1")]
@@ -467,6 +501,7 @@ pub struct ListPeriodBalancesResponse {
#[prost(message, repeated, tag = "2")]
pub denomination_balances: ::prost::alloc::vec::Vec<PeriodDenominationBalance>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenerateAccountingTransferRequest {
#[prost(string, tag = "1")]
@@ -478,6 +513,7 @@ pub struct GenerateAccountingTransferRequest {
#[prost(int64, tag = "4")]
pub target_period_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct GenerateAccountingTransferResponse {
#[prost(int64, tag = "1")]
@@ -485,6 +521,7 @@ pub struct GenerateAccountingTransferResponse {
#[prost(int64, tag = "2")]
pub generated_row_count: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct MapOpeningBalanceAccountRequest {
/// Open period whose profile receives the opening balance. Its configured
@@ -496,6 +533,7 @@ pub struct MapOpeningBalanceAccountRequest {
#[prost(string, tag = "3")]
pub target_account: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnmapOpeningBalanceAccountRequest {
#[prost(int64, tag = "1")]
@@ -503,16 +541,19 @@ pub struct UnmapOpeningBalanceAccountRequest {
#[prost(string, tag = "2")]
pub target_account: ::prost::alloc::string::String,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnmapOpeningBalanceAccountResponse {
#[prost(bool, tag = "1")]
pub removed: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ListOpeningBalanceAccountsRequest {
#[prost(int64, tag = "1")]
pub target_period_id: i64,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct OpeningBalanceAccountMapping {
#[prost(int64, tag = "1")]
@@ -558,6 +599,7 @@ pub struct OpeningBalanceAccountMapping {
/// A portion of a predecessor account's value that no mapping carries into the
/// target period. Closing the target period drops this value, so each entry must
/// either be covered by a broader mapping or deliberately closed out.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnmappedSourceBalance {
#[prost(int64, tag = "1")]
@@ -576,6 +618,7 @@ pub struct UnmappedSourceBalance {
#[prost(enumeration = "OpeningBalanceStatus", tag = "6")]
pub status: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnmappedSourceDenominationBalance {
#[prost(int64, tag = "1")]
@@ -592,6 +635,7 @@ pub struct UnmappedSourceDenominationBalance {
#[prost(enumeration = "OpeningBalanceStatus", tag = "6")]
pub status: i32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListOpeningBalanceAccountsResponse {
#[prost(message, repeated, tag = "1")]
@@ -607,6 +651,7 @@ pub struct ListOpeningBalanceAccountsResponse {
UnmappedSourceDenominationBalance,
>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum JournalSide {
@@ -638,6 +683,7 @@ impl JournalSide {
}
/// A period is only ever open or closed. Approval is a fact about the whole
/// profile, because the profile is the accounting period being reported on.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AccountingPeriodStatus {
@@ -670,6 +716,7 @@ impl AccountingPeriodStatus {
/// How long one accounting period lasts. MONTH and YEAR span whole months, so
/// the caller states only the start and the end is derived. PARTIAL is the
/// exception for periods real life cut short.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AccountingPeriodType {
@@ -707,6 +754,7 @@ impl AccountingPeriodType {
}
}
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum OpeningBalanceStatus {