Giter VIP home page Giter VIP logo

nishan's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar devorein avatar mattcasey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nishan's Issues

Nishan documentation not upto date

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.

Add support for transclusion_reference

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.

Having some issues creating pages

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.

image
image
image

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

Permission error

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.

Expose code to allow me to import HTML

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 :)

Question: Is it possible to list rows in a database?

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:

  • Top level page
    • Nested database
      • Row A
      • Row B
      • Row C
    • Other nested page

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

How to create a page in a workspace

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 ?

Unable to copy a page and have it save

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:

  1. Is there a way to create a new row in a collection/database using a template? Or copy a row in a database into a new row?
  2. Is there a full working example I can use as a reference?
  3. Could you update the discord invite? The current link everywhere is invalid.

Docs link on homepage leads to dead page

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:

image

To Reproduce
Steps to reproduce the behavior:

  1. Go to Nishan homepage.
  2. Click on 'Docs' in the toolbar.
  3. Note the error received, and the path attempted (/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):

  • OS: macOS Version 11.2.1 (Build 20D74)
  • Browser: Chrome
  • Version 89.0.4389.90 (Official Build) (x86_64)

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.