@develit-io/backend-sdk 9.11.13 → 9.11.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -39,7 +39,7 @@ declare const bankAccount: {
39
39
  swiftBic: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"swift_bic", [string, ...string[]], number | undefined>;
40
40
  bicCor: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"bic_cor", [string, ...string[]], number | undefined>;
41
41
  currency: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"currency", ["CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX", ...("CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX")[]], number | undefined>>;
42
- countryCode: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"country_code", ["IM" | "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW", ...("IM" | "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
42
+ countryCode: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"country_code", ["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
43
43
  routingNumber: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"routing_number", [string, ...string[]], number | undefined>;
44
44
  sortCode: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"sort_code", [string, ...string[]], number | undefined>;
45
45
  clabe: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"clabe", [string, ...string[]], number | undefined>;
@@ -238,7 +238,6 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
238
238
  AVAX: "AVAX";
239
239
  }>>;
240
240
  countryCode: z$1.ZodOptional<z$1.ZodEnum<{
241
- IM: "IM";
242
241
  AF: "AF";
243
242
  AL: "AL";
244
243
  DZ: "DZ";
@@ -327,6 +326,7 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
327
326
  IR: "IR";
328
327
  IQ: "IQ";
329
328
  IE: "IE";
329
+ IM: "IM";
330
330
  IL: "IL";
331
331
  IT: "IT";
332
332
  CI: "CI";
package/dist/index.d.ts CHANGED
@@ -39,7 +39,7 @@ declare const bankAccount: {
39
39
  swiftBic: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"swift_bic", [string, ...string[]], number | undefined>;
40
40
  bicCor: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"bic_cor", [string, ...string[]], number | undefined>;
41
41
  currency: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"currency", ["CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX", ...("CZK" | "EUR" | "USD" | "PLN" | "RON" | "GBP" | "RUB" | "HUF" | "CHF" | "DKK" | "SEK" | "HRK" | "NOK" | "BGN" | "TRY" | "AUD" | "CAD" | "JPY" | "CNY" | "INR" | "BRL" | "MXN" | "ZAR" | "SGD" | "HKD" | "KRW" | "MYR" | "THB" | "IDR" | "PHP" | "AED" | "SAR" | "ILS" | "EGP" | "NGN" | "PKR" | "COP" | "CLP" | "PEN" | "VND" | "KZT" | "UAH" | "BTC" | "ETH" | "ADA" | "DOT" | "ATOM" | "XRP" | "LTC" | "SOL" | "DOGE" | "MATIC" | "AVAX")[]], number | undefined>>;
42
- countryCode: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"country_code", ["IM" | "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW", ...("IM" | "AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
42
+ countryCode: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"country_code", ["AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW", ...("AF" | "AL" | "DZ" | "AS" | "AD" | "AO" | "AG" | "AR" | "AM" | "AW" | "AU" | "AT" | "AZ" | "BS" | "BH" | "BD" | "BB" | "BY" | "BE" | "BZ" | "BJ" | "BO" | "BQ" | "BA" | "BW" | "BR" | "IO" | "VG" | "BG" | "BF" | "BI" | "KH" | "CM" | "CA" | "CV" | "CF" | "TD" | "CL" | "CN" | "CO" | "KM" | "CK" | "CR" | "HR" | "CW" | "CY" | "CZ" | "CD" | "DK" | "DJ" | "DM" | "DO" | "TL" | "EC" | "EG" | "SV" | "GQ" | "ER" | "EE" | "ET" | "FO" | "FJ" | "FI" | "FR" | "GF" | "PF" | "GA" | "GM" | "GE" | "DE" | "GH" | "GR" | "GD" | "GP" | "GU" | "GT" | "GN" | "GW" | "GY" | "HT" | "HN" | "HU" | "IS" | "IN" | "ID" | "IR" | "IQ" | "IE" | "IM" | "IL" | "IT" | "CI" | "JM" | "JP" | "JE" | "JO" | "KZ" | "KE" | "KI" | "XK" | "KW" | "KG" | "LA" | "LV" | "LB" | "LS" | "LR" | "LI" | "LT" | "LU" | "MK" | "MG" | "MW" | "MY" | "MV" | "ML" | "MT" | "MQ" | "MR" | "MU" | "MX" | "FM" | "MD" | "MC" | "MN" | "ME" | "MS" | "MA" | "MZ" | "NA" | "NP" | "NL" | "NZ" | "NI" | "NE" | "NG" | "NU" | "NF" | "KP" | "NO" | "OM" | "PK" | "PS" | "PA" | "PG" | "PY" | "PE" | "PH" | "PL" | "PT" | "PR" | "QA" | "CG" | "RE" | "RO" | "RU" | "RW" | "BL" | "KN" | "LC" | "MF" | "VC" | "WS" | "SM" | "SA" | "SN" | "RS" | "SC" | "SL" | "SG" | "SX" | "SK" | "SI" | "SO" | "ZA" | "KR" | "SS" | "ES" | "LK" | "SD" | "SR" | "SJ" | "SZ" | "SE" | "CH" | "TW" | "TJ" | "TZ" | "TH" | "TG" | "TO" | "TT" | "TN" | "TR" | "TM" | "UM" | "VI" | "UG" | "UA" | "AE" | "GB" | "US" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
43
43
  routingNumber: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"routing_number", [string, ...string[]], number | undefined>;
44
44
  sortCode: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"sort_code", [string, ...string[]], number | undefined>;
45
45
  clabe: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"clabe", [string, ...string[]], number | undefined>;
@@ -238,7 +238,6 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
238
238
  AVAX: "AVAX";
239
239
  }>>;
240
240
  countryCode: z$1.ZodOptional<z$1.ZodEnum<{
241
- IM: "IM";
242
241
  AF: "AF";
243
242
  AL: "AL";
244
243
  DZ: "DZ";
@@ -327,6 +326,7 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
327
326
  IR: "IR";
328
327
  IQ: "IQ";
329
328
  IE: "IE";
329
+ IM: "IM";
330
330
  IL: "IL";
331
331
  IT: "IT";
332
332
  CI: "CI";
@@ -15,18 +15,102 @@ interface AccessMiddlewareOptions {
15
15
  errorMessage?: string;
16
16
  }
17
17
  type AccessRequestResolver<TScope extends string = string> = ScopeCondition<TScope> | ((context: Context) => ScopeCondition<TScope>);
18
+ /**
19
+ * Middleware that enforces role-based access control (RBAC).
20
+ *
21
+ * Verifies the authenticated user has the required scopes/permissions by calling
22
+ * the `RBAC_SERVICE` binding. Supports static scope definitions or a dynamic
23
+ * resolver function that receives the Hono context.
24
+ *
25
+ * @requires `RBAC_SERVICE` binding.
26
+ * @requires `identity` context variable (set by the `jwt` middleware).
27
+ * @param accessRequests - Scope conditions to verify, or a function that returns them.
28
+ * @param options.errorMessage - Custom 403 error message.
29
+ * @param Can be disabled by setting `MIDDLEWARE_ACCESS_DISABLED` env var.
30
+ * @throws {HTTPException} 403 if the user does not have the required access.
31
+ */
18
32
  declare const access: <TScope extends string = string>(accessRequests: AccessRequestResolver<TScope>, options?: AccessMiddlewareOptions) => MiddlewareHandler;
19
33
 
34
+ /**
35
+ * Middleware that authenticates requests using an admin API key.
36
+ *
37
+ * Expects a `Bearer <token>` in the `Authorization` header and validates it
38
+ * against the `GATEWAY_ADMIN_API_KEY` secret stored in the Secrets Store binding.
39
+ *
40
+ * @requires `SECRETS_STORE` binding with a `GATEWAY_ADMIN_API_KEY` secret provisioned.
41
+ * @throws {HTTPException} 401 if the token is missing or does not match.
42
+ */
20
43
  declare const adminAuth: MiddlewareHandler;
21
44
 
45
+ /**
46
+ * Middleware that ensures request idempotency using Cloudflare KV.
47
+ *
48
+ * Expects an `x-idempotency-key` header. If the key already exists in KV,
49
+ * the request is rejected as a duplicate (409). Otherwise the key is stored
50
+ * with a 3-day TTL and the request proceeds. Sets `idempotency.key` in context.
51
+ *
52
+ * @requires `IDEMPOTENCY_KV` KV namespace binding.
53
+ * @param Can be disabled by setting `MIDDLEWARE_IDEMPOTENCY_DISABLED` env var.
54
+ * @throws {HTTPException} 401 if the `x-idempotency-key` header is missing.
55
+ * @throws {HTTPException} 409 if the idempotency key has already been used.
56
+ */
22
57
  declare const idempotency: () => MiddlewareHandler;
23
58
 
59
+ /**
60
+ * Middleware that authenticates requests using a JWT access token.
61
+ *
62
+ * Extracts the Bearer token from the `Authorization` header, verifies it via
63
+ * the `AUTH_SERVICE` binding, and populates `identity` in the context with user
64
+ * details (id, email, role, organizationId, exchangeOfficeId).
65
+ *
66
+ * @requires `AUTH_SERVICE` binding.
67
+ * @param Can be disabled by setting `MIDDLEWARE_JWT_DISABLED` env var.
68
+ * @throws {HTTPException} 401 if the header is missing, not a Bearer scheme, or token is invalid.
69
+ * @throws {HTTPException} 422 if user metadata is missing organizationId/exchangeOfficeId.
70
+ */
24
71
  declare const jwt: () => MiddlewareHandler;
25
72
 
73
+ /**
74
+ * Middleware that enforces IP-based access control per organization.
75
+ *
76
+ * Retrieves the caller's IP from request headers and checks it against
77
+ * the organization's authorized IP list via the `ORGANIZATION_SERVICE` binding.
78
+ *
79
+ * @requires `ORGANIZATION_SERVICE` binding.
80
+ * @requires `ENVIRONMENT` binding.
81
+ * @param Can be disabled by setting `MIDDLEWARE_IP_DISABLED` env var.
82
+ * @throws {HTTPException} 401 if the IP address cannot be determined or organization ID is missing.
83
+ * @throws {HTTPException} 404 if the organization is not found or the IP is not authorized.
84
+ */
26
85
  declare const ip: () => MiddlewareHandler;
27
86
 
87
+ /**
88
+ * Middleware that logs incoming requests and outgoing responses.
89
+ *
90
+ * Logs request/response details to the console and optionally sends audit log
91
+ * entries to the `ACTIVITY_SERVICE` binding. Sets `auditLog.requestId` in context
92
+ * for correlating request/response audit log pairs.
93
+ *
94
+ * @requires `ACTIVITY_SERVICE` binding (when audit logging is enabled).
95
+ * @requires `ENVIRONMENT` binding.
96
+ * @param Can be disabled by setting `MIDDLEWARE_LOGGER_DISABLED` env var.
97
+ * @param Audit logging can be separately disabled via `MIDDLEWARE_LOGGER_AUDITLOG_DISABLED` env var.
98
+ */
28
99
  declare const logger: () => MiddlewareHandler;
29
100
 
101
+ /**
102
+ * Middleware that verifies the request payload signature.
103
+ *
104
+ * Expects `x-signature` and `x-signature-key` headers. Looks up the corresponding
105
+ * public key from the organization's signature keys via the `ORGANIZATION_SERVICE` binding
106
+ * and verifies the payload against it.
107
+ *
108
+ * @requires `ORGANIZATION_SERVICE` binding.
109
+ * @requires `ENVIRONMENT` binding.
110
+ * @param Can be disabled by setting `MIDDLEWARE_SIGNATURE_DISABLED` env var.
111
+ * @throws {HTTPException} 401 if signature headers are missing or verification fails.
112
+ * @throws {HTTPException} 404 if the organization or signature key is not found.
113
+ */
30
114
  declare const signature: () => MiddlewareHandler;
31
115
 
32
116
  export { access, adminAuth, idempotency, ip, jwt, logger, signature };
@@ -15,18 +15,102 @@ interface AccessMiddlewareOptions {
15
15
  errorMessage?: string;
16
16
  }
17
17
  type AccessRequestResolver<TScope extends string = string> = ScopeCondition<TScope> | ((context: Context) => ScopeCondition<TScope>);
18
+ /**
19
+ * Middleware that enforces role-based access control (RBAC).
20
+ *
21
+ * Verifies the authenticated user has the required scopes/permissions by calling
22
+ * the `RBAC_SERVICE` binding. Supports static scope definitions or a dynamic
23
+ * resolver function that receives the Hono context.
24
+ *
25
+ * @requires `RBAC_SERVICE` binding.
26
+ * @requires `identity` context variable (set by the `jwt` middleware).
27
+ * @param accessRequests - Scope conditions to verify, or a function that returns them.
28
+ * @param options.errorMessage - Custom 403 error message.
29
+ * @param Can be disabled by setting `MIDDLEWARE_ACCESS_DISABLED` env var.
30
+ * @throws {HTTPException} 403 if the user does not have the required access.
31
+ */
18
32
  declare const access: <TScope extends string = string>(accessRequests: AccessRequestResolver<TScope>, options?: AccessMiddlewareOptions) => MiddlewareHandler;
19
33
 
34
+ /**
35
+ * Middleware that authenticates requests using an admin API key.
36
+ *
37
+ * Expects a `Bearer <token>` in the `Authorization` header and validates it
38
+ * against the `GATEWAY_ADMIN_API_KEY` secret stored in the Secrets Store binding.
39
+ *
40
+ * @requires `SECRETS_STORE` binding with a `GATEWAY_ADMIN_API_KEY` secret provisioned.
41
+ * @throws {HTTPException} 401 if the token is missing or does not match.
42
+ */
20
43
  declare const adminAuth: MiddlewareHandler;
21
44
 
45
+ /**
46
+ * Middleware that ensures request idempotency using Cloudflare KV.
47
+ *
48
+ * Expects an `x-idempotency-key` header. If the key already exists in KV,
49
+ * the request is rejected as a duplicate (409). Otherwise the key is stored
50
+ * with a 3-day TTL and the request proceeds. Sets `idempotency.key` in context.
51
+ *
52
+ * @requires `IDEMPOTENCY_KV` KV namespace binding.
53
+ * @param Can be disabled by setting `MIDDLEWARE_IDEMPOTENCY_DISABLED` env var.
54
+ * @throws {HTTPException} 401 if the `x-idempotency-key` header is missing.
55
+ * @throws {HTTPException} 409 if the idempotency key has already been used.
56
+ */
22
57
  declare const idempotency: () => MiddlewareHandler;
23
58
 
59
+ /**
60
+ * Middleware that authenticates requests using a JWT access token.
61
+ *
62
+ * Extracts the Bearer token from the `Authorization` header, verifies it via
63
+ * the `AUTH_SERVICE` binding, and populates `identity` in the context with user
64
+ * details (id, email, role, organizationId, exchangeOfficeId).
65
+ *
66
+ * @requires `AUTH_SERVICE` binding.
67
+ * @param Can be disabled by setting `MIDDLEWARE_JWT_DISABLED` env var.
68
+ * @throws {HTTPException} 401 if the header is missing, not a Bearer scheme, or token is invalid.
69
+ * @throws {HTTPException} 422 if user metadata is missing organizationId/exchangeOfficeId.
70
+ */
24
71
  declare const jwt: () => MiddlewareHandler;
25
72
 
73
+ /**
74
+ * Middleware that enforces IP-based access control per organization.
75
+ *
76
+ * Retrieves the caller's IP from request headers and checks it against
77
+ * the organization's authorized IP list via the `ORGANIZATION_SERVICE` binding.
78
+ *
79
+ * @requires `ORGANIZATION_SERVICE` binding.
80
+ * @requires `ENVIRONMENT` binding.
81
+ * @param Can be disabled by setting `MIDDLEWARE_IP_DISABLED` env var.
82
+ * @throws {HTTPException} 401 if the IP address cannot be determined or organization ID is missing.
83
+ * @throws {HTTPException} 404 if the organization is not found or the IP is not authorized.
84
+ */
26
85
  declare const ip: () => MiddlewareHandler;
27
86
 
87
+ /**
88
+ * Middleware that logs incoming requests and outgoing responses.
89
+ *
90
+ * Logs request/response details to the console and optionally sends audit log
91
+ * entries to the `ACTIVITY_SERVICE` binding. Sets `auditLog.requestId` in context
92
+ * for correlating request/response audit log pairs.
93
+ *
94
+ * @requires `ACTIVITY_SERVICE` binding (when audit logging is enabled).
95
+ * @requires `ENVIRONMENT` binding.
96
+ * @param Can be disabled by setting `MIDDLEWARE_LOGGER_DISABLED` env var.
97
+ * @param Audit logging can be separately disabled via `MIDDLEWARE_LOGGER_AUDITLOG_DISABLED` env var.
98
+ */
28
99
  declare const logger: () => MiddlewareHandler;
29
100
 
101
+ /**
102
+ * Middleware that verifies the request payload signature.
103
+ *
104
+ * Expects `x-signature` and `x-signature-key` headers. Looks up the corresponding
105
+ * public key from the organization's signature keys via the `ORGANIZATION_SERVICE` binding
106
+ * and verifies the payload against it.
107
+ *
108
+ * @requires `ORGANIZATION_SERVICE` binding.
109
+ * @requires `ENVIRONMENT` binding.
110
+ * @param Can be disabled by setting `MIDDLEWARE_SIGNATURE_DISABLED` env var.
111
+ * @throws {HTTPException} 401 if signature headers are missing or verification fails.
112
+ * @throws {HTTPException} 404 if the organization or signature key is not found.
113
+ */
30
114
  declare const signature: () => MiddlewareHandler;
31
115
 
32
116
  export { access, adminAuth, idempotency, ip, jwt, logger, signature };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-io/backend-sdk",
3
- "version": "9.11.13",
3
+ "version": "9.11.14",
4
4
  "description": "Develit Backend SDK",
5
5
  "author": "Develit.io",
6
6
  "license": "ISC",