@notionhq/client 3.1.2 → 3.1.3

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,11 +1,10 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import type { Agent } from "http";
4
- import type { Readable } from "stream";
5
4
  export type SupportedRequestInfo = string;
6
5
  export type SupportedRequestInit = {
7
6
  agent?: Agent;
8
- body?: string | Readable;
7
+ body?: string | FormData;
9
8
  headers?: Record<string, string>;
10
9
  method?: string;
11
10
  };
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-types.d.ts","sourceRoot":"","sources":["../../src/fetch-types.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAQjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAGtC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAOzC,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAMD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAMD,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE,oBAAoB,EACzB,IAAI,CAAC,EAAE,oBAAoB,KACxB,OAAO,CAAC,iBAAiB,CAAC,CAAA"}
1
+ {"version":3,"file":"fetch-types.d.ts","sourceRoot":"","sources":["../../src/fetch-types.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,MAAM,CAAA;AAGjC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAEzC,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAChC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,EAAE,EAAE,OAAO,CAAA;IACX,IAAI,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAA;IAC3B,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,cAAc,GAAG,CAC3B,GAAG,EAAE,oBAAoB,EACzB,IAAI,CAAC,EAAE,oBAAoB,KACxB,OAAO,CAAC,iBAAiB,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetch-types.js","sourceRoot":"","sources":["../../src/fetch-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Agent } from \"http\"\nimport type { Assert } from \"./type-utils\"\nimport type NodeFetchFn from \"node-fetch\"\nimport type {\n RequestInfo as NodeFetchRequestInfo,\n RequestInit as NodeFetchRequestInit,\n Response as NodeFetchResponse,\n} from \"node-fetch\"\nimport type { Readable } from \"stream\"\n\n// The `Supported` types should be kept up to date in order to exactly match what we use in the client. This ensures maximal compatibility with other `fetch` implementations.\nexport type SupportedRequestInfo = string\n// We can't assert against the browser or native Node fetch types without complicating the package structure (see #401), so perform a best effort against `node-fetch`, which we use by default.\ntype _assertSupportedInfoIsSubtypeOfNodeFetch = Assert<\n NodeFetchRequestInfo,\n SupportedRequestInfo\n>\n\nexport type SupportedRequestInit = {\n agent?: Agent\n body?: string | Readable\n headers?: Record<string, string>\n method?: string\n}\ntype _assertSupportedInitIsSubtypeOfNodeFetch = Assert<\n NodeFetchRequestInit,\n SupportedRequestInit\n>\n\nexport type SupportedResponse = {\n ok: boolean\n text: () => Promise<string>\n headers: unknown\n status: number\n}\ntype _assertSupportedResponseIsSubtypeOfNodeFetch = Assert<\n SupportedResponse,\n NodeFetchResponse\n>\n\nexport type SupportedFetch = (\n url: SupportedRequestInfo,\n init?: SupportedRequestInit\n) => Promise<SupportedResponse>\ntype _assertSupportedFetchIsSubtypeOfNodeFetch = Assert<\n SupportedFetch,\n typeof NodeFetchFn\n>\n"]}
1
+ {"version":3,"file":"fetch-types.js","sourceRoot":"","sources":["../../src/fetch-types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Agent } from \"http\"\n\n// The `Supported` types should be kept up to date in order to exactly match what we use in the client. This ensures maximal compatibility with other `fetch` implementations.\nexport type SupportedRequestInfo = string\n\nexport type SupportedRequestInit = {\n agent?: Agent\n body?: string | FormData\n headers?: Record<string, string>\n method?: string\n}\n\nexport type SupportedResponse = {\n ok: boolean\n text: () => Promise<string>\n headers: unknown\n status: number\n}\n\nexport type SupportedFetch = (\n url: SupportedRequestInfo,\n init?: SupportedRequestInit\n) => Promise<SupportedResponse>\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@notionhq/client",
3
- "version": "3.1.2",
3
+ "version": "3.1.3",
4
4
  "description": "A simple and easy to use client for the Notion API",
5
5
  "engines": {
6
6
  "node": ">=18"
@@ -41,7 +41,6 @@
41
41
  ],
42
42
  "devDependencies": {
43
43
  "@types/jest": "^28.1.4",
44
- "@types/node-fetch": "^2.5.10",
45
44
  "@typescript-eslint/eslint-plugin": "^5.39.0",
46
45
  "@typescript-eslint/parser": "^5.39.0",
47
46
  "cspell": "^5.4.1",