notion-to-md 3.1.5 → 3.1.6

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.
@@ -31,7 +31,7 @@ export type Annotations = {
31
31
  strikethrough: boolean;
32
32
  underline: boolean;
33
33
  code: boolean;
34
- color: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
34
+ color: "default" | "gray" | "brown" | "orange" | "yellow" | "green" | "blue" | "purple" | "pink" | "red" | "default_background" | "gray_background" | "brown_background" | "orange_background" | "yellow_background" | "green_background" | "blue_background" | "purple_background" | "pink_background" | "red_background";
35
35
  };
36
36
  export type Text = {
37
37
  type: "text";
@@ -75,6 +75,13 @@ export type CalloutIcon = {
75
75
  url: string;
76
76
  expiry_time: string;
77
77
  };
78
+ } | {
79
+ type: "custom_emoji";
80
+ custom_emoji: {
81
+ id: string;
82
+ name: string;
83
+ url: string;
84
+ };
78
85
  } | null;
79
86
  export type CustomTransformer = (block: ListBlockChildrenResponseResult) => string | boolean | Promise<string | boolean>;
80
87
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,KAAK,EACV,yBAAyB,EAE1B,MAAM,0CAA0C,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG;IAC5B,kBAAkB,CAAC,EAAE;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAC1C,yBAAyB,CAAC,SAAS,CAAC,GAAG,eAAe,CAAC;AAEzD,MAAM,MAAM,+BAA+B,GACzC,gCAAgC,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC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G,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,WAAW,EAAE;QACX,IAAI,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,KAAK,CAAC;QACd,aAAa,EAAE,KAAK,CAAC;QACrB,SAAS,EAAE,KAAK,CAAC;QACjB,IAAI,EAAE,KAAK,CAAC;QACZ,KAAK,EAAE,SAAS,CAAC;KAClB,CAAC;IACF,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAChD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GAC5D;IAAE,IAAI,EAAE,cAAc,CAAC;IAAC,YAAY,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACjF,IAAI,CAAC;AAET,MAAM,MAAM,iBAAiB,GAAG,CAC9B,KAAK,EAAE,+BAA+B,KACnC,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"","sourcesContent":["import { Client } from \"@notionhq/client\";\nimport type {\n ListBlockChildrenResponse,\n GetBlockParameters,\n} from \"@notionhq/client/build/src/api-endpoints\";\n\nexport type BlockAttributes = {\n numbered_list_item?: {\n number?: number;\n };\n};\n\nexport type ListBlockChildrenResponseResults =\n ListBlockChildrenResponse[\"results\"] & BlockAttributes;\n\nexport type ListBlockChildrenResponseResult =\n ListBlockChildrenResponseResults[0] & BlockAttributes;\n\nexport type TextRequest = string;\n\nexport type BlockType =\n | \"image\"\n | \"video\"\n | \"file\"\n | \"pdf\"\n | \"table\"\n | \"bookmark\"\n | \"embed\"\n | \"equation\"\n | \"divider\"\n | \"toggle\"\n | \"to_do\"\n | \"bulleted_list_item\"\n | \"numbered_list_item\"\n | \"synced_block\"\n | \"column_list\"\n | \"column\"\n | \"link_preview\"\n | \"link_to_page\"\n | \"paragraph\"\n | \"heading_1\"\n | \"heading_2\"\n | \"heading_3\"\n | \"bulleted_list_item\"\n | \"numbered_list_item\"\n | \"quote\"\n | \"to_do\"\n | \"template\"\n | \"synced_block\"\n | \"child_page\"\n | \"child_database\"\n | \"code\"\n | \"callout\"\n | \"breadcrumb\"\n | \"table_of_contents\"\n | \"link_to_page\"\n | \"audio\"\n | \"unsupported\"\n | (string & {});\n\nexport type ConfigurationOptions = {\n separateChildPage?: boolean;\n convertImagesToBase64?: boolean;\n parseChildPages?: boolean;\n};\nexport interface NotionToMarkdownOptions {\n notionClient: Client;\n config?: ConfigurationOptions;\n}\n\nexport type MdStringObject = Record<string, string>;\n\nexport type MdBlock = {\n type?: string;\n blockId: string;\n parent: string;\n children: MdBlock[];\n};\n\nexport type Annotations = {\n bold: boolean;\n italic: boolean;\n strikethrough: boolean;\n underline: boolean;\n code: boolean;\n color:\n | \"default\"\n | \"gray\"\n | \"brown\"\n | \"orange\"\n | \"yellow\"\n | \"green\"\n | \"blue\"\n | \"purple\"\n | \"pink\"\n | \"red\"\n | \"gray_background\"\n | \"brown_background\"\n | \"orange_background\"\n | \"yellow_background\"\n | \"green_background\"\n | \"blue_background\"\n | \"purple_background\"\n | \"pink_background\"\n | \"red_background\";\n};\n\nexport type Text = {\n type: \"text\";\n text: {\n content: string;\n link: {\n url: TextRequest;\n } | null;\n };\n annotations: Annotations;\n plain_text: string;\n href: string | null;\n};\n\nexport type Equation = {\n type: \"equation\";\n equation: {\n expression: string;\n };\n annotations: {\n bold: false;\n italic: false;\n strikethrough: false;\n underline: false;\n code: false;\n color: \"default\";\n };\n plain_text: string;\n href: null;\n};\n\nexport type CalloutIcon =\n | { type: \"emoji\"; emoji?: string }\n | { type: \"external\"; external?: { url: string } }\n | { type: \"file\"; file: { url: string; expiry_time: string } }\n | null;\n\nexport type CustomTransformer = (\n block: ListBlockChildrenResponseResult,\n) => string | boolean | Promise<string | boolean>;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"","sourcesContent":["import { Client } from \"@notionhq/client\";\nimport type {\n ListBlockChildrenResponse,\n GetBlockParameters,\n} from \"@notionhq/client/build/src/api-endpoints\";\n\nexport type BlockAttributes = {\n numbered_list_item?: {\n number?: number;\n };\n};\n\nexport type ListBlockChildrenResponseResults =\n ListBlockChildrenResponse[\"results\"] & BlockAttributes;\n\nexport type ListBlockChildrenResponseResult =\n ListBlockChildrenResponseResults[0] & BlockAttributes;\n\nexport type TextRequest = string;\n\nexport type BlockType =\n | \"image\"\n | \"video\"\n | \"file\"\n | \"pdf\"\n | \"table\"\n | \"bookmark\"\n | \"embed\"\n | \"equation\"\n | \"divider\"\n | \"toggle\"\n | \"to_do\"\n | \"bulleted_list_item\"\n | \"numbered_list_item\"\n | \"synced_block\"\n | \"column_list\"\n | \"column\"\n | \"link_preview\"\n | \"link_to_page\"\n | \"paragraph\"\n | \"heading_1\"\n | \"heading_2\"\n | \"heading_3\"\n | \"bulleted_list_item\"\n | \"numbered_list_item\"\n | \"quote\"\n | \"to_do\"\n | \"template\"\n | \"synced_block\"\n | \"child_page\"\n | \"child_database\"\n | \"code\"\n | \"callout\"\n | \"breadcrumb\"\n | \"table_of_contents\"\n | \"link_to_page\"\n | \"audio\"\n | \"unsupported\"\n | (string & {});\n\nexport type ConfigurationOptions = {\n separateChildPage?: boolean;\n convertImagesToBase64?: boolean;\n parseChildPages?: boolean;\n};\nexport interface NotionToMarkdownOptions {\n notionClient: Client;\n config?: ConfigurationOptions;\n}\n\nexport type MdStringObject = Record<string, string>;\n\nexport type MdBlock = {\n type?: string;\n blockId: string;\n parent: string;\n children: MdBlock[];\n};\n\nexport type Annotations = {\n bold: boolean;\n italic: boolean;\n strikethrough: boolean;\n underline: boolean;\n code: boolean;\n color:\n | \"default\"\n | \"gray\"\n | \"brown\"\n | \"orange\"\n | \"yellow\"\n | \"green\"\n | \"blue\"\n | \"purple\"\n | \"pink\"\n | \"red\"\n | \"default_background\"\n | \"gray_background\"\n | \"brown_background\"\n | \"orange_background\"\n | \"yellow_background\"\n | \"green_background\"\n | \"blue_background\"\n | \"purple_background\"\n | \"pink_background\"\n | \"red_background\";\n};\n\nexport type Text = {\n type: \"text\";\n text: {\n content: string;\n link: {\n url: TextRequest;\n } | null;\n };\n annotations: Annotations;\n plain_text: string;\n href: string | null;\n};\n\nexport type Equation = {\n type: \"equation\";\n equation: {\n expression: string;\n };\n annotations: {\n bold: false;\n italic: false;\n strikethrough: false;\n underline: false;\n code: false;\n color: \"default\";\n };\n plain_text: string;\n href: null;\n};\n\nexport type CalloutIcon =\n | { type: \"emoji\"; emoji?: string }\n | { type: \"external\"; external?: { url: string } }\n | { type: \"file\"; file: { url: string; expiry_time: string } }\n | { type: \"custom_emoji\"; custom_emoji: { id: string; name: string; url: string } }\n | null;\n\nexport type CustomTransformer = (\n block: ListBlockChildrenResponseResult,\n) => string | boolean | Promise<string | boolean>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "notion-to-md",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "engines": {
5
5
  "node": ">=12"
6
6
  },