Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Usage

import * as types from "https://raw.githubusercontent.com/scrapbox-jp/types/main/rest.ts";

type definitions for Cosense REST API responses

§Interfaces

AdminAddEvent
AdminDeleteEvent
BackupData

project backup data got from /api/project-backup/:projectname/:backupId.json

BackupedPage

page data to be backed up

BackupList

The response type of /api/project-backup/:projectname/list

BackupSummary

Backup summary

BadRequestError

error when normal response is not returned from the URL destination page

BaseLine

scrapbox line metadata

BasePage

basic information about a page

ChangeLine
CharsCountChange
Commit

Scrapboxのページの編集commit

CommitsResponse

the response type of /api/commits/:projectname/:pageid

DeleteChange

change that deletes an existing line

DeletedPage

The response type of /api/deleted-pages/:projectname/:pageid

DescriptionsChange

occurs when the thumbnail text of a page is changed

ErrorLike

error types returned by Scrapbox REST API

ExportedData

JSON data exported from https://scrapbox.io/api/page-data/export/:projectname.json

ExportedPage

page data when exported

FileCapacityError

error that occurs when capacity is exhausted

FilesChange
FileSearchResult

the response type of /api/pages/:projectname/search/files

FoundPage

/api/pages/:projectname/search/query で見つかったページ

FoundPageByFile

/api/pages/:projectname/search/files で見つかったページ

FoundProject

/api/projects/search/query や /api/projects/search/watch-list で見つかったproject

GCSError

Google Cloud Storage XML API error

GuestUser
HelpFeelsChange
IconsChange

occurs when icons in a page are changed

ImageChange

occurs when the thumbnail of a page is changed

ImportedData

JSON data for importing by https://scrapbox.io/api/page-data/import/:projectname.json

ImportedLightPage

import page data without metadata

ImportedLine

import line data with metadata

ImportedPage

import page data with metadata

InfoboxDefinitionChange
InfoboxResult
InsertChange

change that creates a new line

InvalidFollowingIdError

error that occurs when an invalid followingId is passed

InvalidURLError

error returned when passing an invalid URL

InvitationResetEvent
LinesCountChange
LinksChange

occurs when links in a page are changed

MemberAddEvent
MemberJoinEvent
MemberProject

project information which is joined

MemberUser
NewLine
NoQueryError

error that appears when you don't pass a search string

NotFoundError

error that occurs when the specified project or page is not found

NotLoggedInError

error that occurs when calling an API that requires login without being logged in

NotMemberError

error that occurs when calling API on a private project you haven't joined

NotMemberProject

project information which isn't joined

NotPrivilegeError

error that occurs when owner/admin privileges are insufficient

OwnerSetEvent
Page

page information

PageDeleteEvent
PageFilter

Setting for Page list filter

PageList

the response type of https://scrpabox.io/api/pages/:projectname

PageSnapshotList

the response type of /api/page-snapshots/:projectname/:pageid

PageSnapshotResult

the response type of /api/page-snapshots/:projectname/:pageid/:timestampid

PageSummary

a page summary included in PageList

PageWithSnapshot
PinChange

occurs when the pin status of a page is changed

Project

project information

ProjectEvent
ProjectLinksChange

occurs when project links in a page are changed

ProjectRelatedPage

外部プロジェクトの関連ページ

ProjectResponse

the response type of /api/projects

ProjectSearchResult

the response type of /api/projects/search/query and /api/projects/search/watch-list

RelatedPage

related page metadata

RelatedPages
SearchedTitle

the response type of https://scrapbox.io/api/pages/:projectname/search/titles

SearchQuery

検索クエリ

SearchResult

the response type of /api/pages/:projectname/search/query

SessionError

error that occurs when CSRF token is invalid

Snapshot

a page snapshot

SnapshotTimestamp
Stream

The response type of /api/stream/:projectname

StreamPage
TitleChange

occurs when the title of a page is changed

TranslationResult

The response type of /api/deepl/translate?text=:text, which is used in Translation mode (beta).

TranslationSetting

Setting for Translation mode (beta)

TweetInfo

the response type of /api/embed-text/twitter

UpdateChange

change that rewrites an existing line

URLInfo

the response type of /api/embed-text/url

User

user information

UserForExport

user infomation included in exported data

UserInfo

user detailed information

§Type Aliases

Change

ページの変更内容

CommitId

the commit id

LineId

the line id

PageId

the page id

PageWithInfoboxDefinition

A page with infobox definition

PageWithoutInfoboxDefinition

A page without infobox definition

ProjectId

the project id

ProjectUpdatesStreamEvent
StringLc

the formatted string

TranslationLanguage

Available languages you can use in Translation mode (beta)

UnixTime

UNIX time

UserId

the user id

UserResponse

the response type of https://scrapbox.io/api/users/me