1.0.17 • Published 2 years ago

@mountnotion/tools v1.0.17

Weekly downloads
-
License
unlicensed
Repository
github
Last release
2 years ago

@mount-notion/tools

install

# npm
npm i -S @mount-notion/tools

# yarn
yarn add @mount-notion/tools

overview

summary
notion api responses are EXTREMELY deeply nested. tools provides simple flattening of notion responses and simple expansion of properties. beyond that, it exports a wrapper around the notion api for easy configuration.

example usage

import {
  flattenPageResponse,
  expandProperties,
  notion,
} from '@mount-notion/tools';

const page = await notion.pages.retrieve({
  page_id,
});

const [person, PROPERTIES] = flattenPageResponse<People>(page);

const properties = expandProperties<People>(person, {
  properties: PROPERTIES,
});

const updatedPerson = await notion.pages.update(
  {
    page_id,
    properties,
  },
  { flattenResponse: true }
);
1.3.26

2 years ago

1.3.27

2 years ago

1.0.19

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.3.10

2 years ago

1.3.13

2 years ago

1.0.22

2 years ago

1.3.14

2 years ago

1.0.21

2 years ago

1.3.11

2 years ago

1.3.12

2 years ago

1.3.17

2 years ago

1.3.15

2 years ago

1.3.16

2 years ago

1.0.23

2 years ago

1.3.19

2 years ago

1.3.20

2 years ago

1.3.21

2 years ago

1.3.9

2 years ago

1.3.8

2 years ago

1.3.24

2 years ago

1.3.25

2 years ago

1.3.22

2 years ago

1.3.23

2 years ago

1.3.7

2 years ago

1.3.6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago