@domicile-desktop/sdk 0.0.0-alpha-ecc3148d2d30 → 0.0.0-alpha-2d145b5615e1

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.
@@ -535,13 +535,16 @@ export type DomicileHost = {
535
535
  */
536
536
  closeBrowserWindow(id: string): void;
537
537
  /**
538
- * GETs `url` from the browser process with the cookies of the profile the
539
- * ordinary browser windows use, so a bar item can read a site the user is
540
- * signed in to. Resolves with the response, whatever its status. Rejects
541
- * with a NetworkError for a network failure or a refusal: an address that
542
- * is not https, a `Cookie` header or one the browser sets itself, or a
543
- * locked desk. Redirects are followed on https only; one that leaves the
544
- * origin drops `headers`.
538
+ * Sends `method`, "GET" or "POST", to `url` from the browser process with
539
+ * the cookies of the profile the ordinary browser windows use, so a bar
540
+ * item can read a site the user is signed in to. A POST sends `body`, as a
541
+ * same-origin CORS request from `url`'s own origin.
542
+ * Resolves with the response, whatever its status. Rejects with a
543
+ * NetworkError for a network failure or a refusal: an address that is not
544
+ * https, another method, a GET with a body, a `Cookie` or `Origin` header
545
+ * or one the browser sets itself, or a locked desk. A GET follows redirects on https
546
+ * only, and one that leaves the origin drops `headers`; a POST follows
547
+ * none.
545
548
  *
546
549
  * With `sapisidHashOrigin`, an https origin such as
547
550
  * "https://mail.google.com", the browser also sends the `Authorization:
@@ -551,7 +554,7 @@ export type DomicileHost = {
551
554
  * Handled by the browser process, over its own pipe: see
552
555
  * components/domicile/mojom/shell_fetch.mojom.
553
556
  */
554
- fetchWithCookies(url: string, headers: readonly DomicileFetchHeader[], sapisidHashOrigin: string | null): Promise<DomicileFetchResponse>;
557
+ fetchWithCookies(url: string, method: string, headers: readonly DomicileFetchHeader[], body: string | null, sapisidHashOrigin: string | null): Promise<DomicileFetchResponse>;
555
558
  /**
556
559
  * The screens of the desktop.
557
560
  *
package/package.json CHANGED
@@ -128,7 +128,7 @@
128
128
  "test:unit": "bun test"
129
129
  },
130
130
  "type": "module",
131
- "version": "0.0.0-alpha-ecc3148d2d30",
131
+ "version": "0.0.0-alpha-2d145b5615e1",
132
132
  "repository": {
133
133
  "type": "git",
134
134
  "url": "git+https://github.com/cprussin/domicile.git",