type JsonValue = string | number | boolean | null | JsonObject | JsonValue[];
type JsonObject = Record<string, any>;
interface GraphQLOperationDefinition {
    methodName: string;
    displayName: string;
    group: string;
    query: string | null;
    operationName: string | null;
    requestId: string | null;
    defaultVariables: JsonObject;
}
interface GraphQLResult<TData extends JsonObject = JsonObject> {
    data: TData | null;
    raw: JsonObject;
    statusCode: number | null;
    operationName: string | null;
    requestId: string | null;
}
interface CountryFieldRule {
    fieldName: string;
    entityType: string | null;
    paymentMethodSource: string | null;
    isRequired: boolean;
    regexPattern: string | null;
    transactionType: string | null;
}
interface ErrorItem extends JsonObject {
    message?: string | null;
    code?: string | null;
}
interface AuthToken extends JsonObject {
    idToken?: string | null;
    expiresIn?: number | null;
    refreshToken?: JsonValue;
    accessToken?: string | null;
    tokenType?: string | null;
}
interface AuthGetTokenResponse extends JsonObject {
    token?: AuthToken | null;
}
interface AccountBalanceItem extends JsonObject {
    currencyCode?: string | null;
    currentBalance?: number | null;
    availableBalance?: number | null;
    withdrawableBalance?: number | null;
    currencyType?: string | null;
    payinPayout?: JsonValue;
}
interface AccountGetBalancesResponse extends JsonObject {
    balances?: AccountBalanceItem[] | null;
}
type AuthChangePasswordResponse = JsonObject;
type PayinHostedCancelTransactionResponse = JsonObject;
type PayinHostedCreateTransactionResponse = JsonObject;
type PayinHostedGetTransactionByInternalRefResponse = JsonObject;
type PayinHostedGetTransactionByReferenceResponse = JsonObject;
type PayinHostedGetTransactionsResponse = JsonObject;
type PayinS2sCancelTransactionResponse = JsonObject;
type PayinS2sCreateTransactionResponse = JsonObject;
type PayinS2sGetBanksResponse = JsonObject;
type PayinS2sGetIdentificationTypesResponse = JsonObject;
type PayinS2sGetPaymentMethodsResponse = JsonObject;
type PayinS2sGetTransactionByInternalRefResponse = JsonObject;
type PayinS2sGetTransactionByReferenceResponse = JsonObject;
type PayinS2sGetTransactionsResponse = JsonObject;
type PayinS2sPayTransactionResponse = JsonObject;
type PayoutCreateTransactionResponse = JsonObject;
type PayoutGetBanksResponse = JsonObject;
type PayoutGetFxRateResponse = JsonObject;
type PayoutGetTransactionResponse = JsonObject;
type PayoutGetTransactionsResponse = JsonObject;

declare class PayydSDKError extends Error {
    constructor(message: string);
}
declare class SigningConfigurationError extends PayydSDKError {
}
declare class OperationNotFoundError extends PayydSDKError {
}
declare class GraphQLRequestError extends PayydSDKError {
    readonly statusCode: number | null;
    readonly responseBody: string | null;
    readonly endpoint: string | null;
    readonly operationName: string | null;
    readonly requestId: string | null;
    constructor(message: string, options?: {
        statusCode?: number | null;
        responseBody?: string | null;
        endpoint?: string | null;
        operationName?: string | null;
        requestId?: string | null;
    });
}
declare class GraphQLError extends PayydSDKError {
    readonly errors: JsonObject[];
    readonly data: JsonObject | null;
    readonly statusCode: number | null;
    readonly endpoint: string | null;
    readonly operationName: string | null;
    readonly requestId: string | null;
    constructor(message: string, options: {
        errors: JsonObject[];
        data?: JsonObject | null;
        statusCode?: number | null;
        endpoint?: string | null;
        operationName?: string | null;
        requestId?: string | null;
    });
}

interface AccountGetBalancesFilterOptions {
    currencyCode?: string | null;
}
declare class AccountGetBalancesFilter {
    readonly currencyCode: string | null;
    constructor(options?: AccountGetBalancesFilterOptions);
    toVariables(): JsonObject | null;
}
interface PayinCreateTransactionInputOptions {
    countryIsoCode2: string;
    amount: number;
    currencyCode: string;
    reference: string;
    callbackUrl: string;
    paymentRedirectUrl?: string | null;
}
declare class PayinCreateTransactionInput {
    readonly countryIsoCode2: string;
    readonly amount: number;
    readonly currencyCode: string;
    readonly reference: string;
    readonly callbackUrl: string;
    readonly paymentRedirectUrl: string | null;
    constructor(options: PayinCreateTransactionInputOptions);
    toVariables(): JsonObject;
}
interface PayinCancelTransactionInputOptions {
    internalRef: string;
    reason: string;
}
declare class PayinCancelTransactionInput {
    readonly internalRef: string;
    readonly reason: string;
    constructor(options: PayinCancelTransactionInputOptions);
    toVariables(): JsonObject;
}
interface PayinGetTransactionsQueryOptions {
    skip?: number | null;
    take?: number;
    where?: JsonObject | null;
    order?: JsonObject[] | null;
}
declare class PayinGetTransactionsQuery {
    readonly skip: number | null;
    readonly take: number;
    readonly where: JsonObject | null;
    readonly order: JsonObject[] | null;
    constructor(options?: PayinGetTransactionsQueryOptions);
    toVariables(): JsonObject;
}
interface PayinCountryQueryOptions {
    countryIsoCode3: string;
}
declare class PayinCountryQuery {
    readonly countryIsoCode3: string;
    constructor(options: PayinCountryQueryOptions);
    toVariables(): JsonObject;
}
interface PayinGetBanksQueryOptions {
    countryIsoCode3: string;
    language?: string;
    skip?: number | null;
    take?: number;
    order?: JsonObject[] | null;
}
declare class PayinGetBanksQuery {
    readonly countryIsoCode3: string;
    readonly language: string;
    readonly skip: number | null;
    readonly take: number;
    readonly order: JsonObject[] | null;
    constructor(options: PayinGetBanksQueryOptions);
    toVariables(): JsonObject;
}
interface PayinPaymentMethodInputOptions {
    paymentMethodSource: string;
    type: string;
}
declare class PayinPaymentMethodInput {
    readonly paymentMethodSource: string;
    readonly type: string;
    constructor(options: PayinPaymentMethodInputOptions);
    toDict(): JsonObject;
}
interface PayinSenderAddressInputOptions {
    countryIsoCode3: string;
    streetAddress?: string | null;
    city?: string | null;
    state?: string | null;
    zipCode?: string | null;
}
declare class PayinSenderAddressInput {
    readonly countryIsoCode3: string;
    readonly streetAddress: string | null;
    readonly city: string | null;
    readonly state: string | null;
    readonly zipCode: string | null;
    constructor(options: PayinSenderAddressInputOptions);
    toDict(): JsonObject;
}
interface PayinSenderBankDetailsInputOptions {
    accountNumber?: string | null;
    bankBranchCode?: string | null;
    bankName?: string | null;
}
declare class PayinSenderBankDetailsInput {
    readonly accountNumber: string | null;
    readonly bankBranchCode: string | null;
    readonly bankName: string | null;
    constructor(options?: PayinSenderBankDetailsInputOptions);
    toDict(): JsonObject;
}
interface PayinSenderIdentificationInputOptions {
    number: string;
    expirationDate?: string | null;
    identificationTypeName?: string | null;
    issuedDate?: string | null;
}
declare class PayinSenderIdentificationInput {
    readonly number: string;
    readonly expirationDate: string | null;
    readonly identificationTypeName: string | null;
    readonly issuedDate: string | null;
    constructor(options: PayinSenderIdentificationInputOptions);
    toDict(): JsonObject;
}
interface PayinSenderInputOptions {
    entityType: string;
    emailAddress: string;
    phoneCountryCode: string;
    phoneNumber: string;
    address?: PayinSenderAddressInput | null;
    identification?: PayinSenderIdentificationInput | null;
    dob?: string | null;
    gender?: string | null;
    businessName?: string | null;
    firstName?: string | null;
    lastName?: string | null;
    bankDetails?: PayinSenderBankDetailsInput | null;
}
declare class PayinSenderInput {
    readonly entityType: string;
    readonly emailAddress: string;
    readonly phoneCountryCode: string;
    readonly phoneNumber: string;
    readonly address: PayinSenderAddressInput | null;
    readonly identification: PayinSenderIdentificationInput | null;
    readonly dob: string | null;
    readonly gender: string | null;
    readonly businessName: string | null;
    readonly firstName: string | null;
    readonly lastName: string | null;
    readonly bankDetails: PayinSenderBankDetailsInput | null;
    constructor(options: PayinSenderInputOptions);
    toDict(): JsonObject;
}
interface PayinS2sPayInputOptions {
    internalRef: string;
    language: string;
    paymentMethod: PayinPaymentMethodInput;
    sender: PayinSenderInput;
}
declare class PayinS2sPayInput {
    readonly internalRef: string;
    readonly language: string;
    readonly paymentMethod: PayinPaymentMethodInput;
    readonly sender: PayinSenderInput;
    constructor(options: PayinS2sPayInputOptions);
    toDict(): JsonObject;
}
interface PayinS2sPayTransactionInputOptions {
    input: PayinS2sPayInput;
}
declare class PayinS2sPayTransactionInput {
    readonly input: PayinS2sPayInput;
    constructor(options: PayinS2sPayTransactionInputOptions);
    toVariables(): JsonObject;
}
interface PayoutReceiverInputOptions {
    name: string;
    streetAddress: string;
    city: string;
    zipCode: string;
    state: string;
    countryIsoCode3: string;
    emailAddress: string;
    entityType: string;
    phoneCountryCode: string;
    phoneNumber: string;
    accountNumber: string;
    bankBranchCode?: string | null;
    bankName: string;
    unitNumber?: string | null;
}
declare class PayoutReceiverInput {
    readonly name: string;
    readonly streetAddress: string;
    readonly city: string;
    readonly zipCode: string;
    readonly state: string;
    readonly countryIsoCode3: string;
    readonly emailAddress: string;
    readonly entityType: string;
    readonly phoneCountryCode: string;
    readonly phoneNumber: string;
    readonly accountNumber: string;
    readonly bankBranchCode: string | null;
    readonly bankName: string;
    readonly unitNumber: string | null;
    constructor(options: PayoutReceiverInputOptions);
    toDict(): JsonObject;
}
interface PayoutCreateTransactionInputOptions {
    reference: string;
    fromAmount: number;
    fromCurrencyCode: string;
    toCurrencyCode: string;
    receiver: PayoutReceiverInput;
    callbackUrl: string;
    description?: string | null;
}
declare class PayoutCreateTransactionInput {
    readonly reference: string;
    readonly fromAmount: number;
    readonly fromCurrencyCode: string;
    readonly toCurrencyCode: string;
    readonly receiver: PayoutReceiverInput;
    readonly callbackUrl: string;
    readonly description: string | null;
    constructor(options: PayoutCreateTransactionInputOptions);
    toVariables(): JsonObject;
}
interface PayoutGetBanksQueryOptions {
    countryIsoCode3: string;
    skip?: number;
    take?: number;
}
declare class PayoutGetBanksQuery {
    readonly countryIsoCode3: string;
    readonly skip: number;
    readonly take: number;
    constructor(options: PayoutGetBanksQueryOptions);
    toVariables(): JsonObject;
}
interface PayoutGetFxRateQueryOptions {
    fromAmount: number;
    fromCurrencyCode: string;
    toCurrencyCode: string;
}
declare class PayoutGetFxRateQuery {
    readonly fromAmount: number;
    readonly fromCurrencyCode: string;
    readonly toCurrencyCode: string;
    constructor(options: PayoutGetFxRateQueryOptions);
    toVariables(): JsonObject;
}
interface PayoutGetTransactionsQueryOptions {
    skip?: number | null;
    take?: number;
    where?: JsonObject | null;
    order?: JsonObject[] | null;
}
declare class PayoutGetTransactionsQuery {
    readonly skip: number | null;
    readonly take: number;
    readonly where: JsonObject | null;
    readonly order: JsonObject[] | null;
    constructor(options?: PayoutGetTransactionsQueryOptions);
    toVariables(): JsonObject;
}

interface GraphQLClientOptions {
    endpoint: string;
    token?: string | null;
    headers?: Record<string, string>;
    timeout?: number;
    fetch?: typeof fetch;
    operations?: Record<string, GraphQLOperationDefinition>;
    apiKey?: string | null;
    secretKey?: string | null;
    signRequests?: boolean;
}
interface ExecuteResultOptions {
    variables?: JsonObject | null;
    operationName?: string | null;
    extraHeaders?: Record<string, string> | null;
    preservePayoutBankBranchCodeNull?: boolean;
}
declare class GraphQLClient {
    readonly endpoint: string;
    readonly timeout: number;
    protected readonly apiKey: string | null;
    protected readonly secretKey: string | null;
    protected readonly signRequests: boolean;
    protected readonly fetchImpl: typeof fetch;
    protected readonly defaultHeaders: Record<string, string>;
    protected readonly operations: Record<string, GraphQLOperationDefinition>;
    constructor(options: GraphQLClientOptions);
    get operationNames(): string[];
    setBearerToken(token?: string | null): void;
    registerOperation(name: string, query: string | null, options?: {
        variables?: JsonObject | null;
        operationName?: string | null;
        requestId?: string | null;
    }): void;
    registerOperations(operations: Record<string, GraphQLOperationDefinition>): void;
    executeResult<TData extends JsonObject = JsonObject>(query: string, options?: ExecuteResultOptions): Promise<GraphQLResult<TData>>;
    execute<TData extends JsonObject = JsonObject>(query: string, options?: ExecuteResultOptions): Promise<TData | null>;
    executePersistedResult<TData extends JsonObject = JsonObject>(requestIdValue: string, options?: ExecuteResultOptions): Promise<GraphQLResult<TData>>;
    runResult<TData extends JsonObject = JsonObject>(operation: string, variables?: JsonObject | null, extraHeaders?: Record<string, string> | null): Promise<GraphQLResult<TData>>;
    private preparePayloadVariables;
    run<TData extends JsonObject = JsonObject>(operation: string, variables?: JsonObject | null, extraHeaders?: Record<string, string> | null): Promise<TData | null>;
    private buildPayydSignatureHeaders;
}

interface PayydEnterpriseClientOptions extends Omit<GraphQLClientOptions, "operations" | "endpoint"> {
    endpoint?: string;
    apiKey: string;
    secretKey: string;
}
declare class PayydEnterpriseClient extends GraphQLClient {
    static readonly SANDBOX_ENDPOINT = "https://sandbox-enterprisegateway.payyd.money/graphql";
    static readonly PREPROD_ENDPOINT = "https://preprod-enterprisegateway.payyd.money/graphql";
    static readonly PRODUCTION_ENDPOINT = "https://enterprisegateway.payyd.money/graphql";
    constructor(options: PayydEnterpriseClientOptions);
    get availableMethods(): string[];
    defaultVariablesFor(methodName: string): JsonObject;
    callRaw<TData extends JsonObject = JsonObject>(methodName: string, variables?: JsonObject | null): Promise<GraphQLResult<TData>>;
    private callModel;
    accountGetBalances(currencyCode?: string | null, options?: {
        filter?: AccountGetBalancesFilter | null;
    }): Promise<AccountGetBalancesResponse>;
    authChangePassword(variables?: JsonObject | null): Promise<AuthChangePasswordResponse>;
    authGetToken(username: string, password: string): Promise<AuthGetTokenResponse>;
    payinHostedCancelTransaction(cancel: PayinCancelTransactionInput): Promise<PayinHostedCancelTransactionResponse>;
    payinHostedCreateTransaction(transaction: PayinCreateTransactionInput): Promise<PayinHostedCreateTransactionResponse>;
    payinHostedGetTransactionByInternalRef(internalRef: string): Promise<PayinHostedGetTransactionByInternalRefResponse>;
    payinHostedGetTransactionByReference(reference: string): Promise<PayinHostedGetTransactionByReferenceResponse>;
    payinHostedGetTransactions(query?: PayinGetTransactionsQuery | null): Promise<PayinHostedGetTransactionsResponse>;
    payinS2sCancelTransaction(cancel: PayinCancelTransactionInput): Promise<PayinS2sCancelTransactionResponse>;
    payinS2sCreateTransaction(transaction: PayinCreateTransactionInput): Promise<PayinS2sCreateTransactionResponse>;
    payinS2sGetIdentificationTypes(countryIsoCode3: string): Promise<PayinS2sGetIdentificationTypesResponse>;
    payinS2sGetPaymentMethods(countryIsoCode3: string): Promise<PayinS2sGetPaymentMethodsResponse>;
    payinS2sGetTransactionByInternalRef(internalRef: string): Promise<PayinS2sGetTransactionByInternalRefResponse>;
    payinS2sGetTransactionByReference(reference: string): Promise<PayinS2sGetTransactionByReferenceResponse>;
    payinS2sGetTransactions(query?: PayinGetTransactionsQuery | null): Promise<PayinS2sGetTransactionsResponse>;
    payinS2sGetBanks(query: PayinGetBanksQuery): Promise<PayinS2sGetBanksResponse>;
    payinS2sPayTransaction(transaction: PayinS2sPayTransactionInput): Promise<PayinS2sPayTransactionResponse>;
    payoutCreateTransaction(transaction: PayoutCreateTransactionInput): Promise<PayoutCreateTransactionResponse>;
    payoutGetBanks(query: PayoutGetBanksQuery): Promise<PayoutGetBanksResponse>;
    payoutGetFxRate(query: PayoutGetFxRateQuery): Promise<PayoutGetFxRateResponse>;
    payoutGetTransaction(reference: string): Promise<PayoutGetTransactionResponse>;
    payoutGetTransactions(query?: PayoutGetTransactionsQuery | null): Promise<PayoutGetTransactionsResponse>;
    private static requireNonEmpty;
}

declare const DEFAULT_EMAIL_REGEX = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
declare const DEFAULT_MOBILE_REGEX = "^\\+?[1-9]\\d{1,14}$";
declare const DEFAULT_COUNTRY_TEXT_REGEX = "^[A-Za-z ]+$";
declare function requiredText(fieldName: string, value: string | null | undefined): string;
declare function setOptionalText(target: JsonObject, key: string, value: string | null | undefined): void;
declare function normalizeCountryCode(value: string | null | undefined): string;
declare function sanitizeRegex(pattern: string): string;
declare function matchesRuleRegex(pattern: string, value: string): boolean;
declare function isPlainObject(value: unknown): value is JsonObject;
declare function deepClone<T>(value: T): T;
declare function stripNullValues(value: unknown): unknown;
declare function canonicalizeNumber(value: unknown): unknown;
declare function normalizeAmountFields(value: unknown, parentKey?: string): unknown;
declare function extractBearerToken(headers: Record<string, string>): string | null;
declare function getRequiredSenderFieldsForCountry(countryIsoCode3: string, entityType: string, paymentMethodSource?: string | null): Record<string, boolean>;
declare function countriesWithSendRules(): string[];
declare function validatePayinCountryRules(payInput: PayinS2sPayInput): void;

declare const PAYYD_OPERATION_DEFINITIONS: Record<string, GraphQLOperationDefinition>;

declare const PAYIN_COUNTRY_RULES: Record<string, CountryFieldRule[]>;

export { type AccountBalanceItem, AccountGetBalancesFilter, type AccountGetBalancesFilterOptions, type AccountGetBalancesResponse, type AuthChangePasswordResponse, type AuthGetTokenResponse, type AuthToken, type CountryFieldRule, DEFAULT_COUNTRY_TEXT_REGEX, DEFAULT_EMAIL_REGEX, DEFAULT_MOBILE_REGEX, type ErrorItem, type ExecuteResultOptions, GraphQLClient, type GraphQLClientOptions, GraphQLError, type GraphQLOperationDefinition, GraphQLRequestError, type GraphQLResult, type JsonObject, type JsonValue, OperationNotFoundError, PAYIN_COUNTRY_RULES, PAYYD_OPERATION_DEFINITIONS, PayinCancelTransactionInput, type PayinCancelTransactionInputOptions, PayinCountryQuery, type PayinCountryQueryOptions, PayinCreateTransactionInput, type PayinCreateTransactionInputOptions, PayinGetBanksQuery, type PayinGetBanksQueryOptions, PayinGetTransactionsQuery, type PayinGetTransactionsQueryOptions, type PayinHostedCancelTransactionResponse, type PayinHostedCreateTransactionResponse, type PayinHostedGetTransactionByInternalRefResponse, type PayinHostedGetTransactionByReferenceResponse, type PayinHostedGetTransactionsResponse, PayinPaymentMethodInput, type PayinPaymentMethodInputOptions, type PayinS2sCancelTransactionResponse, type PayinS2sCreateTransactionResponse, type PayinS2sGetBanksResponse, type PayinS2sGetIdentificationTypesResponse, type PayinS2sGetPaymentMethodsResponse, type PayinS2sGetTransactionByInternalRefResponse, type PayinS2sGetTransactionByReferenceResponse, type PayinS2sGetTransactionsResponse, PayinS2sPayInput, type PayinS2sPayInputOptions, PayinS2sPayTransactionInput, type PayinS2sPayTransactionInputOptions, type PayinS2sPayTransactionResponse, PayinSenderAddressInput, type PayinSenderAddressInputOptions, PayinSenderBankDetailsInput, type PayinSenderBankDetailsInputOptions, PayinSenderIdentificationInput, type PayinSenderIdentificationInputOptions, PayinSenderInput, type PayinSenderInputOptions, PayoutCreateTransactionInput, type PayoutCreateTransactionInputOptions, type PayoutCreateTransactionResponse, PayoutGetBanksQuery, type PayoutGetBanksQueryOptions, type PayoutGetBanksResponse, PayoutGetFxRateQuery, type PayoutGetFxRateQueryOptions, type PayoutGetFxRateResponse, type PayoutGetTransactionResponse, PayoutGetTransactionsQuery, type PayoutGetTransactionsQueryOptions, type PayoutGetTransactionsResponse, PayoutReceiverInput, type PayoutReceiverInputOptions, PayydEnterpriseClient, type PayydEnterpriseClientOptions, PayydSDKError, SigningConfigurationError, canonicalizeNumber, countriesWithSendRules, deepClone, extractBearerToken, getRequiredSenderFieldsForCountry, isPlainObject, matchesRuleRegex, normalizeAmountFields, normalizeCountryCode, requiredText, sanitizeRegex, setOptionalText, stripNullValues, validatePayinCountryRules };
