@notionhq/custom-blocks 0.2.7 → 0.2.9
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/README.md +4 -0
- package/dist/version.js +1 -1
- package/docs/pages.md +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -138,6 +138,10 @@ also needs the base domain. The allowlist applies to every custom block in the
|
|
|
138
138
|
workspace. For `fetch` or `XMLHttpRequest`, an external API must allow the block's
|
|
139
139
|
origin through CORS.
|
|
140
140
|
|
|
141
|
+
When a custom block makes repeated requests to an external API, consider its
|
|
142
|
+
rate limits. Consider batching requests or caching results to reduce unnecessary
|
|
143
|
+
calls. If the API returns 429, follow its retry guidance.
|
|
144
|
+
|
|
141
145
|
Never put API secrets in a block bundle. Store them in the Worker. Read more in
|
|
142
146
|
the [custom block security guide](https://developers.notion.com/custom-blocks/guides/security).
|
|
143
147
|
|
package/dist/version.js
CHANGED
package/docs/pages.md
CHANGED
|
@@ -137,6 +137,10 @@ if (restored.status === "error") {
|
|
|
137
137
|
`pages.unarchive` is shorthand for calling `pages.update` with `is_archived: false`.
|
|
138
138
|
Both methods return an `UpdatePageResult`.
|
|
139
139
|
|
|
140
|
+
## Trashing and untrashing pages
|
|
141
|
+
|
|
142
|
+
This is not currently supported by the custom blocks SDK.
|
|
143
|
+
|
|
140
144
|
## Icons, covers, and file uploads
|
|
141
145
|
|
|
142
146
|
`pages.update` can set icons and covers, and returned `NotionPage` objects can contain both fields. `pages.create` cannot set them yet.
|