Skip to content

Commit aa86e4e

Browse files
michelle0927lcaresia
authored andcommitted
Notion Database Page - Support End Dates (#14556)
* update data property * versions * update object detection
1 parent 52f33e9 commit aa86e4e

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

components/notion/actions/append-block/append-block.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "notion-append-block",
77
name: "Append Block to Parent",
88
description: "Creates and appends blocks to the specified parent. [See the documentation](https://developers.notion.com/reference/patch-block-children)",
9-
version: "0.2.15",
9+
version: "0.2.16",
1010
type: "action",
1111
props: {
1212
notion,

components/notion/actions/create-page-from-database/create-page-from-database.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "notion-create-page-from-database",
88
name: "Create Page from Database",
99
description: "Creates a page from a database. [See the docs](https://developers.notion.com/reference/post-page)",
10-
version: "0.1.13",
10+
version: "0.1.14",
1111
type: "action",
1212
props: {
1313
notion,

components/notion/actions/create-page/create-page.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "notion-create-page",
88
name: "Create Page",
99
description: "Creates a page from a parent page. The only valid property is *title*. [See the documentation](https://developers.notion.com/reference/post-page)",
10-
version: "0.2.11",
10+
version: "0.2.12",
1111
type: "action",
1212
props: {
1313
notion,

components/notion/actions/duplicate-page/duplicate-page.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "notion-duplicate-page",
88
name: "Duplicate Page",
99
description: "Creates a new page copied from an existing page block. [See the docs](https://developers.notion.com/reference/post-page)",
10-
version: "0.0.7",
10+
version: "0.0.8",
1111
type: "action",
1212
props: {
1313
notion,

components/notion/actions/update-page/update-page.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "notion-update-page",
88
name: "Update Page",
99
description: "Updates page property values for the specified page. Properties that are not set will remain unchanged. To append page content, use the *append block* action. [See the docs](https://developers.notion.com/reference/patch-page)",
10-
version: "1.1.1",
10+
version: "1.1.2",
1111
type: "action",
1212
props: {
1313
notion,

components/notion/common/notion-page-properties.mjs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,16 @@ const NOTION_PAGE_PROPERTIES = {
6464
},
6565
date: {
6666
type: "string",
67-
example: "2022-05-15T18:47:00.000Z",
67+
example: "2022-05-15T18:47:00.000Z or { \"start\": \"2022-05-15T18:47:00.000Z\", \"end\": \"2022-06-15T18:47:00.000Z\" }",
6868
options: () => undefined,
6969
convertToNotion: (property) => ({
70-
date: {
71-
start: property.value,
72-
},
70+
date: !(typeof (property.value) === "string")
71+
? property.value
72+
: property.value.trim().startsWith("{")
73+
? JSON.parse(property.value)
74+
: {
75+
start: property.value,
76+
},
7377
}),
7478
},
7579
people: {

components/notion/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/notion",
3-
"version": "0.2.4",
3+
"version": "0.2.5",
44
"description": "Pipedream Notion Components",
55
"main": "notion.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)