/** * @module Resources/ECForms */ import { AuthParams, SendData } from "../api/RestAPI.js"; import { OnlineBrand, ProcessingMode } from "./common/enums.js"; import { AmountWithCurrency, Metadata } from "./common/types.js"; import { CRUDResource } from "./CRUDResource.js"; import { InstallmentPlan, SubscriptionPeriod } from "./Subscriptions.js"; import { PaymentType, TransactionTokenType, UsageLimit } from "./TransactionTokens.js"; export declare enum CheckoutType { PAYMENT = "payment", TOKEN = "token" } export declare enum ECFormCustomFieldType { STRING = "string", SELECT = "select" } export declare enum Languages { EN_US = "en_us", JA_JP = "ja_jp", ZH_CN = "zh_cn", ZH_TW = "zh_tw" } export type ECFormCustomField = { key: string; label: string; type: ECFormCustomFieldType; required?: boolean; options?: string[]; }; export type ECFormItem = { id: string; merchantId: string; storeId: string; name: string; createdOn: string; mode: ProcessingMode; successRedirectUrl?: string | null; failureRedirectUrl?: string | null; pendingRedirectUrl?: string | null; appId: string; checkout: CheckoutType; paymentType?: PaymentType | null; tokenType: TransactionTokenType; univapayCustomerId: string | null; capture: boolean; captureAt?: string | null; onlyDirectCurrency?: boolean; supportedPaymentMethods: (PaymentType | OnlineBrand)[]; hidePrivacyLink?: boolean; title: string | null; description: string | null; confirmationRequired: boolean; locale: string | null; header: string | null; dark: boolean; submitButtonText?: string | null; showCvv: boolean; displayStoreName: boolean; displayStoreLogo: boolean; headerColor?: string | null; buttonColor?: string | null; backgroundColor?: string | null; subscriptionId?: string | null; subscriptionPeriod?: SubscriptionPeriod | null; subscriptionInitialAmount?: AmountWithCurrency | null; subscriptionStart?: string | null; installmentPlan?: InstallmentPlan | null; installmentQty?: number | null; installmentAmount?: AmountWithCurrency | null; subscriptionTimezone?: string | null; subscriptionPreserveEndOfMonth?: boolean | null; usageLimit?: UsageLimit | null; cvvAuthorize: boolean; address?: boolean | null; requireName?: boolean | null; requireNameKana?: boolean | null; requireEmail?: boolean | null; requireBillingAddress?: boolean | null; requirePhoneNumber?: boolean | null; email?: string | null; shippingAddressLine1: string | null; shippingAddressLine2: string | null; shippingAddressCity: string | null; shippingAddressState: string | null; shippingAddressZip: string | null; shippingAddressCountryCode: string | null; buyerName: string | null; buyerNameTransliteration: string | null; buyerDateOfBirth: string | null; descriptor: string | null; ignoreDescriptorOnError: boolean | null; metadata?: T | null; customFieldsTitles?: Partial> | null; orderSummaryTitles?: Partial> | null; customFields?: Partial> | null; }; export type ResponseECForm = ECFormItem; export declare class ECForms extends CRUDResource { static requiredParams: string[]; static routeBase: string; private _get?; get(id: string, data?: SendData | null, auth?: AuthParams): Promise>; }