From a29dcdfb296bb1d593b04a8d275d6633f2ced754 Mon Sep 17 00:00:00 2001 From: Rustem Shaydullin Date: Thu, 28 Aug 2025 20:57:14 +0300 Subject: [PATCH 1/6] Get rid of remains of ShopIDs and WalletIDs --- proto/domain.thrift | 8 ++------ proto/merch_stat.thrift | 16 ++++++++-------- proto/payment_processing.thrift | 13 ++++++------- proto/proxy_provider.thrift | 10 +++++----- 4 files changed, 21 insertions(+), 26 deletions(-) diff --git a/proto/domain.thrift b/proto/domain.thrift index 0511d365..ecda616b 100644 --- a/proto/domain.thrift +++ b/proto/domain.thrift @@ -775,8 +775,6 @@ struct PartyContactInfo { /* Shops */ -typedef base.ID ShopID - struct ShopAccount { 1: required CurrencyRef currency 2: required AccountID settlement @@ -2337,11 +2335,9 @@ struct PartyCondition { 2: optional PartyConditionDefinition definition } -typedef base.ID WalletID - union PartyConditionDefinition { - 1: ShopID shop_is - 2: WalletID wallet_is + 1: ShopConfigRef shop_is + 2: WalletConfigRef wallet_is } struct CriterionRef { 1: required ObjectID id } diff --git a/proto/merch_stat.thrift b/proto/merch_stat.thrift index bd18cbd3..833a7b77 100644 --- a/proto/merch_stat.thrift +++ b/proto/merch_stat.thrift @@ -15,8 +15,8 @@ namespace erlang dmsl.merchstat struct StatPayment { 1 : required domain.InvoicePaymentID id 2 : required domain.InvoiceID invoice_id - 3 : required domain.PartyConfigRef owner_id - 4 : required domain.ShopConfigRef shop_id + 3 : required domain.PartyConfigRef party_ref + 4 : required domain.ShopConfigRef shop_ref 5 : required base.Timestamp created_at 6 : required InvoicePaymentStatus status 7 : required domain.Amount amount @@ -160,8 +160,8 @@ struct DigitalWallet { */ struct StatInvoice { 1 : required domain.InvoiceID id - 2 : required domain.PartyConfigRef owner_id - 3 : required domain.ShopConfigRef shop_id + 2 : required domain.PartyConfigRef party_ref + 3 : required domain.ShopConfigRef shop_ref 4 : required base.Timestamp created_at 5 : required InvoiceStatus status 6 : required string product @@ -204,8 +204,8 @@ struct StatRefund { 1 : required domain.InvoicePaymentRefundID id 2 : required domain.InvoicePaymentID payment_id 3 : required domain.InvoiceID invoice_id - 4 : required domain.PartyConfigRef owner_id - 5 : required domain.ShopConfigRef shop_id + 4 : required domain.PartyConfigRef party_ref + 5 : required domain.ShopConfigRef shop_ref 6 : required InvoicePaymentRefundStatus status 7 : required base.Timestamp created_at 8 : required domain.Amount amount @@ -240,8 +240,8 @@ struct StatChargeback { 1: required domain.InvoiceID invoice_id 2: required domain.InvoicePaymentID payment_id 3: required domain.InvoicePaymentChargebackID chargeback_id - 4: required domain.PartyConfigRef party_id - 5: required domain.ShopConfigRef shop_id + 4: required domain.PartyConfigRef party_ref + 5: required domain.ShopConfigRef shop_ref 6: required domain.InvoicePaymentChargebackStatus chargeback_status 7: required base.Timestamp created_at 8: optional domain.InvoicePaymentChargebackReason chargeback_reason diff --git a/proto/payment_processing.thrift b/proto/payment_processing.thrift index 4f39708c..20ff1311 100644 --- a/proto/payment_processing.thrift +++ b/proto/payment_processing.thrift @@ -504,8 +504,8 @@ struct EventRange { typedef domain.InvoiceMutationParams InvoiceMutationParams struct InvoiceParams { - 1: required domain.PartyConfigRef party_id - 2: required domain.ShopConfigRef shop_id + 1: required domain.PartyConfigRef party_ref + 2: required domain.ShopConfigRef shop_ref 3: required domain.InvoiceDetails details 4: required base.Timestamp due 5: required domain.Cash cost @@ -527,8 +527,8 @@ struct InvoiceWithTemplateParams { struct InvoiceTemplateCreateParams { 10: required domain.InvoiceTemplateID template_id - 1: required domain.PartyConfigRef party_id - 2: required domain.ShopConfigRef shop_id + 1: required domain.PartyConfigRef party_ref + 2: required domain.ShopConfigRef shop_ref 4: required domain.LifetimeInterval invoice_lifetime 7: required string product # for backward compatibility 11: optional string name @@ -1488,7 +1488,6 @@ service InvoiceTemplating { // Types -typedef domain.WalletID WalletID typedef domain.PaymentInstitutionRef PaymentInstitutionRef struct Varset { @@ -1496,8 +1495,8 @@ struct Varset { 2: optional domain.CurrencyRef currency 3: optional domain.Cash amount 4: optional domain.PaymentMethodRef payment_method - 5: optional domain.WalletID wallet_id - 6: optional domain.ShopID shop_id + 5: optional domain.WalletConfigRef wallet_ref + 6: optional domain.ShopConfigRef shop_ref 8: optional domain.PaymentTool payment_tool 9: optional domain.PartyConfigRef party_ref 10: optional domain.BinData bin_data diff --git a/proto/proxy_provider.thrift b/proto/proxy_provider.thrift index 1502f577..45e3b80c 100644 --- a/proto/proxy_provider.thrift +++ b/proto/proxy_provider.thrift @@ -139,11 +139,11 @@ struct PaymentInfo { } struct Shop { - 1: required domain.ShopID id - 2: required domain.Category category - 3: required string name - 4: optional string description - 5: required domain.ShopLocation location + 1: required domain.ShopConfigRef ref + 2: required domain.Category category + 3: required string name + 4: optional string description + 5: required domain.ShopLocation location } struct Invoice { From e9dc15e283cf023b86931837c35fc677cfdcad84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC?= Date: Fri, 29 Aug 2025 12:16:41 +0300 Subject: [PATCH 2/6] Revert "Get rid of remains of ShopIDs and WalletIDs" This reverts commit a29dcdfb296bb1d593b04a8d275d6633f2ced754. --- proto/proxy_provider.thrift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proto/proxy_provider.thrift b/proto/proxy_provider.thrift index 45e3b80c..1502f577 100644 --- a/proto/proxy_provider.thrift +++ b/proto/proxy_provider.thrift @@ -139,11 +139,11 @@ struct PaymentInfo { } struct Shop { - 1: required domain.ShopConfigRef ref - 2: required domain.Category category - 3: required string name - 4: optional string description - 5: required domain.ShopLocation location + 1: required domain.ShopID id + 2: required domain.Category category + 3: required string name + 4: optional string description + 5: required domain.ShopLocation location } struct Invoice { From 1e7a2c24abb8a20212e2e70efac60550eaba7361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC?= Date: Fri, 29 Aug 2025 12:17:23 +0300 Subject: [PATCH 3/6] Revert "Get rid of remains of ShopIDs and WalletIDs" This reverts commit a29dcdfb296bb1d593b04a8d275d6633f2ced754. --- proto/payment_processing.thrift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proto/payment_processing.thrift b/proto/payment_processing.thrift index 20ff1311..a1f1d1e2 100644 --- a/proto/payment_processing.thrift +++ b/proto/payment_processing.thrift @@ -1488,6 +1488,7 @@ service InvoiceTemplating { // Types +typedef domain.WalletID WalletID typedef domain.PaymentInstitutionRef PaymentInstitutionRef struct Varset { @@ -1495,8 +1496,8 @@ struct Varset { 2: optional domain.CurrencyRef currency 3: optional domain.Cash amount 4: optional domain.PaymentMethodRef payment_method - 5: optional domain.WalletConfigRef wallet_ref - 6: optional domain.ShopConfigRef shop_ref + 5: optional domain.WalletID wallet_id + 6: optional domain.ShopID shop_id 8: optional domain.PaymentTool payment_tool 9: optional domain.PartyConfigRef party_ref 10: optional domain.BinData bin_data From f01f0e24cb470c957490917dc0c0aa0d3a056484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC?= Date: Fri, 29 Aug 2025 12:20:01 +0300 Subject: [PATCH 4/6] revert refs --- proto/payment_processing.thrift | 6 ++---- proto/proxy_provider.thrift | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/proto/payment_processing.thrift b/proto/payment_processing.thrift index a1f1d1e2..9829baba 100644 --- a/proto/payment_processing.thrift +++ b/proto/payment_processing.thrift @@ -1487,8 +1487,6 @@ service InvoiceTemplating { /* Party management service definitions */ // Types - -typedef domain.WalletID WalletID typedef domain.PaymentInstitutionRef PaymentInstitutionRef struct Varset { @@ -1496,8 +1494,8 @@ struct Varset { 2: optional domain.CurrencyRef currency 3: optional domain.Cash amount 4: optional domain.PaymentMethodRef payment_method - 5: optional domain.WalletID wallet_id - 6: optional domain.ShopID shop_id + 5: optional base.ID wallet_id + 6: optional base.ID shop_id 8: optional domain.PaymentTool payment_tool 9: optional domain.PartyConfigRef party_ref 10: optional domain.BinData bin_data diff --git a/proto/proxy_provider.thrift b/proto/proxy_provider.thrift index 1502f577..7a44af9a 100644 --- a/proto/proxy_provider.thrift +++ b/proto/proxy_provider.thrift @@ -139,7 +139,7 @@ struct PaymentInfo { } struct Shop { - 1: required domain.ShopID id + 1: required base.ID id 2: required domain.Category category 3: required string name 4: optional string description From 9f11ebdb6c0da24ded0107d81f77bf5ec76fbd02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D1=80=D1=82=D0=B5=D0=BC?= Date: Fri, 29 Aug 2025 12:32:55 +0300 Subject: [PATCH 5/6] returned refs --- proto/payment_processing.thrift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/payment_processing.thrift b/proto/payment_processing.thrift index 9829baba..15db75b9 100644 --- a/proto/payment_processing.thrift +++ b/proto/payment_processing.thrift @@ -1494,8 +1494,8 @@ struct Varset { 2: optional domain.CurrencyRef currency 3: optional domain.Cash amount 4: optional domain.PaymentMethodRef payment_method - 5: optional base.ID wallet_id - 6: optional base.ID shop_id + 5: optional domain.WalletConfigRef wallet_ref + 6: optional domain.ShopConfigRef shop_ref 8: optional domain.PaymentTool payment_tool 9: optional domain.PartyConfigRef party_ref 10: optional domain.BinData bin_data From d5a851bf5a4999f50d69663eca9f07bcfe4e3915 Mon Sep 17 00:00:00 2001 From: Rustem Shaydullin Date: Mon, 22 Sep 2025 16:23:37 +0300 Subject: [PATCH 6/6] Revert shop in proxy provider --- proto/proxy_provider.thrift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/proto/proxy_provider.thrift b/proto/proxy_provider.thrift index 45e3b80c..1502f577 100644 --- a/proto/proxy_provider.thrift +++ b/proto/proxy_provider.thrift @@ -139,11 +139,11 @@ struct PaymentInfo { } struct Shop { - 1: required domain.ShopConfigRef ref - 2: required domain.Category category - 3: required string name - 4: optional string description - 5: required domain.ShopLocation location + 1: required domain.ShopID id + 2: required domain.Category category + 3: required string name + 4: optional string description + 5: required domain.ShopLocation location } struct Invoice {