├── assets └── content.png ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── docs ├── styles │ ├── logo-styles.css │ └── jetbrains-mono.css ├── images │ ├── arrow_down.svg │ ├── copy-icon.svg │ ├── footer-go-to-link.svg │ ├── copy-successful-icon.svg │ ├── go-to-top-icon.svg │ ├── burger.svg │ ├── nav-icons │ │ ├── field-value.svg │ │ ├── field-variable.svg │ │ ├── exception-class.svg │ │ ├── enum.svg │ │ ├── interface.svg │ │ ├── interface-kotlin.svg │ │ ├── enum-kotlin.svg │ │ ├── typealias-kotlin.svg │ │ ├── object.svg │ │ ├── class-kotlin.svg │ │ ├── class.svg │ │ └── function.svg │ ├── logo-icon.svg │ ├── anchor-copy-button.svg │ ├── theme-toggle.svg │ └── docs_logo.svg └── scripts │ └── sourceset_dependencies.js ├── .idea ├── codeStyles │ └── codeStyleConfig.xml └── copyright │ ├── profiles_settings.xml │ └── asl2.xml ├── samples ├── sample-jvm │ └── build.gradle.kts ├── sample-native-osx │ └── build.gradle.kts └── notion-cli │ ├── build.gradle.kts │ └── src │ ├── jvmMain │ └── kotlin │ │ └── Main.kt │ └── macosMain │ └── kotlin │ └── Main.kt ├── settings.gradle.kts ├── gradle.properties └── library └── src ├── commonMain └── kotlin │ └── org │ └── jraf │ └── klibnotion │ ├── model │ ├── base │ │ ├── EmojiOrFile.kt │ │ └── UrlString.kt │ ├── date │ │ ├── Timestamp.kt │ │ └── DateOrDateRange.kt │ ├── block │ │ ├── EquationBlock.kt │ │ ├── DividerBlock.kt │ │ ├── TableOfContentsBlock.kt │ │ ├── EmbedBlock.kt │ │ ├── ChildPageBlock.kt │ │ ├── ChildDatabaseBlock.kt │ │ ├── CalloutBlock.kt │ │ ├── QuoteBlock.kt │ │ ├── SyncedBlock.kt │ │ ├── ToggleBlock.kt │ │ ├── Heading1Block.kt │ │ ├── Heading2Block.kt │ │ ├── Heading3Block.kt │ │ ├── ParagraphBlock.kt │ │ ├── BulletedListItemBlock.kt │ │ ├── NumberedListItemBlock.kt │ │ ├── CodeBlock.kt │ │ ├── ToDoBlock.kt │ │ ├── BookmarkBlock.kt │ │ ├── UnknownTypeBlock.kt │ │ ├── ImageBlock.kt │ │ └── VideoBlock.kt │ ├── oauth │ │ ├── OAuthCodeAndState.kt │ │ └── OAuthCredentials.kt │ ├── exceptions │ │ └── NotionClientException.kt │ ├── user │ │ ├── Bot.kt │ │ ├── Person.kt │ │ ├── AnonymousUser.kt │ │ ├── User.kt │ │ └── UnknownTypeUser.kt │ ├── property │ │ ├── spec │ │ │ ├── DatePropertySpec.kt │ │ │ ├── EmailPropertySpec.kt │ │ │ ├── FilesPropertySpec.kt │ │ │ ├── UrlPropertySpec.kt │ │ │ ├── PeoplePropertySpec.kt │ │ │ ├── CheckboxPropertySpec.kt │ │ │ ├── CreatedByPropertySpec.kt │ │ │ ├── RichTextPropertySpec.kt │ │ │ ├── CreatedTimePropertySpec.kt │ │ │ ├── LastEditedByPropertySpec.kt │ │ │ ├── PhoneNumberPropertySpec.kt │ │ │ ├── LastEditedTimePropertySpec.kt │ │ │ ├── SelectPropertySpec.kt │ │ │ ├── MultiSelectPropertySpec.kt │ │ │ ├── TitlePropertySpec.kt │ │ │ └── UnknownTypePropertySpec.kt │ │ └── value │ │ │ ├── EmailPropertyValue.kt │ │ │ ├── UrlPropertyValue.kt │ │ │ ├── NumberPropertyValue.kt │ │ │ ├── CheckboxPropertyValue.kt │ │ │ ├── PhoneNumberPropertyValue.kt │ │ │ ├── CreatedByPropertyValue.kt │ │ │ ├── FilesPropertyValue.kt │ │ │ ├── PeoplePropertyValue.kt │ │ │ ├── LastEditedByPropertyValue.kt │ │ │ ├── DatePropertyValue.kt │ │ │ ├── RelationPropertyValue.kt │ │ │ ├── SelectPropertyValue.kt │ │ │ ├── TitlePropertyValue.kt │ │ │ ├── RichTextPropertyValue.kt │ │ │ ├── CreatedTimePropertyValue.kt │ │ │ ├── LastEditedTimePropertyValue.kt │ │ │ └── MultiSelectPropertyValue.kt │ ├── richtext │ │ ├── TextRichText.kt │ │ ├── EquationRichText.kt │ │ ├── RichText.kt │ │ └── UnknownTypeRichText.kt │ └── file │ │ └── File.kt │ ├── client │ ├── HttpProxy.kt │ ├── BaseUri.kt │ ├── HttpConfiguration.kt │ └── ClientConfiguration.kt │ └── internal │ ├── api │ └── model │ │ ├── ApiConverterException.kt │ │ ├── block │ │ ├── ApiBlockEmbed.kt │ │ ├── ApiSyncedBlock.kt │ │ ├── ApiSyncedFrom.kt │ │ ├── ApiBlockChildPage.kt │ │ ├── ApiBlockEquation.kt │ │ ├── ApiBlockChildDatabase.kt │ │ ├── ApiBlockBookmark.kt │ │ └── ApiPageResultBlockConverter.kt │ │ ├── user │ │ ├── ApiBot.kt │ │ ├── ApiPerson.kt │ │ └── ApiUserResultPageConverter.kt │ │ ├── emoji │ │ └── ApiEmoji.kt │ │ ├── richtext │ │ ├── ApiLink.kt │ │ ├── ApiRichTextEquation.kt │ │ ├── ApiRichTextMentionPage.kt │ │ ├── ApiRichTextMentionDatabase.kt │ │ └── ApiRichTextText.kt │ │ ├── file │ │ └── ApiFile.kt │ │ ├── search │ │ ├── SearchParameters.kt │ │ ├── ApiSearchFilter.kt │ │ └── ApiSearchSort.kt │ │ ├── page │ │ └── ApiPageResultPageConverter.kt │ │ ├── property │ │ ├── spec │ │ │ ├── ApiPropertySpecNumber.kt │ │ │ └── ApiPropertySpecFormula.kt │ │ ├── value │ │ │ └── ApiPropertyValueRelation.kt │ │ └── ApiSelectOption.kt │ │ ├── date │ │ └── ApiDate.kt │ │ └── pagination │ │ └── ApiResultPage.kt │ ├── model │ ├── block │ │ └── MutableBlock.kt │ ├── emoji │ │ └── EmojiImpl.kt │ ├── file │ │ └── FileImpl.kt │ ├── property │ │ ├── spec │ │ │ ├── UrlPropertySpecImpl.kt │ │ │ ├── DatePropertySpecImpl.kt │ │ │ ├── EmailPropertySpecImpl.kt │ │ │ ├── FilesPropertySpecImpl.kt │ │ │ ├── TitlePropertySpecImpl.kt │ │ │ ├── PeoplePropertySpecImpl.kt │ │ │ ├── CheckboxPropertySpecImpl.kt │ │ │ ├── RichTextPropertySpecImpl.kt │ │ │ ├── CreatedByPropertySpecImpl.kt │ │ │ ├── CreatedTimePropertySpecImpl.kt │ │ │ ├── PhoneNumberPropertySpecImpl.kt │ │ │ ├── LastEditedByPropertySpecImpl.kt │ │ │ ├── LastEditedTimePropertySpecImpl.kt │ │ │ ├── FormulaPropertySpecImpl.kt │ │ │ └── NumberPropertySpecImpl.kt │ │ ├── value │ │ │ ├── UrlPropertyValueImpl.kt │ │ │ ├── EmailPropertyValueImpl.kt │ │ │ ├── NumberPropertyValueImpl.kt │ │ │ ├── CheckboxPropertyValueImpl.kt │ │ │ └── PhoneNumberPropertyValueImpl.kt │ │ └── SelectOptionImpl.kt │ ├── oauth │ │ └── OAuthCodeAndStateImpl.kt │ └── user │ │ ├── BotImpl.kt │ │ └── AnonymousUserImpl.kt │ └── CoroutineUtils.kt ├── jvmMain └── kotlin │ └── org │ └── jraf │ └── klibnotion │ ├── model │ └── date │ │ └── Timestamp.kt │ └── internal │ └── CoroutineUtils.kt └── macosMain └── kotlin └── org └── jraf └── klibnotion └── model └── date └── Timestamp.kt /assets/content.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoD/klibnotion/HEAD/assets/content.png -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/BoD/klibnotion/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | out 3 | .gradle 4 | *.iml 5 | .DS_Store 6 | .idea/* 7 | !.idea/codeStyles 8 | !.idea/copyright 9 | local.properties 10 | -------------------------------------------------------------------------------- /docs/styles/logo-styles.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --dokka-logo-image-url: url('../images/logo-icon.svg'); 3 | --dokka-logo-height: 50px; 4 | --dokka-logo-width: 50px; 5 | } 6 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /docs/images/arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/images/copy-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/images/footer-go-to-link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/scripts/sourceset_dependencies.js: -------------------------------------------------------------------------------- 1 | sourceset_dependencies='{":klibnotion:dokkaHtml/commonMain":[],":klibnotion:dokkaHtml/jvmMain":[":klibnotion:dokkaHtml/commonMain"],":klibnotion:dokkaHtml/macosMain":[":klibnotion:dokkaHtml/commonMain"]}' 2 | -------------------------------------------------------------------------------- /docs/images/copy-successful-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /docs/images/go-to-top-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/images/burger.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /samples/sample-jvm/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("jvm") 3 | } 4 | 5 | kotlin { 6 | jvmToolchain(17) 7 | } 8 | 9 | dependencies { 10 | // Kotlin 11 | implementation(libs.kotlinx.coroutines.core) 12 | 13 | // Library 14 | implementation(project(":klibnotion")) 15 | // implementation("org.jraf", "klibnotion", "1.0.0") 16 | } 17 | -------------------------------------------------------------------------------- /settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "klibnotion-root" 2 | 3 | include(":library") 4 | project(":library").name = "klibnotion" 5 | 6 | // Include all the sample modules from the "samples" directory 7 | file("samples").listFiles()!!.forEach { dir -> 8 | include(dir.name) 9 | project(":${dir.name}").apply { 10 | projectDir = dir 11 | name = dir.name 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /docs/images/nav-icons/field-value.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/images/nav-icons/field-variable.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/images/nav-icons/exception-class.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/sample-native-osx/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | } 4 | 5 | kotlin { 6 | macosX64("macos") { 7 | binaries { 8 | executable() 9 | } 10 | } 11 | 12 | sourceSets { 13 | val macosMain by getting { 14 | dependencies { 15 | // Library 16 | implementation(project(":klibnotion")) 17 | // implementation("org.jraf", "klibnotion", "1.0.0") 18 | } 19 | } 20 | } 21 | } 22 | 23 | // ./gradlew :sample-native-osx:build -------------------------------------------------------------------------------- /docs/images/nav-icons/enum.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/images/logo-icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/images/nav-icons/interface.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/images/nav-icons/interface-kotlin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/images/nav-icons/enum-kotlin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/images/nav-icons/typealias-kotlin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/images/anchor-copy-button.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 10 | 11 | 13 | 14 | 16 | 17 | 20 | 21 | -------------------------------------------------------------------------------- /docs/images/theme-toggle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /docs/images/nav-icons/object.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/images/nav-icons/class-kotlin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/images/nav-icons/class.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/images/nav-icons/function.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /docs/styles/jetbrains-mono.css: -------------------------------------------------------------------------------- 1 | @font-face{ 2 | font-family: 'JetBrains Mono'; 3 | src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/web/JetBrainsMono-Regular.eot') format('embedded-opentype'), 4 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Regular.woff2') format('woff2'), 5 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Regular.ttf') format('truetype'); 6 | font-weight: normal; 7 | font-style: normal; 8 | } 9 | 10 | @font-face{ 11 | font-family: 'JetBrains Mono'; 12 | src: url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/web/JetBrainsMono-Bold.eot') format('embedded-opentype'), 13 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/webfonts/JetBrainsMono-Bold.woff2') format('woff2'), 14 | url('https://raw.githubusercontent.com/JetBrains/JetBrainsMono/master/fonts/ttf/JetBrainsMono-Bold.ttf') format('truetype'); 15 | font-weight: bold; 16 | font-style: bold; 17 | } -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | # IDE (e.g. Android Studio) users: 3 | # Gradle settings configured through the IDE *will override* 4 | # any settings specified in this file. 5 | # For more details on how to configure your build environment visit 6 | # http://www.gradle.org/docs/current/userguide/build_environment.html 7 | # Specifies the JVM arguments used for the daemon process. 8 | # The setting is particularly useful for tweaking memory settings. 9 | org.gradle.jvmargs=-Xmx4g 10 | # Use the daemon 11 | org.gradle.daemon=true 12 | # Configure on demand 13 | org.gradle.configureondemand=true 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | org.gradle.parallel=true 18 | # See https://docs.gradle.org/3.5/userguide/build_cache.html 19 | org.gradle.caching=true 20 | # Kotlin code style for this project: "official" or "obsolete": 21 | kotlin.code.style=official 22 | android.useAndroidX=true 23 | android.enableJetifier=true 24 | -------------------------------------------------------------------------------- /.idea/copyright/asl2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /samples/notion-cli/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | kotlin("multiplatform") 3 | } 4 | 5 | repositories { 6 | mavenLocal() 7 | mavenCentral() 8 | } 9 | 10 | kotlin { 11 | macosX64("macos") { 12 | binaries { 13 | executable() 14 | } 15 | } 16 | 17 | jvm { 18 | val main by compilations.getting { 19 | kotlinOptions { 20 | jvmTarget = "1.8" 21 | } 22 | } 23 | } 24 | 25 | sourceSets.all { 26 | languageSettings.optIn("kotlin.RequiresOptIn") 27 | languageSettings.optIn("kotlinx.cli.ExperimentalCli") 28 | } 29 | 30 | sourceSets { 31 | val commonMain by getting { 32 | dependencies { 33 | // Kotlin 34 | implementation(libs.kotlinx.cli) 35 | 36 | // Library 37 | implementation(project(":klibnotion")) 38 | } 39 | } 40 | 41 | val macosMain by getting { 42 | dependencies { 43 | } 44 | } 45 | 46 | val jvmMain by getting { 47 | dependencies { 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/base/EmojiOrFile.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.base 27 | 28 | interface EmojiOrFile 29 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/date/Timestamp.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.date 27 | 28 | expect class Timestamp 29 | -------------------------------------------------------------------------------- /library/src/jvmMain/kotlin/org/jraf/klibnotion/model/date/Timestamp.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.date 27 | 28 | import java.util.Date 29 | 30 | actual typealias Timestamp = Date 31 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/client/HttpProxy.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.client 27 | 28 | data class HttpProxy( 29 | val host: String, 30 | val port: Int 31 | ) 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/EquationBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | interface EquationBlock : Block { 29 | val expression: String 30 | } 31 | -------------------------------------------------------------------------------- /library/src/macosMain/kotlin/org/jraf/klibnotion/model/date/Timestamp.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.date 27 | 28 | import platform.Foundation.NSDate 29 | 30 | actual typealias Timestamp = NSDate 31 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/base/UrlString.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.base 27 | 28 | /** 29 | * A String representing an url. 30 | */ 31 | typealias UrlString = String 32 | -------------------------------------------------------------------------------- /samples/notion-cli/src/jvmMain/kotlin/Main.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | import kotlin.system.exitProcess 27 | 28 | suspend fun main(av: Array) { 29 | NotionCli(av).main() 30 | // Exit process 31 | exitProcess(0) 32 | } 33 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/client/BaseUri.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.client 27 | 28 | data class BaseUri( 29 | val scheme: String, 30 | val host: String, 31 | val port: Int 32 | ) 33 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/oauth/OAuthCodeAndState.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.oauth 27 | 28 | interface OAuthCodeAndState { 29 | val code: String 30 | val state: String 31 | } 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/ApiConverterException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model 27 | 28 | internal class ApiConverterException(message: String?) : Exception(message) 29 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/exceptions/NotionClientException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.exceptions 27 | 28 | open class NotionClientException(override val cause: Throwable) : Exception(cause) 29 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/DividerBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/block). 30 | */ 31 | interface DividerBlock : Block 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/TableOfContentsBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/block). 30 | */ 31 | interface TableOfContentsBlock : Block 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/user/Bot.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.user 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/user). 30 | */ 31 | interface Bot : User { 32 | val name: String 33 | } 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/oauth/OAuthCredentials.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.oauth 27 | 28 | data class OAuthCredentials( 29 | val clientId: String, 30 | val clientSecret: String, 31 | val redirectUri: String, 32 | ) 33 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/block/MutableBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.block 27 | 28 | import org.jraf.klibnotion.model.block.Block 29 | 30 | internal interface MutableBlock { 31 | var children: List? 32 | } 33 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/EmbedBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/block). 30 | */ 31 | interface EmbedBlock: Block { 32 | val url: String 33 | } 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/emoji/EmojiImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.emoji 27 | 28 | import org.jraf.klibnotion.model.emoji.Emoji 29 | 30 | internal data class EmojiImpl( 31 | override val value: String, 32 | ) : Emoji 33 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/DatePropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface DatePropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/EmailPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface EmailPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/FilesPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface FilesPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/UrlPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface UrlPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/ChildPageBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/block). 30 | */ 31 | interface ChildPageBlock : Block { 32 | val title: String 33 | } 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/PeoplePropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface PeoplePropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiBlockEmbed.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | @Serializable 31 | internal data class ApiBlockEmbed( 32 | val url: String 33 | ) 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/CheckboxPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface CheckboxPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/CreatedByPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface CreatedByPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/RichTextPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface RichTextPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/user/Person.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.user 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/user). 30 | */ 31 | interface Person : User { 32 | val name: String 33 | val email: String 34 | } 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/ChildDatabaseBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/block). 30 | */ 31 | interface ChildDatabaseBlock : Block { 32 | val title: String 33 | } 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/CreatedTimePropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface CreatedTimePropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/LastEditedByPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface LastEditedByPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/PhoneNumberPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface PhoneNumberPropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /samples/notion-cli/src/macosMain/kotlin/Main.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | import kotlinx.coroutines.runBlocking 27 | import kotlin.system.exitProcess 28 | 29 | fun main(av: Array) { 30 | runBlocking { 31 | NotionCli(av).main() 32 | // Exit process 33 | exitProcess(0) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/CoroutineUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal 27 | 28 | import kotlinx.coroutines.CoroutineScope 29 | 30 | internal expect val klibNotionScope: CoroutineScope 31 | 32 | internal expect fun runBlocking(block: suspend () -> T): T 33 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/LastEditedTimePropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/database). 30 | */ 31 | interface LastEditedTimePropertySpec : PropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/richtext/TextRichText.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.richtext 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/rich-text). 30 | */ 31 | interface TextRichText : RichText { 32 | val linkUrl: String? 33 | } 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/file/FileImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.file 27 | 28 | import org.jraf.klibnotion.model.file.File 29 | 30 | internal data class FileImpl( 31 | override val name: String?, 32 | override val url: String, 33 | ) : File 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiSyncedBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | @Serializable 31 | internal data class ApiSyncedBlock( 32 | val synced_from: ApiSyncedFrom, 33 | ) 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/EmailPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 30 | */ 31 | interface EmailPropertyValue : PropertyValue 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/UrlPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 30 | */ 31 | interface UrlPropertyValue : PropertyValue 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/richtext/EquationRichText.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.richtext 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/rich-text). 30 | */ 31 | interface EquationRichText : RichText { 32 | val expression: String 33 | } 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/NumberPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 30 | */ 31 | interface NumberPropertyValue : PropertyValue 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/CheckboxPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 30 | */ 31 | interface CheckboxPropertyValue : PropertyValue 32 | -------------------------------------------------------------------------------- /docs/images/docs_logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/user/ApiBot.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.user 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/user). 32 | */ 33 | @Serializable 34 | internal class ApiBot 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/PhoneNumberPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 30 | */ 31 | interface PhoneNumberPropertyValue : PropertyValue 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/CalloutBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.base.EmojiOrFile 29 | import org.jraf.klibnotion.model.richtext.RichTextList 30 | 31 | interface CalloutBlock : Block { 32 | val text: RichTextList? 33 | val icon: EmojiOrFile? 34 | } 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/QuoteBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface QuoteBlock : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/SyncedBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.base.UuidString 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface SyncedBlock : Block { 34 | val syncedFrom: UuidString? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/ToggleBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface ToggleBlock : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/date/DateOrDateRange.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.date 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/page#date-property-values). 30 | */ 31 | data class DateOrDateRange( 32 | val start: DateOrDateTime, 33 | val end: DateOrDateTime? = null, 34 | ) 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/richtext/RichText.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.richtext 27 | 28 | /** 29 | * See [Reference](https://developers.notion.com/reference/rich-text). 30 | */ 31 | sealed interface RichText { 32 | val plainText: String 33 | val href: String? 34 | val annotations: Annotations 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiSyncedFrom.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import kotlinx.serialization.Serializable 29 | import org.jraf.klibnotion.model.base.UuidString 30 | 31 | @Serializable 32 | internal data class ApiSyncedFrom( 33 | val block_id: UuidString, 34 | ) 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/Heading1Block.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface Heading1Block : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/Heading2Block.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface Heading2Block : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/Heading3Block.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface Heading3Block : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/UrlPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.UrlPropertySpec 29 | 30 | internal data class UrlPropertySpecImpl(override val name: String, override val id: String) : 31 | UrlPropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/ParagraphBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface ParagraphBlock : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/oauth/OAuthCodeAndStateImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.oauth 27 | 28 | import org.jraf.klibnotion.model.oauth.OAuthCodeAndState 29 | 30 | internal data class OAuthCodeAndStateImpl( 31 | override val code: String, 32 | override val state: String, 33 | ) : OAuthCodeAndState 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/DatePropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.DatePropertySpec 29 | 30 | internal data class DatePropertySpecImpl(override val name: String, override val id: String) : 31 | DatePropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/EmailPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.EmailPropertySpec 29 | 30 | internal data class EmailPropertySpecImpl(override val name: String, override val id: String) : 31 | EmailPropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/FilesPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.FilesPropertySpec 29 | 30 | internal data class FilesPropertySpecImpl(override val name: String, override val id: String) : 31 | FilesPropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/TitlePropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.TitlePropertySpec 29 | 30 | internal data class TitlePropertySpecImpl(override val name: String, override val id: String) : 31 | TitlePropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/user/AnonymousUser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.user 27 | 28 | /** 29 | * This type can be returned when a page referencing a user from another workspace has been 30 | * imported. 31 | * 32 | * See [Reference](https://developers.notion.com/reference/user). 33 | */ 34 | interface AnonymousUser : User 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/PeoplePropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.PeoplePropertySpec 29 | 30 | internal data class PeoplePropertySpecImpl(override val name: String, override val id: String) : 31 | PeoplePropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/BulletedListItemBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface BulletedListItemBlock : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/NumberedListItemBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface NumberedListItemBlock : Block { 34 | val text: RichTextList? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/CreatedByPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.user.User 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface CreatedByPropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/FilesPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.file.File 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface FilesPropertyValue : PropertyValue> 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/PeoplePropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.user.User 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface PeoplePropertyValue : PropertyValue> 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/user/ApiPerson.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.user 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/user). 32 | */ 33 | @Serializable 34 | internal data class ApiPerson( 35 | val email: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/LastEditedByPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.user.User 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface LastEditedByPropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/emoji/ApiEmoji.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.emoji 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/emoji-object). 32 | */ 33 | @Serializable 34 | internal data class ApiEmoji( 35 | val emoji: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/richtext/ApiLink.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.richtext 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/rich-text). 32 | */ 33 | @Serializable 34 | internal data class ApiLink( 35 | val url: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/CheckboxPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.CheckboxPropertySpec 29 | 30 | internal data class CheckboxPropertySpecImpl(override val name: String, override val id: String) : 31 | CheckboxPropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/RichTextPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.RichTextPropertySpec 29 | 30 | internal data class RichTextPropertySpecImpl(override val name: String, override val id: String) : 31 | RichTextPropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/CodeBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface CodeBlock : Block { 34 | val text: RichTextList? 35 | val language: String 36 | } 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/ToDoBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface ToDoBlock : Block { 34 | val text: RichTextList? 35 | val checked: Boolean 36 | } 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/file/ApiFile.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.file 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See 32 | * - [Reference](https://developers.notion.com/reference/file-object) 33 | */ 34 | @Serializable 35 | internal data class ApiFile( 36 | val url: String, 37 | ) 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/CreatedByPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.CreatedByPropertySpec 29 | 30 | internal data class CreatedByPropertySpecImpl(override val name: String, override val id: String) : 31 | CreatedByPropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/BookmarkBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface BookmarkBlock : Block { 34 | val url: String 35 | val caption: RichTextList? 36 | } 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/DatePropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.date.DateOrDateRange 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface DatePropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/RelationPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.base.UuidString 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface RelationPropertyValue : PropertyValue> 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/SelectPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.property.SelectOption 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface SelectPropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/TitlePropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface TitlePropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiBlockChildPage.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | @Serializable 34 | internal data class ApiBlockChildPage( 35 | val title: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/CreatedTimePropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.CreatedTimePropertySpec 29 | 30 | internal data class CreatedTimePropertySpecImpl(override val name: String, override val id: String) : 31 | CreatedTimePropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/PhoneNumberPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.PhoneNumberPropertySpec 29 | 30 | internal data class PhoneNumberPropertySpecImpl(override val name: String, override val id: String) : 31 | PhoneNumberPropertySpec 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/RichTextPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.richtext.RichTextList 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface RichTextPropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiBlockEquation.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | @Serializable 34 | internal data class ApiBlockEquation( 35 | val expression: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/CreatedTimePropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.date.DateOrDateTime 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface CreatedTimePropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/jvmMain/kotlin/org/jraf/klibnotion/internal/CoroutineUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal 27 | 28 | import kotlinx.coroutines.CoroutineScope 29 | import kotlinx.coroutines.GlobalScope 30 | 31 | internal actual val klibNotionScope: CoroutineScope = GlobalScope 32 | 33 | internal actual fun runBlocking(block: suspend () -> T) = kotlinx.coroutines.runBlocking { block() } 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiBlockChildDatabase.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | @Serializable 34 | internal data class ApiBlockChildDatabase( 35 | val title: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/search/SearchParameters.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2022-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.search 27 | 28 | import org.jraf.klibnotion.model.property.sort.PropertySort 29 | 30 | internal data class SearchParameters( 31 | val query: String?, 32 | val sort: PropertySort?, 33 | val type: String, 34 | val startCursor: String?, 35 | ) 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/file/File.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.file 27 | 28 | import org.jraf.klibnotion.internal.model.file.FileImpl 29 | import org.jraf.klibnotion.model.base.EmojiOrFile 30 | 31 | interface File : EmojiOrFile { 32 | val name: String? 33 | val url: String 34 | } 35 | 36 | fun File(url: String): File = FileImpl(name = null, url = url) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/SelectPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.SelectOption 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/database). 32 | */ 33 | interface SelectPropertySpec : PropertySpec { 34 | val options: List 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/LastEditedTimePropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.date.DateOrDateTime 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface LastEditedTimePropertyValue : PropertyValue 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/value/MultiSelectPropertyValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.value 27 | 28 | import org.jraf.klibnotion.model.property.SelectOption 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | interface MultiSelectPropertyValue : PropertyValue> 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/page/ApiPageResultPageConverter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.page 27 | 28 | import org.jraf.klibnotion.internal.api.model.pagination.ApiResultPageConverter 29 | import org.jraf.klibnotion.model.page.Page 30 | 31 | internal object ApiPageResultPageConverter : ApiResultPageConverter(ApiPageConverter) 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/user/ApiUserResultPageConverter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.user 27 | 28 | import org.jraf.klibnotion.internal.api.model.pagination.ApiResultPageConverter 29 | import org.jraf.klibnotion.model.user.User 30 | 31 | internal object ApiUserResultPageConverter : ApiResultPageConverter(ApiUserConverter) 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/UnknownTypeBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | /** 29 | * This type is returned when a Block of a type unknown to this library is returned by the Notion API. 30 | * 31 | * See [Reference](https://developers.notion.com/reference/block). 32 | */ 33 | interface UnknownTypeBlock : Block { 34 | val type: String 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiBlockBookmark.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import kotlinx.serialization.Serializable 29 | import org.jraf.klibnotion.internal.api.model.richtext.ApiRichText 30 | 31 | @Serializable 32 | internal data class ApiBlockBookmark( 33 | val url: String, 34 | val caption: List, 35 | ) 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/richtext/ApiRichTextEquation.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.richtext 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/rich-text). 32 | */ 33 | @Serializable 34 | internal data class ApiRichTextEquation( 35 | val expression: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/richtext/ApiRichTextMentionPage.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.richtext 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/rich-text). 32 | */ 33 | @Serializable 34 | internal data class ApiRichTextMentionPage( 35 | val id: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/LastEditedByPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.LastEditedByPropertySpec 29 | 30 | internal data class LastEditedByPropertySpecImpl( 31 | override val name: String, 32 | override val id: String, 33 | ) : LastEditedByPropertySpec 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/MultiSelectPropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.SelectOption 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/database). 32 | */ 33 | interface MultiSelectPropertySpec : PropertySpec { 34 | val options: List 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/user/User.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.user 27 | 28 | import org.jraf.klibnotion.model.base.UrlString 29 | import org.jraf.klibnotion.model.base.UuidString 30 | 31 | /** 32 | * See [Reference](https://developers.notion.com/reference/user). 33 | */ 34 | sealed interface User { 35 | val id: UuidString 36 | val avatarUrl: UrlString? 37 | } 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/block/ApiPageResultBlockConverter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.block 27 | 28 | import org.jraf.klibnotion.internal.api.model.pagination.ApiResultPageConverter 29 | import org.jraf.klibnotion.model.block.Block 30 | 31 | internal object ApiPageResultBlockConverter : ApiResultPageConverter(ApiInBlockConverter) 32 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/richtext/ApiRichTextMentionDatabase.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.richtext 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/rich-text). 32 | */ 33 | @Serializable 34 | internal data class ApiRichTextMentionDatabase( 35 | val id: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/property/spec/ApiPropertySpecNumber.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.property.spec 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/database). 32 | */ 33 | @Serializable 34 | internal data class ApiPropertySpecNumber( 35 | val format: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/LastEditedTimePropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.LastEditedTimePropertySpec 29 | 30 | internal data class LastEditedTimePropertySpecImpl( 31 | override val name: String, 32 | override val id: String, 33 | ) : LastEditedTimePropertySpec 34 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/value/UrlPropertyValueImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.value 27 | 28 | import org.jraf.klibnotion.model.property.value.UrlPropertyValue 29 | 30 | internal data class UrlPropertyValueImpl( 31 | override val id: String, 32 | override val name: String, 33 | override val value: String?, 34 | ) : UrlPropertyValue 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/date/ApiDate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.date 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#date-property-values). 32 | */ 33 | @Serializable 34 | internal data class ApiDate( 35 | val start: String, 36 | val end: String? = null, 37 | ) 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/property/spec/ApiPropertySpecFormula.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.property.spec 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/database). 32 | */ 33 | @Serializable 34 | internal data class ApiPropertySpecFormula( 35 | val expression: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/search/ApiSearchFilter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.search 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/post-search). 32 | */ 33 | @Serializable 34 | internal data class ApiSearchFilter( 35 | val property: String, 36 | val value: String, 37 | ) 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/user/UnknownTypeUser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.user 27 | 28 | /** 29 | * This type is returned when a User of a type unknown to this library is returned by the Notion API. 30 | * 31 | * See [Reference](https://developers.notion.com/reference/user). 32 | */ 33 | interface UnknownTypeUser : User { 34 | val name: String? 35 | val type: String? 36 | } 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/search/ApiSearchSort.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.search 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/post-search). 32 | */ 33 | @Serializable 34 | internal data class ApiSearchSort( 35 | val direction: String, 36 | val timestamp: String, 37 | ) 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/value/EmailPropertyValueImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.value 27 | 28 | import org.jraf.klibnotion.model.property.value.EmailPropertyValue 29 | 30 | internal data class EmailPropertyValueImpl( 31 | override val id: String, 32 | override val name: String, 33 | override val value: String?, 34 | ) : EmailPropertyValue 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/richtext/UnknownTypeRichText.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.richtext 27 | 28 | /** 29 | * This type is returned when a Rich Text of a type unknown to this library is returned by the Notion API. 30 | * 31 | * See [Reference](https://developers.notion.com/reference/rich-text). 32 | */ 33 | interface UnknownTypeRichText : RichText { 34 | val type: String 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/client/HttpConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.client 27 | 28 | import kotlin.jvm.JvmOverloads 29 | 30 | data class HttpConfiguration @JvmOverloads constructor( 31 | val loggingLevel: HttpLoggingLevel = HttpLoggingLevel.NONE, 32 | val mockServerBaserUri: BaseUri? = null, 33 | val httpProxy: HttpProxy? = null, 34 | val bypassSslChecks: Boolean = false, 35 | ) 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/richtext/ApiRichTextText.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.richtext 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/rich-text). 32 | */ 33 | @Serializable 34 | internal data class ApiRichTextText( 35 | val content: String, 36 | val link: ApiLink? = null, 37 | ) 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/SelectOptionImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property 27 | 28 | import org.jraf.klibnotion.model.color.Color 29 | import org.jraf.klibnotion.model.property.SelectOption 30 | 31 | internal data class SelectOptionImpl( 32 | override val name: String, 33 | override val id: String, 34 | override val color: Color 35 | ) : SelectOption 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/FormulaPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.FormulaPropertySpec 29 | 30 | internal data class FormulaPropertySpecImpl( 31 | override val name: String, 32 | override val id: String, 33 | override val expression: String, 34 | ) : FormulaPropertySpec 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/value/NumberPropertyValueImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.value 27 | 28 | import org.jraf.klibnotion.model.property.value.NumberPropertyValue 29 | 30 | internal data class NumberPropertyValueImpl( 31 | override val id: String, 32 | override val name: String, 33 | override val value: Number?, 34 | ) : NumberPropertyValue 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/property/value/ApiPropertyValueRelation.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.property.value 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/page#all-property-values). 32 | */ 33 | @Serializable 34 | internal data class ApiPropertyValueRelation( 35 | val id: String, 36 | ) 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/value/CheckboxPropertyValueImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.value 27 | 28 | import org.jraf.klibnotion.model.property.value.CheckboxPropertyValue 29 | 30 | internal data class CheckboxPropertyValueImpl( 31 | override val id: String, 32 | override val name: String, 33 | override val value: Boolean, 34 | ) : CheckboxPropertyValue 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/ImageBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.file.File 29 | import org.jraf.klibnotion.model.richtext.RichTextList 30 | 31 | /** 32 | * See [reference](https://developers.notion.com/reference/block#image-blocks) 33 | */ 34 | interface ImageBlock : Block { 35 | val image: File 36 | val caption: RichTextList? 37 | } 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/block/VideoBlock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.block 27 | 28 | import org.jraf.klibnotion.model.file.File 29 | import org.jraf.klibnotion.model.richtext.RichTextList 30 | 31 | /** 32 | * See [reference](https://developers.notion.com/reference/block#video-blocks) 33 | */ 34 | interface VideoBlock : Block { 35 | val video: File 36 | val caption: RichTextList? 37 | } 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/pagination/ApiResultPage.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.pagination 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/pagination). 32 | */ 33 | @Serializable 34 | internal data class ApiResultPage( 35 | val results: List, 36 | val next_cursor: String?, 37 | ) 38 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/spec/NumberPropertySpecImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.spec 27 | 28 | import org.jraf.klibnotion.model.property.spec.NumberPropertySpec 29 | 30 | internal data class NumberPropertySpecImpl( 31 | override val name: String, 32 | override val id: String, 33 | override val format: NumberPropertySpec.NumberFormat, 34 | ) : NumberPropertySpec 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/TitlePropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * Each database must have exactly one title property. This property controls the 30 | * title that appears at the top of the page when the page is opened. 31 | * 32 | * See [Reference](https://developers.notion.com/reference/database). 33 | */ 34 | interface TitlePropertySpec : PropertySpec 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/api/model/property/ApiSelectOption.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.api.model.property 27 | 28 | import kotlinx.serialization.Serializable 29 | 30 | /** 31 | * See [Reference](https://developers.notion.com/reference/database). 32 | */ 33 | @Serializable 34 | internal data class ApiSelectOption( 35 | val name: String, 36 | val id: String? = null, 37 | val color: String, 38 | ) 39 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/property/value/PhoneNumberPropertyValueImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.property.value 27 | 28 | import org.jraf.klibnotion.model.property.value.PhoneNumberPropertyValue 29 | 30 | internal data class PhoneNumberPropertyValueImpl( 31 | override val id: String, 32 | override val name: String, 33 | override val value: String?, 34 | ) : PhoneNumberPropertyValue 35 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/user/BotImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.user 27 | 28 | import org.jraf.klibnotion.model.base.UrlString 29 | import org.jraf.klibnotion.model.base.UuidString 30 | import org.jraf.klibnotion.model.user.Bot 31 | 32 | internal data class BotImpl( 33 | override val id: UuidString, 34 | override val name: String, 35 | override val avatarUrl: UrlString?, 36 | ) : Bot 37 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/model/property/spec/UnknownTypePropertySpec.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.model.property.spec 27 | 28 | /** 29 | * This type is returned when a Property Spec of a type unknown to this library is returned by the Notion API. 30 | * 31 | * See [Reference](https://developers.notion.com/reference/database). 32 | */ 33 | interface UnknownTypePropertySpec : PropertySpec { 34 | val type: String? 35 | } 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/client/ClientConfiguration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.client 27 | 28 | import org.jraf.klibnotion.internal.client.VERSION 29 | import kotlin.jvm.JvmOverloads 30 | 31 | data class ClientConfiguration @JvmOverloads constructor( 32 | val authentication: Authentication, 33 | val httpConfiguration: HttpConfiguration = HttpConfiguration(), 34 | val userAgent: String = "klibnotion/$VERSION", 35 | ) 36 | -------------------------------------------------------------------------------- /library/src/commonMain/kotlin/org/jraf/klibnotion/internal/model/user/AnonymousUserImpl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * This source is part of the 3 | * _____ ___ ____ 4 | * __ / / _ \/ _ | / __/___ _______ _ 5 | * / // / , _/ __ |/ _/_/ _ \/ __/ _ `/ 6 | * \___/_/|_/_/ |_/_/ (_)___/_/ \_, / 7 | * /___/ 8 | * repository. 9 | * 10 | * Copyright (C) 2021-present Benoit 'BoD' Lubek (BoD@JRAF.org) 11 | * and contributors (https://github.com/BoD/klibnotion/graphs/contributors) 12 | * 13 | * Licensed under the Apache License, Version 2.0 (the "License"); 14 | * you may not use this file except in compliance with the License. 15 | * You may obtain a copy of the License at 16 | * 17 | * http://www.apache.org/licenses/LICENSE-2.0 18 | * 19 | * Unless required by applicable law or agreed to in writing, software 20 | * distributed under the License is distributed on an "AS IS" BASIS, 21 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | * See the License for the specific language governing permissions and 23 | * limitations under the License. 24 | */ 25 | 26 | package org.jraf.klibnotion.internal.model.user 27 | 28 | import org.jraf.klibnotion.model.base.UrlString 29 | import org.jraf.klibnotion.model.base.UuidString 30 | import org.jraf.klibnotion.model.user.AnonymousUser 31 | 32 | internal data class AnonymousUserImpl( 33 | override val id: UuidString, 34 | override val avatarUrl: UrlString?, 35 | ) : AnonymousUser 36 | --------------------------------------------------------------------------------