@develit-io/backend-sdk 9.0.2 → 9.0.3

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
@@ -3,7 +3,6 @@ import { ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, AnyColumn
3
3
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
4
4
  import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
5
5
  import { z as z$1 } from 'zod';
6
- export { I as IdempotencyContextVariables, U as UserContextVariables } from './shared/backend-sdk.BBnNdxMl.mjs';
7
6
  import * as z from 'zod/v4/core';
8
7
  import { ContentfulStatusCode, SuccessStatusCode } from 'hono/utils/http-status';
9
8
  export { ContentfulStatusCode as InternalResponseStatus } from 'hono/utils/http-status';
@@ -35,7 +34,7 @@ declare const bankAccount: {
35
34
  swiftBic: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"swift_bic", [string, ...string[]], number | undefined>;
36
35
  bicCor: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"bic_cor", [string, ...string[]], number | undefined>;
37
36
  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>>;
38
- countryCode: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"country_code", ["EC" | "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" | "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" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW", ...("EC" | "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" | "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" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
37
+ 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" | "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" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
39
38
  routingNumber: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"routing_number", [string, ...string[]], number | undefined>;
40
39
  sortCode: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"sort_code", [string, ...string[]], number | undefined>;
41
40
  clabe: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"clabe", [string, ...string[]], number | undefined>;
@@ -189,7 +188,6 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
189
188
  AVAX: "AVAX";
190
189
  }>>;
191
190
  countryCode: z$1.ZodOptional<z$1.ZodEnum<{
192
- EC: "EC";
193
191
  AF: "AF";
194
192
  AL: "AL";
195
193
  DZ: "DZ";
@@ -243,6 +241,7 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
243
241
  DM: "DM";
244
242
  DO: "DO";
245
243
  TL: "TL";
244
+ EC: "EC";
246
245
  EG: "EG";
247
246
  SV: "SV";
248
247
  GQ: "GQ";
@@ -442,6 +441,19 @@ interface CommandItem<TAuditAction = string> {
442
441
  id: string;
443
442
  }
444
443
 
444
+ interface IdempotencyContextVariables {
445
+ idempotency: {
446
+ key: string;
447
+ };
448
+ }
449
+ interface UserContextVariables {
450
+ user: {
451
+ email: string;
452
+ role: string;
453
+ organizationId: string;
454
+ };
455
+ }
456
+
445
457
  /**
446
458
  * Utility type to infer possible relation includes (`with`) for a given table.
447
459
  * This helps define which relations (one-to-many, many-to-one) can be included in a query.
@@ -832,4 +844,4 @@ type AsyncMethod<TArgs extends unknown[] = unknown[], TResult = unknown> = (...a
832
844
  declare function cloudflareQueue<TArgs extends unknown[] = unknown[], TResult = unknown>(options: WithRetryCounterOptions): (target: unknown, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod<TArgs, TResult>>) => void;
833
845
 
834
846
  export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInternalError, createSignatureKeyPair, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, signPayload, useFetch, useResult, useResultSync, uuidv4, verifyPayloadSignature, workflowInstanceStatusSchema };
835
- export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, UserRole, ValidatedInput, WorkflowInstanceStatus };
847
+ export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IdempotencyContextVariables, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, UserContextVariables, UserRole, ValidatedInput, WorkflowInstanceStatus };
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import { ExtractTablesWithRelations, DBQueryConfig, BuildQueryResult, AnyColumn
3
3
  import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
4
4
  import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
5
5
  import { z as z$1 } from 'zod';
6
- export { I as IdempotencyContextVariables, U as UserContextVariables } from './shared/backend-sdk.BBnNdxMl.js';
7
6
  import * as z from 'zod/v4/core';
8
7
  import { ContentfulStatusCode, SuccessStatusCode } from 'hono/utils/http-status';
9
8
  export { ContentfulStatusCode as InternalResponseStatus } from 'hono/utils/http-status';
@@ -35,7 +34,7 @@ declare const bankAccount: {
35
34
  swiftBic: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"swift_bic", [string, ...string[]], number | undefined>;
36
35
  bicCor: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"bic_cor", [string, ...string[]], number | undefined>;
37
36
  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>>;
38
- countryCode: drizzle_orm.NotNull<drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"country_code", ["EC" | "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" | "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" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW", ...("EC" | "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" | "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" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
37
+ 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" | "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" | "UZ" | "VU" | "VE" | "VN" | "WF" | "EH" | "YE" | "ZM" | "ZW")[]], number | undefined>>;
39
38
  routingNumber: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"routing_number", [string, ...string[]], number | undefined>;
40
39
  sortCode: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"sort_code", [string, ...string[]], number | undefined>;
41
40
  clabe: drizzle_orm_sqlite_core.SQLiteTextBuilderInitial<"clabe", [string, ...string[]], number | undefined>;
@@ -189,7 +188,6 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
189
188
  AVAX: "AVAX";
190
189
  }>>;
191
190
  countryCode: z$1.ZodOptional<z$1.ZodEnum<{
192
- EC: "EC";
193
191
  AF: "AF";
194
192
  AL: "AL";
195
193
  DZ: "DZ";
@@ -243,6 +241,7 @@ declare const bankAccountMetadataSchema: z$1.ZodObject<{
243
241
  DM: "DM";
244
242
  DO: "DO";
245
243
  TL: "TL";
244
+ EC: "EC";
246
245
  EG: "EG";
247
246
  SV: "SV";
248
247
  GQ: "GQ";
@@ -442,6 +441,19 @@ interface CommandItem<TAuditAction = string> {
442
441
  id: string;
443
442
  }
444
443
 
444
+ interface IdempotencyContextVariables {
445
+ idempotency: {
446
+ key: string;
447
+ };
448
+ }
449
+ interface UserContextVariables {
450
+ user: {
451
+ email: string;
452
+ role: string;
453
+ organizationId: string;
454
+ };
455
+ }
456
+
445
457
  /**
446
458
  * Utility type to infer possible relation includes (`with`) for a given table.
447
459
  * This helps define which relations (one-to-many, many-to-one) can be included in a query.
@@ -832,4 +844,4 @@ type AsyncMethod<TArgs extends unknown[] = unknown[], TResult = unknown> = (...a
832
844
  declare function cloudflareQueue<TArgs extends unknown[] = unknown[], TResult = unknown>(options: WithRetryCounterOptions): (target: unknown, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<AsyncMethod<TArgs, TResult>>) => void;
833
845
 
834
846
  export { DatabaseTransaction, ENVIRONMENT, RPCResponse, USER_ROLES, action, asNonEmpty, bankAccount, bankAccountMetadataSchema, base, bicSchema, buildMultiFilterConditions, buildRangeFilterConditions, buildSearchConditions, calculateExponentialBackoff, cloudflareQueue, composeWranglerBase, createAuditLogWriter, createInternalError, createSignatureKeyPair, defineCommand, derivePortFromId, develitWorker, durableObjectNamespaceIdFromName, first, firstOrError, getD1Credentials, getD1DatabaseIdFromWrangler, getDrizzleD1Config, getSecret, handleAction, ibanSchema, isInternalError, nullToOptional, optionalToNull, paginationQuerySchema, paginationSchema, resolveColumn, service, signPayload, useFetch, useResult, useResultSync, uuidv4, verifyPayloadSignature, workflowInstanceStatusSchema };
835
- export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, UserRole, ValidatedInput, WorkflowInstanceStatus };
847
+ export type { ActionExecution, ActionHandlerOptions, AuditLogWriter, BankAccountMetadata, BaseEvent, BuildSearchOptions, Command, CommandLogPayload, DevelitWorkerMethods, Environment, GatewayResponse, IRPCResponse, IdempotencyContextVariables, IncludeRelation, InferResultType, InternalError, InternalErrorResponseStatus, Project, UserContextVariables, UserRole, ValidatedInput, WorkflowInstanceStatus };
@@ -1,80 +1,13 @@
1
- import * as hono_types from 'hono/types';
2
- import { I as IdempotencyContextVariables, U as UserContextVariables } from './shared/backend-sdk.BBnNdxMl.mjs';
1
+ import { MiddlewareHandler } from 'hono/types';
3
2
 
4
- declare const idempotency: () => hono_types.MiddlewareHandler<{
5
- Variables: IdempotencyContextVariables;
6
- Bindings: {
7
- IDEMPOTENCY_KV: KVNamespace;
8
- };
9
- }, string, {}, Response>;
3
+ declare const idempotency: () => MiddlewareHandler;
10
4
 
11
- type AuthService = {
12
- verifyAccessToken: (params: {
13
- accessToken: string;
14
- }) => Promise<{
15
- data?: {
16
- payload: {
17
- user: {
18
- email: string;
19
- role: string;
20
- rawUserMetaData: string | null;
21
- };
22
- };
23
- };
24
- error?: unknown;
25
- }>;
26
- };
27
- declare const jwt: () => hono_types.MiddlewareHandler<{
28
- Variables: UserContextVariables;
29
- Bindings: {
30
- AUTH_SERVICE: AuthService;
31
- };
32
- }, string, {}, Response>;
5
+ declare const jwt: () => MiddlewareHandler;
33
6
 
34
- type OrganizationService$1 = {
35
- getOrganization: (params: {
36
- organizationId: string;
37
- }) => Promise<{
38
- data: {
39
- id: string;
40
- ipAuthorization: boolean;
41
- authorizedIps: {
42
- ip: string;
43
- }[];
44
- } | null | undefined;
45
- error: boolean;
46
- }>;
47
- };
48
- declare const ip: () => hono_types.MiddlewareHandler<{
49
- Variables: UserContextVariables;
50
- Bindings: {
51
- ENVIRONMENT: string;
52
- ORGANIZATION_SERVICE: OrganizationService$1;
53
- };
54
- }, string, {}, Response>;
7
+ declare const ip: () => MiddlewareHandler;
55
8
 
56
- declare const logger: () => hono_types.MiddlewareHandler<any, string, {}, Response>;
9
+ declare const logger: () => MiddlewareHandler;
57
10
 
58
- type OrganizationService = {
59
- getOrganization: (params: {
60
- organizationId: string;
61
- }) => Promise<{
62
- data: {
63
- id: string;
64
- signatureKeys: {
65
- name: string;
66
- publicKey: string;
67
- }[];
68
- } | null | undefined;
69
- error: boolean;
70
- }>;
71
- };
72
- declare const signature: () => hono_types.MiddlewareHandler<{
73
- Variables: UserContextVariables;
74
- Bindings: {
75
- ENVIRONMENT: string;
76
- ORGANIZATION_SERVICE: OrganizationService;
77
- };
78
- }, string, {}, Response>;
11
+ declare const signature: () => MiddlewareHandler;
79
12
 
80
13
  export { idempotency, ip, jwt, logger, signature };
@@ -1,80 +1,13 @@
1
- import * as hono_types from 'hono/types';
2
- import { I as IdempotencyContextVariables, U as UserContextVariables } from './shared/backend-sdk.BBnNdxMl.js';
1
+ import { MiddlewareHandler } from 'hono/types';
3
2
 
4
- declare const idempotency: () => hono_types.MiddlewareHandler<{
5
- Variables: IdempotencyContextVariables;
6
- Bindings: {
7
- IDEMPOTENCY_KV: KVNamespace;
8
- };
9
- }, string, {}, Response>;
3
+ declare const idempotency: () => MiddlewareHandler;
10
4
 
11
- type AuthService = {
12
- verifyAccessToken: (params: {
13
- accessToken: string;
14
- }) => Promise<{
15
- data?: {
16
- payload: {
17
- user: {
18
- email: string;
19
- role: string;
20
- rawUserMetaData: string | null;
21
- };
22
- };
23
- };
24
- error?: unknown;
25
- }>;
26
- };
27
- declare const jwt: () => hono_types.MiddlewareHandler<{
28
- Variables: UserContextVariables;
29
- Bindings: {
30
- AUTH_SERVICE: AuthService;
31
- };
32
- }, string, {}, Response>;
5
+ declare const jwt: () => MiddlewareHandler;
33
6
 
34
- type OrganizationService$1 = {
35
- getOrganization: (params: {
36
- organizationId: string;
37
- }) => Promise<{
38
- data: {
39
- id: string;
40
- ipAuthorization: boolean;
41
- authorizedIps: {
42
- ip: string;
43
- }[];
44
- } | null | undefined;
45
- error: boolean;
46
- }>;
47
- };
48
- declare const ip: () => hono_types.MiddlewareHandler<{
49
- Variables: UserContextVariables;
50
- Bindings: {
51
- ENVIRONMENT: string;
52
- ORGANIZATION_SERVICE: OrganizationService$1;
53
- };
54
- }, string, {}, Response>;
7
+ declare const ip: () => MiddlewareHandler;
55
8
 
56
- declare const logger: () => hono_types.MiddlewareHandler<any, string, {}, Response>;
9
+ declare const logger: () => MiddlewareHandler;
57
10
 
58
- type OrganizationService = {
59
- getOrganization: (params: {
60
- organizationId: string;
61
- }) => Promise<{
62
- data: {
63
- id: string;
64
- signatureKeys: {
65
- name: string;
66
- publicKey: string;
67
- }[];
68
- } | null | undefined;
69
- error: boolean;
70
- }>;
71
- };
72
- declare const signature: () => hono_types.MiddlewareHandler<{
73
- Variables: UserContextVariables;
74
- Bindings: {
75
- ENVIRONMENT: string;
76
- ORGANIZATION_SERVICE: OrganizationService;
77
- };
78
- }, string, {}, Response>;
11
+ declare const signature: () => MiddlewareHandler;
79
12
 
80
13
  export { 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.0.2",
3
+ "version": "9.0.3",
4
4
  "description": "Develit Backend SDK",
5
5
  "author": "Develit.io",
6
6
  "license": "ISC",
@@ -1,14 +0,0 @@
1
- interface IdempotencyContextVariables {
2
- idempotency: {
3
- key: string;
4
- };
5
- }
6
- interface UserContextVariables {
7
- user: {
8
- email: string;
9
- role: string;
10
- organizationId: string;
11
- };
12
- }
13
-
14
- export type { IdempotencyContextVariables as I, UserContextVariables as U };
@@ -1,14 +0,0 @@
1
- interface IdempotencyContextVariables {
2
- idempotency: {
3
- key: string;
4
- };
5
- }
6
- interface UserContextVariables {
7
- user: {
8
- email: string;
9
- role: string;
10
- organizationId: string;
11
- };
12
- }
13
-
14
- export type { IdempotencyContextVariables as I, UserContextVariables as U };