reinforz / nishan Goto Github PK
View Code? Open in Web Editor NEWAn ecosystem of packages for notion written in typescript.
Home Page: https://nishan-docs.netlify.app/
License: MIT License
An ecosystem of packages for notion written in typescript.
Home Page: https://nishan-docs.netlify.app/
License: MIT License
Hey I just found out by analyzing your latest code that nishan's official documentation is not upto date with the api. It'd be wonderful if you could update it to the latest documentation.
Is your feature request related to a problem? Please describe.
I can not reference the transclusion_reference
type block. When I do it, the following error is displayed:
Block type is not of the supported types
Given type: transclusion_reference
Describe the solution you'd like
I would like to get support for this block, the @nishan/types
already has all typing for it, the @nishan/core
seems to be out of date.
Additional context
I have the following dependencies specified in my application:
"@nishans/core": "^0.0.35",
"@nishans/types": "^0.0.57",
The example of code, which may cause this issue:
const syncedBlocks = await page.getBlocks((block) => block.type.includes('transclusion'), true);
Please note, the page should include the synced block on it to throw this error.
Hey @Devorein, I've been trying to create a collection view page and i've been having some trouble. it goes through without any errors, but when I check notion no page has been created... I've included the logs & code.
Am I doing something wrong here? My apologies if I am missing something obvious.
EDIT: I thought I might add in yes, I have tried restarting notion and checking it on another device
Describe the bug
For some reason, despite being an admin in my workspace, I get 401 when trying to write the data on the page. I can notice that the x-notion-active-user-header
I see on the website transaction requests and in my console differs. It might be the reason behind the problem. The token_v2
is valid through. I can not find any way to switch to the proper x-notion-active-user-header
.
Additional context
The other workspace, where I initially testes the code and which is totally owned by me works and shows no permission problems.
Is your feature request related to a problem? Please describe.
I want to save HTML inside of Notion. It turns out they have an API to import html AND this library has a method called enqueueAndPollTask() which has the types to do it using the "importFile" event!
Describe the solution you'd like
At minimum, just a way to call enqueueAndPollTask()
myself, using any one of the tasks available.
Describe alternatives you've considered
It might already be exposed, but I couldn't figure it out :)
I'm trying to understand the hierarchy of the Nishan client, and I'm not 100% sure how to query the data I'm after.
My page structure is such:
I want to be able to retrieve Row A, Row B, Row C as entries, but after reviewing the code I'm not sure this is exposed?
Thanks in advance
Hello @Devorein, I just found this project here, I realize it's a project in the working. I've read through your code trying to figure out how can I create a page in a workspace.
I only understood how to fetch things, but not creating.
Can you please, publish an example on how to create a page, then add a headline, text, image ?
Context
I have a nested database with some rows. I want to script creating a new row by coping an existing row OR by using a template.
Describe the bug
Unable to copy a page and have it save
To Reproduce
I first tried to do this outside of a database, just for a regular page but couldn't get it to work.
import { NotionCore } from "@nishans/core";
const nishan = new NotionCore.Api.Nishan({
token: "XXXXX",
logger: true,
});
(async () => {
const pageId = "some-UUID";
const pages = await nishan.getPagesById([pageId]);
const page = pages.page.get(pageId);
const res = await page?.duplicate(1);
console.log(res);
})();
It outputs some JSON, but I can't find the relevant page on notion or where its copied to. Any ideas on how to do this correctly?
2 additional questions:
Describe the bug
Hello @Devorein from the documentation, it seems that we can call collection.addRows however that method no longer exists.
How can I add records?
Also, how does the update work?
Thank you
Describe the bug
I was trying to pull up the docs to look into some of the packages available and was greeted with the following error after clicking Docs at the top of the site:
To Reproduce
Steps to reproduce the behavior:
/docs/root
).Expected behavior
I'd expect to be directed to the /docs
endpoint with the documentation.
Screenshots
I've attached screenshots above.
Desktop (please complete the following information):
Additional context
From what I can tell, it's simply the Docs element/tag routing to an invalid path (/docs/root
) instead of the correct one (/docs
).
Hey @Devorein,
I was wondering if we could have the ability to search a collection?
I think in notion the endpoint being used is queryCollection
.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.