@nuxt/scripts
Version:
Load third-party scripts with better performance, privacy and DX in Nuxt Apps.
35 lines (34 loc) • 3.16 kB
TypeScript
import type { PayPalNamespace } from '@paypal/paypal-js';
import type { RegistryScriptInput } from '#nuxt-scripts/types';
export interface PayPalApi {
paypal: PayPalNamespace;
}
declare global {
interface Window extends PayPalApi {
}
}
export declare const PayPalOptions: import("valibot").ObjectSchema<{
readonly clientId: import("valibot").StringSchema<undefined>;
readonly buyerCountry: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
readonly commit: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
readonly components: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>], undefined>, undefined>;
readonly currency: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
readonly debug: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").BooleanSchema<undefined>], undefined>, undefined>;
readonly disableFunding: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>], undefined>, undefined>;
readonly enableFunding: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>], undefined>, undefined>;
readonly integrationDate: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
readonly intent: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
readonly locale: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
/**
* loadScript() supports an array for merchantId, even though
* merchant-id technically may not contain multiple values.
* For an array with a length of > 1 it automatically sets
* merchantId to "*" and moves the actual values to dataMerchantId
*/
readonly merchantId: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>], undefined>, undefined>;
readonly partnerAttributionId: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
readonly vault: import("valibot").OptionalSchema<import("valibot").UnionSchema<[import("valibot").StringSchema<undefined>, import("valibot").BooleanSchema<undefined>], undefined>, undefined>;
readonly sandbox: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
}, undefined>;
export type PayPalInput = RegistryScriptInput<typeof PayPalOptions>;
export declare function useScriptPayPal<T extends PayPalApi>(_options?: PayPalInput): import("#nuxt-scripts/types").UseScriptContext<T>;