@texonom/ncompat 1.1.1 → 1.1.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/build/types.d.ts CHANGED
@@ -1,21 +1,21 @@
1
- import type { Client } from '@notionhq/client';
2
- type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
3
- export type PartialPage = Awaited<ReturnType<InstanceType<typeof Client>['pages']['retrieve']>>;
4
- export type Page = Extract<Awaited<ReturnType<InstanceType<typeof Client>['pages']['retrieve']>>, {
5
- url: string;
6
- }>;
7
- export type PartialBlock = Awaited<ReturnType<InstanceType<typeof Client>['blocks']['retrieve']>>;
8
- export type Block = Extract<PartialBlock, {
9
- type: string;
10
- }>;
11
- export type BlockChildren = Awaited<ReturnType<InstanceType<typeof Client>['blocks']['children']['list']>>['results'];
12
- export type RichText = Extract<Block, {
13
- type: 'paragraph';
14
- }>['paragraph']['rich_text'];
15
- export type RichTextItem = ArrayElement<RichText>;
16
- export type PageMap = Record<string, PartialPage>;
17
- export type BlockMap = Record<string, PartialBlock>;
18
- export type BlockChildrenMap = Record<string, Array<string>>;
19
- export type ParentMap = Record<string, string>;
20
- export {};
1
+ import type { Client } from '@notionhq/client';
2
+ type ArrayElement<ArrayType extends readonly unknown[]> = ArrayType extends readonly (infer ElementType)[] ? ElementType : never;
3
+ export type PartialPage = Awaited<ReturnType<InstanceType<typeof Client>['pages']['retrieve']>>;
4
+ export type Page = Extract<Awaited<ReturnType<InstanceType<typeof Client>['pages']['retrieve']>>, {
5
+ url: string;
6
+ }>;
7
+ export type PartialBlock = Awaited<ReturnType<InstanceType<typeof Client>['blocks']['retrieve']>>;
8
+ export type Block = Extract<PartialBlock, {
9
+ type: string;
10
+ }>;
11
+ export type BlockChildren = Awaited<ReturnType<InstanceType<typeof Client>['blocks']['children']['list']>>['results'];
12
+ export type RichText = Extract<Block, {
13
+ type: 'paragraph';
14
+ }>['paragraph']['rich_text'];
15
+ export type RichTextItem = ArrayElement<RichText>;
16
+ export type PageMap = Record<string, PartialPage>;
17
+ export type BlockMap = Record<string, PartialBlock>;
18
+ export type BlockChildrenMap = Record<string, Array<string>>;
19
+ export type ParentMap = Record<string, string>;
20
+ export {};
21
21
  //# sourceMappingURL=types.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@texonom/ncompat",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "description": "Compatibility layer between the official Notion API and unofficial private API.",
6
6
  "repository": "texonom/notion",
@@ -18,12 +18,12 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "p-queue": "^7.3.4",
21
- "@texonom/ntypes": "^1.1.1",
22
- "@texonom/nutils": "^1.1.1"
21
+ "@texonom/ntypes": "^1.1.2",
22
+ "@texonom/nutils": "^1.1.2"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@notionhq/client": "^1.0.4",
26
- "@texonom/nclient": "^1.1.1"
26
+ "@texonom/nclient": "^1.1.2"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "@notionhq/client": "^1.0.4"