mirror of
https://github.com/zhigang1992/notion-api-worker.git
synced 2026-04-29 04:25:27 +08:00
Merge pull request #36 from chromakode/add-column-types
Add support for url, email, phone_number types
This commit is contained in:
@@ -38,7 +38,10 @@ export type ColumnType =
|
||||
| "multi_select"
|
||||
| "number"
|
||||
| "relation"
|
||||
| "file";
|
||||
| "file"
|
||||
| "email"
|
||||
| "phone_number"
|
||||
| "url";
|
||||
|
||||
export type ColumnSchemaType = {
|
||||
name: string;
|
||||
|
||||
@@ -39,6 +39,9 @@ export const getNotionValue = (
|
||||
case "title":
|
||||
return getTextContent(val);
|
||||
case "select":
|
||||
case "email":
|
||||
case "phone_number":
|
||||
case "url":
|
||||
return val[0][0];
|
||||
case "multi_select":
|
||||
return val[0][0].split(",") as string[];
|
||||
|
||||
Reference in New Issue
Block a user