@stripe/ui-extension-sdk
Version:
The suite of functionality available to UI extensions in Stripe apps
29 lines (28 loc) • 852 B
TypeScript
export type SerializableRequestOptions = {
body?: string | URLSearchParams;
cache?: RequestCache;
credentials?: RequestCredentials;
headers?: object;
integrity?: string;
method?: 'GET' | 'POST' | 'PUT' | 'HEAD' | 'DELETE' | 'PATCH';
mode?: RequestMode;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
url?: string;
};
export type SerializableResponse = {
json?: Object;
arrayBuffer?: ArrayBuffer;
headers: {
[key: string]: string;
};
ok: boolean;
redirected: boolean;
status: number;
statusText: string;
type: string;
url: string;
};
export type StripeApiFetch = (path: string, init?: SerializableRequestOptions) => Promise<SerializableResponse>;
export { selectPreferredStripeApiFetch } from './selectPreferredStripeApiFetch';