bitpay-sdk
Version:
Complete version of the NodeJS library for the new cryptographically secure BitPay API
420 lines (419 loc) • 16.6 kB
TypeScript
import { z } from 'zod';
export declare const invoiceSchema: z.ZodObject<{
buyer: z.ZodOptional<z.ZodObject<{
email: z.ZodOptional<z.ZodString>;
name: z.ZodOptional<z.ZodString>;
address1: z.ZodOptional<z.ZodString>;
address2: z.ZodOptional<z.ZodString>;
locality: z.ZodOptional<z.ZodString>;
region: z.ZodOptional<z.ZodString>;
postalCode: z.ZodOptional<z.ZodString>;
country: z.ZodOptional<z.ZodString>;
phone: z.ZodOptional<z.ZodString>;
notify: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
name?: string | undefined;
country?: string | undefined;
email?: string | undefined;
region?: string | undefined;
address1?: string | undefined;
address2?: string | undefined;
phone?: string | undefined;
locality?: string | undefined;
postalCode?: string | undefined;
notify?: boolean | undefined;
}, {
name?: string | undefined;
country?: string | undefined;
email?: string | undefined;
region?: string | undefined;
address1?: string | undefined;
address2?: string | undefined;
phone?: string | undefined;
locality?: string | undefined;
postalCode?: string | undefined;
notify?: boolean | undefined;
}>>;
transactions: z.ZodOptional<z.ZodArray<z.ZodObject<{
amount: z.ZodNumber;
confirmations: z.ZodOptional<z.ZodNumber>;
time: z.ZodOptional<z.ZodString>;
receivedTime: z.ZodOptional<z.ZodString>;
txid: z.ZodOptional<z.ZodString>;
exRates: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
outputIndex: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
amount: number;
time?: string | undefined;
confirmations?: number | undefined;
receivedTime?: string | undefined;
txid?: string | undefined;
exRates?: Record<string, number> | undefined;
outputIndex?: number | undefined;
}, {
amount: number;
time?: string | undefined;
confirmations?: number | undefined;
receivedTime?: string | undefined;
txid?: string | undefined;
exRates?: Record<string, number> | undefined;
outputIndex?: number | undefined;
}>, "many">>;
buyerProvidedInfo: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
phoneNumber: z.ZodOptional<z.ZodString>;
sms: z.ZodOptional<z.ZodString>;
smsVerified: z.ZodOptional<z.ZodBoolean>;
selectedTransactionCurrency: z.ZodOptional<z.ZodString>;
emailAddress: z.ZodOptional<z.ZodString>;
selectedWallet: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name?: string | undefined;
phoneNumber?: string | undefined;
sms?: string | undefined;
smsVerified?: boolean | undefined;
selectedTransactionCurrency?: string | undefined;
emailAddress?: string | undefined;
selectedWallet?: string | undefined;
}, {
name?: string | undefined;
phoneNumber?: string | undefined;
sms?: string | undefined;
smsVerified?: boolean | undefined;
selectedTransactionCurrency?: string | undefined;
emailAddress?: string | undefined;
selectedWallet?: string | undefined;
}>>;
supportedTransactionCurrencies: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
enabled: z.ZodBoolean;
reason: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
enabled: boolean;
reason?: string | undefined;
}, {
enabled: boolean;
reason?: string | undefined;
}>>>;
minerFees: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
satoshisPerByte: z.ZodOptional<z.ZodNumber>;
totalFee: z.ZodOptional<z.ZodNumber>;
fiatAmount: z.ZodOptional<z.ZodNumber>;
}, "strip", z.ZodTypeAny, {
satoshisPerByte?: number | undefined;
totalFee?: number | undefined;
fiatAmount?: number | undefined;
}, {
satoshisPerByte?: number | undefined;
totalFee?: number | undefined;
fiatAmount?: number | undefined;
}>>>;
shopper: z.ZodOptional<z.ZodObject<{
user: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
user?: string | undefined;
}, {
user?: string | undefined;
}>>;
refundInfo: z.ZodOptional<z.ZodObject<{
supportRequest: z.ZodString;
currency: z.ZodString;
amounts: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
}, "strip", z.ZodTypeAny, {
currency: string;
supportRequest: string;
amounts?: Record<string, number> | undefined;
}, {
currency: string;
supportRequest: string;
amounts?: Record<string, number> | undefined;
}>>;
universalCodes: z.ZodOptional<z.ZodObject<{
paymentString: z.ZodOptional<z.ZodString>;
verificationLink: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
paymentString?: string | undefined;
verificationLink?: string | undefined;
}, {
paymentString?: string | undefined;
verificationLink?: string | undefined;
}>>;
currency: z.ZodOptional<z.ZodString>;
guid: z.ZodOptional<z.ZodString>;
token: z.ZodOptional<z.ZodString>;
price: z.ZodOptional<z.ZodNumber>;
posData: z.ZodOptional<z.ZodString>;
notificationURL: z.ZodOptional<z.ZodString>;
transactionSpeed: z.ZodOptional<z.ZodString>;
fullNotifications: z.ZodOptional<z.ZodBoolean>;
notificationEmail: z.ZodOptional<z.ZodString>;
redirectURL: z.ZodOptional<z.ZodString>;
closeURL: z.ZodOptional<z.ZodString>;
orderId: z.ZodOptional<z.ZodString>;
itemDesc: z.ZodOptional<z.ZodString>;
itemCode: z.ZodOptional<z.ZodString>;
physical: z.ZodOptional<z.ZodBoolean>;
paymentCurrencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
acceptanceWindow: z.ZodOptional<z.ZodNumber>;
autoRedirect: z.ZodOptional<z.ZodBoolean>;
forcedBuyerSelectedWallet: z.ZodOptional<z.ZodString>;
forcedBuyerSelectedTransactionCurrency: z.ZodOptional<z.ZodString>;
id: z.ZodOptional<z.ZodString>;
url: z.ZodOptional<z.ZodString>;
status: z.ZodOptional<z.ZodString>;
lowFeeDetected: z.ZodOptional<z.ZodBoolean>;
invoiceTime: z.ZodOptional<z.ZodNumber>;
expirationTime: z.ZodOptional<z.ZodNumber>;
currentTime: z.ZodOptional<z.ZodNumber>;
exceptionStatus: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodString]>>;
targetConfirmations: z.ZodOptional<z.ZodNumber>;
refundAddresses: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodObject<{
type: z.ZodString;
date: z.ZodString;
tag: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
email: z.ZodNullable<z.ZodOptional<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
type: string;
date: string;
email?: string | null | undefined;
tag?: number | null | undefined;
}, {
type: string;
date: string;
email?: string | null | undefined;
tag?: number | null | undefined;
}>>, "many">>;
refundAddressRequestPending: z.ZodOptional<z.ZodBoolean>;
buyerProvidedEmail: z.ZodOptional<z.ZodString>;
billId: z.ZodOptional<z.ZodString>;
extendedNotifications: z.ZodOptional<z.ZodBoolean>;
transactionCurrency: z.ZodOptional<z.ZodString>;
amountPaid: z.ZodOptional<z.ZodNumber>;
displayAmountPaid: z.ZodOptional<z.ZodString>;
exchangeRates: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>>;
paymentSubtotals: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
paymentTotals: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNumber>>;
paymentDisplayTotals: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
paymentDisplaySubTotals: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>;
nonPayProPaymentReceived: z.ZodOptional<z.ZodBoolean>;
jsonPayProRequired: z.ZodOptional<z.ZodBoolean>;
merchantName: z.ZodOptional<z.ZodString>;
bitpayIdRequired: z.ZodOptional<z.ZodBoolean>;
underpaidAmount: z.ZodOptional<z.ZodNumber>;
overpaidAmount: z.ZodOptional<z.ZodNumber>;
paymentCodes: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
isCancelled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
exchangeRates: Record<string, Record<string, number>> | null;
paymentSubtotals: Record<string, number> | null;
paymentTotals: Record<string, number> | null;
paymentDisplayTotals: Record<string, string> | null;
paymentDisplaySubTotals: Record<string, string> | null;
paymentCodes: Record<string, Record<string, string>> | null;
currency?: string | undefined;
currentTime?: number | undefined;
id?: string | undefined;
url?: string | undefined;
status?: string | undefined;
token?: string | undefined;
guid?: string | undefined;
price?: number | undefined;
buyer?: {
name?: string | undefined;
country?: string | undefined;
email?: string | undefined;
region?: string | undefined;
address1?: string | undefined;
address2?: string | undefined;
phone?: string | undefined;
locality?: string | undefined;
postalCode?: string | undefined;
notify?: boolean | undefined;
} | undefined;
transactions?: {
amount: number;
time?: string | undefined;
confirmations?: number | undefined;
receivedTime?: string | undefined;
txid?: string | undefined;
exRates?: Record<string, number> | undefined;
outputIndex?: number | undefined;
}[] | undefined;
buyerProvidedInfo?: {
name?: string | undefined;
phoneNumber?: string | undefined;
sms?: string | undefined;
smsVerified?: boolean | undefined;
selectedTransactionCurrency?: string | undefined;
emailAddress?: string | undefined;
selectedWallet?: string | undefined;
} | undefined;
supportedTransactionCurrencies?: Record<string, {
enabled: boolean;
reason?: string | undefined;
}> | undefined;
minerFees?: Record<string, {
satoshisPerByte?: number | undefined;
totalFee?: number | undefined;
fiatAmount?: number | undefined;
}> | undefined;
shopper?: {
user?: string | undefined;
} | undefined;
refundInfo?: {
currency: string;
supportRequest: string;
amounts?: Record<string, number> | undefined;
} | undefined;
universalCodes?: {
paymentString?: string | undefined;
verificationLink?: string | undefined;
} | undefined;
posData?: string | undefined;
notificationURL?: string | undefined;
transactionSpeed?: string | undefined;
fullNotifications?: boolean | undefined;
notificationEmail?: string | undefined;
redirectURL?: string | undefined;
closeURL?: string | undefined;
orderId?: string | undefined;
itemDesc?: string | undefined;
itemCode?: string | undefined;
physical?: boolean | undefined;
paymentCurrencies?: string[] | undefined;
acceptanceWindow?: number | undefined;
autoRedirect?: boolean | undefined;
forcedBuyerSelectedWallet?: string | undefined;
forcedBuyerSelectedTransactionCurrency?: string | undefined;
lowFeeDetected?: boolean | undefined;
invoiceTime?: number | undefined;
expirationTime?: number | undefined;
exceptionStatus?: string | boolean | undefined;
targetConfirmations?: number | undefined;
refundAddresses?: Record<string, {
type: string;
date: string;
email?: string | null | undefined;
tag?: number | null | undefined;
}>[] | undefined;
refundAddressRequestPending?: boolean | undefined;
buyerProvidedEmail?: string | undefined;
billId?: string | undefined;
extendedNotifications?: boolean | undefined;
transactionCurrency?: string | undefined;
amountPaid?: number | undefined;
displayAmountPaid?: string | undefined;
nonPayProPaymentReceived?: boolean | undefined;
jsonPayProRequired?: boolean | undefined;
merchantName?: string | undefined;
bitpayIdRequired?: boolean | undefined;
underpaidAmount?: number | undefined;
overpaidAmount?: number | undefined;
isCancelled?: boolean | undefined;
}, {
exchangeRates: Record<string, Record<string, number>> | null;
paymentSubtotals: Record<string, number> | null;
paymentTotals: Record<string, number> | null;
paymentDisplayTotals: Record<string, string> | null;
paymentDisplaySubTotals: Record<string, string> | null;
paymentCodes: Record<string, Record<string, string>> | null;
currency?: string | undefined;
currentTime?: number | undefined;
id?: string | undefined;
url?: string | undefined;
status?: string | undefined;
token?: string | undefined;
guid?: string | undefined;
price?: number | undefined;
buyer?: {
name?: string | undefined;
country?: string | undefined;
email?: string | undefined;
region?: string | undefined;
address1?: string | undefined;
address2?: string | undefined;
phone?: string | undefined;
locality?: string | undefined;
postalCode?: string | undefined;
notify?: boolean | undefined;
} | undefined;
transactions?: {
amount: number;
time?: string | undefined;
confirmations?: number | undefined;
receivedTime?: string | undefined;
txid?: string | undefined;
exRates?: Record<string, number> | undefined;
outputIndex?: number | undefined;
}[] | undefined;
buyerProvidedInfo?: {
name?: string | undefined;
phoneNumber?: string | undefined;
sms?: string | undefined;
smsVerified?: boolean | undefined;
selectedTransactionCurrency?: string | undefined;
emailAddress?: string | undefined;
selectedWallet?: string | undefined;
} | undefined;
supportedTransactionCurrencies?: Record<string, {
enabled: boolean;
reason?: string | undefined;
}> | undefined;
minerFees?: Record<string, {
satoshisPerByte?: number | undefined;
totalFee?: number | undefined;
fiatAmount?: number | undefined;
}> | undefined;
shopper?: {
user?: string | undefined;
} | undefined;
refundInfo?: {
currency: string;
supportRequest: string;
amounts?: Record<string, number> | undefined;
} | undefined;
universalCodes?: {
paymentString?: string | undefined;
verificationLink?: string | undefined;
} | undefined;
posData?: string | undefined;
notificationURL?: string | undefined;
transactionSpeed?: string | undefined;
fullNotifications?: boolean | undefined;
notificationEmail?: string | undefined;
redirectURL?: string | undefined;
closeURL?: string | undefined;
orderId?: string | undefined;
itemDesc?: string | undefined;
itemCode?: string | undefined;
physical?: boolean | undefined;
paymentCurrencies?: string[] | undefined;
acceptanceWindow?: number | undefined;
autoRedirect?: boolean | undefined;
forcedBuyerSelectedWallet?: string | undefined;
forcedBuyerSelectedTransactionCurrency?: string | undefined;
lowFeeDetected?: boolean | undefined;
invoiceTime?: number | undefined;
expirationTime?: number | undefined;
exceptionStatus?: string | boolean | undefined;
targetConfirmations?: number | undefined;
refundAddresses?: Record<string, {
type: string;
date: string;
email?: string | null | undefined;
tag?: number | null | undefined;
}>[] | undefined;
refundAddressRequestPending?: boolean | undefined;
buyerProvidedEmail?: string | undefined;
billId?: string | undefined;
extendedNotifications?: boolean | undefined;
transactionCurrency?: string | undefined;
amountPaid?: number | undefined;
displayAmountPaid?: string | undefined;
nonPayProPaymentReceived?: boolean | undefined;
jsonPayProRequired?: boolean | undefined;
merchantName?: string | undefined;
bitpayIdRequired?: boolean | undefined;
underpaidAmount?: number | undefined;
overpaidAmount?: number | undefined;
isCancelled?: boolean | undefined;
}>;