@notionhq/client 2.2.7 → 2.2.8
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/build/package.json +1 -1
- package/build/src/Client.d.ts +1 -0
- package/build/src/Client.d.ts.map +1 -1
- package/build/src/api-endpoints.d.ts +57 -40
- package/build/src/api-endpoints.d.ts.map +1 -1
- package/build/src/api-endpoints.js +8 -1
- package/build/src/api-endpoints.js.map +1 -1
- package/build/src/fetch-types.d.ts +12 -12
- package/build/src/fetch-types.d.ts.map +1 -1
- package/build/src/fetch-types.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/// <reference
|
|
2
|
-
import type {
|
|
3
|
-
type FetchFn = typeof fetch;
|
|
4
|
-
type FetchResponse = Awaited<ReturnType<FetchFn>>;
|
|
5
|
-
type RequestInit = NonNullable<Parameters<FetchFn>[1]>;
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Agent } from "http";
|
|
6
3
|
export type SupportedRequestInfo = string;
|
|
7
4
|
export type SupportedRequestInit = {
|
|
8
|
-
agent?:
|
|
9
|
-
body?:
|
|
10
|
-
headers?:
|
|
11
|
-
method?:
|
|
12
|
-
|
|
5
|
+
agent?: Agent;
|
|
6
|
+
body?: string;
|
|
7
|
+
headers?: Record<string, string>;
|
|
8
|
+
method?: string;
|
|
9
|
+
};
|
|
10
|
+
export type SupportedResponse = {
|
|
11
|
+
ok: boolean;
|
|
12
|
+
text: () => Promise<string>;
|
|
13
|
+
headers: unknown;
|
|
14
|
+
status: number;
|
|
13
15
|
};
|
|
14
|
-
export type SupportedResponse = FetchResponse | NodeResponse;
|
|
15
16
|
export type SupportedFetch = (url: SupportedRequestInfo, init?: SupportedRequestInit) => Promise<SupportedResponse>;
|
|
16
|
-
export {};
|
|
17
17
|
//# sourceMappingURL=fetch-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-types.d.ts","sourceRoot":"","sources":["../../src/fetch-types.ts"],"names":[],"mappings":";
|
|
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;AAUjC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAA;AAOzC,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch-types.js","sourceRoot":"","sources":["../../src/fetch-types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
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\"\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\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"]}
|