repo
stringclasses
4 values
file_path
stringlengths
6
193
extension
stringclasses
30 values
content
stringlengths
0
5.21M
token_count
int64
0
3.8M
hyperswitch
migrations/2024-05-31-074402_add_acquirer_country_code_in_authentication/up.sql
.sql
-- Your SQL goes here ALTER TABLE authentication ADD COLUMN IF NOT EXISTS acquirer_country_code VARCHAR(64);
23
hyperswitch
migrations/2024-05-31-074402_add_acquirer_country_code_in_authentication/down.sql
.sql
ALTER TABLE authentication DROP COLUMN IF EXISTS acquirer_country_code;
12
hyperswitch
migrations/2023-01-12-084710_update_merchant_routing_algorithm/up.sql
.sql
-- Your SQL goes here ALTER TABLE merchant_account DROP COLUMN routing_algorithm; ALTER TABLE merchant_account DROP COLUMN custom_routing_rules; ALTER TABLE merchant_account ADD COLUMN routing_algorithm JSON; DROP TYPE "RoutingAlgorithm";
41
hyperswitch
migrations/2023-01-12-084710_update_merchant_routing_algorithm/down.sql
.sql
-- This file should undo anything in `up.sql` CREATE TYPE "RoutingAlgorithm" AS ENUM ( 'round_robin', 'max_conversion', 'min_cost', 'custom' ); ALTER TABLE merchant_account DROP COLUMN routing_algorithm; ALTER TABLE merchant_account ADD COLUMN custom_routing_rules JSON; ALTER TABLE merchant_account ADD...
73
hyperswitch
migrations/2023-01-12-140107_drop_temp_card/up.sql
.sql
DROP TABLE temp_card;
5
hyperswitch
migrations/2023-01-12-140107_drop_temp_card/down.sql
.sql
CREATE TABLE temp_card ( id SERIAL PRIMARY KEY, date_created TIMESTAMP NOT NULL, txn_id VARCHAR(255), card_info JSON ); CREATE INDEX temp_card_txn_id_index ON temp_card (txn_id);
47
hyperswitch
migrations/2023-04-26-090005_remove_default_created_at_modified_at/up.sql
.sql
-- Merchant Account ALTER TABLE merchant_account ALTER COLUMN modified_at DROP DEFAULT; ALTER TABLE merchant_account ALTER COLUMN created_at DROP DEFAULT; -- Merchant Connector Account ALTER TABLE merchant_connector_account ALTER COLUMN modified_at DROP DEFAULT; ALTER TABLE merchant_connector_account ALTER COLUMN c...
235
hyperswitch
migrations/2023-04-26-090005_remove_default_created_at_modified_at/down.sql
.sql
-- Merchant Account ALTER TABLE merchant_account ALTER COLUMN modified_at SET DEFAULT now(); ALTER TABLE merchant_account ALTER COLUMN created_at SET DEFAULT now(); -- Merchant Connector Account ALTER TABLE merchant_connector_account ALTER COLUMN modified_at SET DEFAULT now(); ALTER TABLE merchant_connector_account...
252
hyperswitch
migrations/2024-08-12-130304_add_translations_table/up.sql
.sql
CREATE TABLE IF NOT EXISTS unified_translations ( unified_code VARCHAR(255) NOT NULL, unified_message VARCHAR(1024) NOT NULL, locale VARCHAR(255) NOT NULL , translation VARCHAR(1024) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT now()::TIMESTAMP, last_modified_at TIMESTAMP NOT NULL DEFAULT now...
99
hyperswitch
migrations/2024-08-12-130304_add_translations_table/down.sql
.sql
-- This file should undo anything in `up.sql` DROP TABLE IF EXISTS unified_translations;
19
hyperswitch
migrations/2022-11-25-121143_add_paypal_pmt/up.sql
.sql
-- Your SQL goes here ALTER TYPE "PaymentMethodType" ADD VALUE 'paypal' after 'pay_later';
24
hyperswitch
migrations/2022-11-25-121143_add_paypal_pmt/down.sql
.sql
-- This file should undo anything in `up.sql` DELETE FROM pg_enum WHERE enumlabel = 'paypal' AND enumtypid = ( SELECT oid FROM pg_type WHERE typname = 'PaymentMethodType' )
45
hyperswitch
migrations/2025-03-20-085151_force-3ds-challenge-triggered/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS force_3ds_challenge_trigger boolean DEFAULT false;
26
hyperswitch
migrations/2025-03-20-085151_force-3ds-challenge-triggered/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_intent DROP COLUMN IF EXISTS force_3ds_challenge_trigger;
27
hyperswitch
migrations/2024-04-23-061745_add_pm_collect_link_config_to_merchant_account/up.sql
.sql
ALTER TABLE merchant_account ADD COLUMN IF NOT EXISTS pm_collect_link_config JSONB NULL; ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS payout_link_config JSONB NULL;
35
hyperswitch
migrations/2024-04-23-061745_add_pm_collect_link_config_to_merchant_account/down.sql
.sql
ALTER TABLE merchant_account DROP COLUMN IF EXISTS pm_collect_link_config; ALTER TABLE business_profile DROP COLUMN IF EXISTS payout_link_config;
27
hyperswitch
migrations/2024-07-05-115837_add_shipping_details_in_payment_intent/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS shipping_details BYTEA DEFAULT NULL;
22
hyperswitch
migrations/2024-07-05-115837_add_shipping_details_in_payment_intent/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_intent DROP COLUMN IF EXISTS shipping_details;
22
hyperswitch
v2_compatible_migrations/2024-08-28-081757_drop_not_null_constraints_on_v1_columns/up.sql
.sql
-- Drop not null constraints on not null columns of v1 which are either dropped or made nullable in v2. ------------------------ Organization ----------------------- ALTER TABLE organization DROP CONSTRAINT organization_pkey, ALTER COLUMN org_id DROP NOT NULL; -- Create index on org_id in organization table --...
676
hyperswitch
v2_compatible_migrations/2024-08-28-081757_drop_not_null_constraints_on_v1_columns/down.sql
.sql
------------------------ Organization ----------------------- -- Drop index on org_id in organization table DROP INDEX IF EXISTS idx_organization_org_id; -- Re-add primary key constraint on `organization` ALTER TABLE organization ADD CONSTRAINT organization_pkey PRIMARY KEY (org_id), ALTER COLUMN org_id SET NO...
385
hyperswitch
v2_compatible_migrations/2024-07-29-155137_add_v2_soft_delete_db_enum/up.sql
.sql
-- Your SQL goes here CREATE TYPE "DeleteStatus" AS ENUM ('active', 'redacted');
21
hyperswitch
v2_compatible_migrations/2024-07-29-155137_add_v2_soft_delete_db_enum/down.sql
.sql
-- This file should undo anything in `up.sql` DROP TYPE "DeleteStatus";
17
hyperswitch
v2_compatible_migrations/2024-08-28-081747_recreate_ids_for_v2/up.sql
.sql
-- This file contains queries to re-create the `id` column as a `VARCHAR` column instead of `SERIAL` column for tables that already have it. -- It must be ensured that the deployed version of the application does not include the `id` column in any of its queries. -- Drop the id column as this will be used later as the ...
169
hyperswitch
v2_compatible_migrations/2024-08-28-081747_recreate_ids_for_v2/down.sql
.sql
-- This file contains queries to create the `id` column as a `SERIAL` column instead of `VARCHAR` column for tables that already have it. -- This is to revert the `id` columns to the previous state. ALTER TABLE customers DROP COLUMN IF EXISTS id; ALTER TABLE payment_intent DROP COLUMN IF EXISTS id; ALTER TABLE p...
92
hyperswitch
v2_compatible_migrations/2024-08-28-081721_add_v2_columns/up.sql
.sql
-- This file contains all new columns being added as part of v2 refactoring. -- The new columns added should work with both v1 and v2 applications. ALTER TABLE customers ADD COLUMN IF NOT EXISTS merchant_reference_id VARCHAR(64), ADD COLUMN IF NOT EXISTS default_billing_address BYTEA DEFAULT NULL, ADD COLUMN IF...
708
hyperswitch
v2_compatible_migrations/2024-08-28-081721_add_v2_columns/down.sql
.sql
-- This file drops all new columns being added as part of v2 refactoring. -- These migrations can be run as long as there's no v2 application running. ALTER TABLE customers DROP COLUMN IF EXISTS merchant_reference_id, DROP COLUMN IF EXISTS default_billing_address, DROP COLUMN IF EXISTS default_shipping_address,...
432
hyperswitch
v2_migrations/2025-02-10-101458_create_index_payment_attempt_payment_id/up.sql
.sql
-- Your SQL goes here DROP INDEX IF EXISTS payment_attempt_payment_id_merchant_id_index; CREATE INDEX IF NOT EXISTS payment_attempt_payment_id_index ON payment_attempt (payment_id);
36
hyperswitch
v2_migrations/2025-02-10-101458_create_index_payment_attempt_payment_id/down.sql
.sql
-- This file should undo anything in `up.sql` DROP INDEX IF EXISTS payment_attempt_payment_id_index; CREATE INDEX IF NOT EXISTS payment_attempt_payment_id_merchant_id_index ON payment_attempt (payment_id, merchant_id);
44
hyperswitch
v2_migrations/2025-02-24-053820_add_billing_processor_value_to_connector_type_enum/up.sql
.sql
-- Your SQL goes here ALTER TYPE "ConnectorType" ADD VALUE If NOT EXISTS 'billing_processor';
21
hyperswitch
v2_migrations/2025-02-24-053820_add_billing_processor_value_to_connector_type_enum/down.sql
.sql
-- This file should undo anything in `up.sql` SELECT 1;
15
hyperswitch
v2_migrations/2025-03-25-074512_payment-method-subtype-mandatory/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_attempt ALTER COLUMN payment_method_subtype SET NOT NULL;
19
hyperswitch
v2_migrations/2025-03-25-074512_payment-method-subtype-mandatory/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE payment_attempt ALTER COLUMN payment_method_subtype DROP NOT NULL;
24
hyperswitch
v2_migrations/2025-04-02-051959_add_network_error_info_in_payment_attempt/up.sql
.sql
ALTER TABLE payment_attempt ADD COLUMN IF NOT EXISTS network_advice_code VARCHAR(32) DEFAULT NULL, ADD COLUMN IF NOT EXISTS network_decline_code VARCHAR(32) DEFAULT NULL, ADD COLUMN IF NOT EXISTS network_error_message TEXT DEFAULT NULL;
51
hyperswitch
v2_migrations/2025-04-02-051959_add_network_error_info_in_payment_attempt/down.sql
.sql
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS network_advice_code, DROP COLUMN IF EXISTS networ_decline_code, DROP COLUMN IF EXISTS network_error_message;
32
hyperswitch
v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql
.sql
-- This file contains queries to drop columns no longer used by the v2 application. -- It is safer to take a backup of the database before running these queries as they're destructive in nature. -- These queries should only be run when we're sure that data inserted by the v1 application is no longer required. ALTER TAB...
993
hyperswitch
v2_migrations/2025-01-13-081847_drop_v1_columns/down.sql
.sql
ALTER TABLE ORGANIZATION ADD COLUMN org_id VARCHAR(32), ADD COLUMN org_name TEXT; ALTER TABLE merchant_account ADD COLUMN merchant_id VARCHAR(64), ADD COLUMN return_url VARCHAR(255), ADD COLUMN enable_payment_response_hash BOOLEAN DEFAULT FALSE, ADD COLUMN payment_response_hash_key VARCHAR(255)...
1,245
hyperswitch
v2_migrations/2024-08-28-081838_update_v2_primary_key_constraints/up.sql
.sql
-- This file contains queries to update the primary key constraints suitable to the v2 application. -- This also has queries to update other constraints and indexes on tables where applicable. ------------------------ Organization ----------------------- -- Update null id and organization_name fields UPDATE ORGANIZATI...
441
hyperswitch
v2_migrations/2024-08-28-081838_update_v2_primary_key_constraints/down.sql
.sql
-- Backfill for organization table ------------------------ Organization ----------------------- UPDATE ORGANIZATION SET org_id = id WHERE org_id IS NULL; ALTER TABLE ORGANIZATION DROP CONSTRAINT organization_pkey_id; ALTER TABLE ORGANIZATION DROP CONSTRAINT organization_organization_name_key; -- Backfill UPDATE ORGA...
451
hyperswitch
v2_migrations/2024-08-28-081837_add_not_null_constraints_to_v2_columns/up.sql
.sql
-- Your SQL goes here ALTER TABLE customers ALTER COLUMN status SET NOT NULL, ALTER COLUMN status SET DEFAULT 'active'; -- This migration is to make profile_id mandatory in mca table ALTER TABLE merchant_connector_account ALTER COLUMN profile_id SET NOT NULL; -- This migration is to make fields mandator...
193
hyperswitch
v2_migrations/2024-08-28-081837_add_not_null_constraints_to_v2_columns/down.sql
.sql
-- This file should undo anything in `up.sql` ALTER TABLE customers ALTER COLUMN status DROP NOT NULL, ALTER COLUMN status DROP DEFAULT; ALTER TABLE merchant_connector_account ALTER COLUMN profile_id DROP NOT NULL; ALTER TABLE payment_intent ALTER COLUMN profile_id DROP NOT NULL, ALTER COLUMN cur...
171
hyperswitch
v2_migrations/2025-03-19-080705_payment-method-subtype-optional/up.sql
.sql
-- Your SQL goes here ALTER TABLE payment_attempt ALTER COLUMN payment_method_subtype DROP NOT NULL;
19
hyperswitch
v2_migrations/2025-03-19-080705_payment-method-subtype-optional/down.sql
.sql
ALTER TABLE payment_attempt ALTER COLUMN payment_method_subtype SET NOT NULL;
13
hyperswitch
v2_migrations/2025-01-17-042122_add_feature_metadata_in_payment_attempt/up.sql
.sql
ALTER TABLE payment_attempt ADD COLUMN feature_metadata JSONB;
12
hyperswitch
v2_migrations/2025-01-17-042122_add_feature_metadata_in_payment_attempt/down.sql
.sql
ALTER TABLE payment_attempt DROP COLUMN IF EXISTS feature_metadata;
12
hyperswitch
loadtest/Dockerfile
none
FROM rust:latest AS builder WORKDIR /app COPY . . RUN cargo install diesel_cli && cargo build --bin router --release FROM rust:latest AS runtime WORKDIR /app COPY --from=builder /app/migrations migrations COPY --from=builder /app/target/release/router router COPY --from=builder /usr/local/cargo/bin/diesel diesel
79
hyperswitch
loadtest/docker-compose.yaml
.yaml
version: "2" networks: loadtest_net: services: db: image: postgres restart: always environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: loadtest_router networks: - loadtest_net healthcheck: test: [ "CMD-SHELL", "pg_isready -U postgres" ] ...
836
hyperswitch
loadtest/README.md
.md
## Performance Benchmarking Setup The setup uses docker compose to get the required components up and running. It also handles running database migration and starts [K6 load testing](https://k6.io/docs/) script at the end. The metrics are visible in the console as well as through Grafana dashboard. We have added a ca...
955
hyperswitch
loadtest/loadtest.sh
.sh
#!/bin/bash run_loadtest() { docker compose down docker compose up k6 } print_details() { echo "-----------------------------------" echo "RUN NAME: $1" echo " SCRIPT: $2" echo "-----------------------------------" } exit_if_baseline_file_not_exist() { if ! [ -e "./k6/benchmark/baseline_$1.json" ] t...
532
hyperswitch
loadtest/k6/payment-confirm.js
.js
import http from "k6/http"; import { sleep, check } from "k6"; import { Counter } from "k6/metrics"; import { setup_merchant_apikey } from "./helper/setup.js"; import { random_string } from "./helper/misc.js"; import { readBaseline, storeResult } from "./helper/compare-result.js"; export const requests = new Counter("...
682
hyperswitch
loadtest/k6/payment-create-and-confirm.js
.js
import http from "k6/http"; import { sleep, check } from "k6"; import { Counter } from "k6/metrics"; import { setup_merchant_apikey } from "./helper/setup.js"; import { random_string } from "./helper/misc.js"; import { readBaseline, storeResult } from "./helper/compare-result.js"; export const requests = new Counter("...
745
hyperswitch
loadtest/k6/health.js
.js
import http from "k6/http"; import { sleep, check } from "k6"; import { Counter } from "k6/metrics"; import { readBaseline, storeResult } from "./helper/compare-result.js"; export const requests = new Counter('http_reqs'); const baseline = readBaseline("health"); export const options = { stages: [ { dura...
274
hyperswitch
loadtest/k6/rps.js
.js
import { group } from 'k6'; import { Counter } from "k6/metrics"; import { readBaseline, storeResult } from "./helper/compare-result.js"; import { setup_merchant_apikey } from "./helper/setup.js"; import paymentCreateAndConfirmFunc from './payment-create-and-confirm.js'; import paymentConfirmFunc from './payment-confir...
223
hyperswitch
loadtest/k6/helper/setup.js
.js
import http from "k6/http"; import { check } from "k6"; export function setup_merchant_apikey() { let params = { "headers": { "Content-Type": "application/json", "api-key" : "test_admin" } }; let merchant_account_payload = { "merchant_id":`merchant_${Date.now...
1,069
hyperswitch
loadtest/k6/helper/k6-summary.js
.js
var forEach = function (obj, callback) { for (var key in obj) { if (obj.hasOwnProperty(key)) { if (callback(key, obj[key])) { break } } } } var palette = { bold: 1, faint: 2, red: 31, green: 32, cyan: 36, //TODO: add others? } var groupPrefix = '█' var detailsPrefix = '↳' v...
3,545
hyperswitch
loadtest/k6/helper/compare-result.js
.js
import { textSummary } from "./k6-summary.js"; function compute(baseline, result) { return ((1 - (result/baseline)) * -100).toFixed(2) } function buildResult(baseline, data) { return function(metrics, fields) { const result = {} metrics.forEach(metric => { result[metric] = {} ...
484
hyperswitch
loadtest/k6/helper/misc.js
.js
export function random_string() { return Math.random().toString(36).slice(-5) }
21
hyperswitch
loadtest/config/development.toml
.toml
[log.file] enabled = false [log.console] enabled = false [log.telemetry] traces_enabled = true metrics_enabled = true ignore_errors = false [key_manager] url = "http://localhost:5000" [master_database] username = "postgres" password = "postgres" host = "db" port = 5432 dbname = "loadtest_router" pool_size = 20 conn...
17,119
hyperswitch
loadtest/config/otel-collector.yaml
.yaml
receivers: otlp: protocols: grpc: exporters: otlp: endpoint: tempo:4317 tls: insecure: true service: pipelines: traces: receivers: [otlp] exporters: [otlp]
62
hyperswitch
loadtest/config/tempo.yaml
.yaml
server: http_listen_port: 3200 distributor: receivers: otlp: protocols: grpc: ingester: trace_idle_period: 10s # the length of time after a trace has not received spans to consider it complete and flush it max_block_bytes: 1_000_000 # cut the head block when it hits t...
429
hyperswitch
loadtest/grafana/grafana-dashboard.yaml
.yaml
apiVersion: 1 providers: - name: 'default' org_id: 1 folder: '' type: 'file' options: path: /var/lib/grafana/dashboards
47
hyperswitch
loadtest/grafana/grafana-datasource.yaml
.yaml
apiVersion: 1 datasources: - name: K6InfluxDB type: influxdb access: proxy database: scripts url: http://influxdb:8086 isDefault: false - name: Tempo type: tempo access: proxy url: http://tempo:3200 isDefault: true editable: true
95
hyperswitch
loadtest/grafana/dashboards/k6-load-testing-results_rev3.json
.json
{ "__inputs": [ { "name": "DS_K6", "label": "k6", "description": "", "type": "datasource", "pluginId": "influxdb", "pluginName": "InfluxDB" } ], "__requires": [ { "type": "grafana", "id": "grafana", "name": "Grafana", "version": "4.4.1" }...
9,505
hyperswitch
docs/try_local_system.md
.md
# Try out hyperswitch on your system The simplest way to run hyperswitch locally is [with Docker Compose](#run-hyperswitch-using-docker-compose) by pulling the latest images from Docker Hub. However, if you're willing to modify the code and run it, or are a developer contributing to hyperswitch, then you can either [s...
6,078
hyperswitch
docs/SECURITY.md
.md
# Security Policy ## Reporting a security issue The hyperswitch project team welcomes security reports and is committed to providing prompt attention to security issues. Security issues should be reported privately via the [advisories page on GitHub][report-vulnerability] or by email at [hyperswitch@juspay.in](mailto...
116
hyperswitch
docs/try_sandbox.md
.md
# Try out hyperswitch sandbox environment **Table Of Contents:** - [Set up your accounts](#set-up-your-accounts) - [Try out our APIs](#try-out-our-apis) - [Create a payment](#create-a-payment) - [Create a refund](#create-a-refund) ## Set up your accounts 1. Sign up on the payment connector's (say Stripe, Adyen,...
1,178
hyperswitch
docs/CONTRIBUTING.md
.md
# Contributing to hyperswitch :tada: First off, thanks for taking the time to contribute! We are so happy to have you! :tada: There are opportunities to contribute to hyperswitch at any level. It doesn't matter if you are just getting started with Rust or are the most weathered expert, we can use your help. **No con...
6,405
hyperswitch
docs/TERMS_OF_CONTEST.md
.md
## Terms and Conditions Juspay Technologies Private Limited (Juspay) is the problem statement issuer for the contest and this contest is subject to the below stated terms and conditions. **Hyperswitch** is Juspay's open source full stack payment infrastructure solution to embrace diversity, reduce payment friction an...
644
hyperswitch
docs/CODE_OF_CONDUCT.md
.md
# Code of Conduct The hyperswitch project adheres to the [Rust Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct). This describes the minimum behavior expected from all contributors.
44
hyperswitch
docs/building_docker_images.md
.md
# Building Docker Images ## Cargo Features The Hyperswitch application server makes extensive use of [Cargo features][cargo-features] to selectively toggle certain features and integrations. The list of features can be found in the `[features]` section in the [`crates/router/Cargo.toml`][router-manifest] file. Of th...
1,362
hyperswitch
docs/architecture.md
.md
# HyperSwitch Architecture - [Introduction](#introduction) - [Router](#router) - [Scheduler](#scheduler) - [Producer (Job scheduler)](#producer-job-scheduler) - [Consumer (Job executor)](#consumer-job-executor) - [Database](#database) - [Postgres](#postgres) - [Redis](#redis) - [Locker](#locker) - [Monitoring]...
1,074
hyperswitch
docs/CONTRIBUTOR_LICENSE_AGREEMENT.md
.md
# Contributor License Agreement You accept and agree to the following terms and conditions for Your present and future Contributions submitted to Juspay Technologies Private Limited, Except for the license granted herein to Juspay Technologies Private Limited and recipients of software distributed by Juspay Technologi...
1,363
hyperswitch
docs/one_click_setup.md
.md
# One-Click Docker Setup Guide This document provides detailed information about the one-click setup script for Hyperswitch. ## Overview The `setup.sh` script simplifies the process of setting up Hyperswitch in a local development or testing environment. It provides an interactive setup experience that handles check...
715
hyperswitch
docs/rfcs/guidelines.md
.md
# Hyperswitch RFC Process Hyperswitch welcomes contributions from anyone in the open-source community. Although some contributions can be easily reviewed and implemented through regular GitHub pull requests, larger changes that require design decisions will require more discussion and collaboration within the communit...
826
hyperswitch
docs/rfcs/000-issuing-template.md
.md
## RFC 000: [Title] ### I. Objective A clear and concise title for the RFC ### II. Proposal A detailed description of the proposed changes, discussion time frame, technical details and potential drawbacks or alternative solutions that were considered ### III. Open Questions Any questions or concerns that are still o...
100
hyperswitch
docs/rfcs/000-resolution-template.md
.md
## RFC 000: [Title] ### I. Status The final status of the RFC (Accepted / Rejected) ### II. Resolution A description of the final resolution of the RFC, including any modifications or adjustments made during the discussion and review process ### III. Implementation A description of how the resolution will be impleme...
103
hyperswitch
docs/rfcs/text/001-compile-time-perf.md
.md
## RFC 001: Hyperswitch compile time optimization ### I. Objective Optimizing the compile time of Hyperswitch while preserving (and/or improving) the runtime performance. This would ensure accessibility across machines and improve developer experience for the community ### II. Proposal While the Rust compiler pr...
793
hyperswitch
docs/imgs/get-api-keys.svg
.svg
<svg width="280" height="42" viewBox="0 0 280 42" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="280" height="42" rx="4" fill="#006DF9"/> <path d="M91.1364 19.1094C91.0668 18.8674 90.969 18.6536 90.843 18.468C90.7171 18.2791 90.563 18.12 90.3807 17.9908C90.2017 17.8582 89.9962 17.7571 89.7642 17.6875C89.5...
8,274
hyperswitch
docs/imgs/signup-to-hs.svg
.svg
<svg width="280" height="41" viewBox="0 0 280 41" fill="none" xmlns="http://www.w3.org/2000/svg"> <rect width="280" height="41" rx="4" fill="#006DF9"/> <path d="M72.9506 18.2646C72.9137 17.8922 72.7552 17.6029 72.4751 17.3967C72.1951 17.1905 71.815 17.0874 71.3349 17.0874C71.0086 17.0874 70.7332 17.1335 70.5085 17.2259...
11,907
hyperswitch
docs/imgs/hyperswitch-logo-dark.svg
.svg
<svg width="545" height="58" viewBox="0 0 545 58" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M27.2375 54.3079C25.9366 54.3441 24.6718 54.2355 23.3708 54.0545C19.8655 53.5477 16.577 52.4255 13.5414 50.5792C6.81987 46.5246 2.51952 40.6238 0.748782 32.8766C0.35127 31.1...
14,233
hyperswitch
docs/imgs/hyperswitch-logo-light.svg
.svg
<svg width="545" height="58" viewBox="0 0 545 58" fill="none" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" clip-rule="evenodd" d="M27.0673 54.3079C25.7664 54.3441 24.5016 54.2355 23.2006 54.0545C19.6953 53.5477 16.4068 52.4255 13.3713 50.5792C6.6497 46.5246 2.34935 40.6238 0.578616 32.8766C0.181104 31....
14,267
hyperswitch
crates/diesel_models/Cargo.toml
.toml
[package] name = "diesel_models" description = "Database types shared across `router` and other crates" version = "0.1.0" edition.workspace = true rust-version.workspace = true readme = "README.md" license.workspace = true [features] default = ["kv_store"] kv_store = [] v1 = ["common_utils/v1", "common_types/v1"] v2 =...
484
hyperswitch
crates/diesel_models/drop_id.patch
.patch
diff --git a/crates/diesel_models/src/schema.rs b/crates/diesel_models/src/schema.rs index b35e809a0..749a5dd47 100644 --- a/crates/diesel_models/src/schema.rs +++ b/crates/diesel_models/src/schema.rs @@ -142,14 +142,13 @@ diesel::table! { } diesel::table! { use diesel::sql_types::*; use crate::enums::die...
509
hyperswitch
crates/diesel_models/README.md
.md
# Storage Models Database models shared across `router` and other crates.
15
hyperswitch
crates/diesel_models/src/payment_link.rs
.rs
use common_utils::types::MinorUnit; use diesel::{Identifiable, Insertable, Queryable, Selectable}; use serde::{self, Deserialize, Serialize}; use time::PrimitiveDateTime; use crate::{enums as storage_enums, schema::payment_link}; #[derive(Clone, Debug, Identifiable, Queryable, Selectable, Serialize, Deserialize)] #[d...
574
hyperswitch
crates/diesel_models/src/query.rs
.rs
pub mod address; pub mod api_keys; pub mod blocklist_lookup; pub mod business_profile; mod capture; pub mod cards_info; pub mod configs; pub mod authentication; pub mod authorization; pub mod blocklist; pub mod blocklist_fingerprint; pub mod callback_mapper; pub mod customers; pub mod dashboard_metadata; pub mod dispu...
217
hyperswitch
crates/diesel_models/src/merchant_account.rs
.rs
use common_utils::{encryption::Encryption, pii}; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use crate::enums as storage_enums; #[cfg(feature = "v1")] use crate::schema::merchant_account; #[cfg(feature = "v2")] use crate::schema_v2::merchant_account; /// Note: The order of fields in th...
3,931
hyperswitch
crates/diesel_models/src/payment_intent.rs
.rs
use common_enums::{PaymentMethodType, RequestIncrementalAuthorization}; use common_types::primitive_wrappers::RequestExtendedAuthorizationBool; use common_utils::{encryption::Encryption, pii, types::MinorUnit}; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use serde::{Deserialize, Serializ...
12,381
hyperswitch
crates/diesel_models/src/refund.rs
.rs
use common_utils::{ pii, types::{ChargeRefunds, ConnectorTransactionId, ConnectorTransactionIdTrait, MinorUnit}, }; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use serde::{Deserialize, Serialize}; use time::PrimitiveDateTime; use crate::enums as storage_enums; #[cfg(all(any(feat...
6,326
hyperswitch
crates/diesel_models/src/schema_v2.rs
.rs
// @generated automatically by Diesel CLI. diesel::table! { use diesel::sql_types::*; use crate::enums::diesel_exports::*; address (address_id) { #[max_length = 64] address_id -> Varchar, #[max_length = 128] city -> Nullable<Varchar>, country -> Nullable<CountryAlph...
11,404
hyperswitch
crates/diesel_models/src/organization.rs
.rs
use common_utils::{id_type, pii}; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; #[cfg(feature = "v1")] use crate::schema::organization; #[cfg(feature = "v2")] use crate::schema_v2::organization; pub trait OrganizationBridge { fn get_organization_id(&self) -> id_type::OrganizationId; ...
1,773
hyperswitch
crates/diesel_models/src/capture.rs
.rs
use common_utils::types::{ConnectorTransactionId, MinorUnit}; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use serde::{Deserialize, Serialize}; use time::PrimitiveDateTime; use crate::{enums as storage_enums, schema::captures}; #[derive( Clone, Debug, Eq, PartialEq, Identifiable, Qu...
1,196
hyperswitch
crates/diesel_models/src/enums.rs
.rs
#[doc(hidden)] pub mod diesel_exports { pub use super::{ DbApiVersion as ApiVersion, DbAttemptStatus as AttemptStatus, DbAuthenticationType as AuthenticationType, DbBlocklistDataKind as BlocklistDataKind, DbCaptureMethod as CaptureMethod, DbCaptureStatus as CaptureStatus, DbCardDisco...
1,814
hyperswitch
crates/diesel_models/src/kv.rs
.rs
use error_stack::ResultExt; use serde::{Deserialize, Serialize}; #[cfg(feature = "v2")] use crate::payment_attempt::PaymentAttemptUpdateInternal; #[cfg(feature = "v1")] use crate::payment_intent::PaymentIntentUpdate; #[cfg(feature = "v2")] use crate::payment_intent::PaymentIntentUpdateInternal; use crate::{ addres...
2,575
hyperswitch
crates/diesel_models/src/authorization.rs
.rs
use common_utils::types::MinorUnit; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use serde::{Deserialize, Serialize}; use time::PrimitiveDateTime; use crate::{enums as storage_enums, schema::incremental_authorization}; #[derive( Clone, Debug, Eq, PartialEq, Identifiable, Queryable, ...
742
hyperswitch
crates/diesel_models/src/file.rs
.rs
use common_utils::custom_serde; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use masking::{Deserialize, Serialize}; use crate::schema::file_metadata; #[derive(Clone, Debug, Deserialize, Insertable, Serialize, router_derive::DebugAsDisplay)] #[diesel(table_name = file_metadata)] #[serde(...
676
hyperswitch
crates/diesel_models/src/authentication.rs
.rs
use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use serde::{self, Deserialize, Serialize}; use serde_json; use crate::schema::authentication; #[derive( Clone, Debug, Eq, PartialEq, Identifiable, Queryable, Selectable, Serialize, Deserialize, )] #[diesel(table_name = authentication, pr...
3,598
hyperswitch
crates/diesel_models/src/unified_translations.rs
.rs
//! Translations use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use time::PrimitiveDateTime; use crate::schema::unified_translations; #[derive(Clone, Debug, Queryable, Selectable, Identifiable)] #[diesel(table_name = unified_translations, primary_key(unified_code, unified_message, locale...
331
hyperswitch
crates/diesel_models/src/schema.rs
.rs
// @generated automatically by Diesel CLI. diesel::table! { use diesel::sql_types::*; use crate::enums::diesel_exports::*; address (address_id) { #[max_length = 64] address_id -> Varchar, #[max_length = 128] city -> Nullable<Varchar>, country -> Nullable<CountryAlph...
12,084
hyperswitch
crates/diesel_models/src/api_keys.rs
.rs
use diesel::{AsChangeset, AsExpression, Identifiable, Insertable, Queryable, Selectable}; use serde::{Deserialize, Serialize}; use time::PrimitiveDateTime; use crate::schema::api_keys; #[derive( serde::Serialize, serde::Deserialize, Debug, Clone, Identifiable, Queryable, Selectable, )] #[diesel(table_name = api_k...
1,006
hyperswitch
crates/diesel_models/src/relay.rs
.rs
use common_utils::pii; use diesel::{AsChangeset, Identifiable, Insertable, Queryable, Selectable}; use time::PrimitiveDateTime; use crate::{enums as storage_enums, schema::relay}; #[derive( Clone, Debug, Eq, Identifiable, Queryable, Selectable, PartialEq, serde::Serialize, serde::D...
629