Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@notionhq/client

Package Overview
Dependencies
Maintainers
6
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@notionhq/client - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

16

build/src/api-types.d.ts

@@ -34,3 +34,3 @@ /**

text: RichText[];
children?: BlockBase[];
children?: Block[];
};

@@ -63,3 +63,3 @@ }

text: RichText[];
children?: BlockBase[];
children?: Block[];
};

@@ -71,3 +71,3 @@ }

text: RichText[];
children?: BlockBase[];
children?: Block[];
};

@@ -80,3 +80,3 @@ }

checked: boolean;
children?: BlockBase[];
children?: Block[];
};

@@ -88,3 +88,3 @@ }

text: RichText[];
children?: BlockBase[];
children?: Block[];
};

@@ -142,8 +142,2 @@ }

}
export interface MultiSelectProperty extends PropertyBase {
type: "multi_select";
multi_select: {
options: MultiSelectOption[];
};
}
export interface DateProperty extends PropertyBase {

@@ -150,0 +144,0 @@ type: "date";

"use strict";
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to set private field on non-instance");
}
privateMap.set(receiver, value);
return value;
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) {
if (!privateMap.has(receiver)) {
throw new TypeError("attempted to get private field on non-instance");
}
return privateMap.get(receiver);
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _auth, _logLevel, _logger, _got;
var _Client_auth, _Client_logLevel, _Client_logger, _Client_got;
Object.defineProperty(exports, "__esModule", { value: true });

@@ -26,6 +24,6 @@ const url_1 = require("url");

var _a, _b, _c, _d, _e;
_auth.set(this, void 0);
_logLevel.set(this, void 0);
_logger.set(this, void 0);
_got.set(this, void 0);
_Client_auth.set(this, void 0);
_Client_logLevel.set(this, void 0);
_Client_logger.set(this, void 0);
_Client_got.set(this, void 0);
/*

@@ -166,9 +164,9 @@ * Notion API endpoints

};
__classPrivateFieldSet(this, _auth, options === null || options === void 0 ? void 0 : options.auth);
__classPrivateFieldSet(this, _logLevel, (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : logging_1.LogLevel.WARN);
__classPrivateFieldSet(this, _logger, (_b = options === null || options === void 0 ? void 0 : options.logger) !== null && _b !== void 0 ? _b : logging_1.makeConsoleLogger(this.constructor.name));
__classPrivateFieldSet(this, _Client_auth, options === null || options === void 0 ? void 0 : options.auth, "f");
__classPrivateFieldSet(this, _Client_logLevel, (_a = options === null || options === void 0 ? void 0 : options.logLevel) !== null && _a !== void 0 ? _a : logging_1.LogLevel.WARN, "f");
__classPrivateFieldSet(this, _Client_logger, (_b = options === null || options === void 0 ? void 0 : options.logger) !== null && _b !== void 0 ? _b : logging_1.makeConsoleLogger(this.constructor.name), "f");
const prefixUrl = ((_c = options === null || options === void 0 ? void 0 : options.baseUrl) !== null && _c !== void 0 ? _c : "https://api.notion.com") + "/v1/";
const timeout = (_d = options === null || options === void 0 ? void 0 : options.timeoutMs) !== null && _d !== void 0 ? _d : 60000;
const notionVersion = (_e = options === null || options === void 0 ? void 0 : options.notionVersion) !== null && _e !== void 0 ? _e : Client.defaultNotionVersion;
__classPrivateFieldSet(this, _got, got_1.default.extend({
__classPrivateFieldSet(this, _Client_got, got_1.default.extend({
prefixUrl,

@@ -183,3 +181,3 @@ timeout,

agent: makeAgentOption(prefixUrl, options === null || options === void 0 ? void 0 : options.agent),
}));
}), "f");
}

@@ -200,3 +198,3 @@ /**

try {
const response = await __classPrivateFieldGet(this, _got).call(this, path, {
const response = await __classPrivateFieldGet(this, _Client_got, "f").call(this, path, {
method,

@@ -249,4 +247,4 @@ searchParams: query,

log(level, message, extraInfo) {
if (logging_1.logLevelSeverity(level) >= logging_1.logLevelSeverity(__classPrivateFieldGet(this, _logLevel))) {
__classPrivateFieldGet(this, _logger).call(this, level, message, extraInfo);
if (logging_1.logLevelSeverity(level) >= logging_1.logLevelSeverity(__classPrivateFieldGet(this, _Client_logLevel, "f"))) {
__classPrivateFieldGet(this, _Client_logger, "f").call(this, level, message, extraInfo);
}

@@ -265,3 +263,3 @@ }

const headers = {};
const authHeaderValue = auth !== null && auth !== void 0 ? auth : __classPrivateFieldGet(this, _auth);
const authHeaderValue = auth !== null && auth !== void 0 ? auth : __classPrivateFieldGet(this, _Client_auth, "f");
if (authHeaderValue !== undefined) {

@@ -274,3 +272,3 @@ headers["authorization"] = `Bearer ${authHeaderValue}`;

exports.default = Client;
_auth = new WeakMap(), _logLevel = new WeakMap(), _logger = new WeakMap(), _got = new WeakMap();
_Client_auth = new WeakMap(), _Client_logLevel = new WeakMap(), _Client_logger = new WeakMap(), _Client_got = new WeakMap();
Client.defaultNotionVersion = "2021-05-13";

@@ -277,0 +275,0 @@ /*

{
"name": "@notionhq/client",
"version": "0.1.8",
"version": "0.1.9",
"description": "A simple and easy to use client for the Notion API",

@@ -5,0 +5,0 @@ "engines": {

@@ -10,3 +10,3 @@ <div align="center">

![Build status](https://github.com/makenotion/notion-sdk-js/actions/workflows/ci.yml/badge.svg)
[![npm version](https://badge.fury.io/js/%40notionhq%2Fclient.svg)](https://www.npmjs.com/package/notion-api-js)
[![npm version](https://badge.fury.io/js/%40notionhq%2Fclient.svg)](https://www.npmjs.com/package/@notionhq/client)

@@ -13,0 +13,0 @@ ## Installation

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc