@@ -17,6 +17,7 @@ The Notion Wrapper is a WebAssembly(Wasm) foreign data wrapper which allows you
17
17
18
18
| Version | Wasm Package URL | Checksum |
19
19
| ------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
20
+ | 0.1.1 | ` https://github.com/supabase/wrappers/releases/download/wasm_notion_fdw_v0.1.1/notion_fdw.wasm ` | ` tbd ` |
20
21
| 0.1.0 | ` https://github.com/supabase/wrappers/releases/download/wasm_notion_fdw_v0.1.0/notion_fdw.wasm ` | ` e017263d1fc3427cc1df8071d1182cdc9e2f00363344dddb8c195c5d398a2099 ` |
21
22
22
23
## Preparation
@@ -55,6 +56,42 @@ values (
55
56
returning key_id;
56
57
```
57
58
59
+ ### Connecting to Notion
60
+
61
+ We need to provide Postgres with the credentials to access Notion and any additional options. We can do this using the ` create server ` command:
62
+
63
+ === "With Vault"
64
+
65
+ ```sql
66
+ create server notion_server
67
+ foreign data wrapper wasm_wrapper
68
+ options (
69
+ fdw_package_url 'https://github.com/supabase/wrappers/releases/download/wasm_notion_fdw_v0.1.1/notion_fdw.wasm',
70
+ fdw_package_name 'supabase:notion-fdw',
71
+ fdw_package_version '0.1.1',
72
+ fdw_package_checksum 'tbd',
73
+ api_url 'https://api.notion.com/v1', -- optional
74
+ api_key_id '<key_ID>' -- The Key ID from above.
75
+ );
76
+ ```
77
+
78
+ === "Without Vault"
79
+
80
+ ```sql
81
+ create server cal_server
82
+ foreign data wrapper wasm_wrapper
83
+ options (
84
+ fdw_package_url 'https://github.com/supabase/wrappers/releases/download/wasm_notion_fdw_v0.1.1/notion_fdw.wasm',
85
+ fdw_package_name 'supabase:notion-fdw',
86
+ fdw_package_version '0.1.1',
87
+ fdw_package_checksum 'tbd',
88
+ api_url 'https://api.notion.com/v1', -- optional
89
+ api_key 'secret_xxxx...' -- Notion API key
90
+ );
91
+ ```
92
+
93
+ Note the ` fdw_package_* ` options are required, which specify the Wasm package metadata. You can get the available package version list from [ above] ( #available-versions ) .
94
+
58
95
### Create a schema
59
96
60
97
We recommend creating a schema to hold all the foreign tables:
@@ -91,7 +128,7 @@ Ref: [Notion API docs](https://developers.notion.com/reference/intro)
91
128
92
129
| Object | Select | Insert | Update | Delete | Truncate |
93
130
| ------ | :----: | :----: | :----: | :----: | :------: |
94
- | Block | ✅ | ❌ | ❌ | ❌ | ❌ |
131
+ | Block | ✅ | ❌ | ❌ | ❌ | ❌ |
95
132
96
133
#### Usage
97
134
@@ -130,7 +167,7 @@ Ref: [Notion API docs](https://developers.notion.com/reference/intro)
130
167
131
168
| Object | Select | Insert | Update | Delete | Truncate |
132
169
| ------ | :----: | :----: | :----: | :----: | :------: |
133
- | Page | ✅ | ❌ | ❌ | ❌ | ❌ |
170
+ | Page | ✅ | ❌ | ❌ | ❌ | ❌ |
134
171
135
172
#### Usage
136
173
@@ -164,7 +201,7 @@ Ref: [Notion API docs](https://developers.notion.com/reference/intro)
164
201
165
202
| Object | Select | Insert | Update | Delete | Truncate |
166
203
| -------- | :----: | :----: | :----: | :----: | :------: |
167
- | Database | ✅ | ❌ | ❌ | ❌ | ❌ |
204
+ | Database | ✅ | ❌ | ❌ | ❌ | ❌ |
168
205
169
206
#### Usage
170
207
@@ -198,7 +235,7 @@ Ref: [Notion API docs](https://developers.notion.com/reference/intro)
198
235
199
236
| Object | Select | Insert | Update | Delete | Truncate |
200
237
| ------ | :----: | :----: | :----: | :----: | :------: |
201
- | User | ✅ | ❌ | ❌ | ❌ | ❌ |
238
+ | User | ✅ | ❌ | ❌ | ❌ | ❌ |
202
239
203
240
#### Usage
204
241
0 commit comments