1import type { ParsedQs } from 'qs';
2
3// @docsMissing
4export type QueryParams = ParsedQs;
5
6// @needsAudit @docsMissing
7export type ParsedURL = {
8  scheme: string | null;
9  hostname: string | null;
10  /**
11   * The path into the app specified by the URL.
12   */
13  path: string | null;
14  /**
15   * The set of query parameters specified by the query string of the url used to open the app.
16   */
17  queryParams: QueryParams | null;
18};
19
20// @needsAudit
21export type CreateURLOptions = {
22  /**
23   * URI protocol `<scheme>://` that must be built into your native app.
24   */
25  scheme?: string;
26  /**
27   * An object of parameters that will be converted into a query string.
28   */
29  queryParams?: QueryParams;
30  /**
31   * Should the URI be triple slashed `scheme:///path` or double slashed `scheme://path`.
32   */
33  isTripleSlashed?: boolean;
34};
35
36// @docsMissing
37export type EventType = {
38  url: string;
39  nativeEvent?: MessageEvent;
40};
41
42// @docsMissing
43export type URLListener = (event: EventType) => void;
44
45// @docsMissing
46export type NativeURLListener = (nativeEvent: MessageEvent) => void;
47
48// @docsMissing
49export type SendIntentExtras = { key: string; value: string | number | boolean };
50