Socket
Socket
Sign inDemoInstall

@notionhq/client

Package Overview
Dependencies
Maintainers
13
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 1.0.3 to 1.0.4

2

build/package.json
{
"name": "@notionhq/client",
"version": "1.0.3",
"version": "1.0.4",
"description": "A simple and easy to use client for the Notion API",

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

@@ -44,4 +44,4 @@ "use strict";

method: api_endpoints_1.getBlock.method,
query: helpers_1.pick(args, api_endpoints_1.getBlock.queryParams),
body: helpers_1.pick(args, api_endpoints_1.getBlock.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.getBlock.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.getBlock.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -57,4 +57,4 @@ });

method: api_endpoints_1.updateBlock.method,
query: helpers_1.pick(args, api_endpoints_1.updateBlock.queryParams),
body: helpers_1.pick(args, api_endpoints_1.updateBlock.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.updateBlock.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.updateBlock.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -70,4 +70,4 @@ });

method: api_endpoints_1.deleteBlock.method,
query: helpers_1.pick(args, api_endpoints_1.deleteBlock.queryParams),
body: helpers_1.pick(args, api_endpoints_1.deleteBlock.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.deleteBlock.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.deleteBlock.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -84,4 +84,4 @@ });

method: api_endpoints_1.appendBlockChildren.method,
query: helpers_1.pick(args, api_endpoints_1.appendBlockChildren.queryParams),
body: helpers_1.pick(args, api_endpoints_1.appendBlockChildren.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.appendBlockChildren.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.appendBlockChildren.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -97,4 +97,4 @@ });

method: api_endpoints_1.listBlockChildren.method,
query: helpers_1.pick(args, api_endpoints_1.listBlockChildren.queryParams),
body: helpers_1.pick(args, api_endpoints_1.listBlockChildren.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.listBlockChildren.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.listBlockChildren.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -115,4 +115,4 @@ });

method: api_endpoints_1.listDatabases.method,
query: helpers_1.pick(args, api_endpoints_1.listDatabases.queryParams),
body: helpers_1.pick(args, api_endpoints_1.listDatabases.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.listDatabases.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.listDatabases.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -128,4 +128,4 @@ });

method: api_endpoints_1.getDatabase.method,
query: helpers_1.pick(args, api_endpoints_1.getDatabase.queryParams),
body: helpers_1.pick(args, api_endpoints_1.getDatabase.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.getDatabase.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.getDatabase.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -141,4 +141,4 @@ });

method: api_endpoints_1.queryDatabase.method,
query: helpers_1.pick(args, api_endpoints_1.queryDatabase.queryParams),
body: helpers_1.pick(args, api_endpoints_1.queryDatabase.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.queryDatabase.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.queryDatabase.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -154,4 +154,4 @@ });

method: api_endpoints_1.createDatabase.method,
query: helpers_1.pick(args, api_endpoints_1.createDatabase.queryParams),
body: helpers_1.pick(args, api_endpoints_1.createDatabase.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.createDatabase.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.createDatabase.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -167,4 +167,4 @@ });

method: api_endpoints_1.updateDatabase.method,
query: helpers_1.pick(args, api_endpoints_1.updateDatabase.queryParams),
body: helpers_1.pick(args, api_endpoints_1.updateDatabase.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.updateDatabase.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.updateDatabase.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -182,4 +182,4 @@ });

method: api_endpoints_1.createPage.method,
query: helpers_1.pick(args, api_endpoints_1.createPage.queryParams),
body: helpers_1.pick(args, api_endpoints_1.createPage.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.createPage.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.createPage.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -195,4 +195,4 @@ });

method: api_endpoints_1.getPage.method,
query: helpers_1.pick(args, api_endpoints_1.getPage.queryParams),
body: helpers_1.pick(args, api_endpoints_1.getPage.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.getPage.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.getPage.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -208,4 +208,4 @@ });

method: api_endpoints_1.updatePage.method,
query: helpers_1.pick(args, api_endpoints_1.updatePage.queryParams),
body: helpers_1.pick(args, api_endpoints_1.updatePage.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.updatePage.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.updatePage.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -222,4 +222,4 @@ });

method: api_endpoints_1.getPageProperty.method,
query: helpers_1.pick(args, api_endpoints_1.getPageProperty.queryParams),
body: helpers_1.pick(args, api_endpoints_1.getPageProperty.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.getPageProperty.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.getPageProperty.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -238,4 +238,4 @@ });

method: api_endpoints_1.getUser.method,
query: helpers_1.pick(args, api_endpoints_1.getUser.queryParams),
body: helpers_1.pick(args, api_endpoints_1.getUser.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.getUser.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.getUser.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -251,4 +251,4 @@ });

method: api_endpoints_1.listUsers.method,
query: helpers_1.pick(args, api_endpoints_1.listUsers.queryParams),
body: helpers_1.pick(args, api_endpoints_1.listUsers.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.listUsers.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.listUsers.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -264,4 +264,4 @@ });

method: api_endpoints_1.getSelf.method,
query: helpers_1.pick(args, api_endpoints_1.getSelf.queryParams),
body: helpers_1.pick(args, api_endpoints_1.getSelf.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.getSelf.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.getSelf.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -273,3 +273,3 @@ });

__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(package_json_1.name), "f");
__classPrivateFieldSet(this, _Client_logger, (_b = options === null || options === void 0 ? void 0 : options.logger) !== null && _b !== void 0 ? _b : (0, logging_1.makeConsoleLogger)(package_json_1.name), "f");
__classPrivateFieldSet(this, _Client_prefixUrl, ((_c = options === null || options === void 0 ? void 0 : options.baseUrl) !== null && _c !== void 0 ? _c : "https://api.notion.com") + "/v1/", "f");

@@ -322,3 +322,3 @@ __classPrivateFieldSet(this, _Client_timeoutMs, (_d = options === null || options === void 0 ? void 0 : options.timeoutMs) !== null && _d !== void 0 ? _d : 60000, "f");

if (!response.ok) {
throw errors_1.buildRequestError(response, responseText);
throw (0, errors_1.buildRequestError)(response, responseText);
}

@@ -330,3 +330,3 @@ const responseJson = JSON.parse(responseText);

catch (error) {
if (!errors_1.isNotionClientError(error)) {
if (!(0, errors_1.isNotionClientError)(error)) {
throw error;

@@ -339,3 +339,3 @@ }

});
if (errors_1.isHTTPResponseError(error)) {
if ((0, errors_1.isHTTPResponseError)(error)) {
// The response body may contain sensitive information so it is logged separately at the DEBUG level

@@ -356,4 +356,4 @@ this.log(logging_1.LogLevel.DEBUG, `failed response body`, {

method: api_endpoints_1.search.method,
query: helpers_1.pick(args, api_endpoints_1.search.queryParams),
body: helpers_1.pick(args, api_endpoints_1.search.bodyParams),
query: (0, helpers_1.pick)(args, api_endpoints_1.search.queryParams),
body: (0, helpers_1.pick)(args, api_endpoints_1.search.bodyParams),
auth: args === null || args === void 0 ? void 0 : args.auth,

@@ -369,3 +369,3 @@ });

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

@@ -372,0 +372,0 @@ }

@@ -40,3 +40,3 @@ "use strict";

function isNotionClientError(error) {
return helpers_1.isObject(error) && error instanceof NotionClientErrorBase;
return (0, helpers_1.isObject)(error) && error instanceof NotionClientErrorBase;
}

@@ -190,3 +190,3 @@ exports.isNotionClientError = isNotionClientError;

}
if (!helpers_1.isObject(parsed) ||
if (!(0, helpers_1.isObject)(parsed) ||
typeof parsed["message"] !== "string" ||

@@ -193,0 +193,0 @@ !isAPIErrorCode(parsed["code"])) {

@@ -32,3 +32,3 @@ "use strict";

default:
return helpers_1.assertNever(level);
return (0, helpers_1.assertNever)(level);
}

@@ -35,0 +35,0 @@ }

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

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

Sorry, the diff of this file is too big to display

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

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