accounts are strings in the client side

This commit is contained in:
Priec
2026-08-08 20:30:57 +02:00
parent 7db328ca2b
commit a7b8d2021a
10 changed files with 69 additions and 81 deletions

View File

@@ -3,8 +3,9 @@
pub struct EnsureAccountRequest {
#[prost(string, tag = "1")]
pub profile_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "2")]
pub segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Slash-delimited root-to-leaf account path, for example "123/12/1".
#[prost(string, tag = "2")]
pub account: ::prost::alloc::string::String,
/// Currency accepted by source postings to the leaf account. Empty uses the
/// profile accounting currency. Missing ancestors are created in the profile
/// accounting currency.
@@ -19,10 +20,9 @@ pub struct Account {
pub parent_account_id: ::core::option::Option<i64>,
#[prost(string, tag = "3")]
pub segment: ::prost::alloc::string::String,
/// Root-to-leaf path of this account. Same shape as the request that created
/// it; the server never joins segments into a delimited code.
#[prost(string, repeated, tag = "4")]
pub segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Slash-delimited root-to-leaf account path.
#[prost(string, tag = "4")]
pub account: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub denomination_currency: ::prost::alloc::string::String,
}
@@ -68,10 +68,9 @@ pub struct PostJournalRequest {
pub struct JournalLineInput {
#[prost(enumeration = "JournalSide", tag = "1")]
pub side: i32,
/// Parsed account path segments. The client owns presentation parsing; the
/// server accepts no delimiter-encoded account string.
#[prost(string, repeated, tag = "2")]
pub account_segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Slash-delimited root-to-leaf account path.
#[prost(string, tag = "2")]
pub account: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
@@ -238,9 +237,9 @@ pub struct JournalLine {
pub line_number: i32,
#[prost(enumeration = "JournalSide", tag = "3")]
pub side: i32,
/// Root-to-leaf path of the posted account, as sent on JournalLineInput.
#[prost(string, repeated, tag = "4")]
pub account_segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Slash-delimited root-to-leaf path of the posted account.
#[prost(string, tag = "4")]
pub account: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub amount: ::prost::alloc::string::String,
#[prost(string, tag = "6")]
@@ -386,9 +385,9 @@ pub struct ListPeriodBalancesRequest {
pub struct PeriodBalance {
#[prost(int64, tag = "1")]
pub period_id: i64,
/// Root-to-leaf path of the account this frozen balance belongs to.
#[prost(string, repeated, tag = "2")]
pub account_segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
/// Slash-delimited root-to-leaf path of this frozen balance's account.
#[prost(string, tag = "2")]
pub account: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub currency: ::prost::alloc::string::String,
/// Signed nets use debit-positive convention.
@@ -407,8 +406,8 @@ pub struct PeriodDenominationBalance {
pub period_id: i64,
/// Exact denominated account. Unlike book balances, this quantity is not
/// rolled up into parent accounts with a different denomination.
#[prost(string, repeated, tag = "2")]
pub account_segments: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
#[prost(string, tag = "2")]
pub account: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub denomination_currency: ::prost::alloc::string::String,
/// Signed nets use debit-positive convention and remain in the denomination
@@ -453,23 +452,17 @@ pub struct MapOpeningBalanceAccountRequest {
/// previous_period_id identifies the source profile and period.
#[prost(int64, tag = "1")]
pub target_period_id: i64,
#[prost(string, repeated, tag = "2")]
pub source_account_segments: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, repeated, tag = "3")]
pub target_account_segments: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, tag = "2")]
pub source_account: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub target_account: ::prost::alloc::string::String,
}
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnmapOpeningBalanceAccountRequest {
#[prost(int64, tag = "1")]
pub target_period_id: i64,
#[prost(string, repeated, tag = "2")]
pub target_account_segments: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, tag = "2")]
pub target_account: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct UnmapOpeningBalanceAccountResponse {
@@ -489,16 +482,12 @@ pub struct OpeningBalanceAccountMapping {
pub source_period_id: i64,
#[prost(string, tag = "3")]
pub source_profile_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "4")]
pub source_account_segments: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, tag = "4")]
pub source_account: ::prost::alloc::string::String,
#[prost(string, tag = "5")]
pub target_profile_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "6")]
pub target_account_segments: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, tag = "6")]
pub target_account: ::prost::alloc::string::String,
#[prost(string, tag = "7")]
pub currency: ::prost::alloc::string::String,
/// Signed balances use the debit-positive convention.
@@ -536,10 +525,8 @@ pub struct UnmappedSourceBalance {
pub source_period_id: i64,
#[prost(string, tag = "2")]
pub source_profile_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub source_account_segments: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, tag = "3")]
pub source_account: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub currency: ::prost::alloc::string::String,
/// Signed portion not covered by a mapping, using the debit-positive
@@ -556,10 +543,8 @@ pub struct UnmappedSourceDenominationBalance {
pub source_period_id: i64,
#[prost(string, tag = "2")]
pub source_profile_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub source_account_segments: ::prost::alloc::vec::Vec<
::prost::alloc::string::String,
>,
#[prost(string, tag = "3")]
pub source_account: ::prost::alloc::string::String,
#[prost(string, tag = "4")]
pub denomination_currency: ::prost::alloc::string::String,
/// Exact foreign-currency quantity that no mapping carries forward.