UNPKG

@redwoodjs-stripe/api

Version:

API-side code for RedwoodJS-Stripe projects

861 lines (860 loc) 2.16 MB
import * as stripeItems from "./stripeItems/stripeItems.js"; import * as customerPortal from "./customerPortal/customerPortal.js"; export declare const stripeServices: { checkouts_checkouts: { checkout: ({ customer, mode, cart, successUrl, cancelUrl, allowPromotionCodes, }: import("../generated/graphql.js").MutationCheckoutArgs) => Promise<{ id: string; url: string | null; }>; retrieveStripeCheckoutSession: ({ id, }: import("../generated/graphql.js").QueryRetrieveStripeCheckoutSessionArgs) => Promise<import("stripe").Stripe.Response<import("stripe").Stripe.Checkout.Session>>; }; customers_customers: { stripeCustomerSearch: ({ query, }: import("../generated/graphql.js").QueryStripeCustomerSearchArgs) => Promise<import("../lib/parseStripeResponse.js").ParsedStripeResponse<import("stripe").Stripe.Customer>>; retrieveStripeCustomer: ({ data, }: import("../generated/graphql.js").QueryRetrieveStripeCustomerArgs) => Promise<import("../lib/parseStripeResponse.js").ParsedStripeResponse<import("stripe").Stripe.Customer | import("stripe").Stripe.DeletedCustomer>>; createStripeCustomer: ({ data, }: import("../generated/graphql.js").MutationCreateStripeCustomerArgs) => Promise<{ id: string; object: string; address?: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | null | undefined; balance: number; cash_balance?: { object: string; available: { [x: string]: number; } | null; customer: string; livemode: boolean; settings: { reconciliation_mode: string; using_merchant_default: boolean; }; } | null | undefined; created: number; currency?: (string | null) | undefined; default_source: string | { id: string; object: string; business_profile?: { annual_revenue: { amount: number | null; currency: string | null; fiscal_year_end: string | null; } | null; estimated_worker_count: number | null; mcc: string | null; monthly_estimated_revenue?: { amount: number; currency: string; } | undefined; name: string | null; product_description?: (string | null) | undefined; support_address: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | null; support_email: string | null; support_phone: string | null; support_url: string | null; url: string | null; } | null | undefined; business_type?: string | null | undefined; capabilities?: { acss_debit_payments?: string | undefined; affirm_payments?: string | undefined; afterpay_clearpay_payments?: string | undefined; alma_payments?: string | undefined; amazon_pay_payments?: string | undefined; au_becs_debit_payments?: string | undefined; bacs_debit_payments?: string | undefined; bancontact_payments?: string | undefined; bank_transfer_payments?: string | undefined; blik_payments?: string | undefined; boleto_payments?: string | undefined; card_issuing?: string | undefined; card_payments?: string | undefined; cartes_bancaires_payments?: string | undefined; cashapp_payments?: string | undefined; eps_payments?: string | undefined; fpx_payments?: string | undefined; gb_bank_transfer_payments?: string | undefined; giropay_payments?: string | undefined; grabpay_payments?: string | undefined; ideal_payments?: string | undefined; india_international_payments?: string | undefined; jcb_payments?: string | undefined; jp_bank_transfer_payments?: string | undefined; kakao_pay_payments?: string | undefined; klarna_payments?: string | undefined; konbini_payments?: string | undefined; kr_card_payments?: string | undefined; legacy_payments?: string | undefined; link_payments?: string | undefined; mobilepay_payments?: string | undefined; multibanco_payments?: string | undefined; mx_bank_transfer_payments?: string | undefined; naver_pay_payments?: string | undefined; oxxo_payments?: string | undefined; p24_payments?: string | undefined; payco_payments?: string | undefined; paynow_payments?: string | undefined; promptpay_payments?: string | undefined; revolut_pay_payments?: string | undefined; samsung_pay_payments?: string | undefined; sepa_bank_transfer_payments?: string | undefined; sepa_debit_payments?: string | undefined; sofort_payments?: string | undefined; swish_payments?: string | undefined; tax_reporting_us_1099_k?: string | undefined; tax_reporting_us_1099_misc?: string | undefined; transfers?: string | undefined; treasury?: string | undefined; twint_payments?: string | undefined; us_bank_account_ach_payments?: string | undefined; us_bank_transfer_payments?: string | undefined; zip_payments?: string | undefined; } | undefined; charges_enabled: boolean; company?: { address?: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | undefined; address_kana?: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; town: string | null; } | null | undefined; address_kanji?: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; town: string | null; } | null | undefined; directors_provided?: boolean | undefined; executives_provided?: boolean | undefined; export_license_id?: string | undefined; export_purpose_code?: string | undefined; name?: (string | null) | undefined; name_kana?: (string | null) | undefined; name_kanji?: (string | null) | undefined; owners_provided?: boolean | undefined; ownership_declaration?: { date: number | null; ip: string | null; user_agent: string | null; } | null | undefined; phone?: (string | null) | undefined; structure?: string | undefined; tax_id_provided?: boolean | undefined; tax_id_registrar?: string | undefined; vat_id_provided?: boolean | undefined; verification?: { document: { back: string | { id: string; object: string; created: number; expires_at: number | null; filename: string | null; links?: { id: string; object: string; created: number; expired: boolean; expires_at: number | null; file: string | any; livemode: boolean; metadata: { [x: string]: string; }; url: string | null; }[] | null | undefined; purpose: string; size: number; title: string | null; type: string | null; url: string | null; } | null; details: string | null; details_code: string | null; front: string | { id: string; object: string; created: number; expires_at: number | null; filename: string | null; links?: { id: string; object: string; created: number; expired: boolean; expires_at: number | null; file: string | any; livemode: boolean; metadata: { [x: string]: string; }; url: string | null; }[] | null | undefined; purpose: string; size: number; title: string | null; type: string | null; url: string | null; } | null; }; } | null | undefined; } | undefined; controller?: { fees?: { payer: string; } | undefined; is_controller?: boolean | undefined; losses?: { payments: string; } | undefined; requirement_collection?: string | undefined; stripe_dashboard?: { type: string; } | undefined; type: string; } | undefined; country?: string | undefined; created?: number | undefined; default_currency?: string | undefined; deleted?: void | undefined; details_submitted: boolean; email: string | null; external_accounts?: ({ id: string; object: string; account?: string | any | null | undefined; account_holder_name: string | null; account_holder_type: string | null; account_type: string | null; available_payout_methods?: string[] | null | undefined; bank_name: string | null; country: string; currency: string; customer?: string | { id: string; object: string; address?: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | null | undefined; balance: number; cash_balance?: { object: string; available: { [x: string]: number; } | null; customer: string; livemode: boolean; settings: { reconciliation_mode: string; using_merchant_default: boolean; }; } | null | undefined; created: number; currency?: (string | null) | undefined; default_source: string | any | any | { id: string; object: string; account?: string | any | null | undefined; address_city: string | null; address_country: string | null; address_line1: string | null; address_line1_check: string | null; address_line2: string | null; address_state: string | null; address_zip: string | null; address_zip_check: string | null; available_payout_methods?: string[] | null | undefined; brand: string; country: string | null; currency?: (string | null) | undefined; customer?: string | any | { id: string; object: string; deleted: boolean; } | null | undefined; cvc_check: string | null; default_for_currency?: (boolean | null) | undefined; deleted?: void | undefined; description?: string | undefined; dynamic_last4: string | null; exp_month: number; exp_year: number; fingerprint?: (string | null) | undefined; funding: string; iin?: string | undefined; issuer?: string | undefined; last4: string; metadata: { [x: string]: string; } | null; name: string | null; networks?: { preferred: string | null; } | undefined; status?: (string | null) | undefined; tokenization_method: string | null; } | { id: string; object: string; ach_credit_transfer?: { account_number?: (string | null) | undefined; bank_name?: (string | null) | undefined; fingerprint?: (string | null) | undefined; refund_account_holder_name?: (string | null) | undefined; refund_account_holder_type?: (string | null) | undefined; refund_routing_number?: (string | null) | undefined; routing_number?: (string | null) | undefined; swift_code?: (string | null) | undefined; } | undefined; ach_debit?: { bank_name?: (string | null) | undefined; country?: (string | null) | undefined; fingerprint?: (string | null) | undefined; last4?: (string | null) | undefined; routing_number?: (string | null) | undefined; type?: (string | null) | undefined; } | undefined; acss_debit?: { bank_address_city?: (string | null) | undefined; bank_address_line_1?: (string | null) | undefined; bank_address_line_2?: (string | null) | undefined; bank_address_postal_code?: (string | null) | undefined; bank_name?: (string | null) | undefined; category?: (string | null) | undefined; country?: (string | null) | undefined; fingerprint?: (string | null) | undefined; last4?: (string | null) | undefined; routing_number?: (string | null) | undefined; } | undefined; alipay?: { data_string?: (string | null) | undefined; native_url?: (string | null) | undefined; statement_descriptor?: (string | null) | undefined; } | undefined; amount: number | null; au_becs_debit?: { bsb_number?: (string | null) | undefined; fingerprint?: (string | null) | undefined; last4?: (string | null) | undefined; } | undefined; bancontact?: { bank_code?: (string | null) | undefined; bank_name?: (string | null) | undefined; bic?: (string | null) | undefined; iban_last4?: (string | null) | undefined; preferred_language?: (string | null) | undefined; statement_descriptor?: (string | null) | undefined; } | undefined; card?: { address_line1_check?: (string | null) | undefined; address_zip_check?: (string | null) | undefined; brand?: (string | null) | undefined; country?: (string | null) | undefined; cvc_check?: (string | null) | undefined; description?: string | undefined; dynamic_last4?: (string | null) | undefined; exp_month?: (number | null) | undefined; exp_year?: (number | null) | undefined; fingerprint?: string | undefined; funding?: (string | null) | undefined; iin?: string | undefined; issuer?: string | undefined; last4?: (string | null) | undefined; name?: (string | null) | undefined; three_d_secure?: string | undefined; tokenization_method?: (string | null) | undefined; } | undefined; card_present?: { application_cryptogram?: string | undefined; application_preferred_name?: string | undefined; authorization_code?: (string | null) | undefined; authorization_response_code?: string | undefined; brand?: (string | null) | undefined; country?: (string | null) | undefined; cvm_type?: string | undefined; data_type?: (string | null) | undefined; dedicated_file_name?: string | undefined; description?: string | undefined; emv_auth_data?: string | undefined; evidence_customer_signature?: (string | null) | undefined; evidence_transaction_certificate?: (string | null) | undefined; exp_month?: (number | null) | undefined; exp_year?: (number | null) | undefined; fingerprint?: string | undefined; funding?: (string | null) | undefined; iin?: string | undefined; issuer?: string | undefined; last4?: (string | null) | undefined; pos_device_id?: (string | null) | undefined; pos_entry_mode?: string | undefined; read_method?: (string | null) | undefined; reader?: (string | null) | undefined; terminal_verification_results?: string | undefined; transaction_status_information?: string | undefined; } | undefined; client_secret: string; code_verification?: { attempts_remaining: number; status: string; } | undefined; created: number; currency: string | null; customer?: string | undefined; eps?: { reference?: (string | null) | undefined; statement_descriptor?: (string | null) | undefined; } | undefined; flow: string; giropay?: { bank_code?: (string | null) | undefined; bank_name?: (string | null) | undefined; bic?: (string | null) | undefined; statement_descriptor?: (string | null) | undefined; } | undefined; ideal?: { bank?: (string | null) | undefined; bic?: (string | null) | undefined; iban_last4?: (string | null) | undefined; statement_descriptor?: (string | null) | undefined; } | undefined; klarna?: { background_image_url?: string | undefined; client_token?: (string | null) | undefined; first_name?: string | undefined; last_name?: string | undefined; locale?: string | undefined; logo_url?: string | undefined; page_title?: string | undefined; pay_later_asset_urls_descriptive?: string | undefined; pay_later_asset_urls_standard?: string | undefined; pay_later_name?: string | undefined; pay_later_redirect_url?: string | undefined; pay_now_asset_urls_descriptive?: string | undefined; pay_now_asset_urls_standard?: string | undefined; pay_now_name?: string | undefined; pay_now_redirect_url?: string | undefined; pay_over_time_asset_urls_descriptive?: string | undefined; pay_over_time_asset_urls_standard?: string | undefined; pay_over_time_name?: string | undefined; pay_over_time_redirect_url?: string | undefined; payment_method_categories?: string | undefined; purchase_country?: string | undefined; purchase_type?: string | undefined; redirect_url?: string | undefined; shipping_delay?: number | undefined; shipping_first_name?: string | undefined; shipping_last_name?: string | undefined; } | undefined; livemode: boolean; metadata: { [x: string]: string; } | null; multibanco?: { entity?: (string | null) | undefined; reference?: (string | null) | undefined; refund_account_holder_address_city?: (string | null) | undefined; refund_account_holder_address_country?: (string | null) | undefined; refund_account_holder_address_line1?: (string | null) | undefined; refund_account_holder_address_line2?: (string | null) | undefined; refund_account_holder_address_postal_code?: (string | null) | undefined; refund_account_holder_address_state?: (string | null) | undefined; refund_account_holder_name?: (string | null) | undefined; refund_iban?: (string | null) | undefined; } | undefined; owner: { address: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | null; email: string | null; name: string | null; phone: string | null; verified_address: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | null; verified_email: string | null; verified_name: string | null; verified_phone: string | null; } | null; p24?: { reference?: (string | null) | undefined; } | undefined; receiver?: { address: string | null; amount_charged: number; amount_received: number; amount_returned: number; refund_attributes_method: string; refund_attributes_status: string; } | undefined; redirect?: { failure_reason: string | null; return_url: string; status: string; url: string; } | undefined; sepa_credit_transfer?: { bank_name?: (string | null) | undefined; bic?: (string | null) | undefined; iban?: (string | null) | undefined; refund_account_holder_address_city?: (string | null) | undefined; refund_account_holder_address_country?: (string | null) | undefined; refund_account_holder_address_line1?: (string | null) | undefined; refund_account_holder_address_line2?: (string | null) | undefined; refund_account_holder_address_postal_code?: (string | null) | undefined; refund_account_holder_address_state?: (string | null) | undefined; refund_account_holder_name?: (string | null) | undefined; refund_iban?: (string | null) | undefined; } | undefined; sepa_debit?: { bank_code?: (string | null) | undefined; branch_code?: (string | null) | undefined; country?: (string | null) | undefined; fingerprint?: (string | null) | undefined; last4?: (string | null) | undefined; mandate_reference?: (string | null) | undefined; mandate_url?: (string | null) | undefined; } | undefined; sofort?: { bank_code?: (string | null) | undefined; bank_name?: (string | null) | undefined; bic?: (string | null) | undefined; country?: (string | null) | undefined; iban_last4?: (string | null) | undefined; preferred_language?: (string | null) | undefined; statement_descriptor?: (string | null) | undefined; } | undefined; source_order?: { amount: number; currency: string; email?: string | undefined; items: { amount: number | null; currency: string | null; description: string | null; parent: string | null; quantity?: number | undefined; type: string | null; }[] | null; shipping?: { address?: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | undefined; carrier?: (string | null) | undefined; name?: string | undefined; phone?: (string | null) | undefined; tracking_number?: (string | null) | undefined; } | undefined; } | undefined; statement_descriptor: string | null; status: string; three_d_secure?: { address_line1_check?: (string | null) | undefined; address_zip_check?: (string | null) | undefined; authenticated?: (boolean | null) | undefined; brand?: (string | null) | undefined; card?: (string | null) | undefined; country?: (string | null) | undefined; customer?: (string | null) | undefined; cvc_check?: (string | null) | undefined; description?: string | undefined; dynamic_last4?: (string | null) | undefined; exp_month?: (number | null) | undefined; exp_year?: (number | null) | undefined; fingerprint?: string | undefined; funding?: (string | null) | undefined; iin?: string | undefined; issuer?: string | undefined; last4?: (string | null) | undefined; name?: (string | null) | undefined; three_d_secure?: string | undefined; tokenization_method?: (string | null) | undefined; } | undefined; type: string; usage: string | null; wechat?: { prepay_id?: string | undefined; qr_code_url?: (string | null) | undefined; statement_descriptor?: string | undefined; } | undefined; } | null; deleted?: void | undefined; delinquent?: (boolean | null) | undefined; description: string | null; discount?: { id: string; object: string; checkout_session: string | null; coupon: { id: string; object: string; amount_off: number | null; applies_to?: { products: Array<string>; } | undefined; created: number; currency: string | null; currency_options?: { [x: string]: { amount_off: number; }; } | undefined; deleted?: void | undefined; duration: string; duration_in_months: number | null; livemode: boolean; max_redemptions: number | null; metadata: { [x: string]: string; } | null; name: string | null; percent_off: number | null; redeem_by: number | null; times_redeemed: number; valid: boolean; }; customer: string | any | { id: string; object: string; deleted: boolean; } | null; deleted?: void | undefined; end: number | null; invoice: string | null; invoice_item: string | null; promotion_code: string | { id: string; object: string; active: boolean; code: string; coupon: { id: string; object: string; amount_off: number | null; applies_to?: { products: Array<string>; } | undefined; created: number; currency: string | null; currency_options?: { [x: string]: { amount_off: number; }; } | undefined; deleted?: void | undefined; duration: string; duration_in_months: number | null; livemode: boolean; max_redemptions: number | null; metadata: { [x: string]: string; } | null; name: string | null; percent_off: number | null; redeem_by: number | null; times_redeemed: number; valid: boolean; }; created: number; customer: string | any | { id: string; object: string; deleted: boolean; } | null; expires_at: number | null; livemode: boolean; max_redemptions: number | null; metadata: { [x: string]: string; } | null; restrictions: { currency_options?: { [x: string]: { minimum_amount: number; }; } | undefined; first_time_transaction: boolean; minimum_amount: number | null; minimum_amount_currency: string | null; }; times_redeemed: number; } | null; start: number; subscription: string | null; subscription_item: string | null; } | null | undefined; email: string | null; invoice_credit_balance?: { [x: string]: number; } | undefined; invoice_prefix?: (string | null) | undefined; invoice_settings: { custom_fields: { name: string; value: string; }[] | null; default_payment_method: string | { id: string; object: string; acss_debit?: { bank_name: string | null; fingerprint: string | null; institution_number: string | null; last4: string | null; transit_number: string | null; } | undefined; affirm?: {} | undefined; afterpay_clearpay?: {} | undefined; alipay?: {} | undefined; allow_redisplay?: string | undefined; alma?: {} | undefined; amazon_pay?: {} | undefined; au_becs_debit?: { bsb_number: string | null; fingerprint: string | null; last4: string | null; } | undefined; bacs_debit?: { fingerprint: string | null; last4: string | null; sort_code: string | null; } | undefined; bancontact?: {} | undefined; billing_details: { address: { city: string | null; country: string | null; line1: string | null; line2: string | null; postal_code: string | null; state: string | null; } | null; email: string | null; name: string | null; phone: string | null; }; blik?: {} | undefined; boleto?: { tax_id: string; } | undefined; card?: { brand: string; checks: { address_line1_check: string | null; address_postal_code_check: string | null; cvc_check: string | null; } | null; country: string | null; description?: (string | null) | undefined; display_brand: string | null; exp_month: number; exp_year: number; fingerprint?: (string | null) | undefined; funding: string; generated_from: { charge: string | null; payment_method_details: { card_present?: { amount_authorized: number | null; brand: string | null; brand_product: string | null; capture_before?: number | undefined; cardholder_name: string | null; country: string | null; description?: (string | null) | undefined; emv_auth_data: string | null; exp_month: number; exp_year: number; fingerprint: string | null; funding: string | null; generated_card: string | null; iin?: (string | null) | undefined; incremental_authorization_supported: boolean; issuer?: (string | null) | undefined; last4: string | null; network: string | null; network_transaction_id: string | null; offline: { stored_at: number | null; type: string | null; } | null; overcapture_supported: boolean; preferred_locales: Array<string> | null; read_method: string | null; receipt: { account_type?: string | undefined; application_cryptogram: string | null; application_preferred_name: string | null; authorization_code: string | null; authorization_response_code: string | null; cardholder_verification_method: string | null; dedicated_file_name: string | null; terminal_verification_results: string | null; transaction_status_information: string | null; } | null; wallet?: { type: string; } | undefined; } | undefined; type: string; } | null; setup_attempt: string | { id: string; object: string; application: string | { id: string; object: string; deleted?: void | undefined; name: string | null; } | null; attach_to_self?: boolean | undefined; created: number; customer: string | any | { id: string; object: string;