1 | import type { QueryParams } from './request';
|
2 | /**
|
3 | * Data extracted from an incoming request to a node server
|
4 | */
|
5 | export interface ExtractedNodeRequestData {
|
6 | [key: string]: any;
|
7 | /** Specific headers from the request */
|
8 | headers?: {
|
9 | [key: string]: string;
|
10 | };
|
11 | /** The request's method */
|
12 | method?: string;
|
13 | /** The request's URL, including query string */
|
14 | url?: string;
|
15 | /** String representing the cookies sent along with the request */
|
16 | cookies?: {
|
17 | [key: string]: string;
|
18 | };
|
19 | /** The request's query params */
|
20 | query_string?: QueryParams;
|
21 | /** Any data sent in the request's body, as a JSON string */
|
22 | data?: string;
|
23 | }
|
24 | /**
|
25 | * Location object on a service worker's `self` object.
|
26 | *
|
27 | * See https://developer.mozilla.org/en-US/docs/Web/API/WorkerLocation.
|
28 | */
|
29 | export interface WorkerLocation {
|
30 | /** The protocol scheme of the URL of the script executed in the Worker, including the final ':'. */
|
31 | readonly protocol: string;
|
32 | /** The host, that is the hostname, a ':', and the port of the URL of the script executed in the Worker. */
|
33 | readonly host: string;
|
34 | /** The domain of the URL of the script executed in the Worker. */
|
35 | readonly hostname: string;
|
36 | /** The canonical form of the origin of the specific location. */
|
37 | readonly origin: string;
|
38 | /** The port number of the URL of the script executed in the Worker. */
|
39 | readonly port: string;
|
40 | /** The path of the URL of the script executed in the Worker, beginning with a '/'. */
|
41 | readonly pathname: string;
|
42 | /** The parameters (query string) of the URL of the script executed in the Worker, beginning with a '?'. */
|
43 | readonly search: string;
|
44 | /** The fragment identifier of the URL of the script executed in the Worker, beginning with a '#'. */
|
45 | readonly hash: string;
|
46 | /** Stringifier that returns the whole URL of the script executed in the Worker. */
|
47 | readonly href: string;
|
48 | /** Synonym for `href` attribute */
|
49 | toString(): string;
|
50 | }
|
51 | export type Primitive = number | string | boolean | bigint | symbol | null | undefined;
|
52 | export type HttpHeaderValue = string | string[] | number | null;
|
53 | //# sourceMappingURL=misc.d.ts.map |
\ | No newline at end of file |