New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

notion-types

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notion-types - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

67

build/notion-types.d.ts

@@ -11,3 +11,3 @@ export declare type ID = string;

export declare type Role = 'editor' | 'reader' | 'none' | 'read_and_write';
export declare type CollectionCardCoverType = 'page_cover' | 'page_content' | 'none' | 'file';
export declare type CollectionCardCoverType = 'page_cover' | 'page_content' | 'property' | 'none' | 'file';
export declare type CollectionCardCoverSize = 'small' | 'medium' | 'large';

@@ -23,2 +23,3 @@ export declare type CollectionCardCoverAspect = 'cover' | 'contain';

export declare type PageFormat = ['p', string];
export declare type ExternalLinkFormat = ['‣', [string, string]];
export declare type DateFormat = ['d', {

@@ -30,6 +31,7 @@ type: 'date' | 'daterange';

}];
export declare type SubDecoration = BoldFormat | ItalicFormat | StrikeFormat | CodeFormat | LinkFormat | ColorFormat | DateFormat | UserFormat | PageFormat;
export declare type SubDecoration = BoldFormat | ItalicFormat | StrikeFormat | CodeFormat | LinkFormat | ColorFormat | DateFormat | UserFormat | PageFormat | ExternalLinkFormat;
export declare type BaseDecoration = [string];
export declare type AdditionalDecoration = [string, SubDecoration[]];
export declare type Decoration = BaseDecoration | AdditionalDecoration;
export declare type BlockType = 'page' | 'bookmark' | 'text' | 'bulleted_list' | 'numbered_list' | 'header' | 'sub_header' | 'sub_sub_header' | 'quote' | 'to_do' | 'table_of_contents' | 'divider' | 'column_list' | 'column' | 'callout' | 'toggle' | 'image' | 'embed' | 'video' | 'figma' | 'tweet' | 'maps' | 'pdf' | 'audio' | 'drive' | 'file' | 'code' | 'collection_view';
/**

@@ -53,3 +55,3 @@ * Base properties shared by all block types.

content?: ID[];
type: string;
type: BlockType;
}

@@ -141,2 +143,8 @@ export interface BaseTextBlock extends BaseBlock {

}
export interface TableOfContentsBlock extends BaseBlock {
type: 'table_of_contents';
format?: {
block_color: Color;
};
}
export interface DividerBlock extends BaseBlock {

@@ -194,2 +202,32 @@ type: 'divider';

}
export interface FileBlock extends BaseBlock {
type: 'file';
properties: {
title: Decoration[];
size: Decoration[];
source: string[][];
};
file_ids?: string[];
}
export interface GoogleDriveBlock extends BaseBlock {
type: 'drive';
format: {
drive_status: {
authed: boolean;
last_fetched: number;
};
drive_properties: {
url: string;
icon: string;
title: string;
file_id: string;
trashed: boolean;
version: string;
thumbnail: string;
user_name: string;
modified_time: number;
};
};
file_ids?: string[];
}
export interface CodeBlock extends BaseBlock {

@@ -208,3 +246,3 @@ type: 'code';

/** The different block values a block can have. */
export declare type Block = TextBlock | PageBlock | BulletedListBlock | NumberedListBlock | HeaderBlock | SubHeaderBlock | SubSubHeaderBlock | TodoBlock | DividerBlock | ColumnListBlock | ColumnBlock | QuoteBlock | CodeBlock | ImageBlock | VideoBlock | FigmaBlock | TweetBlock | PdfBlock | MapsBlock | AudioBlock | EmbedBlock | CalloutBlock | BookmarkBlock | ToggleBlock | CollectionBlock;
export declare type Block = TextBlock | PageBlock | BulletedListBlock | NumberedListBlock | HeaderBlock | SubHeaderBlock | SubSubHeaderBlock | TodoBlock | TableOfContentsBlock | DividerBlock | ColumnListBlock | ColumnBlock | QuoteBlock | CodeBlock | ImageBlock | VideoBlock | FigmaBlock | TweetBlock | PdfBlock | MapsBlock | AudioBlock | GoogleDriveBlock | FileBlock | EmbedBlock | CalloutBlock | BookmarkBlock | ToggleBlock | CollectionBlock;
export interface User {

@@ -244,2 +282,8 @@ id: ID;

copied_from: string;
format?: {
collection_page_properties?: Array<{
property: CollectionPropertyID;
visible: boolean;
}>;
};
}

@@ -276,5 +320,3 @@ export declare type CollectionPropertyID = 'string';

format: {
gallery_cover: {
type: CollectionCardCoverType;
};
gallery_cover: CollectionCardCover;
gallery_cover_size: CollectionCardCoverSize;

@@ -297,8 +339,10 @@ gallery_cover_aspect: CollectionCardCoverAspect;

}
export interface CollectionCardCover {
type: CollectionCardCoverType;
property?: CollectionPropertyID;
}
export interface BoardCollectionView extends BaseCollectionView {
type: 'board';
format: {
board_cover: {
type: CollectionCardCoverType;
};
board_cover: CollectionCardCover;
board_cover_size: CollectionCardCoverSize;

@@ -349,2 +393,5 @@ board_cover_aspect: CollectionCardCoverAspect;

};
signed_urls: {
[blockId: string]: string;
};
}

@@ -351,0 +398,0 @@ export interface PageChunk {

4

package.json
{
"name": "notion-types",
"version": "0.3.0",
"version": "0.4.0",
"description": "TypeScript types for core Notion data structures.",

@@ -13,3 +13,3 @@ "repository": "saasify-sh/notion",

},
"gitHead": "3e4e367405e7347c3d5c88a7ed3d0e6d8825ed06"
"gitHead": "76f2886c3a82acae47ac440ea859328fc5821e1e"
}

@@ -67,2 +67,3 @@ // Base Types

| 'page_content'
| 'property'
| 'none'

@@ -82,2 +83,3 @@ | 'file'

export type PageFormat = ['p', string]
export type ExternalLinkFormat = ['‣', [string, string]]
export type DateFormat = [

@@ -103,2 +105,3 @@ 'd',

| PageFormat
| ExternalLinkFormat

@@ -113,2 +116,32 @@ export type BaseDecoration = [string]

export type BlockType =
| 'page'
| 'bookmark'
| 'text'
| 'bulleted_list'
| 'numbered_list'
| 'header'
| 'sub_header'
| 'sub_sub_header'
| 'quote'
| 'to_do'
| 'table_of_contents'
| 'divider'
| 'column_list'
| 'column'
| 'callout'
| 'toggle'
| 'image'
| 'embed'
| 'video'
| 'figma'
| 'tweet'
| 'maps'
| 'pdf'
| 'audio'
| 'drive'
| 'file'
| 'code'
| 'collection_view'
/**

@@ -132,3 +165,3 @@ * Base properties shared by all block types.

content?: ID[]
type: string
type: BlockType
}

@@ -231,2 +264,9 @@

export interface TableOfContentsBlock extends BaseBlock {
type: 'table_of_contents'
format?: {
block_color: Color
}
}
export interface DividerBlock extends BaseBlock {

@@ -297,2 +337,34 @@ type: 'divider'

export interface FileBlock extends BaseBlock {
type: 'file'
properties: {
title: Decoration[]
size: Decoration[]
source: string[][]
}
file_ids?: string[]
}
export interface GoogleDriveBlock extends BaseBlock {
type: 'drive'
format: {
drive_status: {
authed: boolean
last_fetched: number
}
drive_properties: {
url: string
icon: string
title: string
file_id: string
trashed: boolean
version: string
thumbnail: string
user_name: string
modified_time: number
}
}
file_ids?: string[]
}
export interface CodeBlock extends BaseBlock {

@@ -322,2 +394,3 @@ type: 'code'

| TodoBlock
| TableOfContentsBlock
| DividerBlock

@@ -335,2 +408,4 @@ | ColumnListBlock

| AudioBlock
| GoogleDriveBlock
| FileBlock
| EmbedBlock

@@ -386,2 +461,9 @@ | CalloutBlock

copied_from: string
format?: {
collection_page_properties?: Array<{
property: CollectionPropertyID
visible: boolean
}>
}
}

@@ -428,5 +510,3 @@

format: {
gallery_cover: {
type: CollectionCardCoverType
}
gallery_cover: CollectionCardCover
gallery_cover_size: CollectionCardCoverSize

@@ -452,8 +532,11 @@ gallery_cover_aspect: CollectionCardCoverAspect

export interface CollectionCardCover {
type: CollectionCardCoverType
property?: CollectionPropertyID
}
export interface BoardCollectionView extends BaseCollectionView {
type: 'board'
format: {
board_cover: {
type: CollectionCardCoverType
}
board_cover: CollectionCardCover
board_cover_size: CollectionCardCoverSize

@@ -525,2 +608,3 @@ board_cover_aspect: CollectionCardCoverAspect

// added for convenience
collection_query: {

@@ -531,2 +615,7 @@ [collectionId: string]: {

}
// added for convenience
signed_urls: {
[blockId: string]: string
}
}

@@ -533,0 +622,0 @@

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