Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

notion-client

Package Overview
Dependencies
Maintainers
2
Versions
160
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-client - npm Package Compare versions

Comparing version
7.7.0
to
7.7.1
+2
-1
build/index.d.ts

@@ -57,3 +57,3 @@ import * as notion from 'notion-types';

}): Promise<notion.PageChunk>;
getCollectionData(collectionId: string, collectionViewId: string, collectionView?: any, { limit, searchQuery, userTimeZone, loadContentCover, ofetchOptions }?: {
getCollectionData(collectionId: string, collectionViewId: string, collectionView?: any, { limit, searchQuery, userTimeZone, loadContentCover, spaceId, ofetchOptions }?: {
type?: notion.CollectionViewType;

@@ -65,2 +65,3 @@ limit?: number;

loadContentCover?: boolean;
spaceId?: string;
ofetchOptions?: FetchOptions;

@@ -67,0 +68,0 @@ }): Promise<notion.CollectionInstance>;

@@ -17,7 +17,3 @@ // src/notion-api.ts

constructor({
// TODO: figure out a workaround so this base URL isn't hardcoded to my
// personal public notion site. This used to be 'https://www.notion.so/api/v3',
// but the queryCollection endpoint on this domain started returning `530`
// HTTP errors for some reason.
apiBaseUrl = "https://transitive-bs.notion.site/api/v3",
apiBaseUrl = "https://www.notion.so/api/v3",
authToken,

@@ -81,5 +77,7 @@ activeUser,

if (collectionId) {
const spaceId = block?.space_id;
return block.view_ids?.map((collectionViewId) => ({
collectionId,
collectionViewId
collectionViewId,
spaceId
}));

@@ -93,3 +91,3 @@ } else {

async (collectionInstance) => {
const { collectionId, collectionViewId } = collectionInstance;
const { collectionId, collectionViewId, spaceId } = collectionInstance;
const collectionView = recordMap.collection_view[collectionViewId]?.value;

@@ -103,2 +101,3 @@ try {

limit: collectionReducerLimit,
spaceId,
ofetchOptions

@@ -285,2 +284,3 @@ }

loadContentCover = true,
spaceId,
ofetchOptions

@@ -409,2 +409,6 @@ } = {}) {

}
const headers = {};
if (spaceId) {
headers["x-notion-space-id"] = spaceId;
}
return this.fetch({

@@ -425,2 +429,3 @@ endpoint: "queryCollection",

},
headers,
ofetchOptions: {

@@ -427,0 +432,0 @@ timeout: 6e4,

{
"name": "notion-client",
"version": "7.7.0",
"version": "7.7.1",
"type": "module",

@@ -22,4 +22,4 @@ "description": "Robust TypeScript client for the unofficial Notion API.",

"p-map": "^7.0.3",
"notion-types": "7.7.0",
"notion-utils": "7.7.0"
"notion-utils": "7.7.1",
"notion-types": "7.7.1"
},

@@ -26,0 +26,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet