create-request 1.5.4 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,85 +1,94 @@
1
1
  /**
2
2
  * Enum for HTTP methods
3
3
  */
4
- export declare enum HttpMethod {
5
- GET = "GET",
6
- PUT = "PUT",
7
- POST = "POST",
8
- HEAD = "HEAD",
9
- PATCH = "PATCH",
10
- DELETE = "DELETE",
11
- OPTIONS = "OPTIONS"
12
- }
4
+ export declare const HttpMethod: {
5
+ readonly GET: "GET";
6
+ readonly PUT: "PUT";
7
+ readonly POST: "POST";
8
+ readonly HEAD: "HEAD";
9
+ readonly PATCH: "PATCH";
10
+ readonly DELETE: "DELETE";
11
+ readonly OPTIONS: "OPTIONS";
12
+ };
13
+ export type HttpMethod = (typeof HttpMethod)[keyof typeof HttpMethod];
13
14
  /**
14
15
  * Enum for request priorities
15
16
  */
16
- export declare enum RequestPriority {
17
- LOW = "low",
18
- HIGH = "high",
19
- AUTO = "auto"
20
- }
17
+ export declare const RequestPriority: {
18
+ readonly LOW: "low";
19
+ readonly HIGH: "high";
20
+ readonly AUTO: "auto";
21
+ };
22
+ export type RequestPriority = (typeof RequestPriority)[keyof typeof RequestPriority];
21
23
  /**
22
24
  * Enum for credentials policies
23
25
  */
24
- export declare enum CredentialsPolicy {
25
- OMIT = "omit",
26
- INCLUDE = "include",
27
- SAME_ORIGIN = "same-origin"
28
- }
26
+ export declare const CredentialsPolicy: {
27
+ readonly OMIT: "omit";
28
+ readonly INCLUDE: "include";
29
+ readonly SAME_ORIGIN: "same-origin";
30
+ };
31
+ export type CredentialsPolicy = (typeof CredentialsPolicy)[keyof typeof CredentialsPolicy];
29
32
  /**
30
33
  * Enum for request modes
31
34
  */
32
- export declare enum RequestMode {
33
- CORS = "cors",
34
- NO_CORS = "no-cors",
35
- SAME_ORIGIN = "same-origin",
36
- NAVIGATE = "navigate"
37
- }
35
+ export declare const RequestMode: {
36
+ readonly CORS: "cors";
37
+ readonly NO_CORS: "no-cors";
38
+ readonly SAME_ORIGIN: "same-origin";
39
+ readonly NAVIGATE: "navigate";
40
+ };
41
+ export type RequestMode = (typeof RequestMode)[keyof typeof RequestMode];
38
42
  /**
39
43
  * Enum for redirect modes
40
44
  */
41
- export declare enum RedirectMode {
42
- ERROR = "error",
43
- FOLLOW = "follow",
44
- MANUAL = "manual"
45
- }
45
+ export declare const RedirectMode: {
46
+ readonly ERROR: "error";
47
+ readonly FOLLOW: "follow";
48
+ readonly MANUAL: "manual";
49
+ };
50
+ export type RedirectMode = (typeof RedirectMode)[keyof typeof RedirectMode];
46
51
  /**
47
52
  * Enum for cookie SameSite policies
48
53
  */
49
- export declare enum SameSitePolicy {
50
- LAX = "Lax",
51
- NONE = "None",
52
- STRICT = "Strict"
53
- }
54
+ export declare const SameSitePolicy: {
55
+ readonly LAX: "Lax";
56
+ readonly NONE: "None";
57
+ readonly STRICT: "Strict";
58
+ };
59
+ export type SameSitePolicy = (typeof SameSitePolicy)[keyof typeof SameSitePolicy];
54
60
  /**
55
61
  * Enum for body types
56
62
  */
57
- export declare enum BodyType {
58
- JSON = "json",
59
- STRING = "string",
60
- BINARY = "binary"
61
- }
63
+ export declare const BodyType: {
64
+ readonly JSON: "json";
65
+ readonly STRING: "string";
66
+ readonly BINARY: "binary";
67
+ };
68
+ export type BodyType = (typeof BodyType)[keyof typeof BodyType];
62
69
  /**
63
70
  * Referrer policies for fetch requests
64
71
  */
65
- export declare enum ReferrerPolicy {
66
- ORIGIN = "origin",
67
- UNSAFE_URL = "unsafe-url",
68
- SAME_ORIGIN = "same-origin",
69
- NO_REFERRER = "no-referrer",
70
- STRICT_ORIGIN = "strict-origin",
71
- ORIGIN_WHEN_CROSS_ORIGIN = "origin-when-cross-origin",
72
- NO_REFERRER_WHEN_DOWNGRADE = "no-referrer-when-downgrade",
73
- STRICT_ORIGIN_WHEN_CROSS_ORIGIN = "strict-origin-when-cross-origin"
74
- }
72
+ export declare const ReferrerPolicy: {
73
+ readonly ORIGIN: "origin";
74
+ readonly UNSAFE_URL: "unsafe-url";
75
+ readonly SAME_ORIGIN: "same-origin";
76
+ readonly NO_REFERRER: "no-referrer";
77
+ readonly STRICT_ORIGIN: "strict-origin";
78
+ readonly ORIGIN_WHEN_CROSS_ORIGIN: "origin-when-cross-origin";
79
+ readonly NO_REFERRER_WHEN_DOWNGRADE: "no-referrer-when-downgrade";
80
+ readonly STRICT_ORIGIN_WHEN_CROSS_ORIGIN: "strict-origin-when-cross-origin";
81
+ };
82
+ export type ReferrerPolicy = (typeof ReferrerPolicy)[keyof typeof ReferrerPolicy];
75
83
  /**
76
84
  * Cache modes for fetch requests
77
85
  */
78
- export declare enum CacheMode {
79
- RELOAD = "reload",
80
- DEFAULT = "default",
81
- NO_CACHE = "no-cache",
82
- NO_STORE = "no-store",
83
- FORCE_CACHE = "force-cache",
84
- ONLY_IF_CACHED = "only-if-cached"
85
- }
86
+ export declare const CacheMode: {
87
+ readonly RELOAD: "reload";
88
+ readonly DEFAULT: "default";
89
+ readonly NO_CACHE: "no-cache";
90
+ readonly NO_STORE: "no-store";
91
+ readonly FORCE_CACHE: "force-cache";
92
+ readonly ONLY_IF_CACHED: "only-if-cached";
93
+ };
94
+ export type CacheMode = (typeof CacheMode)[keyof typeof CacheMode];