@capacitor/core 6.0.0-rc.1 → 6.0.0-rc.2

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.
package/cookies.md CHANGED
@@ -131,6 +131,8 @@ getCookies(options?: GetCookieOptions) => Promise<HttpCookieMap>
131
131
  setCookie(options: SetCookieOptions) => Promise<void>
132
132
  ```
133
133
 
134
+ Write a cookie to the device.
135
+
134
136
  | Param | Type |
135
137
  | ------------- | ------------------------------------------------------------- |
136
138
  | **`options`** | <code><a href="#setcookieoptions">SetCookieOptions</a></code> |
@@ -144,6 +146,8 @@ setCookie(options: SetCookieOptions) => Promise<void>
144
146
  deleteCookie(options: DeleteCookieOptions) => Promise<void>
145
147
  ```
146
148
 
149
+ Delete a cookie from the device.
150
+
147
151
  | Param | Type |
148
152
  | ------------- | ------------------------------------------------------------------- |
149
153
  | **`options`** | <code><a href="#deletecookieoptions">DeleteCookieOptions</a></code> |
@@ -157,6 +161,8 @@ deleteCookie(options: DeleteCookieOptions) => Promise<void>
157
161
  clearCookies(options: ClearCookieOptions) => Promise<void>
158
162
  ```
159
163
 
164
+ Clear cookies from the device at a given URL.
165
+
160
166
  | Param | Type |
161
167
  | ------------- | ----------------------------------------------------------------- |
162
168
  | **`options`** | <code><a href="#clearcookieoptions">ClearCookieOptions</a></code> |
@@ -170,6 +176,8 @@ clearCookies(options: ClearCookieOptions) => Promise<void>
170
176
  clearAllCookies() => Promise<void>
171
177
  ```
172
178
 
179
+ Clear all cookies on the device.
180
+
173
181
  --------------------
174
182
 
175
183
 
@@ -181,19 +189,19 @@ clearAllCookies() => Promise<void>
181
189
 
182
190
  #### HttpCookie
183
191
 
184
- | Prop | Type |
185
- | ----------- | ------------------- |
186
- | **`url`** | <code>string</code> |
187
- | **`key`** | <code>string</code> |
188
- | **`value`** | <code>string</code> |
192
+ | Prop | Type | Description |
193
+ | ----------- | ------------------- | ------------------------ |
194
+ | **`url`** | <code>string</code> | The URL of the cookie. |
195
+ | **`key`** | <code>string</code> | The key of the cookie. |
196
+ | **`value`** | <code>string</code> | The value of the cookie. |
189
197
 
190
198
 
191
199
  #### HttpCookieExtras
192
200
 
193
- | Prop | Type |
194
- | ------------- | ------------------- |
195
- | **`path`** | <code>string</code> |
196
- | **`expires`** | <code>string</code> |
201
+ | Prop | Type | Description |
202
+ | ------------- | ------------------- | -------------------------------- |
203
+ | **`path`** | <code>string</code> | The path to write the cookie to. |
204
+ | **`expires`** | <code>string</code> | The date to expire the cookie. |
197
205
 
198
206
 
199
207
  ### Type Aliases
package/http.md CHANGED
@@ -106,6 +106,8 @@ Due to the nature of the bridge, parsing and transferring large amount of data f
106
106
  request(options: HttpOptions) => Promise<HttpResponse>
107
107
  ```
108
108
 
109
+ Make a Http Request to a server using native libraries.
110
+
109
111
  | Param | Type |
110
112
  | ------------- | --------------------------------------------------- |
111
113
  | **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> |
@@ -121,6 +123,8 @@ request(options: HttpOptions) => Promise<HttpResponse>
121
123
  get(options: HttpOptions) => Promise<HttpResponse>
122
124
  ```
123
125
 
126
+ Make a Http GET Request to a server using native libraries.
127
+
124
128
  | Param | Type |
125
129
  | ------------- | --------------------------------------------------- |
126
130
  | **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> |
@@ -136,6 +140,8 @@ get(options: HttpOptions) => Promise<HttpResponse>
136
140
  post(options: HttpOptions) => Promise<HttpResponse>
137
141
  ```
138
142
 
143
+ Make a Http POST Request to a server using native libraries.
144
+
139
145
  | Param | Type |
140
146
  | ------------- | --------------------------------------------------- |
141
147
  | **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> |
@@ -151,6 +157,8 @@ post(options: HttpOptions) => Promise<HttpResponse>
151
157
  put(options: HttpOptions) => Promise<HttpResponse>
152
158
  ```
153
159
 
160
+ Make a Http PUT Request to a server using native libraries.
161
+
154
162
  | Param | Type |
155
163
  | ------------- | --------------------------------------------------- |
156
164
  | **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> |
@@ -166,6 +174,8 @@ put(options: HttpOptions) => Promise<HttpResponse>
166
174
  patch(options: HttpOptions) => Promise<HttpResponse>
167
175
  ```
168
176
 
177
+ Make a Http PATCH Request to a server using native libraries.
178
+
169
179
  | Param | Type |
170
180
  | ------------- | --------------------------------------------------- |
171
181
  | **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> |
@@ -181,6 +191,8 @@ patch(options: HttpOptions) => Promise<HttpResponse>
181
191
  delete(options: HttpOptions) => Promise<HttpResponse>
182
192
  ```
183
193
 
194
+ Make a Http DELETE Request to a server using native libraries.
195
+
184
196
  | Param | Type |
185
197
  | ------------- | --------------------------------------------------- |
186
198
  | **`options`** | <code><a href="#httpoptions">HttpOptions</a></code> |
@@ -195,12 +207,12 @@ delete(options: HttpOptions) => Promise<HttpResponse>
195
207
 
196
208
  #### HttpResponse
197
209
 
198
- | Prop | Type |
199
- | ------------- | --------------------------------------------------- |
200
- | **`data`** | <code>any</code> |
201
- | **`status`** | <code>number</code> |
202
- | **`headers`** | <code><a href="#httpheaders">HttpHeaders</a></code> |
203
- | **`url`** | <code>string</code> |
210
+ | Prop | Type | Description |
211
+ | ------------- | --------------------------------------------------- | ------------------------------------------------- |
212
+ | **`data`** | <code>any</code> | Additional data received with the Http response. |
213
+ | **`status`** | <code>number</code> | The status code received from the Http response. |
214
+ | **`headers`** | <code><a href="#httpheaders">HttpHeaders</a></code> | The headers received from the Http response. |
215
+ | **`url`** | <code>string</code> | The response URL recieved from the Http response. |
204
216
 
205
217
 
206
218
  #### HttpHeaders
@@ -210,11 +222,11 @@ delete(options: HttpOptions) => Promise<HttpResponse>
210
222
 
211
223
  | Prop | Type | Description |
212
224
  | --------------------------- | ------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
213
- | **`url`** | <code>string</code> | |
214
- | **`method`** | <code>string</code> | |
215
- | **`params`** | <code><a href="#httpparams">HttpParams</a></code> | |
225
+ | **`url`** | <code>string</code> | The URL to send the request to. |
226
+ | **`method`** | <code>string</code> | The Http Request method to run. (Default is GET) |
227
+ | **`params`** | <code><a href="#httpparams">HttpParams</a></code> | URL parameters to append to the request. |
216
228
  | **`data`** | <code>any</code> | Note: On Android and iOS, data can only be a string or a JSON. FormData, <a href="#blob">Blob</a>, <a href="#arraybuffer">ArrayBuffer</a>, and other complex types are only directly supported on web or through enabling `CapacitorHttp` in the config and using the patched `window.fetch` or `XMLHttpRequest`. If you need to send a complex type, you should serialize the data to base64 and set the `headers["Content-Type"]` and `dataType` attributes accordingly. |
217
- | **`headers`** | <code><a href="#httpheaders">HttpHeaders</a></code> | |
229
+ | **`headers`** | <code><a href="#httpheaders">HttpHeaders</a></code> | Http Request headers to send with the request. |
218
230
  | **`readTimeout`** | <code>number</code> | How long to wait to read additional data in milliseconds. Resets each time new data is received. |
219
231
  | **`connectTimeout`** | <code>number</code> | How long to wait for the initial connection in milliseconds. |
220
232
  | **`disableRedirects`** | <code>boolean</code> | Sets whether automatic HTTP redirects should be disabled |
@@ -664,6 +676,8 @@ Construct a type with a set of properties K of type T
664
676
 
665
677
  #### HttpResponseType
666
678
 
679
+ How to parse the Http response before returning it to the client.
680
+
667
681
  <code>'arraybuffer' | 'blob' | 'json' | 'text' | 'document'</code>
668
682
 
669
683
  </docgen-api>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/core",
3
- "version": "6.0.0-rc.1",
3
+ "version": "6.0.0-rc.2",
4
4
  "description": "Capacitor: Cross-platform apps with JavaScript and the web",
5
5
  "homepage": "https://capacitorjs.com",
6
6
  "author": "Ionic Team <hi@ionic.io> (https://ionic.io)",
@@ -13,21 +13,48 @@ export interface WebViewPath {
13
13
  export declare const WebView: WebViewPlugin;
14
14
  export interface CapacitorCookiesPlugin {
15
15
  getCookies(options?: GetCookieOptions): Promise<HttpCookieMap>;
16
+ /**
17
+ * Write a cookie to the device.
18
+ */
16
19
  setCookie(options: SetCookieOptions): Promise<void>;
20
+ /**
21
+ * Delete a cookie from the device.
22
+ */
17
23
  deleteCookie(options: DeleteCookieOptions): Promise<void>;
24
+ /**
25
+ * Clear cookies from the device at a given URL.
26
+ */
18
27
  clearCookies(options: ClearCookieOptions): Promise<void>;
28
+ /**
29
+ * Clear all cookies on the device.
30
+ */
19
31
  clearAllCookies(): Promise<void>;
20
32
  }
21
33
  interface HttpCookie {
34
+ /**
35
+ * The URL of the cookie.
36
+ */
22
37
  url?: string;
38
+ /**
39
+ * The key of the cookie.
40
+ */
23
41
  key: string;
42
+ /**
43
+ * The value of the cookie.
44
+ */
24
45
  value: string;
25
46
  }
26
47
  interface HttpCookieMap {
27
48
  [key: string]: string;
28
49
  }
29
50
  interface HttpCookieExtras {
51
+ /**
52
+ * The path to write the cookie to.
53
+ */
30
54
  path?: string;
55
+ /**
56
+ * The date to expire the cookie.
57
+ */
31
58
  expires?: string;
32
59
  }
33
60
  export type GetCookieOptions = Omit<HttpCookie, 'key' | 'value'>;
@@ -45,17 +72,47 @@ export declare const CapacitorCookies: CapacitorCookiesPlugin;
45
72
  /******** END COOKIES PLUGIN ********/
46
73
  /******** HTTP PLUGIN ********/
47
74
  export interface CapacitorHttpPlugin {
75
+ /**
76
+ * Make a Http Request to a server using native libraries.
77
+ */
48
78
  request(options: HttpOptions): Promise<HttpResponse>;
79
+ /**
80
+ * Make a Http GET Request to a server using native libraries.
81
+ */
49
82
  get(options: HttpOptions): Promise<HttpResponse>;
83
+ /**
84
+ * Make a Http POST Request to a server using native libraries.
85
+ */
50
86
  post(options: HttpOptions): Promise<HttpResponse>;
87
+ /**
88
+ * Make a Http PUT Request to a server using native libraries.
89
+ */
51
90
  put(options: HttpOptions): Promise<HttpResponse>;
91
+ /**
92
+ * Make a Http PATCH Request to a server using native libraries.
93
+ */
52
94
  patch(options: HttpOptions): Promise<HttpResponse>;
95
+ /**
96
+ * Make a Http DELETE Request to a server using native libraries.
97
+ */
53
98
  delete(options: HttpOptions): Promise<HttpResponse>;
54
99
  }
100
+ /**
101
+ * How to parse the Http response before returning it to the client.
102
+ */
55
103
  export type HttpResponseType = 'arraybuffer' | 'blob' | 'json' | 'text' | 'document';
56
104
  export interface HttpOptions {
105
+ /**
106
+ * The URL to send the request to.
107
+ */
57
108
  url: string;
109
+ /**
110
+ * The Http Request method to run. (Default is GET)
111
+ */
58
112
  method?: string;
113
+ /**
114
+ * URL parameters to append to the request.
115
+ */
59
116
  params?: HttpParams;
60
117
  /**
61
118
  * Note: On Android and iOS, data can only be a string or a JSON.
@@ -66,6 +123,9 @@ export interface HttpOptions {
66
123
  * and set the `headers["Content-Type"]` and `dataType` attributes accordingly.
67
124
  */
68
125
  data?: any;
126
+ /**
127
+ * Http Request headers to send with the request.
128
+ */
69
129
  headers?: HttpHeaders;
70
130
  /**
71
131
  * How long to wait to read additional data in milliseconds.
@@ -101,15 +161,33 @@ export interface HttpOptions {
101
161
  dataType?: 'file' | 'formData';
102
162
  }
103
163
  export interface HttpParams {
164
+ /**
165
+ * A key/value dictionary of URL parameters to set.
166
+ */
104
167
  [key: string]: string | string[];
105
168
  }
106
169
  export interface HttpHeaders {
170
+ /**
171
+ * A key/value dictionary of Http headers.
172
+ */
107
173
  [key: string]: string;
108
174
  }
109
175
  export interface HttpResponse {
176
+ /**
177
+ * Additional data received with the Http response.
178
+ */
110
179
  data: any;
180
+ /**
181
+ * The status code received from the Http response.
182
+ */
111
183
  status: number;
184
+ /**
185
+ * The headers received from the Http response.
186
+ */
112
187
  headers: HttpHeaders;
188
+ /**
189
+ * The response URL recieved from the Http response.
190
+ */
113
191
  url: string;
114
192
  }
115
193
  /**