@cardql/core
Version:
CardQL core SDK for payment processing - cross-platform shared logic, auth and data access
404 lines (398 loc) • 29.5 kB
text/typescript
interface Address {
street1?: string;
street2?: string;
city?: string;
state?: string;
postalCode?: string;
country?: string;
}
interface Industry {
code?: string;
name?: string;
category?: string;
mcc?: number;
}
interface Balance {
available: number;
pending: number;
currency: string;
lastUpdated?: string;
}
interface Card {
last4?: string;
brand?: string;
expMonth?: number;
expYear?: number;
cardType?: string;
holderName?: string;
network?: string;
funding?: string;
country?: string;
}
interface Account {
id: string;
accountID: string;
name: string;
apps: App[];
}
interface App {
id: string;
appID: string;
name: string;
apiKey: string;
}
interface Customer {
id: string;
firstName?: string;
lastName?: string;
middleName?: string;
email?: string;
phone?: string;
address?: any;
country?: string;
status?: string;
isDeleted?: boolean;
isEnriched?: boolean;
provider?: string;
providerID?: string;
cards?: any;
merchants?: any;
createdAt?: string;
updatedAt?: string;
}
interface Merchant {
id: string;
name: string;
descriptor?: string;
status?: string;
isKyc?: boolean;
isKyb?: boolean;
isDeleted?: boolean;
address?: any;
country?: string;
currency?: string;
beneficiaries?: any;
industry?: any;
banks?: any;
locations?: any;
balance?: any;
appID?: string;
pricingID?: string;
createdAt?: string;
updatedAt?: string;
}
interface Payment {
id: string;
amount: string;
currency: string;
merchantID: string;
userID: string;
description?: string;
status?: string;
provider?: string;
providerID?: string;
providerAccountID?: string;
customerID?: string;
locationID?: string;
terminalID?: string;
auth?: any;
metadata?: any;
pricing?: any;
isCnp?: boolean;
capturableAmount?: string;
capturedAmount?: string;
refundableAmount?: string;
netAmount?: string;
fees?: string;
settlementStatus?: string;
settledAt?: string;
fundsAvailableAt?: string;
createdAt?: string;
updatedAt?: string;
}
interface Ledger {
id: string;
amount: string;
currency: string;
merchantID: string;
description?: string;
direction?: string;
type?: string;
status?: string;
reference?: string;
preBalance?: string;
postBalance?: string;
isSettled?: boolean;
paymentID?: string;
metadata?: any;
createdAt?: string;
updatedAt?: string;
}
interface CreateAccountInput {
name: string;
}
interface UpdateAccountInput {
id: string;
name: string;
}
interface CreateAppInput {
accountID: string;
name: string;
}
interface UpdateAppInput {
id: string;
name: string;
}
interface CreateCustomerInput {
firstName?: string;
lastName?: string;
middleName?: string;
email?: string;
phone?: string;
address?: any;
country?: string;
status?: string;
isDeleted?: boolean;
isEnriched?: boolean;
provider?: string;
providerID?: string;
cards?: any;
merchants?: any;
}
interface UpdateCustomerInput {
id: string;
firstName?: string;
lastName?: string;
middleName?: string;
email?: string;
phone?: string;
address?: any;
country?: string;
status?: string;
isDeleted?: boolean;
isEnriched?: boolean;
provider?: string;
providerID?: string;
cards?: any;
merchants?: any;
}
interface CreateMerchantInput {
name: string;
descriptor?: string;
status?: string;
isKyc?: boolean;
isKyb?: boolean;
address?: any;
country?: string;
currency?: string;
beneficiaries?: any;
industry?: any;
banks?: any;
locations?: any;
balance?: any;
appID?: string;
pricingID?: string;
}
interface UpdateMerchantInput {
id: string;
name?: string;
descriptor?: string;
status?: string;
isKyc?: boolean;
isKyb?: boolean;
address?: any;
country?: string;
currency?: string;
beneficiaries?: any;
industry?: any;
banks?: any;
locations?: any;
balance?: any;
appID?: string;
pricingID?: string;
}
interface CreatePaymentInput {
amount: string;
currency: string;
merchantID: string;
userID: string;
description?: string;
status?: string;
provider?: string;
providerID?: string;
providerAccountID?: string;
customerID?: string;
locationID?: string;
terminalID?: string;
auth?: any;
metadata?: any;
pricing?: any;
isCnp?: boolean;
capturableAmount?: string;
capturedAmount?: string;
refundableAmount?: string;
netAmount?: string;
fees?: string;
settlementStatus?: string;
settledAt?: string;
fundsAvailableAt?: string;
}
interface UpdatePaymentInput {
id: string;
amount?: string;
currency?: string;
merchantID?: string;
userID?: string;
description?: string;
status?: string;
provider?: string;
providerID?: string;
providerAccountID?: string;
customerID?: string;
locationID?: string;
terminalID?: string;
auth?: any;
metadata?: any;
pricing?: any;
isCnp?: boolean;
capturableAmount?: string;
capturedAmount?: string;
refundableAmount?: string;
netAmount?: string;
fees?: string;
settlementStatus?: string;
settledAt?: string;
fundsAvailableAt?: string;
}
interface CreateLedgerInput {
amount: string;
currency: string;
merchantID: string;
description?: string;
direction?: string;
type?: string;
status?: string;
reference?: string;
preBalance?: string;
postBalance?: string;
isSettled?: boolean;
paymentID?: string;
metadata?: any;
}
interface UpdateLedgerInput {
id: string;
amount?: string;
currency?: string;
merchantID?: string;
description?: string;
direction?: string;
type?: string;
status?: string;
reference?: string;
preBalance?: string;
postBalance?: string;
isSettled?: boolean;
paymentID?: string;
metadata?: any;
}
interface CardQLConfig {
apiKey: string;
endpoint: string;
timeout?: number;
retries?: number;
}
interface CardQLError {
message: string;
code?: string;
details?: any;
}
type Currency = "USD" | "CAD" | "GBP" | "EUR" | "JPY" | "AUD" | "NZD" | "CHF" | "SEK";
type Country = "US" | "CA" | "GB" | "AU" | "NZ" | "JP";
declare class CardQLClient {
private client;
private config;
constructor(config: CardQLConfig);
request<T = any>(query: string, variables?: any): Promise<T>;
requestWithRetry<T = any>(query: string, variables?: any, retries?: number | undefined): Promise<T>;
setApiKey(apiKey: string): void;
private normalizeError;
private delay;
}
declare class CardQLApi {
private client;
constructor(client: CardQLClient);
getAccounts(): Promise<Account[]>;
getAccount(accountID: string): Promise<Account | null>;
createAccount(input: CreateAccountInput): Promise<Account>;
updateAccount(input: UpdateAccountInput): Promise<Account>;
deleteAccount(id: string): Promise<string>;
getApps(): Promise<App[]>;
getApp(id: string): Promise<App | null>;
createApp(input: CreateAppInput): Promise<App>;
updateApp(input: UpdateAppInput): Promise<App>;
deleteApp(id: string): Promise<string>;
getCustomers(): Promise<Customer[]>;
getCustomer(id: string): Promise<Customer | null>;
createCustomer(input: CreateCustomerInput): Promise<Customer>;
updateCustomer(input: UpdateCustomerInput): Promise<Customer>;
deleteCustomer(id: string): Promise<string>;
getMerchants(): Promise<Merchant[]>;
getMerchant(id: string): Promise<Merchant | null>;
createMerchant(input: CreateMerchantInput): Promise<Merchant>;
updateMerchant(input: UpdateMerchantInput): Promise<Merchant>;
deleteMerchant(id: string): Promise<string>;
getPayments(): Promise<Payment[]>;
getPayment(id: string): Promise<Payment | null>;
createPayment(input: CreatePaymentInput): Promise<Payment>;
updatePayment(input: UpdatePaymentInput): Promise<Payment>;
deletePayment(id: string): Promise<string>;
getLedgers(): Promise<Ledger[]>;
getLedger(id: string): Promise<Ledger | null>;
createLedger(input: CreateLedgerInput): Promise<Ledger>;
updateLedger(input: UpdateLedgerInput): Promise<Ledger>;
deleteLedger(id: string): Promise<string>;
}
declare const GET_ACCOUNTS = "\n query GetAccounts {\n accounts {\n id\n accountID\n name\n apps {\n id\n appID\n name\n apiKey\n }\n }\n }\n";
declare const GET_ACCOUNT = "\n query GetAccount($accountID: ID!) {\n account(accountID: $accountID) {\n id\n accountID\n name\n apps {\n id\n appID\n name\n apiKey\n }\n }\n }\n";
declare const CREATE_ACCOUNT = "\n mutation CreateAccount($name: String!) {\n createAccount(name: $name) {\n id\n accountID\n name\n }\n }\n";
declare const UPDATE_ACCOUNT = "\n mutation UpdateAccount($id: ID!, $name: String!) {\n updateAccount(id: $id, name: $name) {\n id\n accountID\n name\n }\n }\n";
declare const DELETE_ACCOUNT = "\n mutation DeleteAccount($id: ID!) {\n deleteAccount(id: $id)\n }\n";
declare const GET_APPS = "\n query GetApps {\n apps {\n id\n appID\n name\n apiKey\n }\n }\n";
declare const GET_APP = "\n query GetApp($id: ID!) {\n app(id: $id) {\n id\n appID\n name\n apiKey\n }\n }\n";
declare const CREATE_APP = "\n mutation CreateApp($accountID: ID!, $name: String!) {\n createApp(accountID: $accountID, name: $name) {\n id\n appID\n name\n apiKey\n }\n }\n";
declare const UPDATE_APP = "\n mutation UpdateApp($id: ID!, $name: String!) {\n updateApp(id: $id, name: $name) {\n id\n appID\n name\n apiKey\n }\n }\n";
declare const DELETE_APP = "\n mutation DeleteApp($id: ID!) {\n deleteApp(id: $id)\n }\n";
declare const GET_CUSTOMERS = "\n query GetCustomers {\n customers {\n id\n firstName\n lastName\n middleName\n email\n phone\n address\n country\n status\n isDeleted\n isEnriched\n provider\n providerID\n cards\n merchants\n createdAt\n updatedAt\n }\n }\n";
declare const GET_CUSTOMER = "\n query GetCustomer($id: ID!) {\n customer(id: $id) {\n id\n firstName\n lastName\n middleName\n email\n phone\n address\n country\n status\n isDeleted\n isEnriched\n provider\n providerID\n cards\n merchants\n createdAt\n updatedAt\n }\n }\n";
declare const CREATE_CUSTOMER = "\n mutation CreateCustomer(\n $firstName: String\n $lastName: String\n $middleName: String\n $email: String\n $phone: String\n $address: JSON\n $country: String\n $status: String\n $isDeleted: Boolean\n $isEnriched: Boolean\n $provider: String\n $providerID: String\n $cards: JSON\n $merchants: JSON\n ) {\n createCustomer(\n firstName: $firstName\n lastName: $lastName\n middleName: $middleName\n email: $email\n phone: $phone\n address: $address\n country: $country\n status: $status\n isDeleted: $isDeleted\n isEnriched: $isEnriched\n provider: $provider\n providerID: $providerID\n cards: $cards\n merchants: $merchants\n ) {\n id\n firstName\n lastName\n email\n phone\n status\n createdAt\n }\n }\n";
declare const UPDATE_CUSTOMER = "\n mutation UpdateCustomer(\n $id: ID!\n $firstName: String\n $lastName: String\n $middleName: String\n $email: String\n $phone: String\n $address: JSON\n $country: String\n $status: String\n $isDeleted: Boolean\n $isEnriched: Boolean\n $provider: String\n $providerID: String\n $cards: JSON\n $merchants: JSON\n ) {\n updateCustomer(\n id: $id\n firstName: $firstName\n lastName: $lastName\n middleName: $middleName\n email: $email\n phone: $phone\n address: $address\n country: $country\n status: $status\n isDeleted: $isDeleted\n isEnriched: $isEnriched\n provider: $provider\n providerID: $providerID\n cards: $cards\n merchants: $merchants\n ) {\n id\n firstName\n lastName\n email\n phone\n status\n updatedAt\n }\n }\n";
declare const DELETE_CUSTOMER = "\n mutation DeleteCustomer($id: ID!) {\n deleteCustomer(id: $id)\n }\n";
declare const GET_MERCHANTS = "\n query GetMerchants {\n merchants {\n id\n name\n descriptor\n status\n isKyc\n isKyb\n isDeleted\n address\n country\n currency\n beneficiaries\n industry\n banks\n locations\n balance\n appID\n pricingID\n createdAt\n updatedAt\n }\n }\n";
declare const GET_MERCHANT = "\n query GetMerchant($id: ID!) {\n merchant(id: $id) {\n id\n name\n descriptor\n status\n isKyc\n isKyb\n isDeleted\n address\n country\n currency\n beneficiaries\n industry\n banks\n locations\n balance\n appID\n pricingID\n createdAt\n updatedAt\n }\n }\n";
declare const CREATE_MERCHANT = "\n mutation CreateMerchant(\n $name: String!\n $descriptor: String\n $status: String\n $isKyc: Boolean\n $isKyb: Boolean\n $address: JSON\n $country: String\n $currency: String\n $beneficiaries: JSON\n $industry: JSON\n $banks: JSON\n $locations: JSON\n $balance: JSON\n $appID: String\n $pricingID: String\n ) {\n createMerchant(\n name: $name\n descriptor: $descriptor\n status: $status\n isKyc: $isKyc\n isKyb: $isKyb\n address: $address\n country: $country\n currency: $currency\n beneficiaries: $beneficiaries\n industry: $industry\n banks: $banks\n locations: $locations\n balance: $balance\n appID: $appID\n pricingID: $pricingID\n ) {\n id\n name\n status\n country\n currency\n createdAt\n }\n }\n";
declare const UPDATE_MERCHANT = "\n mutation UpdateMerchant(\n $id: ID!\n $name: String\n $descriptor: String\n $status: String\n $isKyc: Boolean\n $isKyb: Boolean\n $address: JSON\n $country: String\n $currency: String\n $beneficiaries: JSON\n $industry: JSON\n $banks: JSON\n $locations: JSON\n $balance: JSON\n $appID: String\n $pricingID: String\n ) {\n updateMerchant(\n id: $id\n name: $name\n descriptor: $descriptor\n status: $status\n isKyc: $isKyc\n isKyb: $isKyb\n address: $address\n country: $country\n currency: $currency\n beneficiaries: $beneficiaries\n industry: $industry\n banks: $banks\n locations: $locations\n balance: $balance\n appID: $appID\n pricingID: $pricingID\n ) {\n id\n name\n status\n country\n currency\n updatedAt\n }\n }\n";
declare const DELETE_MERCHANT = "\n mutation DeleteMerchant($id: ID!) {\n deleteMerchant(id: $id)\n }\n";
declare const GET_PAYMENTS = "\n query GetPayments {\n payments {\n id\n amount\n currency\n merchantID\n userID\n description\n status\n provider\n providerID\n providerAccountID\n customerID\n locationID\n terminalID\n metadata\n isCnp\n capturableAmount\n capturedAmount\n refundableAmount\n netAmount\n fees\n settlementStatus\n settledAt\n fundsAvailableAt\n createdAt\n updatedAt\n # Enhanced subcollection statistics\n authorizationCount\n ledgerEntryCount\n settlementCount\n totalCredits\n totalDebits\n netLedgerAmount\n }\n }\n";
declare const GET_PAYMENT = "\n query GetPayment($id: ID!) {\n payment(id: $id) {\n id\n amount\n currency\n merchantID\n userID\n description\n status\n provider\n providerID\n providerAccountID\n customerID\n locationID\n terminalID\n metadata\n isCnp\n capturableAmount\n capturedAmount\n refundableAmount\n netAmount\n fees\n settlementStatus\n settledAt\n fundsAvailableAt\n createdAt\n updatedAt\n # Enhanced subcollection statistics\n authorizationCount\n ledgerEntryCount\n settlementCount\n totalCredits\n totalDebits\n netLedgerAmount\n }\n }\n";
declare const GET_PAYMENT_WITH_DETAILS = "\n query GetPaymentWithDetails($id: ID!) {\n payment(id: $id) {\n id\n amount\n currency\n merchantID\n userID\n description\n status\n provider\n providerID\n providerAccountID\n customerID\n locationID\n terminalID\n metadata\n isCnp\n capturableAmount\n capturedAmount\n refundableAmount\n netAmount\n fees\n settlementStatus\n settledAt\n fundsAvailableAt\n createdAt\n updatedAt\n # Subcollection data\n authorizations {\n id\n provider\n providerId\n amount\n amountCaptured\n amountRefunded\n paymentMethodId\n network\n networkTransactionId\n receiptNumber\n receiptUrl\n authCode\n brand\n funding\n metadata\n createdAt\n updatedAt\n }\n ledgerEntries {\n id\n accountId\n amount\n currency\n description\n preBalance\n postBalance\n isSettled\n direction\n type\n status\n reference\n settledAt\n metadata\n createdAt\n updatedAt\n }\n settlements {\n id\n amount\n currency\n status\n provider\n providerId\n settledAt\n metadata\n createdAt\n updatedAt\n }\n # Statistics\n authorizationCount\n ledgerEntryCount\n settlementCount\n totalCredits\n totalDebits\n netLedgerAmount\n }\n }\n";
declare const GET_PAYMENT_AUTHORIZATIONS = "\n query GetPaymentAuthorizations($paymentId: ID!) {\n paymentAuthorizations(paymentId: $paymentId) {\n id\n provider\n providerId\n amount\n amountCaptured\n amountRefunded\n paymentMethodId\n network\n networkTransactionId\n receiptNumber\n receiptUrl\n authCode\n brand\n funding\n metadata\n createdAt\n updatedAt\n }\n }\n";
declare const GET_PAYMENT_LEDGER_ENTRIES = "\n query GetPaymentLedgerEntries($paymentId: ID!) {\n paymentLedgerEntries(paymentId: $paymentId) {\n id\n accountId\n amount\n currency\n description\n preBalance\n postBalance\n isSettled\n direction\n type\n status\n reference\n settledAt\n metadata\n createdAt\n updatedAt\n }\n }\n";
declare const GET_PAYMENT_SETTLEMENTS = "\n query GetPaymentSettlements($paymentId: ID!) {\n paymentSettlements(paymentId: $paymentId) {\n id\n amount\n currency\n status\n provider\n providerId\n settledAt\n metadata\n createdAt\n updatedAt\n }\n }\n";
declare const CREATE_PAYMENT = "\n mutation CreatePayment(\n $amount: String!\n $currency: String!\n $merchantID: String!\n $userID: String!\n $description: String\n $status: String\n $provider: String\n $providerID: String\n $providerAccountID: String\n $customerID: String\n $locationID: String\n $terminalID: String\n $metadata: JSON\n $isCnp: Boolean\n $capturableAmount: String\n $capturedAmount: String\n $refundableAmount: String\n $netAmount: String\n $fees: String\n $settlementStatus: String\n $settledAt: String\n $fundsAvailableAt: String\n ) {\n createPayment(\n amount: $amount\n currency: $currency\n merchantID: $merchantID\n userID: $userID\n description: $description\n status: $status\n provider: $provider\n providerID: $providerID\n providerAccountID: $providerAccountID\n customerID: $customerID\n locationID: $locationID\n terminalID: $terminalID\n metadata: $metadata\n isCnp: $isCnp\n capturableAmount: $capturableAmount\n capturedAmount: $capturedAmount\n refundableAmount: $refundableAmount\n netAmount: $netAmount\n fees: $fees\n settlementStatus: $settlementStatus\n settledAt: $settledAt\n fundsAvailableAt: $fundsAvailableAt\n ) {\n id\n amount\n currency\n merchantID\n userID\n status\n createdAt\n # Enhanced statistics\n authorizationCount\n ledgerEntryCount\n settlementCount\n }\n }\n";
declare const UPDATE_PAYMENT = "\n mutation UpdatePayment(\n $id: ID!\n $amount: String\n $currency: String\n $merchantID: String\n $userID: String\n $description: String\n $status: String\n $provider: String\n $providerID: String\n $providerAccountID: String\n $customerID: String\n $locationID: String\n $terminalID: String\n $metadata: JSON\n $isCnp: Boolean\n $capturableAmount: String\n $capturedAmount: String\n $refundableAmount: String\n $netAmount: String\n $fees: String\n $settlementStatus: String\n $settledAt: String\n $fundsAvailableAt: String\n ) {\n updatePayment(\n id: $id\n amount: $amount\n currency: $currency\n merchantID: $merchantID\n userID: $userID\n description: $description\n status: $status\n provider: $provider\n providerID: $providerID\n providerAccountID: $providerAccountID\n customerID: $customerID\n locationID: $locationID\n terminalID: $terminalID\n metadata: $metadata\n isCnp: $isCnp\n capturableAmount: $capturableAmount\n capturedAmount: $capturedAmount\n refundableAmount: $refundableAmount\n netAmount: $netAmount\n fees: $fees\n settlementStatus: $settlementStatus\n settledAt: $settledAt\n fundsAvailableAt: $fundsAvailableAt\n ) {\n id\n amount\n currency\n status\n updatedAt\n # Enhanced statistics\n authorizationCount\n ledgerEntryCount\n settlementCount\n totalCredits\n totalDebits\n netLedgerAmount\n }\n }\n";
declare const DELETE_PAYMENT = "\n mutation DeletePayment($id: ID!) {\n deletePayment(id: $id)\n }\n";
declare const CREATE_PAYMENT_AUTHORIZATION = "\n mutation CreatePaymentAuthorization(\n $paymentId: ID!\n $provider: String!\n $providerId: String!\n $amount: String\n $amountCaptured: String\n $amountRefunded: String\n $paymentMethodId: String!\n $network: String\n $networkTransactionId: String\n $receiptNumber: String\n $receiptUrl: String\n $authCode: String\n $metadata: JSON\n ) {\n createPaymentAuthorization(\n paymentId: $paymentId\n provider: $provider\n providerId: $providerId\n amount: $amount\n amountCaptured: $amountCaptured\n amountRefunded: $amountRefunded\n paymentMethodId: $paymentMethodId\n network: $network\n networkTransactionId: $networkTransactionId\n receiptNumber: $receiptNumber\n receiptUrl: $receiptUrl\n authCode: $authCode\n metadata: $metadata\n ) {\n id\n provider\n providerId\n amount\n paymentMethodId\n authCode\n createdAt\n }\n }\n";
declare const CREATE_PAYMENT_LEDGER_ENTRY = "\n mutation CreatePaymentLedgerEntry(\n $paymentId: ID!\n $accountId: ID!\n $amount: String!\n $currency: String!\n $description: String\n $direction: String!\n $type: String!\n $status: String\n $reference: String\n $metadata: JSON\n ) {\n createPaymentLedgerEntry(\n paymentId: $paymentId\n accountId: $accountId\n amount: $amount\n currency: $currency\n description: $description\n direction: $direction\n type: $type\n status: $status\n reference: $reference\n metadata: $metadata\n ) {\n id\n amount\n currency\n direction\n type\n status\n createdAt\n }\n }\n";
declare const CREATE_PAYMENT_SETTLEMENT = "\n mutation CreatePaymentSettlement(\n $paymentId: ID!\n $amount: String!\n $currency: String!\n $status: String!\n $provider: String\n $providerId: String\n $settledAt: String\n $metadata: JSON\n ) {\n createPaymentSettlement(\n paymentId: $paymentId\n amount: $amount\n currency: $currency\n status: $status\n provider: $provider\n providerId: $providerId\n settledAt: $settledAt\n metadata: $metadata\n ) {\n id\n amount\n currency\n status\n provider\n settledAt\n createdAt\n }\n }\n";
declare const GET_LEDGERS = "\n query GetLedgers {\n ledgers {\n id\n amount\n currency\n merchantID\n description\n direction\n type\n status\n reference\n preBalance\n postBalance\n isSettled\n paymentID\n metadata\n createdAt\n updatedAt\n }\n }\n";
declare const GET_LEDGER = "\n query GetLedger($id: ID!) {\n ledger(id: $id) {\n id\n amount\n currency\n merchantID\n description\n direction\n type\n status\n reference\n preBalance\n postBalance\n isSettled\n paymentID\n metadata\n createdAt\n updatedAt\n }\n }\n";
declare const CREATE_LEDGER = "\n mutation CreateLedger(\n $amount: String!\n $currency: String!\n $merchantID: String!\n $description: String\n $direction: String\n $type: String\n $status: String\n $reference: String\n $preBalance: String\n $postBalance: String\n $isSettled: Boolean\n $paymentID: String\n $metadata: JSON\n ) {\n createLedger(\n amount: $amount\n currency: $currency\n merchantID: $merchantID\n description: $description\n direction: $direction\n type: $type\n status: $status\n reference: $reference\n preBalance: $preBalance\n postBalance: $postBalance\n isSettled: $isSettled\n paymentID: $paymentID\n metadata: $metadata\n ) {\n id\n amount\n currency\n merchantID\n status\n createdAt\n }\n }\n";
declare const UPDATE_LEDGER = "\n mutation UpdateLedger(\n $id: ID!\n $amount: String\n $currency: String\n $merchantID: String\n $description: String\n $direction: String\n $type: String\n $status: String\n $reference: String\n $preBalance: String\n $postBalance: String\n $isSettled: Boolean\n $paymentID: String\n $metadata: JSON\n ) {\n updateLedger(\n id: $id\n amount: $amount\n currency: $currency\n merchantID: $merchantID\n description: $description\n direction: $direction\n type: $type\n status: $status\n reference: $reference\n preBalance: $preBalance\n postBalance: $postBalance\n isSettled: $isSettled\n paymentID: $paymentID\n metadata: $metadata\n ) {\n id\n amount\n currency\n status\n updatedAt\n }\n }\n";
declare const DELETE_LEDGER = "\n mutation DeleteLedger($id: ID!) {\n deleteLedger(id: $id)\n }\n";
declare class CardQL {
client: CardQLClient;
api: CardQLApi;
constructor(config: CardQLConfig);
setApiKey(apiKey: string): void;
}
export { type Account, type Address, type App, type Balance, CREATE_ACCOUNT, CREATE_APP, CREATE_CUSTOMER, CREATE_LEDGER, CREATE_MERCHANT, CREATE_PAYMENT, CREATE_PAYMENT_AUTHORIZATION, CREATE_PAYMENT_LEDGER_ENTRY, CREATE_PAYMENT_SETTLEMENT, type Card, CardQL, CardQLApi, CardQLClient, type CardQLConfig, type CardQLError, type Country, type CreateAccountInput, type CreateAppInput, type CreateCustomerInput, type CreateLedgerInput, type CreateMerchantInput, type CreatePaymentInput, type Currency, type Customer, DELETE_ACCOUNT, DELETE_APP, DELETE_CUSTOMER, DELETE_LEDGER, DELETE_MERCHANT, DELETE_PAYMENT, GET_ACCOUNT, GET_ACCOUNTS, GET_APP, GET_APPS, GET_CUSTOMER, GET_CUSTOMERS, GET_LEDGER, GET_LEDGERS, GET_MERCHANT, GET_MERCHANTS, GET_PAYMENT, GET_PAYMENTS, GET_PAYMENT_AUTHORIZATIONS, GET_PAYMENT_LEDGER_ENTRIES, GET_PAYMENT_SETTLEMENTS, GET_PAYMENT_WITH_DETAILS, type Industry, type Ledger, type Merchant, type Payment, UPDATE_ACCOUNT, UPDATE_APP, UPDATE_CUSTOMER, UPDATE_LEDGER, UPDATE_MERCHANT, UPDATE_PAYMENT, type UpdateAccountInput, type UpdateAppInput, type UpdateCustomerInput, type UpdateLedgerInput, type UpdateMerchantInput, type UpdatePaymentInput, CardQL as default };