notion-client
Advanced tools
Comparing version 4.9.5 to 4.9.7
@@ -136,5 +136,7 @@ "use strict"; | ||
query: this.getQuery(collectionView), | ||
groups: ((_c = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _c === void 0 ? void 0 : _c.board_groups2) || | ||
((_d = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _d === void 0 ? void 0 : _d.board_groups) || | ||
((_e = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _e === void 0 ? void 0 : _e.board_columns), | ||
groups: collectionView.type === 'board' | ||
? ((_c = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _c === void 0 ? void 0 : _c.board_groups2) || | ||
((_d = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _d === void 0 ? void 0 : _d.board_groups) || | ||
((_e = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _e === void 0 ? void 0 : _e.board_columns) | ||
: [], | ||
gotOptions: gotOptions | ||
@@ -384,4 +386,4 @@ }) | ||
} | ||
// useful for debugging collection queries | ||
// console.log('queryCollection', JSON.stringify( { collectionId, collectionViewId, query, loader}, null, 2)) | ||
//useful for debugging collection queries | ||
//console.log('queryCollection', JSON.stringify( { collectionId, collectionViewId, query, loader}, null, 2)) | ||
return [2 /*return*/, this.fetch({ | ||
@@ -407,2 +409,4 @@ endpoint: 'queryCollection', | ||
var query = (collectionView === null || collectionView === void 0 ? void 0 : collectionView.query2) || (collectionView === null || collectionView === void 0 ? void 0 : collectionView.query); | ||
if (!query) | ||
return undefined; | ||
var groupBy = ((_a = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _a === void 0 ? void 0 : _a.board_columns_by) | ||
@@ -409,0 +413,0 @@ ? (_c = (_b = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _b === void 0 ? void 0 : _b.board_columns_by) === null || _c === void 0 ? void 0 : _c.property |
@@ -130,5 +130,7 @@ var __assign = (this && this.__assign) || function () { | ||
query: this.getQuery(collectionView), | ||
groups: ((_c = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _c === void 0 ? void 0 : _c.board_groups2) || | ||
((_d = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _d === void 0 ? void 0 : _d.board_groups) || | ||
((_e = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _e === void 0 ? void 0 : _e.board_columns), | ||
groups: collectionView.type === 'board' | ||
? ((_c = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _c === void 0 ? void 0 : _c.board_groups2) || | ||
((_d = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _d === void 0 ? void 0 : _d.board_groups) || | ||
((_e = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _e === void 0 ? void 0 : _e.board_columns) | ||
: [], | ||
gotOptions: gotOptions | ||
@@ -378,4 +380,4 @@ }) | ||
} | ||
// useful for debugging collection queries | ||
// console.log('queryCollection', JSON.stringify( { collectionId, collectionViewId, query, loader}, null, 2)) | ||
//useful for debugging collection queries | ||
//console.log('queryCollection', JSON.stringify( { collectionId, collectionViewId, query, loader}, null, 2)) | ||
return [2 /*return*/, this.fetch({ | ||
@@ -401,2 +403,4 @@ endpoint: 'queryCollection', | ||
var query = (collectionView === null || collectionView === void 0 ? void 0 : collectionView.query2) || (collectionView === null || collectionView === void 0 ? void 0 : collectionView.query); | ||
if (!query) | ||
return undefined; | ||
var groupBy = ((_a = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _a === void 0 ? void 0 : _a.board_columns_by) | ||
@@ -403,0 +407,0 @@ ? (_c = (_b = collectionView === null || collectionView === void 0 ? void 0 : collectionView.format) === null || _b === void 0 ? void 0 : _b.board_columns_by) === null || _c === void 0 ? void 0 : _c.property |
{ | ||
"name": "notion-client", | ||
"version": "4.9.5", | ||
"version": "4.9.7", | ||
"description": "Robust TypeScript client for the unofficial Notion API.", | ||
@@ -28,3 +28,3 @@ "repository": "NotionX/react-notion-x", | ||
}, | ||
"gitHead": "9682db83c55ae55e18226265bcb3654817dce095" | ||
"gitHead": "6532aecb13c597ae8a00eec1d78747a8836fe1ee" | ||
} |
@@ -125,5 +125,7 @@ import got, { OptionsOfJSONResponseBody } from 'got' | ||
groups: | ||
collectionView?.format?.board_groups2 || | ||
collectionView?.format?.board_groups || | ||
collectionView?.format?.board_columns, | ||
collectionView.type === 'board' | ||
? collectionView?.format?.board_groups2 || | ||
(collectionView?.format as any)?.board_groups || | ||
collectionView?.format?.board_columns | ||
: [], | ||
gotOptions | ||
@@ -425,4 +427,4 @@ } | ||
// useful for debugging collection queries | ||
// console.log('queryCollection', JSON.stringify( { collectionId, collectionViewId, query, loader}, null, 2)) | ||
//useful for debugging collection queries | ||
//console.log('queryCollection', JSON.stringify( { collectionId, collectionViewId, query, loader}, null, 2)) | ||
@@ -447,2 +449,4 @@ return this.fetch<notion.CollectionInstance>({ | ||
let query = collectionView?.query2 || collectionView?.query | ||
if(!query) return undefined | ||
const groupBy = collectionView?.format?.board_columns_by | ||
@@ -449,0 +453,0 @@ ? collectionView?.format?.board_columns_by?.property |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
988282
12163