From c774c2ab673030e311188050ff27a6bb6c4b68ed Mon Sep 17 00:00:00 2001 From: Prasunna Soppa Date: Thu, 14 Nov 2024 16:46:47 +0530 Subject: [PATCH 1/7] add call_back_mapper table --- .vscode/launch.json | 1164 +++++++++++++++++ crates/diesel_models/src/call_back_mapper.rs | 28 + crates/diesel_models/src/lib.rs | 1 + crates/diesel_models/src/query.rs | 1 + .../src/query/call_back_mapper.rs | 30 + crates/diesel_models/src/schema.rs | 17 + crates/router/src/db.rs | 1 + crates/router/src/db/call_back_mapper.rs | 53 + crates/router/src/types/storage.rs | 3 +- .../src/types/storage/call_back_mapper.rs | 1 + .../down.sql | 2 + .../up.sql | 8 + 12 files changed, 1308 insertions(+), 1 deletion(-) create mode 100644 .vscode/launch.json create mode 100644 crates/diesel_models/src/call_back_mapper.rs create mode 100644 crates/diesel_models/src/query/call_back_mapper.rs create mode 100644 crates/router/src/db/call_back_mapper.rs create mode 100644 crates/router/src/types/storage/call_back_mapper.rs create mode 100644 migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql create mode 100644 migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..f9d240c2e4c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,1164 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'analytics'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=analytics" + ], + "filter": { + "name": "analytics", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'api_models'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=api_models" + ], + "filter": { + "name": "api_models", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'cards'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=cards" + ], + "filter": { + "name": "cards", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'basic'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=basic", + "--package=cards" + ], + "filter": { + "name": "basic", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'common_utils'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=common_utils" + ], + "filter": { + "name": "common_utils", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'percentage'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=percentage", + "--package=common_utils" + ], + "filter": { + "name": "percentage", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'common_enums'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=common_enums" + ], + "filter": { + "name": "common_enums", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'masking'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=masking" + ], + "filter": { + "name": "masking", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'basic'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=basic", + "--package=masking" + ], + "filter": { + "name": "basic", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'router_env'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=router_env" + ], + "filter": { + "name": "router_env", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'env'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=env", + "--package=router_env" + ], + "filter": { + "name": "env", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'logger'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=logger", + "--package=router_env" + ], + "filter": { + "name": "logger", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'euclid'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=euclid" + ], + "filter": { + "name": "euclid", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug benchmark 'backends'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bench=backends", + "--package=euclid" + ], + "filter": { + "name": "backends", + "kind": "bench" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'hyperswitch_constraint_graph'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=hyperswitch_constraint_graph" + ], + "filter": { + "name": "hyperswitch_constraint_graph", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'diesel_models'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=diesel_models" + ], + "filter": { + "name": "diesel_models", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'hyperswitch_domain_models'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=hyperswitch_domain_models" + ], + "filter": { + "name": "hyperswitch_domain_models", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'hyperswitch_interfaces'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=hyperswitch_interfaces" + ], + "filter": { + "name": "hyperswitch_interfaces", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'storage_impl'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=storage_impl" + ], + "filter": { + "name": "storage_impl", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'redis_interface'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=redis_interface" + ], + "filter": { + "name": "redis_interface", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'config_importer'", + "cargo": { + "args": [ + "build", + "--bin=config_importer", + "--package=config_importer" + ], + "filter": { + "name": "config_importer", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'config_importer'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=config_importer", + "--package=config_importer" + ], + "filter": { + "name": "config_importer", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'connector_configs'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=connector_configs" + ], + "filter": { + "name": "connector_configs", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'currency_conversion'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=currency_conversion" + ], + "filter": { + "name": "currency_conversion", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'drainer'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=drainer" + ], + "filter": { + "name": "drainer", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'drainer'", + "cargo": { + "args": [ + "build", + "--bin=drainer", + "--package=drainer" + ], + "filter": { + "name": "drainer", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'drainer'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=drainer", + "--package=drainer" + ], + "filter": { + "name": "drainer", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'external_services'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=external_services" + ], + "filter": { + "name": "external_services", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'kgraph_utils'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=kgraph_utils" + ], + "filter": { + "name": "kgraph_utils", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug benchmark 'evaluation'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bench=evaluation", + "--package=kgraph_utils" + ], + "filter": { + "name": "evaluation", + "kind": "bench" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'events'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=events" + ], + "filter": { + "name": "events", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'hsdev'", + "cargo": { + "args": [ + "build", + "--bin=hsdev", + "--package=hsdev" + ], + "filter": { + "name": "hsdev", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'hsdev'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=hsdev", + "--package=hsdev" + ], + "filter": { + "name": "hsdev", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'hyperswitch_connectors'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=hyperswitch_connectors" + ], + "filter": { + "name": "hyperswitch_connectors", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'openapi'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=openapi" + ], + "filter": { + "name": "openapi", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'openapi'", + "cargo": { + "args": [ + "build", + "--bin=openapi", + "--package=openapi" + ], + "filter": { + "name": "openapi", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'openapi'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=openapi", + "--package=openapi" + ], + "filter": { + "name": "openapi", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'pm_auth'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=pm_auth" + ], + "filter": { + "name": "pm_auth", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'router'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=router" + ], + "filter": { + "name": "router", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'router'", + "cargo": { + "args": [ + "build", + "--bin=router", + "--package=router" + ], + "filter": { + "name": "router", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}", + "env":{ + "RUST_MIN_STACK": "10388608" + } + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'router'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=router", + "--package=router" + ], + "filter": { + "name": "router", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'scheduler'", + "cargo": { + "args": [ + "build", + "--bin=scheduler", + "--package=router" + ], + "filter": { + "name": "scheduler", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'scheduler'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=scheduler", + "--package=router" + ], + "filter": { + "name": "scheduler", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'cache'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=cache", + "--package=router" + ], + "filter": { + "name": "cache", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'connectors'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=connectors", + "--package=router" + ], + "filter": { + "name": "connectors", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'customers'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=customers", + "--package=router" + ], + "filter": { + "name": "customers", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'health_check'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=health_check", + "--package=router" + ], + "filter": { + "name": "health_check", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'integration_demo'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=integration_demo", + "--package=router" + ], + "filter": { + "name": "integration_demo", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'macros'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=macros", + "--package=router" + ], + "filter": { + "name": "macros", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'payments'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=payments", + "--package=router" + ], + "filter": { + "name": "payments", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'payments2'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=payments2", + "--package=router" + ], + "filter": { + "name": "payments2", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'payouts'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=payouts", + "--package=router" + ], + "filter": { + "name": "payouts", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'refunds'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=refunds", + "--package=router" + ], + "filter": { + "name": "refunds", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'services'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=services", + "--package=router" + ], + "filter": { + "name": "services", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'utils'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=utils", + "--package=router" + ], + "filter": { + "name": "utils", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'webhooks'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=webhooks", + "--package=router" + ], + "filter": { + "name": "webhooks", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'scheduler'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=scheduler" + ], + "filter": { + "name": "scheduler", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in library 'test_utils'", + "cargo": { + "args": [ + "test", + "--no-run", + "--lib", + "--package=test_utils" + ], + "filter": { + "name": "test_utils", + "kind": "lib" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug executable 'test_utils'", + "cargo": { + "args": [ + "build", + "--bin=test_utils", + "--package=test_utils" + ], + "filter": { + "name": "test_utils", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug unit tests in executable 'test_utils'", + "cargo": { + "args": [ + "test", + "--no-run", + "--bin=test_utils", + "--package=test_utils" + ], + "filter": { + "name": "test_utils", + "kind": "bin" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + }, + { + "type": "lldb", + "request": "launch", + "name": "Debug integration test 'connectors'", + "cargo": { + "args": [ + "test", + "--no-run", + "--test=connectors", + "--package=test_utils" + ], + "filter": { + "name": "connectors", + "kind": "test" + } + }, + "args": [], + "cwd": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/crates/diesel_models/src/call_back_mapper.rs b/crates/diesel_models/src/call_back_mapper.rs new file mode 100644 index 00000000000..10e7f264cf8 --- /dev/null +++ b/crates/diesel_models/src/call_back_mapper.rs @@ -0,0 +1,28 @@ +use diesel::{ Identifiable, Insertable, Queryable, Selectable}; +use serde::{self, Deserialize, Serialize}; +use serde_json; + +use crate::schema::call_back_mapper; + +#[derive( + Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize, +)] +#[diesel(table_name = call_back_mapper, primary_key(id), check_for_backend(diesel::pg::Pg))] + +pub struct CallBackMapper { + pub id: String, + #[serde(rename = "type")] + pub id_type: String, + pub data: serde_json::Value, + pub created_at: time::PrimitiveDateTime, + pub last_modified_at: time::PrimitiveDateTime, +} + +#[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Insertable)] +#[diesel(table_name = call_back_mapper)] +pub struct CallBackMapperNew{ + pub id: String, + #[serde(rename = "type")] + pub id_type: String, + pub data: serde_json::Value, +} \ No newline at end of file diff --git a/crates/diesel_models/src/lib.rs b/crates/diesel_models/src/lib.rs index c7a3818d5fe..a444567cd13 100644 --- a/crates/diesel_models/src/lib.rs +++ b/crates/diesel_models/src/lib.rs @@ -43,6 +43,7 @@ pub mod role; pub mod routing_algorithm; pub mod types; pub mod unified_translations; +pub mod call_back_mapper; #[allow(unused_qualifications)] pub mod schema; diff --git a/crates/diesel_models/src/query.rs b/crates/diesel_models/src/query.rs index f966e90acba..4d2f38e1637 100644 --- a/crates/diesel_models/src/query.rs +++ b/crates/diesel_models/src/query.rs @@ -41,3 +41,4 @@ pub mod user; pub mod user_authentication_method; pub mod user_key_store; pub mod user_role; +pub mod call_back_mapper; \ No newline at end of file diff --git a/crates/diesel_models/src/query/call_back_mapper.rs b/crates/diesel_models/src/query/call_back_mapper.rs new file mode 100644 index 00000000000..fc4ce5c324f --- /dev/null +++ b/crates/diesel_models/src/query/call_back_mapper.rs @@ -0,0 +1,30 @@ +use diesel::{associations::HasTable, ExpressionMethods}; + +use super::generics; +use crate::{ + call_back_mapper::{ + CallBackMapper, CallBackMapperNew, + }, + schema::call_back_mapper::dsl, + PgPooledConn, StorageResult, +}; + +impl CallBackMapperNew{ + pub async fn insert(self, conn: &PgPooledConn) -> StorageResult { + generics::generic_insert(conn, self).await + } +} + +impl CallBackMapper{ + pub async fn find_by_id( + conn: &PgPooledConn, + id: String, + ) -> StorageResult { + generics::generic_find_one::<::Table, _, _>( + conn, + dsl::id + .eq(id.to_owned()) + ) + .await + } +} \ No newline at end of file diff --git a/crates/diesel_models/src/schema.rs b/crates/diesel_models/src/schema.rs index 782d7f50eac..58c3b47591b 100644 --- a/crates/diesel_models/src/schema.rs +++ b/crates/diesel_models/src/schema.rs @@ -216,6 +216,22 @@ diesel::table! { } } +diesel::table! { + use diesel::sql_types::*; + use crate::enums::diesel_exports::*; + + call_back_mapper (id) { + #[max_length = 128] + id -> Varchar, + #[sql_name = "type"] + #[max_length = 64] + id_type -> Varchar, + data -> Jsonb, + created_at -> Timestamp, + last_modified_at -> Timestamp, + } +} + diesel::table! { use diesel::sql_types::*; use crate::enums::diesel_exports::*; @@ -1379,6 +1395,7 @@ diesel::allow_tables_to_appear_in_same_query!( blocklist_fingerprint, blocklist_lookup, business_profile, + call_back_mapper, captures, cards_info, configs, diff --git a/crates/router/src/db.rs b/crates/router/src/db.rs index de0c6282fc2..c9120e41d32 100644 --- a/crates/router/src/db.rs +++ b/crates/router/src/db.rs @@ -37,6 +37,7 @@ pub mod user; pub mod user_authentication_method; pub mod user_key_store; pub mod user_role; +pub mod call_back_mapper; use common_utils::id_type; use diesel_models::{ fraud_check::{FraudCheck, FraudCheckUpdate}, diff --git a/crates/router/src/db/call_back_mapper.rs b/crates/router/src/db/call_back_mapper.rs new file mode 100644 index 00000000000..2ef2f08c1f8 --- /dev/null +++ b/crates/router/src/db/call_back_mapper.rs @@ -0,0 +1,53 @@ +use error_stack::report; +// use diesel_models::call_back_mapper; +use router_env::{instrument, tracing}; + +use super::Store; +use crate::{ + connection, + core::errors::{self, CustomResult}, + types::storage, +}; + +#[async_trait::async_trait] +pub trait CallBackMapperInterface { + async fn insert_call_back_mapper( + &self, + call_back_mapper: storage::CallBackMapperNew, + ) -> CustomResult; + + async fn find_call_back_mapper_by_id( + &self, + id: String, + ) -> CustomResult; +} + +#[async_trait::async_trait] +impl CallBackMapperInterface for Store { + #[instrument(skip_all)] + async fn insert_call_back_mapper( + &self, + call_back_mapper: storage::CallBackMapperNew, + ) -> CustomResult{ + let conn = connection::pg_connection_write(self).await?; + call_back_mapper + .insert(&conn) + .await + .map_err(|error| report!(errors::StorageError::from(error))) + } + + async fn find_call_back_mapper_by_id( + &self, + id: String, + ) -> CustomResult{ + let conn = connection::pg_connection_read(self).await?; + storage::CallBackMapper::find_by_id( + &conn, + id, + ) + .await + .map_err(|error| report!(errors::StorageError::from(error))) + + } + +} \ No newline at end of file diff --git a/crates/router/src/types/storage.rs b/crates/router/src/types/storage.rs index 41ece363b4f..d5d8e82729e 100644 --- a/crates/router/src/types/storage.rs +++ b/crates/router/src/types/storage.rs @@ -39,6 +39,7 @@ pub mod unified_translations; pub mod user; pub mod user_authentication_method; pub mod user_role; +pub mod call_back_mapper; use std::collections::HashMap; @@ -68,7 +69,7 @@ pub use self::{ merchant_account::*, merchant_connector_account::*, merchant_key_store::*, payment_link::*, payment_method::*, process_tracker::*, refund::*, reverse_lookup::*, role::*, routing_algorithm::*, unified_translations::*, user::*, user_authentication_method::*, - user_role::*, + user_role::*, call_back_mapper::*, }; use crate::types::api::routing; diff --git a/crates/router/src/types/storage/call_back_mapper.rs b/crates/router/src/types/storage/call_back_mapper.rs new file mode 100644 index 00000000000..542a79ffa09 --- /dev/null +++ b/crates/router/src/types/storage/call_back_mapper.rs @@ -0,0 +1 @@ +pub use diesel_models::call_back_mapper::{CallBackMapper, CallBackMapperNew}; diff --git a/migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql b/migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql new file mode 100644 index 00000000000..7a285def854 --- /dev/null +++ b/migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +DROP TABLE IF EXISTS call_back_mapper; \ No newline at end of file diff --git a/migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql b/migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql new file mode 100644 index 00000000000..602dfd0b59e --- /dev/null +++ b/migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql @@ -0,0 +1,8 @@ +-- Your SQL goes here +CREATE TABLE IF NOT EXISTS call_back_mapper ( + id VARCHAR(128) NOT NULL PRIMARY KEY, + type VARCHAR(64) NOT NULL, + data JSONB NOT NULL, + created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP, + last_modified_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP +); \ No newline at end of file From c41e0628b8af4e2a1f9ec999c17c29b213258db1 Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:27:26 +0000 Subject: [PATCH 2/7] chore: run formatter --- crates/diesel_models/src/call_back_mapper.rs | 6 +++--- crates/diesel_models/src/lib.rs | 2 +- crates/diesel_models/src/query.rs | 2 +- .../src/query/call_back_mapper.rs | 18 ++++++------------ crates/router/src/db.rs | 2 +- crates/router/src/db/call_back_mapper.rs | 17 ++++++----------- crates/router/src/types/storage.rs | 16 ++++++++-------- 7 files changed, 26 insertions(+), 37 deletions(-) diff --git a/crates/diesel_models/src/call_back_mapper.rs b/crates/diesel_models/src/call_back_mapper.rs index 10e7f264cf8..25c2f3d0ecf 100644 --- a/crates/diesel_models/src/call_back_mapper.rs +++ b/crates/diesel_models/src/call_back_mapper.rs @@ -1,4 +1,4 @@ -use diesel::{ Identifiable, Insertable, Queryable, Selectable}; +use diesel::{Identifiable, Insertable, Queryable, Selectable}; use serde::{self, Deserialize, Serialize}; use serde_json; @@ -20,9 +20,9 @@ pub struct CallBackMapper { #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Insertable)] #[diesel(table_name = call_back_mapper)] -pub struct CallBackMapperNew{ +pub struct CallBackMapperNew { pub id: String, #[serde(rename = "type")] pub id_type: String, pub data: serde_json::Value, -} \ No newline at end of file +} diff --git a/crates/diesel_models/src/lib.rs b/crates/diesel_models/src/lib.rs index a444567cd13..9ff310dcf26 100644 --- a/crates/diesel_models/src/lib.rs +++ b/crates/diesel_models/src/lib.rs @@ -10,6 +10,7 @@ pub mod authentication; pub mod authorization; pub mod blocklist; pub mod blocklist_fingerprint; +pub mod call_back_mapper; pub mod customers; pub mod dispute; pub mod enums; @@ -43,7 +44,6 @@ pub mod role; pub mod routing_algorithm; pub mod types; pub mod unified_translations; -pub mod call_back_mapper; #[allow(unused_qualifications)] pub mod schema; diff --git a/crates/diesel_models/src/query.rs b/crates/diesel_models/src/query.rs index 4d2f38e1637..070660a041c 100644 --- a/crates/diesel_models/src/query.rs +++ b/crates/diesel_models/src/query.rs @@ -10,6 +10,7 @@ pub mod authentication; pub mod authorization; pub mod blocklist; pub mod blocklist_fingerprint; +pub mod call_back_mapper; pub mod customers; pub mod dashboard_metadata; pub mod dispute; @@ -41,4 +42,3 @@ pub mod user; pub mod user_authentication_method; pub mod user_key_store; pub mod user_role; -pub mod call_back_mapper; \ No newline at end of file diff --git a/crates/diesel_models/src/query/call_back_mapper.rs b/crates/diesel_models/src/query/call_back_mapper.rs index fc4ce5c324f..72f11089629 100644 --- a/crates/diesel_models/src/query/call_back_mapper.rs +++ b/crates/diesel_models/src/query/call_back_mapper.rs @@ -2,29 +2,23 @@ use diesel::{associations::HasTable, ExpressionMethods}; use super::generics; use crate::{ - call_back_mapper::{ - CallBackMapper, CallBackMapperNew, - }, + call_back_mapper::{CallBackMapper, CallBackMapperNew}, schema::call_back_mapper::dsl, PgPooledConn, StorageResult, }; -impl CallBackMapperNew{ +impl CallBackMapperNew { pub async fn insert(self, conn: &PgPooledConn) -> StorageResult { generics::generic_insert(conn, self).await } } -impl CallBackMapper{ - pub async fn find_by_id( - conn: &PgPooledConn, - id: String, - ) -> StorageResult { +impl CallBackMapper { + pub async fn find_by_id(conn: &PgPooledConn, id: String) -> StorageResult { generics::generic_find_one::<::Table, _, _>( conn, - dsl::id - .eq(id.to_owned()) + dsl::id.eq(id.to_owned()), ) .await } -} \ No newline at end of file +} diff --git a/crates/router/src/db.rs b/crates/router/src/db.rs index c9120e41d32..1452091d623 100644 --- a/crates/router/src/db.rs +++ b/crates/router/src/db.rs @@ -6,6 +6,7 @@ pub mod blocklist; pub mod blocklist_fingerprint; pub mod blocklist_lookup; pub mod business_profile; +pub mod call_back_mapper; pub mod capture; pub mod cards_info; pub mod configs; @@ -37,7 +38,6 @@ pub mod user; pub mod user_authentication_method; pub mod user_key_store; pub mod user_role; -pub mod call_back_mapper; use common_utils::id_type; use diesel_models::{ fraud_check::{FraudCheck, FraudCheckUpdate}, diff --git a/crates/router/src/db/call_back_mapper.rs b/crates/router/src/db/call_back_mapper.rs index 2ef2f08c1f8..45e0897749d 100644 --- a/crates/router/src/db/call_back_mapper.rs +++ b/crates/router/src/db/call_back_mapper.rs @@ -28,7 +28,7 @@ impl CallBackMapperInterface for Store { async fn insert_call_back_mapper( &self, call_back_mapper: storage::CallBackMapperNew, - ) -> CustomResult{ + ) -> CustomResult { let conn = connection::pg_connection_write(self).await?; call_back_mapper .insert(&conn) @@ -39,15 +39,10 @@ impl CallBackMapperInterface for Store { async fn find_call_back_mapper_by_id( &self, id: String, - ) -> CustomResult{ + ) -> CustomResult { let conn = connection::pg_connection_read(self).await?; - storage::CallBackMapper::find_by_id( - &conn, - id, - ) - .await - .map_err(|error| report!(errors::StorageError::from(error))) - + storage::CallBackMapper::find_by_id(&conn, id) + .await + .map_err(|error| report!(errors::StorageError::from(error))) } - -} \ No newline at end of file +} diff --git a/crates/router/src/types/storage.rs b/crates/router/src/types/storage.rs index d5d8e82729e..3d9af071d0d 100644 --- a/crates/router/src/types/storage.rs +++ b/crates/router/src/types/storage.rs @@ -6,6 +6,7 @@ pub mod blocklist; pub mod blocklist_fingerprint; pub mod blocklist_lookup; pub mod business_profile; +pub mod call_back_mapper; pub mod capture; pub mod cards_info; pub mod configs; @@ -39,7 +40,6 @@ pub mod unified_translations; pub mod user; pub mod user_authentication_method; pub mod user_role; -pub mod call_back_mapper; use std::collections::HashMap; @@ -63,13 +63,13 @@ pub use scheduler::db::process_tracker; pub use self::{ address::*, api_keys::*, authentication::*, authorization::*, blocklist::*, - blocklist_fingerprint::*, blocklist_lookup::*, business_profile::*, capture::*, cards_info::*, - configs::*, customers::*, dashboard_metadata::*, dispute::*, ephemeral_key::*, events::*, - file::*, fraud_check::*, generic_link::*, gsm::*, locker_mock_up::*, mandate::*, - merchant_account::*, merchant_connector_account::*, merchant_key_store::*, payment_link::*, - payment_method::*, process_tracker::*, refund::*, reverse_lookup::*, role::*, - routing_algorithm::*, unified_translations::*, user::*, user_authentication_method::*, - user_role::*, call_back_mapper::*, + blocklist_fingerprint::*, blocklist_lookup::*, business_profile::*, call_back_mapper::*, + capture::*, cards_info::*, configs::*, customers::*, dashboard_metadata::*, dispute::*, + ephemeral_key::*, events::*, file::*, fraud_check::*, generic_link::*, gsm::*, + locker_mock_up::*, mandate::*, merchant_account::*, merchant_connector_account::*, + merchant_key_store::*, payment_link::*, payment_method::*, process_tracker::*, refund::*, + reverse_lookup::*, role::*, routing_algorithm::*, unified_translations::*, user::*, + user_authentication_method::*, user_role::*, }; use crate::types::api::routing; From e3ed4a7c24ecbff86b4b8814c2359a90bf578ceb Mon Sep 17 00:00:00 2001 From: Prasunna Soppa Date: Thu, 14 Nov 2024 16:57:37 +0530 Subject: [PATCH 3/7] remove launch json --- .vscode/launch.json | 1164 ------------------------------------------- 1 file changed, 1164 deletions(-) delete mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index f9d240c2e4c..00000000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,1164 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'analytics'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=analytics" - ], - "filter": { - "name": "analytics", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'api_models'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=api_models" - ], - "filter": { - "name": "api_models", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'cards'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=cards" - ], - "filter": { - "name": "cards", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'basic'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=basic", - "--package=cards" - ], - "filter": { - "name": "basic", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'common_utils'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=common_utils" - ], - "filter": { - "name": "common_utils", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'percentage'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=percentage", - "--package=common_utils" - ], - "filter": { - "name": "percentage", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'common_enums'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=common_enums" - ], - "filter": { - "name": "common_enums", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'masking'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=masking" - ], - "filter": { - "name": "masking", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'basic'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=basic", - "--package=masking" - ], - "filter": { - "name": "basic", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'router_env'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=router_env" - ], - "filter": { - "name": "router_env", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'env'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=env", - "--package=router_env" - ], - "filter": { - "name": "env", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'logger'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=logger", - "--package=router_env" - ], - "filter": { - "name": "logger", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'euclid'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=euclid" - ], - "filter": { - "name": "euclid", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug benchmark 'backends'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bench=backends", - "--package=euclid" - ], - "filter": { - "name": "backends", - "kind": "bench" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'hyperswitch_constraint_graph'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=hyperswitch_constraint_graph" - ], - "filter": { - "name": "hyperswitch_constraint_graph", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'diesel_models'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=diesel_models" - ], - "filter": { - "name": "diesel_models", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'hyperswitch_domain_models'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=hyperswitch_domain_models" - ], - "filter": { - "name": "hyperswitch_domain_models", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'hyperswitch_interfaces'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=hyperswitch_interfaces" - ], - "filter": { - "name": "hyperswitch_interfaces", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'storage_impl'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=storage_impl" - ], - "filter": { - "name": "storage_impl", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'redis_interface'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=redis_interface" - ], - "filter": { - "name": "redis_interface", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'config_importer'", - "cargo": { - "args": [ - "build", - "--bin=config_importer", - "--package=config_importer" - ], - "filter": { - "name": "config_importer", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'config_importer'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=config_importer", - "--package=config_importer" - ], - "filter": { - "name": "config_importer", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'connector_configs'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=connector_configs" - ], - "filter": { - "name": "connector_configs", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'currency_conversion'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=currency_conversion" - ], - "filter": { - "name": "currency_conversion", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'drainer'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=drainer" - ], - "filter": { - "name": "drainer", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'drainer'", - "cargo": { - "args": [ - "build", - "--bin=drainer", - "--package=drainer" - ], - "filter": { - "name": "drainer", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'drainer'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=drainer", - "--package=drainer" - ], - "filter": { - "name": "drainer", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'external_services'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=external_services" - ], - "filter": { - "name": "external_services", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'kgraph_utils'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=kgraph_utils" - ], - "filter": { - "name": "kgraph_utils", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug benchmark 'evaluation'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bench=evaluation", - "--package=kgraph_utils" - ], - "filter": { - "name": "evaluation", - "kind": "bench" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'events'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=events" - ], - "filter": { - "name": "events", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'hsdev'", - "cargo": { - "args": [ - "build", - "--bin=hsdev", - "--package=hsdev" - ], - "filter": { - "name": "hsdev", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'hsdev'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=hsdev", - "--package=hsdev" - ], - "filter": { - "name": "hsdev", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'hyperswitch_connectors'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=hyperswitch_connectors" - ], - "filter": { - "name": "hyperswitch_connectors", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'openapi'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=openapi" - ], - "filter": { - "name": "openapi", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'openapi'", - "cargo": { - "args": [ - "build", - "--bin=openapi", - "--package=openapi" - ], - "filter": { - "name": "openapi", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'openapi'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=openapi", - "--package=openapi" - ], - "filter": { - "name": "openapi", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'pm_auth'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=pm_auth" - ], - "filter": { - "name": "pm_auth", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'router'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=router" - ], - "filter": { - "name": "router", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'router'", - "cargo": { - "args": [ - "build", - "--bin=router", - "--package=router" - ], - "filter": { - "name": "router", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}", - "env":{ - "RUST_MIN_STACK": "10388608" - } - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'router'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=router", - "--package=router" - ], - "filter": { - "name": "router", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'scheduler'", - "cargo": { - "args": [ - "build", - "--bin=scheduler", - "--package=router" - ], - "filter": { - "name": "scheduler", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'scheduler'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=scheduler", - "--package=router" - ], - "filter": { - "name": "scheduler", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'cache'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=cache", - "--package=router" - ], - "filter": { - "name": "cache", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'connectors'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=connectors", - "--package=router" - ], - "filter": { - "name": "connectors", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'customers'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=customers", - "--package=router" - ], - "filter": { - "name": "customers", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'health_check'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=health_check", - "--package=router" - ], - "filter": { - "name": "health_check", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'integration_demo'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=integration_demo", - "--package=router" - ], - "filter": { - "name": "integration_demo", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'macros'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=macros", - "--package=router" - ], - "filter": { - "name": "macros", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'payments'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=payments", - "--package=router" - ], - "filter": { - "name": "payments", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'payments2'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=payments2", - "--package=router" - ], - "filter": { - "name": "payments2", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'payouts'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=payouts", - "--package=router" - ], - "filter": { - "name": "payouts", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'refunds'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=refunds", - "--package=router" - ], - "filter": { - "name": "refunds", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'services'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=services", - "--package=router" - ], - "filter": { - "name": "services", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'utils'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=utils", - "--package=router" - ], - "filter": { - "name": "utils", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'webhooks'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=webhooks", - "--package=router" - ], - "filter": { - "name": "webhooks", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'scheduler'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=scheduler" - ], - "filter": { - "name": "scheduler", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in library 'test_utils'", - "cargo": { - "args": [ - "test", - "--no-run", - "--lib", - "--package=test_utils" - ], - "filter": { - "name": "test_utils", - "kind": "lib" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug executable 'test_utils'", - "cargo": { - "args": [ - "build", - "--bin=test_utils", - "--package=test_utils" - ], - "filter": { - "name": "test_utils", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug unit tests in executable 'test_utils'", - "cargo": { - "args": [ - "test", - "--no-run", - "--bin=test_utils", - "--package=test_utils" - ], - "filter": { - "name": "test_utils", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - }, - { - "type": "lldb", - "request": "launch", - "name": "Debug integration test 'connectors'", - "cargo": { - "args": [ - "test", - "--no-run", - "--test=connectors", - "--package=test_utils" - ], - "filter": { - "name": "connectors", - "kind": "test" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -} \ No newline at end of file From baf137e6c59f086db8a0486b9b7607e8403efdf0 Mon Sep 17 00:00:00 2001 From: Prasunna Soppa Date: Thu, 14 Nov 2024 19:00:10 +0530 Subject: [PATCH 4/7] fix migration check --- crates/diesel_models/src/schema.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/diesel_models/src/schema.rs b/crates/diesel_models/src/schema.rs index 2755961d9d0..8ac9aebb8e4 100644 --- a/crates/diesel_models/src/schema.rs +++ b/crates/diesel_models/src/schema.rs @@ -225,7 +225,7 @@ diesel::table! { id -> Varchar, #[sql_name = "type"] #[max_length = 64] - id_type -> Varchar, + type_ -> Varchar, data -> Jsonb, created_at -> Timestamp, last_modified_at -> Timestamp, From df0e757a35c9f7ebc4c6b1b82ac1ee91f93a771a Mon Sep 17 00:00:00 2001 From: Prasunna Soppa Date: Thu, 14 Nov 2024 22:09:07 +0530 Subject: [PATCH 5/7] fix migration check --- crates/diesel_models/src/call_back_mapper.rs | 4 ++-- crates/diesel_models/src/schema_v2.rs | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/crates/diesel_models/src/call_back_mapper.rs b/crates/diesel_models/src/call_back_mapper.rs index 25c2f3d0ecf..6eb6dca1d95 100644 --- a/crates/diesel_models/src/call_back_mapper.rs +++ b/crates/diesel_models/src/call_back_mapper.rs @@ -12,7 +12,7 @@ use crate::schema::call_back_mapper; pub struct CallBackMapper { pub id: String, #[serde(rename = "type")] - pub id_type: String, + pub type_: String, pub data: serde_json::Value, pub created_at: time::PrimitiveDateTime, pub last_modified_at: time::PrimitiveDateTime, @@ -23,6 +23,6 @@ pub struct CallBackMapper { pub struct CallBackMapperNew { pub id: String, #[serde(rename = "type")] - pub id_type: String, + pub type_: String, pub data: serde_json::Value, } diff --git a/crates/diesel_models/src/schema_v2.rs b/crates/diesel_models/src/schema_v2.rs index e3097f80db9..700813276c1 100644 --- a/crates/diesel_models/src/schema_v2.rs +++ b/crates/diesel_models/src/schema_v2.rs @@ -224,6 +224,22 @@ diesel::table! { } } +diesel::table! { + use diesel::sql_types::*; + use crate::enums::diesel_exports::*; + + call_back_mapper (id) { + #[max_length = 128] + id -> Varchar, + #[sql_name = "type"] + #[max_length = 64] + type_ -> Varchar, + data -> Jsonb, + created_at -> Timestamp, + last_modified_at -> Timestamp, + } +} + diesel::table! { use diesel::sql_types::*; use crate::enums::diesel_exports::*; @@ -1346,6 +1362,7 @@ diesel::allow_tables_to_appear_in_same_query!( blocklist_fingerprint, blocklist_lookup, business_profile, + call_back_mapper, captures, cards_info, configs, From c5b7164ede3d02561dac9892bc9e3447a46a6811 Mon Sep 17 00:00:00 2001 From: Prasunna Soppa Date: Fri, 15 Nov 2024 11:39:16 +0530 Subject: [PATCH 6/7] resolve pr comments --- .../src/{call_back_mapper.rs => callback_mapper.rs} | 8 ++++---- crates/diesel_models/src/lib.rs | 2 +- crates/diesel_models/src/query.rs | 2 +- .../src/query/{call_back_mapper.rs => callback_mapper.rs} | 4 ++-- crates/diesel_models/src/schema.rs | 4 ++-- crates/diesel_models/src/schema_v2.rs | 4 ++-- crates/router/src/db.rs | 2 +- .../src/db/{call_back_mapper.rs => callback_mapper.rs} | 1 - crates/router/src/types/storage.rs | 4 ++-- crates/router/src/types/storage/call_back_mapper.rs | 1 - crates/router/src/types/storage/callback_mapper.rs | 1 + .../2024-11-13-105952_add_call-back-mapper_table/down.sql | 2 +- .../2024-11-13-105952_add_call-back-mapper_table/up.sql | 2 +- 13 files changed, 18 insertions(+), 19 deletions(-) rename crates/diesel_models/src/{call_back_mapper.rs => callback_mapper.rs} (79%) rename crates/diesel_models/src/query/{call_back_mapper.rs => callback_mapper.rs} (85%) rename crates/router/src/db/{call_back_mapper.rs => callback_mapper.rs} (97%) delete mode 100644 crates/router/src/types/storage/call_back_mapper.rs create mode 100644 crates/router/src/types/storage/callback_mapper.rs diff --git a/crates/diesel_models/src/call_back_mapper.rs b/crates/diesel_models/src/callback_mapper.rs similarity index 79% rename from crates/diesel_models/src/call_back_mapper.rs rename to crates/diesel_models/src/callback_mapper.rs index 6eb6dca1d95..68a79bc0dcc 100644 --- a/crates/diesel_models/src/call_back_mapper.rs +++ b/crates/diesel_models/src/callback_mapper.rs @@ -2,12 +2,12 @@ use diesel::{Identifiable, Insertable, Queryable, Selectable}; use serde::{self, Deserialize, Serialize}; use serde_json; -use crate::schema::call_back_mapper; +use crate::schema::callback_mapper; #[derive( Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize, )] -#[diesel(table_name = call_back_mapper, primary_key(id), check_for_backend(diesel::pg::Pg))] +#[diesel(table_name = callback_mapper, primary_key(id), check_for_backend(diesel::pg::Pg))] pub struct CallBackMapper { pub id: String, @@ -19,10 +19,10 @@ pub struct CallBackMapper { } #[derive(Clone, Debug, Eq, PartialEq, Serialize, Deserialize, Insertable)] -#[diesel(table_name = call_back_mapper)] +#[diesel(table_name = callback_mapper)] pub struct CallBackMapperNew { pub id: String, #[serde(rename = "type")] pub type_: String, pub data: serde_json::Value, -} +} \ No newline at end of file diff --git a/crates/diesel_models/src/lib.rs b/crates/diesel_models/src/lib.rs index 9ff310dcf26..4d06a438f47 100644 --- a/crates/diesel_models/src/lib.rs +++ b/crates/diesel_models/src/lib.rs @@ -10,7 +10,7 @@ pub mod authentication; pub mod authorization; pub mod blocklist; pub mod blocklist_fingerprint; -pub mod call_back_mapper; +pub mod callback_mapper; pub mod customers; pub mod dispute; pub mod enums; diff --git a/crates/diesel_models/src/query.rs b/crates/diesel_models/src/query.rs index 070660a041c..1c786a1fa25 100644 --- a/crates/diesel_models/src/query.rs +++ b/crates/diesel_models/src/query.rs @@ -10,7 +10,7 @@ pub mod authentication; pub mod authorization; pub mod blocklist; pub mod blocklist_fingerprint; -pub mod call_back_mapper; +pub mod callback_mapper; pub mod customers; pub mod dashboard_metadata; pub mod dispute; diff --git a/crates/diesel_models/src/query/call_back_mapper.rs b/crates/diesel_models/src/query/callback_mapper.rs similarity index 85% rename from crates/diesel_models/src/query/call_back_mapper.rs rename to crates/diesel_models/src/query/callback_mapper.rs index 72f11089629..1e475f303db 100644 --- a/crates/diesel_models/src/query/call_back_mapper.rs +++ b/crates/diesel_models/src/query/callback_mapper.rs @@ -2,8 +2,8 @@ use diesel::{associations::HasTable, ExpressionMethods}; use super::generics; use crate::{ - call_back_mapper::{CallBackMapper, CallBackMapperNew}, - schema::call_back_mapper::dsl, + callback_mapper::{CallBackMapper, CallBackMapperNew}, + schema::callback_mapper::dsl, PgPooledConn, StorageResult, }; diff --git a/crates/diesel_models/src/schema.rs b/crates/diesel_models/src/schema.rs index 8ac9aebb8e4..110a4b1ac2f 100644 --- a/crates/diesel_models/src/schema.rs +++ b/crates/diesel_models/src/schema.rs @@ -220,7 +220,7 @@ diesel::table! { use diesel::sql_types::*; use crate::enums::diesel_exports::*; - call_back_mapper (id) { + callback_mapper (id) { #[max_length = 128] id -> Varchar, #[sql_name = "type"] @@ -1415,7 +1415,7 @@ diesel::allow_tables_to_appear_in_same_query!( blocklist_fingerprint, blocklist_lookup, business_profile, - call_back_mapper, + callback_mapper, captures, cards_info, configs, diff --git a/crates/diesel_models/src/schema_v2.rs b/crates/diesel_models/src/schema_v2.rs index 700813276c1..91b268ab0b8 100644 --- a/crates/diesel_models/src/schema_v2.rs +++ b/crates/diesel_models/src/schema_v2.rs @@ -228,7 +228,7 @@ diesel::table! { use diesel::sql_types::*; use crate::enums::diesel_exports::*; - call_back_mapper (id) { + callback_mapper (id) { #[max_length = 128] id -> Varchar, #[sql_name = "type"] @@ -1362,7 +1362,7 @@ diesel::allow_tables_to_appear_in_same_query!( blocklist_fingerprint, blocklist_lookup, business_profile, - call_back_mapper, + callback_mapper, captures, cards_info, configs, diff --git a/crates/router/src/db.rs b/crates/router/src/db.rs index cf71be5c806..9cd0f3856a9 100644 --- a/crates/router/src/db.rs +++ b/crates/router/src/db.rs @@ -6,7 +6,7 @@ pub mod blocklist; pub mod blocklist_fingerprint; pub mod blocklist_lookup; pub mod business_profile; -pub mod call_back_mapper; +pub mod callback_mapper; pub mod capture; pub mod cards_info; pub mod configs; diff --git a/crates/router/src/db/call_back_mapper.rs b/crates/router/src/db/callback_mapper.rs similarity index 97% rename from crates/router/src/db/call_back_mapper.rs rename to crates/router/src/db/callback_mapper.rs index 45e0897749d..9d235a976fa 100644 --- a/crates/router/src/db/call_back_mapper.rs +++ b/crates/router/src/db/callback_mapper.rs @@ -1,5 +1,4 @@ use error_stack::report; -// use diesel_models::call_back_mapper; use router_env::{instrument, tracing}; use super::Store; diff --git a/crates/router/src/types/storage.rs b/crates/router/src/types/storage.rs index 3d9af071d0d..2ece861efbe 100644 --- a/crates/router/src/types/storage.rs +++ b/crates/router/src/types/storage.rs @@ -6,7 +6,7 @@ pub mod blocklist; pub mod blocklist_fingerprint; pub mod blocklist_lookup; pub mod business_profile; -pub mod call_back_mapper; +pub mod callback_mapper; pub mod capture; pub mod cards_info; pub mod configs; @@ -63,7 +63,7 @@ pub use scheduler::db::process_tracker; pub use self::{ address::*, api_keys::*, authentication::*, authorization::*, blocklist::*, - blocklist_fingerprint::*, blocklist_lookup::*, business_profile::*, call_back_mapper::*, + blocklist_fingerprint::*, blocklist_lookup::*, business_profile::*, callback_mapper::*, capture::*, cards_info::*, configs::*, customers::*, dashboard_metadata::*, dispute::*, ephemeral_key::*, events::*, file::*, fraud_check::*, generic_link::*, gsm::*, locker_mock_up::*, mandate::*, merchant_account::*, merchant_connector_account::*, diff --git a/crates/router/src/types/storage/call_back_mapper.rs b/crates/router/src/types/storage/call_back_mapper.rs deleted file mode 100644 index 542a79ffa09..00000000000 --- a/crates/router/src/types/storage/call_back_mapper.rs +++ /dev/null @@ -1 +0,0 @@ -pub use diesel_models::call_back_mapper::{CallBackMapper, CallBackMapperNew}; diff --git a/crates/router/src/types/storage/callback_mapper.rs b/crates/router/src/types/storage/callback_mapper.rs new file mode 100644 index 00000000000..cc8cc944838 --- /dev/null +++ b/crates/router/src/types/storage/callback_mapper.rs @@ -0,0 +1 @@ +pub use diesel_models::callback_mapper::{CallBackMapper, CallBackMapperNew}; diff --git a/migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql b/migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql index 7a285def854..8c2f4f54a17 100644 --- a/migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql +++ b/migrations/2024-11-13-105952_add_call-back-mapper_table/down.sql @@ -1,2 +1,2 @@ -- This file should undo anything in `up.sql` -DROP TABLE IF EXISTS call_back_mapper; \ No newline at end of file +DROP TABLE IF EXISTS callback_mapper; \ No newline at end of file diff --git a/migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql b/migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql index 602dfd0b59e..f9df2c9537d 100644 --- a/migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql +++ b/migrations/2024-11-13-105952_add_call-back-mapper_table/up.sql @@ -1,5 +1,5 @@ -- Your SQL goes here -CREATE TABLE IF NOT EXISTS call_back_mapper ( +CREATE TABLE IF NOT EXISTS callback_mapper ( id VARCHAR(128) NOT NULL PRIMARY KEY, type VARCHAR(64) NOT NULL, data JSONB NOT NULL, From 75d929bf4e45c1868ded14087b31caa189e41cc9 Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 06:10:12 +0000 Subject: [PATCH 7/7] chore: run formatter --- crates/diesel_models/src/callback_mapper.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/diesel_models/src/callback_mapper.rs b/crates/diesel_models/src/callback_mapper.rs index 68a79bc0dcc..8d660de9a0a 100644 --- a/crates/diesel_models/src/callback_mapper.rs +++ b/crates/diesel_models/src/callback_mapper.rs @@ -25,4 +25,4 @@ pub struct CallBackMapperNew { #[serde(rename = "type")] pub type_: String, pub data: serde_json::Value, -} \ No newline at end of file +}