superfaceai / cli

Let AI connect the APIs for you
https://superface.ai
MIT License
23 stars 4 forks source link

[BUG] Required `Notion-Version` header is missing in maps #337

Open zdne opened 1 year ago

zdne commented 1 year ago

Following the notion tutorial everything works fine. But when I try some other usecases like:

superface new notion "create page"

or

superface new notion "search for a page"

I get a correct map that is missing the mandatory Notion-Version header. Note, with "list all users" the header is set correctly.

Expected Behavior

When I create unsafe usecase for notion the Notion-Version header is set in Comlink maps:

function SearchForPage({input, parameters, services}){
  const url = `${services.default}/v1/search`;
const options = {
  method: 'POST',
  body: {
    query: input.query,
    filter: input.filter,
    sort: input.sort,
    start_cursor: input.start_cursor,
    page_size: input.page_size,
  },
  headers: {
    'Content-Type': 'application/json',
    'Notion-Version': '2022-06-28',
  },

Current Behavior

The header 'Notion-Version': '2022-06-28' is not present in maps for unsafe notion usecases

Steps to Reproduce

superface new notion "search for a page"

Your Environment