@notionhq/custom-blocks 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -18
- package/dist/bridge/SandboxBridge.d.ts +7 -8
- package/dist/bridge/SandboxBridge.d.ts.map +1 -1
- package/dist/bridge/SandboxBridge.js +39 -114
- package/dist/bridge/applyHostStateMessage.d.ts.map +1 -1
- package/dist/bridge/createBrowserSandboxBridge.d.ts +3 -0
- package/dist/bridge/createBrowserSandboxBridge.d.ts.map +1 -0
- package/dist/bridge/createBrowserSandboxBridge.js +54 -0
- package/dist/bridge/getBridge.d.ts +1 -1
- package/dist/bridge/getBridge.d.ts.map +1 -1
- package/dist/bridge/getBridge.js +2 -2
- package/dist/bridge/getInitializedHostState.d.ts.map +1 -1
- package/dist/bridge/hostState.d.ts +2 -2
- package/dist/bridge/hostState.d.ts.map +1 -1
- package/dist/bridge/initialization/SandboxInitialization.d.ts +6 -0
- package/dist/bridge/initialization/SandboxInitialization.d.ts.map +1 -1
- package/dist/bridge/initialization/SandboxInitialization.js +13 -10
- package/dist/bridge/messageInterceptor.d.ts.map +1 -1
- package/dist/bridge/requests.d.ts.map +1 -1
- package/dist/bridge/sandboxEnvironment.d.ts +30 -0
- package/dist/bridge/sandboxEnvironment.d.ts.map +1 -0
- package/dist/bridge/sandboxEnvironment.js +1 -0
- package/dist/bridge/subscribeToHostStateField.d.ts.map +1 -1
- package/dist/bridge.d.ts.map +1 -1
- package/dist/data-sources.d.ts.map +1 -1
- package/dist/dataSources/NotionDataSource.d.ts.map +1 -1
- package/dist/dataSources/bridge/DataSourceCache.d.ts +18 -0
- package/dist/dataSources/bridge/DataSourceCache.d.ts.map +1 -0
- package/dist/dataSources/bridge/DataSourceCache.js +75 -0
- package/dist/dataSources/bridge/applyDataSourceBindings.d.ts.map +1 -1
- package/dist/dataSources/bridge/makeDataSourceReadResponseSchema.d.ts.map +1 -1
- package/dist/dataSources/bridge/resolveDataSourceQuery.d.ts.map +1 -1
- package/dist/dataSources/bridge/resolveDataSources.d.ts.map +1 -1
- package/dist/dataSources/bridge/resolveSorts.d.ts.map +1 -1
- package/dist/dataSources/bridge/reuseDataSourcesForUnchangedBindings.d.ts +0 -3
- package/dist/dataSources/bridge/reuseDataSourcesForUnchangedBindings.d.ts.map +1 -1
- package/dist/dataSources/bridge/reuseDataSourcesForUnchangedBindings.js +2 -5
- package/dist/dataSources/dataSourceInaccessibleError.d.ts.map +1 -1
- package/dist/dataSources/dataSourceState.d.ts.map +1 -1
- package/dist/dataSources/ensureDataSource.d.ts.map +1 -1
- package/dist/dataSources/filters/resolveFilter.d.ts.map +1 -1
- package/dist/dataSources/filters/types.d.ts.map +1 -1
- package/dist/dataSources/getDataSourcePage.d.ts.map +1 -1
- package/dist/dataSources/observeDataSource.d.ts.map +1 -1
- package/dist/dataSources/properties/resolvePropertyAddress.d.ts.map +1 -1
- package/dist/dataSources/properties/resolvePropertyWriteMapForDataSource.d.ts.map +1 -1
- package/dist/dataSources/properties/resolvePropertyWriteMapForDataSource.js +2 -2
- package/dist/dataSources/resolvePageDataSource.d.ts.map +1 -1
- package/dist/dataSources/subscribeToDataSource.d.ts.map +1 -1
- package/dist/dataSources/types.d.ts.map +1 -1
- package/dist/files/files.d.ts +1 -1
- package/dist/files/files.d.ts.map +1 -1
- package/dist/files/icons.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/initialization/NotInIframeError.d.ts.map +1 -1
- package/dist/initialization/initCustomBlock.d.ts.map +1 -1
- package/dist/initialization/notifyReady.d.ts.map +1 -1
- package/dist/initialization/react/useCustomBlockInit.d.ts.map +1 -1
- package/dist/initialization/resolveInitialState.d.ts.map +1 -1
- package/dist/initialization/types.d.ts.map +1 -1
- package/dist/layout/autoResize.d.ts.map +1 -1
- package/dist/layout/getInitialContentHeight.d.ts.map +1 -1
- package/dist/location/getContainingPage.d.ts.map +1 -1
- package/dist/location/getInstance.d.ts.map +1 -1
- package/dist/location/getParent.d.ts.map +1 -1
- package/dist/location/mapContainingPage.d.ts +2 -2
- package/dist/location/mapContainingPage.d.ts.map +1 -1
- package/dist/location/mapParent.d.ts.map +1 -1
- package/dist/location/subscribeToContainingPage.d.ts.map +1 -1
- package/dist/location/subscribeToParent.d.ts.map +1 -1
- package/dist/location/types.d.ts.map +1 -1
- package/dist/manifest/getManifest.d.ts.map +1 -1
- package/dist/manifest/readLocalManifest.d.ts.map +1 -1
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/navigation/openExternalUrl.d.ts.map +1 -1
- package/dist/navigation/types.d.ts.map +1 -1
- package/dist/navigation.d.ts.map +1 -1
- package/dist/pages/NotionPage.d.ts.map +1 -1
- package/dist/pages/bridge/buildCreatePageRequest.d.ts.map +1 -1
- package/dist/pages/bridge/getPageForDataSource.d.ts.map +1 -1
- package/dist/pages/bridge/resolveCreatePageDestination.d.ts.map +1 -1
- package/dist/pages/bridge/sendCreatePageRequest.d.ts.map +1 -1
- package/dist/pages/bridge/toNotionPageFromBridgePage.d.ts.map +1 -1
- package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.d.ts +2 -2
- package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.d.ts.map +1 -1
- package/dist/pages/bridge/updatePage.d.ts.map +1 -1
- package/dist/pages/createPage.d.ts.map +1 -1
- package/dist/pages/getPage.d.ts.map +1 -1
- package/dist/pages/identityBlockKey.d.ts.map +1 -1
- package/dist/pages/identityPageKey.d.ts.map +1 -1
- package/dist/pages/openPage.d.ts.map +1 -1
- package/dist/pages/parent.d.ts.map +1 -1
- package/dist/pages/types.d.ts +5 -3
- package/dist/pages/types.d.ts.map +1 -1
- package/dist/pages.d.ts.map +1 -1
- package/dist/preferences/backgroundColors.d.ts.map +1 -1
- package/dist/preferences/getContrastMode.d.ts.map +1 -1
- package/dist/preferences/getTheme.d.ts.map +1 -1
- package/dist/preferences/react/useContrastMode.d.ts.map +1 -1
- package/dist/preferences/react/useTheme.d.ts.map +1 -1
- package/dist/preferences/subscribeToContrastMode.d.ts.map +1 -1
- package/dist/preferences/subscribeToTheme.d.ts.map +1 -1
- package/dist/preferences/syncDocumentAppearance.d.ts +1 -1
- package/dist/preferences/syncDocumentAppearance.d.ts.map +1 -1
- package/dist/preferences/syncDocumentAppearance.js +2 -1
- package/dist/preferences.d.ts.map +1 -1
- package/dist/protocol/compatibility/protocol12/hostToSandbox.d.ts +3356 -0
- package/dist/protocol/compatibility/protocol12/hostToSandbox.js +38 -0
- package/dist/protocol/compatibility/protocol12/page.d.ts +296 -0
- package/dist/protocol/compatibility/protocol12/page.js +7 -0
- package/dist/protocol/context/containingPage.d.ts +4 -2
- package/dist/protocol/context/containingPage.js +1 -1
- package/dist/protocol/context/messages/pageChanged.js +2 -2
- package/dist/protocol/dataSources/areDataSourceBindingsEqual.d.ts +3 -0
- package/dist/protocol/dataSources/areDataSourceBindingsEqual.js +26 -0
- package/dist/protocol/dataSources/messages/queryDataSource.d.ts +24 -19
- package/dist/protocol/dataSources/messages/queryDataSource.js +2 -0
- package/dist/protocol/files.d.ts +18 -0
- package/dist/protocol/files.js +9 -0
- package/dist/protocol/messages/hostToSandbox.d.ts +2200 -68
- package/dist/protocol/messages/hostToSandbox.js +6 -2
- package/dist/protocol/messages/sandboxToHost.d.ts +51 -51
- package/dist/protocol/pages/bridgePage.d.ts +20 -17
- package/dist/protocol/pages/messages/createPage.d.ts +88 -85
- package/dist/protocol/pages/messages/getPage.d.ts +24 -19
- package/dist/protocol/pages/messages/getPage.js +2 -0
- package/dist/protocol/pages/messages/updatePage.d.ts +37 -34
- package/dist/protocol/pages/properties/bridgePagePropertyMaps.d.ts +37 -34
- package/dist/protocol/pages/properties/bridgePagePropertyMaps.js +3 -3
- package/dist/protocol/pages/properties/bridgePagePropertyValue.d.ts +236 -2
- package/dist/protocol/pages/properties/bridgePagePropertyValue.js +20 -7
- package/dist/protocol/utils/errors.d.ts +6 -0
- package/dist/protocol/utils/errors.js +8 -0
- package/dist/protocol/utils/protocolVersion.d.ts +4 -2
- package/dist/protocol/utils/protocolVersion.js +4 -2
- package/dist/react/InitializationErrorDetails.d.ts.map +1 -1
- package/dist/react/MissingHostCommand.d.ts.map +1 -1
- package/dist/react/MissingHostScreen.d.ts.map +1 -1
- package/dist/react/NotionCustomBlock.d.ts.map +1 -1
- package/dist/react/index.d.ts +0 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +0 -1
- package/dist/react/useAsyncRead.d.ts.map +1 -1
- package/dist/react/useContainingPage.d.ts.map +1 -1
- package/dist/react/useLiveLocationRead.d.ts.map +1 -1
- package/dist/react/usePage.d.ts.map +1 -1
- package/dist/react/useParent.d.ts.map +1 -1
- package/dist/react/useQuerySubscription.d.ts.map +1 -1
- package/dist/react/useUserFields.d.ts.map +1 -1
- package/dist/react/useViewer.d.ts.map +1 -1
- package/dist/styles/scrollbars.css +18 -0
- package/dist/users/NotionUser.d.ts.map +1 -1
- package/dist/users/bridge/toNotionUserDataFromBridgeUser.d.ts.map +1 -1
- package/dist/users/getUser.d.ts.map +1 -1
- package/dist/users/getViewer.d.ts.map +1 -1
- package/dist/users/listUsers.d.ts.map +1 -1
- package/dist/users/types.d.ts.map +1 -1
- package/dist/users.d.ts.map +1 -1
- package/dist/utils/makeUuid.d.ts.map +1 -1
- package/dist/utils/notifyListener.d.ts.map +1 -1
- package/dist/utils/typeUtils.d.ts.map +1 -1
- package/dist/utils/unreachable.d.ts.map +1 -1
- package/dist/utils/version.d.ts.map +1 -1
- package/dist/utils/version.js +1 -1
- package/docs/block-location.md +22 -9
- package/docs/deployment.md +5 -11
- package/docs/errors.md +4 -0
- package/docs/grants.md +7 -2
- package/docs/local-development.md +39 -0
- package/docs/pages.md +97 -62
- package/package.json +2 -1
- package/src/bridge/SandboxBridge.ts +49 -144
- package/src/bridge/createBrowserSandboxBridge.ts +64 -0
- package/src/bridge/getBridge.ts +3 -2
- package/src/bridge/hostState.ts +2 -2
- package/src/bridge/initialization/SandboxInitialization.ts +24 -10
- package/src/bridge/sandboxEnvironment.ts +38 -0
- package/src/dataSources/bridge/DataSourceCache.ts +94 -0
- package/src/dataSources/bridge/reuseDataSourcesForUnchangedBindings.ts +5 -5
- package/src/dataSources/properties/resolvePropertyWriteMapForDataSource.ts +2 -2
- package/src/files/files.ts +1 -1
- package/src/location/mapContainingPage.ts +2 -2
- package/src/pages/bridge/toNotionPagePropertyFromBridgeProperty.ts +2 -2
- package/src/pages/types.ts +9 -3
- package/src/preferences/syncDocumentAppearance.ts +2 -1
- package/src/react/index.ts +0 -2
- package/src/styles/scrollbars.css +18 -0
- package/dist/react/NotionTokenScope.d.ts +0 -10
- package/dist/react/NotionTokenScope.d.ts.map +0 -1
- package/dist/react/NotionTokenScope.js +0 -12
- package/src/react/NotionTokenScope.tsx +0 -26
|
@@ -133,23 +133,6 @@ export declare const bridgePagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
|
|
|
133
133
|
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
134
134
|
readonly id: v.StringSchema<undefined>;
|
|
135
135
|
}, undefined>, undefined>;
|
|
136
|
-
}, undefined>, v.ObjectSchema<{
|
|
137
|
-
readonly id: v.StringSchema<undefined>;
|
|
138
|
-
readonly type: v.LiteralSchema<"files", undefined>;
|
|
139
|
-
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
140
|
-
readonly type: v.LiteralSchema<"external", undefined>;
|
|
141
|
-
readonly external: v.ObjectSchema<{
|
|
142
|
-
readonly url: v.StringSchema<undefined>;
|
|
143
|
-
}, undefined>;
|
|
144
|
-
readonly name: v.StringSchema<undefined>;
|
|
145
|
-
}, undefined>, v.ObjectSchema<{
|
|
146
|
-
readonly type: v.LiteralSchema<"file", undefined>;
|
|
147
|
-
readonly file: v.ObjectSchema<{
|
|
148
|
-
readonly url: v.StringSchema<undefined>;
|
|
149
|
-
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
150
|
-
}, undefined>;
|
|
151
|
-
readonly name: v.StringSchema<undefined>;
|
|
152
|
-
}, undefined>], undefined>, undefined>;
|
|
153
136
|
}, undefined>, v.ObjectSchema<{
|
|
154
137
|
readonly id: v.StringSchema<undefined>;
|
|
155
138
|
readonly type: v.LiteralSchema<"place", undefined>;
|
|
@@ -205,6 +188,23 @@ export declare const bridgePagePropertyWriteMapSchema: v.RecordSchema<v.StringSc
|
|
|
205
188
|
readonly id: v.StringSchema<undefined>;
|
|
206
189
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
207
190
|
readonly verification: v.StringSchema<undefined>;
|
|
191
|
+
}, undefined>, v.ObjectSchema<{
|
|
192
|
+
readonly id: v.StringSchema<undefined>;
|
|
193
|
+
readonly type: v.LiteralSchema<"files", undefined>;
|
|
194
|
+
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
195
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
196
|
+
readonly external: v.ObjectSchema<{
|
|
197
|
+
readonly url: v.StringSchema<undefined>;
|
|
198
|
+
}, undefined>;
|
|
199
|
+
readonly name: v.StringSchema<undefined>;
|
|
200
|
+
}, undefined>, v.ObjectSchema<{
|
|
201
|
+
readonly type: v.LiteralSchema<"file", undefined>;
|
|
202
|
+
readonly file: v.ObjectSchema<{
|
|
203
|
+
readonly url: v.StringSchema<undefined>;
|
|
204
|
+
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
205
|
+
}, undefined>;
|
|
206
|
+
readonly name: v.StringSchema<undefined>;
|
|
207
|
+
}, undefined>], undefined>, undefined>;
|
|
208
208
|
}, undefined>], undefined>, undefined>;
|
|
209
209
|
export declare const bridgePagePropertyReadMapSchema: v.RecordSchema<v.StringSchema<undefined>, v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
210
210
|
readonly id: v.StringSchema<undefined>;
|
|
@@ -340,23 +340,6 @@ export declare const bridgePagePropertyReadMapSchema: v.RecordSchema<v.StringSch
|
|
|
340
340
|
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
341
341
|
readonly id: v.StringSchema<undefined>;
|
|
342
342
|
}, undefined>, undefined>;
|
|
343
|
-
}, undefined>, v.ObjectSchema<{
|
|
344
|
-
readonly id: v.StringSchema<undefined>;
|
|
345
|
-
readonly type: v.LiteralSchema<"files", undefined>;
|
|
346
|
-
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
347
|
-
readonly type: v.LiteralSchema<"external", undefined>;
|
|
348
|
-
readonly external: v.ObjectSchema<{
|
|
349
|
-
readonly url: v.StringSchema<undefined>;
|
|
350
|
-
}, undefined>;
|
|
351
|
-
readonly name: v.StringSchema<undefined>;
|
|
352
|
-
}, undefined>, v.ObjectSchema<{
|
|
353
|
-
readonly type: v.LiteralSchema<"file", undefined>;
|
|
354
|
-
readonly file: v.ObjectSchema<{
|
|
355
|
-
readonly url: v.StringSchema<undefined>;
|
|
356
|
-
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
357
|
-
}, undefined>;
|
|
358
|
-
readonly name: v.StringSchema<undefined>;
|
|
359
|
-
}, undefined>], undefined>, undefined>;
|
|
360
343
|
}, undefined>, v.ObjectSchema<{
|
|
361
344
|
readonly id: v.StringSchema<undefined>;
|
|
362
345
|
readonly type: v.LiteralSchema<"place", undefined>;
|
|
@@ -412,6 +395,26 @@ export declare const bridgePagePropertyReadMapSchema: v.RecordSchema<v.StringSch
|
|
|
412
395
|
readonly id: v.StringSchema<undefined>;
|
|
413
396
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
414
397
|
readonly verification: v.StringSchema<undefined>;
|
|
398
|
+
}, undefined>, v.ObjectSchema<{
|
|
399
|
+
readonly id: v.StringSchema<undefined>;
|
|
400
|
+
readonly type: v.LiteralSchema<"files", undefined>;
|
|
401
|
+
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
402
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
403
|
+
readonly external: v.ObjectSchema<{
|
|
404
|
+
readonly url: v.StringSchema<undefined>;
|
|
405
|
+
}, undefined>;
|
|
406
|
+
readonly name: v.StringSchema<undefined>;
|
|
407
|
+
}, undefined>, v.ObjectSchema<{
|
|
408
|
+
readonly type: v.LiteralSchema<"file", undefined>;
|
|
409
|
+
readonly file: v.ObjectSchema<{
|
|
410
|
+
readonly url: v.StringSchema<undefined>;
|
|
411
|
+
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
412
|
+
}, undefined>;
|
|
413
|
+
readonly name: v.StringSchema<undefined>;
|
|
414
|
+
}, undefined>, v.ObjectSchema<{
|
|
415
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
416
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
417
|
+
}, undefined>], undefined>, undefined>;
|
|
415
418
|
}, undefined>], undefined>, undefined>, undefined>;
|
|
416
419
|
export type BridgePagePropertyReadMap = v.InferOutput<typeof bridgePagePropertyReadMapSchema>;
|
|
417
420
|
export type BridgePagePropertyWriteMap = v.InferInput<typeof bridgePagePropertyWriteMapSchema>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import {
|
|
3
|
-
export const bridgePagePropertyWriteMapSchema = v.record(v.string(),
|
|
4
|
-
export const bridgePagePropertyReadMapSchema = v.record(v.string(), v.nullable(
|
|
2
|
+
import { bridgePagePropertyReadValueSchema, bridgePagePropertyWriteValueSchema, } from "./bridgePagePropertyValue.js";
|
|
3
|
+
export const bridgePagePropertyWriteMapSchema = v.record(v.string(), bridgePagePropertyWriteValueSchema);
|
|
4
|
+
export const bridgePagePropertyReadMapSchema = v.record(v.string(), v.nullable(bridgePagePropertyReadValueSchema));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const bridgePagePropertyWriteValueSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
3
3
|
readonly id: v.StringSchema<undefined>;
|
|
4
4
|
readonly type: v.LiteralSchema<"title", undefined>;
|
|
5
5
|
readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
@@ -133,6 +133,61 @@ export declare const bridgePagePropertyValueSchema: v.VariantSchema<"type", [v.O
|
|
|
133
133
|
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
134
134
|
readonly id: v.StringSchema<undefined>;
|
|
135
135
|
}, undefined>, undefined>;
|
|
136
|
+
}, undefined>, v.ObjectSchema<{
|
|
137
|
+
readonly id: v.StringSchema<undefined>;
|
|
138
|
+
readonly type: v.LiteralSchema<"place", undefined>;
|
|
139
|
+
readonly place: v.NullableSchema<v.ObjectSchema<{
|
|
140
|
+
readonly lat: v.NumberSchema<undefined>;
|
|
141
|
+
readonly lon: v.NumberSchema<undefined>;
|
|
142
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
143
|
+
readonly address: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
144
|
+
readonly aws_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
145
|
+
readonly google_place_id: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
146
|
+
}, undefined>, undefined>;
|
|
147
|
+
}, undefined>, v.ObjectSchema<{
|
|
148
|
+
readonly id: v.StringSchema<undefined>;
|
|
149
|
+
readonly type: v.LiteralSchema<"created_time", undefined>;
|
|
150
|
+
readonly created_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
151
|
+
}, undefined>, v.ObjectSchema<{
|
|
152
|
+
readonly id: v.StringSchema<undefined>;
|
|
153
|
+
readonly type: v.LiteralSchema<"last_edited_time", undefined>;
|
|
154
|
+
readonly last_edited_time: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
155
|
+
}, undefined>, v.ObjectSchema<{
|
|
156
|
+
readonly id: v.StringSchema<undefined>;
|
|
157
|
+
readonly type: v.LiteralSchema<"created_by", undefined>;
|
|
158
|
+
readonly created_by: v.NullableSchema<v.ObjectSchema<{
|
|
159
|
+
readonly id: v.StringSchema<undefined>;
|
|
160
|
+
readonly table: v.StringSchema<undefined>;
|
|
161
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
162
|
+
}, undefined>, undefined>;
|
|
163
|
+
}, undefined>, v.ObjectSchema<{
|
|
164
|
+
readonly id: v.StringSchema<undefined>;
|
|
165
|
+
readonly type: v.LiteralSchema<"last_edited_by", undefined>;
|
|
166
|
+
readonly last_edited_by: v.NullableSchema<v.ObjectSchema<{
|
|
167
|
+
readonly id: v.StringSchema<undefined>;
|
|
168
|
+
readonly table: v.StringSchema<undefined>;
|
|
169
|
+
readonly spaceId: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
170
|
+
}, undefined>, undefined>;
|
|
171
|
+
}, undefined>, v.ObjectSchema<{
|
|
172
|
+
readonly id: v.StringSchema<undefined>;
|
|
173
|
+
readonly type: v.LiteralSchema<"unique_id", undefined>;
|
|
174
|
+
readonly unique_id: v.StringSchema<undefined>;
|
|
175
|
+
}, undefined>, v.ObjectSchema<{
|
|
176
|
+
readonly id: v.StringSchema<undefined>;
|
|
177
|
+
readonly type: v.LiteralSchema<"button", undefined>;
|
|
178
|
+
readonly button: v.StringSchema<undefined>;
|
|
179
|
+
}, undefined>, v.ObjectSchema<{
|
|
180
|
+
readonly id: v.StringSchema<undefined>;
|
|
181
|
+
readonly type: v.LiteralSchema<"formula", undefined>;
|
|
182
|
+
readonly formula: v.StringSchema<undefined>;
|
|
183
|
+
}, undefined>, v.ObjectSchema<{
|
|
184
|
+
readonly id: v.StringSchema<undefined>;
|
|
185
|
+
readonly type: v.LiteralSchema<"rollup", undefined>;
|
|
186
|
+
readonly rollup: v.StringSchema<undefined>;
|
|
187
|
+
}, undefined>, v.ObjectSchema<{
|
|
188
|
+
readonly id: v.StringSchema<undefined>;
|
|
189
|
+
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
190
|
+
readonly verification: v.StringSchema<undefined>;
|
|
136
191
|
}, undefined>, v.ObjectSchema<{
|
|
137
192
|
readonly id: v.StringSchema<undefined>;
|
|
138
193
|
readonly type: v.LiteralSchema<"files", undefined>;
|
|
@@ -150,6 +205,164 @@ export declare const bridgePagePropertyValueSchema: v.VariantSchema<"type", [v.O
|
|
|
150
205
|
}, undefined>;
|
|
151
206
|
readonly name: v.StringSchema<undefined>;
|
|
152
207
|
}, undefined>], undefined>, undefined>;
|
|
208
|
+
}, undefined>], undefined>;
|
|
209
|
+
/** A Files read value can include placeholders for unavailable attachments. */
|
|
210
|
+
export declare const bridgeFilesPropertyReadValueSchema: v.ObjectSchema<{
|
|
211
|
+
readonly id: v.StringSchema<undefined>;
|
|
212
|
+
readonly type: v.LiteralSchema<"files", undefined>;
|
|
213
|
+
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
214
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
215
|
+
readonly external: v.ObjectSchema<{
|
|
216
|
+
readonly url: v.StringSchema<undefined>;
|
|
217
|
+
}, undefined>;
|
|
218
|
+
readonly name: v.StringSchema<undefined>;
|
|
219
|
+
}, undefined>, v.ObjectSchema<{
|
|
220
|
+
readonly type: v.LiteralSchema<"file", undefined>;
|
|
221
|
+
readonly file: v.ObjectSchema<{
|
|
222
|
+
readonly url: v.StringSchema<undefined>;
|
|
223
|
+
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
224
|
+
}, undefined>;
|
|
225
|
+
readonly name: v.StringSchema<undefined>;
|
|
226
|
+
}, undefined>, v.ObjectSchema<{
|
|
227
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
228
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
229
|
+
}, undefined>], undefined>, undefined>;
|
|
230
|
+
}, undefined>;
|
|
231
|
+
export type BridgeFilesPropertyReadValue = v.InferOutput<typeof bridgeFilesPropertyReadValueSchema>;
|
|
232
|
+
export declare const bridgePagePropertyReadValueSchema: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
233
|
+
readonly id: v.StringSchema<undefined>;
|
|
234
|
+
readonly type: v.LiteralSchema<"title", undefined>;
|
|
235
|
+
readonly title: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
236
|
+
}, undefined>, v.ObjectSchema<{
|
|
237
|
+
readonly id: v.StringSchema<undefined>;
|
|
238
|
+
readonly type: v.LiteralSchema<"rich_text", undefined>;
|
|
239
|
+
readonly rich_text: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
240
|
+
}, undefined>, v.ObjectSchema<{
|
|
241
|
+
readonly id: v.StringSchema<undefined>;
|
|
242
|
+
readonly type: v.LiteralSchema<"number", undefined>;
|
|
243
|
+
readonly number: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
244
|
+
}, undefined>, v.ObjectSchema<{
|
|
245
|
+
readonly id: v.StringSchema<undefined>;
|
|
246
|
+
readonly type: v.LiteralSchema<"url", undefined>;
|
|
247
|
+
readonly url: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
248
|
+
}, undefined>, v.ObjectSchema<{
|
|
249
|
+
readonly id: v.StringSchema<undefined>;
|
|
250
|
+
readonly type: v.LiteralSchema<"email", undefined>;
|
|
251
|
+
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
252
|
+
}, undefined>, v.ObjectSchema<{
|
|
253
|
+
readonly id: v.StringSchema<undefined>;
|
|
254
|
+
readonly type: v.LiteralSchema<"phone_number", undefined>;
|
|
255
|
+
readonly phone_number: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
256
|
+
}, undefined>, v.ObjectSchema<{
|
|
257
|
+
readonly id: v.StringSchema<undefined>;
|
|
258
|
+
readonly type: v.LiteralSchema<"checkbox", undefined>;
|
|
259
|
+
readonly checkbox: v.BooleanSchema<undefined>;
|
|
260
|
+
}, undefined>, v.ObjectSchema<{
|
|
261
|
+
readonly id: v.StringSchema<undefined>;
|
|
262
|
+
readonly type: v.LiteralSchema<"select", undefined>;
|
|
263
|
+
readonly select: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
264
|
+
readonly id: v.StringSchema<undefined>;
|
|
265
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
266
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
267
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
268
|
+
}, undefined>, v.ObjectSchema<{
|
|
269
|
+
readonly name: v.StringSchema<undefined>;
|
|
270
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
271
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
272
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
273
|
+
}, undefined>], undefined>, undefined>;
|
|
274
|
+
}, undefined>, v.ObjectSchema<{
|
|
275
|
+
readonly id: v.StringSchema<undefined>;
|
|
276
|
+
readonly type: v.LiteralSchema<"status", undefined>;
|
|
277
|
+
readonly status: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
278
|
+
readonly id: v.StringSchema<undefined>;
|
|
279
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
280
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
281
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
282
|
+
}, undefined>, v.ObjectSchema<{
|
|
283
|
+
readonly name: v.StringSchema<undefined>;
|
|
284
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
285
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
286
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
287
|
+
}, undefined>], undefined>, undefined>;
|
|
288
|
+
}, undefined>, v.ObjectSchema<{
|
|
289
|
+
readonly id: v.StringSchema<undefined>;
|
|
290
|
+
readonly type: v.LiteralSchema<"multi_select", undefined>;
|
|
291
|
+
readonly multi_select: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
292
|
+
readonly id: v.StringSchema<undefined>;
|
|
293
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
294
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
295
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
296
|
+
}, undefined>, v.ObjectSchema<{
|
|
297
|
+
readonly name: v.StringSchema<undefined>;
|
|
298
|
+
readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
299
|
+
readonly color: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
300
|
+
readonly description: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
301
|
+
}, undefined>], undefined>, undefined>;
|
|
302
|
+
}, undefined>, v.ObjectSchema<{
|
|
303
|
+
readonly id: v.StringSchema<undefined>;
|
|
304
|
+
readonly type: v.LiteralSchema<"date", undefined>;
|
|
305
|
+
readonly date: v.NullableSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
306
|
+
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
307
|
+
readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
308
|
+
readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
309
|
+
readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
|
|
310
|
+
readonly value: v.NumberSchema<undefined>;
|
|
311
|
+
readonly time: v.StringSchema<undefined>;
|
|
312
|
+
readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
313
|
+
}, undefined>, v.ObjectSchema<{
|
|
314
|
+
readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
|
|
315
|
+
readonly value: v.NumberSchema<undefined>;
|
|
316
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
317
|
+
readonly unit: v.LiteralSchema<"none", undefined>;
|
|
318
|
+
}, undefined>], undefined>, undefined>;
|
|
319
|
+
readonly start: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IncludesAction<string, "T", undefined>]>;
|
|
320
|
+
}, undefined>, v.ObjectSchema<{
|
|
321
|
+
readonly start: v.StringSchema<undefined>;
|
|
322
|
+
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
323
|
+
readonly reminder: v.OptionalSchema<v.UnionSchema<[v.UnionSchema<[v.ObjectSchema<{
|
|
324
|
+
readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
|
|
325
|
+
readonly value: v.NumberSchema<undefined>;
|
|
326
|
+
readonly time: v.StringSchema<undefined>;
|
|
327
|
+
readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
328
|
+
}, undefined>, v.ObjectSchema<{
|
|
329
|
+
readonly unit: v.PicklistSchema<["hour", "minute"], undefined>;
|
|
330
|
+
readonly value: v.NumberSchema<undefined>;
|
|
331
|
+
}, undefined>], undefined>, v.ObjectSchema<{
|
|
332
|
+
readonly unit: v.LiteralSchema<"none", undefined>;
|
|
333
|
+
}, undefined>], undefined>, undefined>;
|
|
334
|
+
readonly time_zone: v.StringSchema<undefined>;
|
|
335
|
+
}, undefined>, v.ObjectSchema<{
|
|
336
|
+
readonly start: v.StringSchema<undefined>;
|
|
337
|
+
readonly end: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
338
|
+
readonly time_zone: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
339
|
+
readonly reminder: v.OptionalSchema<v.UnionSchema<[v.ObjectSchema<{
|
|
340
|
+
readonly unit: v.PicklistSchema<["year", "month", "week", "day"], undefined>;
|
|
341
|
+
readonly value: v.NumberSchema<undefined>;
|
|
342
|
+
readonly time: v.StringSchema<undefined>;
|
|
343
|
+
readonly defaultTimeZone: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
344
|
+
}, undefined>, v.ObjectSchema<{
|
|
345
|
+
readonly unit: v.LiteralSchema<"none", undefined>;
|
|
346
|
+
}, undefined>], undefined>, undefined>;
|
|
347
|
+
}, undefined>], undefined>, undefined>;
|
|
348
|
+
}, undefined>, v.ObjectSchema<{
|
|
349
|
+
readonly id: v.StringSchema<undefined>;
|
|
350
|
+
readonly type: v.LiteralSchema<"people", undefined>;
|
|
351
|
+
readonly people: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
352
|
+
readonly object: v.OptionalSchema<v.LiteralSchema<"user", undefined>, undefined>;
|
|
353
|
+
readonly id: v.StringSchema<undefined>;
|
|
354
|
+
}, undefined>, v.ObjectSchema<{
|
|
355
|
+
readonly object: v.LiteralSchema<"group", undefined>;
|
|
356
|
+
readonly id: v.StringSchema<undefined>;
|
|
357
|
+
readonly name: v.OptionalSchema<v.NullableSchema<v.StringSchema<undefined>, undefined>, undefined>;
|
|
358
|
+
}, undefined>], undefined>, undefined>;
|
|
359
|
+
}, undefined>, v.ObjectSchema<{
|
|
360
|
+
readonly id: v.StringSchema<undefined>;
|
|
361
|
+
readonly type: v.LiteralSchema<"relation", undefined>;
|
|
362
|
+
readonly has_more: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
363
|
+
readonly relation: v.ArraySchema<v.ObjectSchema<{
|
|
364
|
+
readonly id: v.StringSchema<undefined>;
|
|
365
|
+
}, undefined>, undefined>;
|
|
153
366
|
}, undefined>, v.ObjectSchema<{
|
|
154
367
|
readonly id: v.StringSchema<undefined>;
|
|
155
368
|
readonly type: v.LiteralSchema<"place", undefined>;
|
|
@@ -205,5 +418,26 @@ export declare const bridgePagePropertyValueSchema: v.VariantSchema<"type", [v.O
|
|
|
205
418
|
readonly id: v.StringSchema<undefined>;
|
|
206
419
|
readonly type: v.LiteralSchema<"verification", undefined>;
|
|
207
420
|
readonly verification: v.StringSchema<undefined>;
|
|
421
|
+
}, undefined>, v.ObjectSchema<{
|
|
422
|
+
readonly id: v.StringSchema<undefined>;
|
|
423
|
+
readonly type: v.LiteralSchema<"files", undefined>;
|
|
424
|
+
readonly files: v.ArraySchema<v.UnionSchema<[v.ObjectSchema<{
|
|
425
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
426
|
+
readonly external: v.ObjectSchema<{
|
|
427
|
+
readonly url: v.StringSchema<undefined>;
|
|
428
|
+
}, undefined>;
|
|
429
|
+
readonly name: v.StringSchema<undefined>;
|
|
430
|
+
}, undefined>, v.ObjectSchema<{
|
|
431
|
+
readonly type: v.LiteralSchema<"file", undefined>;
|
|
432
|
+
readonly file: v.ObjectSchema<{
|
|
433
|
+
readonly url: v.StringSchema<undefined>;
|
|
434
|
+
readonly expiry_time: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
435
|
+
}, undefined>;
|
|
436
|
+
readonly name: v.StringSchema<undefined>;
|
|
437
|
+
}, undefined>, v.ObjectSchema<{
|
|
438
|
+
readonly type: v.LiteralSchema<"unavailable", undefined>;
|
|
439
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
440
|
+
}, undefined>], undefined>, undefined>;
|
|
208
441
|
}, undefined>], undefined>;
|
|
209
|
-
export type
|
|
442
|
+
export type BridgePagePropertyReadValue = v.InferOutput<typeof bridgePagePropertyReadValueSchema>;
|
|
443
|
+
export type BridgePagePropertyWriteValue = v.InferOutput<typeof bridgePagePropertyWriteValueSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
-
import { bridgeFilePropertyItemSchema } from "../../files.js";
|
|
2
|
+
import { bridgeFilePropertyItemSchema, bridgeFilePropertyReadItemSchema, } from "../../files.js";
|
|
3
3
|
import { nullableStringSchema } from "../../utils/nullableStringSchema.js";
|
|
4
4
|
import { notionDateInputSchema } from "./dateInput.js";
|
|
5
5
|
import { metadataActorSchema } from "./metadataActor.js";
|
|
@@ -9,7 +9,7 @@ import { notionRichTextItemSchema } from "./richText.js";
|
|
|
9
9
|
import { notionSelectOptionInputSchema } from "./selectOption.js";
|
|
10
10
|
import { notionUserInputSchema } from "./userInput.js";
|
|
11
11
|
const pagePropertyBaseSchema = { id: v.string() };
|
|
12
|
-
|
|
12
|
+
const basePropertySchemas = [
|
|
13
13
|
v.object({
|
|
14
14
|
...pagePropertyBaseSchema,
|
|
15
15
|
type: v.literal("title"),
|
|
@@ -76,11 +76,6 @@ export const bridgePagePropertyValueSchema = v.variant("type", [
|
|
|
76
76
|
has_more: v.optional(v.boolean()),
|
|
77
77
|
relation: v.array(notionRelationInputSchema),
|
|
78
78
|
}),
|
|
79
|
-
v.object({
|
|
80
|
-
...pagePropertyBaseSchema,
|
|
81
|
-
type: v.literal("files"),
|
|
82
|
-
files: v.array(bridgeFilePropertyItemSchema),
|
|
83
|
-
}),
|
|
84
79
|
v.object({
|
|
85
80
|
...pagePropertyBaseSchema,
|
|
86
81
|
type: v.literal("place"),
|
|
@@ -131,4 +126,22 @@ export const bridgePagePropertyValueSchema = v.variant("type", [
|
|
|
131
126
|
type: v.literal("verification"),
|
|
132
127
|
verification: v.string(),
|
|
133
128
|
}),
|
|
129
|
+
];
|
|
130
|
+
export const bridgePagePropertyWriteValueSchema = v.variant("type", [
|
|
131
|
+
...basePropertySchemas,
|
|
132
|
+
v.object({
|
|
133
|
+
...pagePropertyBaseSchema,
|
|
134
|
+
type: v.literal("files"),
|
|
135
|
+
files: v.array(bridgeFilePropertyItemSchema),
|
|
136
|
+
}),
|
|
137
|
+
]);
|
|
138
|
+
/** A Files read value can include placeholders for unavailable attachments. */
|
|
139
|
+
export const bridgeFilesPropertyReadValueSchema = v.object({
|
|
140
|
+
...pagePropertyBaseSchema,
|
|
141
|
+
type: v.literal("files"),
|
|
142
|
+
files: v.array(bridgeFilePropertyReadItemSchema),
|
|
143
|
+
});
|
|
144
|
+
export const bridgePagePropertyReadValueSchema = v.variant("type", [
|
|
145
|
+
...basePropertySchemas,
|
|
146
|
+
bridgeFilesPropertyReadValueSchema,
|
|
134
147
|
]);
|
|
@@ -22,6 +22,12 @@ export declare const customBlockErrorInfoSchema: v.ObjectSchema<{
|
|
|
22
22
|
readonly message: v.StringSchema<undefined>;
|
|
23
23
|
readonly isRetryable: v.BooleanSchema<undefined>;
|
|
24
24
|
}, undefined>;
|
|
25
|
+
/** Diagnostic context supplied by the host. The SDK treats individual values as opaque. */
|
|
26
|
+
export declare const customBlockErrorDetailsSchema: v.CustomSchema<Record<string, unknown>, undefined>;
|
|
27
|
+
/** Error payload for responses that carry optional host diagnostic context. */
|
|
28
|
+
export type CustomBlockErrorInfoWithDetails<TCode extends string = string> = CustomBlockErrorInfo<TCode> & {
|
|
29
|
+
details?: v.InferOutput<typeof customBlockErrorDetailsSchema>;
|
|
30
|
+
};
|
|
25
31
|
/** Failures shared by one-shot requests and SDK waits. Unknown string codes remain valid. */
|
|
26
32
|
export type CustomBlockRequestErrorCode = CustomBlockErrorCode<
|
|
27
33
|
/** The host established that the resource does not exist and may disclose its absence. */
|
|
@@ -9,3 +9,11 @@ export const customBlockErrorInfoSchema = v.object({
|
|
|
9
9
|
message: v.string(),
|
|
10
10
|
isRetryable: v.boolean(),
|
|
11
11
|
});
|
|
12
|
+
/** Diagnostic context supplied by the host. The SDK treats individual values as opaque. */
|
|
13
|
+
export const customBlockErrorDetailsSchema = v.custom(value => {
|
|
14
|
+
if (value === null || typeof value !== "object") {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
const prototype = Object.getPrototypeOf(value);
|
|
18
|
+
return prototype === Object.prototype || prototype === null;
|
|
19
|
+
});
|
|
@@ -3,5 +3,7 @@
|
|
|
3
3
|
* Increase this value for breaking wire changes. Hosts can continue to accept
|
|
4
4
|
* older versions, so this value does not set the minimum or maximum they accept.
|
|
5
5
|
*/
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
6
|
+
/** Protocol 13 supports read-only unavailable entries in Files properties. */
|
|
7
|
+
export declare const PROTOCOL_VERSION_13_PARTIAL_FILES = 13;
|
|
8
|
+
export declare const LATEST_BRIDGE_PROTOCOL_VERSION = 13;
|
|
9
|
+
export declare const PROTOCOL_VERSION_12_MINIMAL_INIT = 12;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
* Increase this value for breaking wire changes. Hosts can continue to accept
|
|
4
4
|
* older versions, so this value does not set the minimum or maximum they accept.
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
/** Protocol 13 supports read-only unavailable entries in Files properties. */
|
|
7
|
+
export const PROTOCOL_VERSION_13_PARTIAL_FILES = 13;
|
|
8
|
+
export const LATEST_BRIDGE_PROTOCOL_VERSION = PROTOCOL_VERSION_13_PARTIAL_FILES;
|
|
7
9
|
// Protocol 12 separates setup, data reads, and render readiness.
|
|
8
|
-
export const
|
|
10
|
+
export const PROTOCOL_VERSION_12_MINIMAL_INIT = 12;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitializationErrorDetails.d.ts","
|
|
1
|
+
{"version":3,"file":"InitializationErrorDetails.d.ts","sources":["../../src/react/InitializationErrorDetails.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAA;AAExG,MAAM,MAAM,+BAA+B,GAAG;IAC7C,KAAK,EAAE,8BAA8B,CAAA;IACrC,SAAS,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,wBAAgB,0BAA0B,CAAC,EAC1C,KAAK,EACL,SAAc,GACd,EAAE,+BAA+B,+BAmBjC","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingHostCommand.d.ts","
|
|
1
|
+
{"version":3,"file":"MissingHostCommand.d.ts","sources":["../../src/react/MissingHostCommand.tsx"],"names":[],"mappings":"AAIA,wBAAgB,kBAAkB,gCA4CjC","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingHostScreen.d.ts","
|
|
1
|
+
{"version":3,"file":"MissingHostScreen.d.ts","sources":["../../src/react/MissingHostScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAA;AAGxG,OAAO,yBAAyB,CAAA;AAEhC,MAAM,MAAM,sBAAsB,GAAG;IACpC,KAAK,EAAE,8BAA8B,CAAA;CACrC,CAAA;AAED,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,EAAE,sBAAsB,+BAwBlE","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotionCustomBlock.d.ts","
|
|
1
|
+
{"version":3,"file":"NotionCustomBlock.d.ts","sources":["../../src/react/NotionCustomBlock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAMtC,OAAO,iCAAiC,CAAA;AAExC,MAAM,MAAM,sBAAsB,GAAG;IACpC,QAAQ,EAAE,SAAS,CAAA;IACnB,mEAAmE;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,CAAC,CAAA;CACzD,CAAA;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EACjC,QAAQ,EACR,QAAe,EACf,aAAa,GACb,EAAE,sBAAsB,+BAgCxB","sourceRoot":""}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -9,8 +9,6 @@ export { useContrastMode } from "../preferences/react/useContrastMode.js";
|
|
|
9
9
|
export { useTheme } from "../preferences/react/useTheme.js";
|
|
10
10
|
export type { NotionCustomBlockProps } from "./NotionCustomBlock.js";
|
|
11
11
|
export { NotionCustomBlock } from "./NotionCustomBlock.js";
|
|
12
|
-
export type { NotionTokenScopeProps } from "./NotionTokenScope.js";
|
|
13
|
-
export { NotionTokenScope } from "./NotionTokenScope.js";
|
|
14
12
|
export { useContainingPage } from "./useContainingPage.js";
|
|
15
13
|
export { usePage } from "./usePage.js";
|
|
16
14
|
export { useParent } from "./useParent.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,wBAAwB,EAAE,MAAM,+CAA+C,CAAA;AAC7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAA;AAClF,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAA;AACzE,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAC3D,YAAY,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAA;AACpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,YAAY,EACX,2BAA2B,EAC3B,0BAA0B,GAC1B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAChE,OAAO,EACN,gBAAgB,EAChB,YAAY,EACZ,WAAW,GACX,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA","sourceRoot":""}
|
package/dist/react/index.js
CHANGED
|
@@ -7,7 +7,6 @@ export { useCustomBlockInit } from "../initialization/react/useCustomBlockInit.j
|
|
|
7
7
|
export { useContrastMode } from "../preferences/react/useContrastMode.js";
|
|
8
8
|
export { useTheme } from "../preferences/react/useTheme.js";
|
|
9
9
|
export { NotionCustomBlock } from "./NotionCustomBlock.js";
|
|
10
|
-
export { NotionTokenScope } from "./NotionTokenScope.js";
|
|
11
10
|
export { useContainingPage } from "./useContainingPage.js";
|
|
12
11
|
export { usePage } from "./usePage.js";
|
|
13
12
|
export { useParent } from "./useParent.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAsyncRead.d.ts","
|
|
1
|
+
{"version":3,"file":"useAsyncRead.d.ts","sources":["../../src/react/useAsyncRead.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,CAAC,CAAC,EAAE,CAAC,IAC7B;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAC/B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAA;AAEhC,MAAM,MAAM,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAChC;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;AAOxB;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EACnC,GAAG,EAAE,CAAC,EACN,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAC9C,kBAAkB,CAAC,CAAC,EAAE,CAAC,CAAC,CAqB1B","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useContainingPage.d.ts","
|
|
1
|
+
{"version":3,"file":"useContainingPage.d.ts","sources":["../../src/react/useContainingPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAI5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAOhE,2GAA2G;AAC3G,wBAAgB,iBAAiB,+FAOhC","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLiveLocationRead.d.ts","
|
|
1
|
+
{"version":3,"file":"useLiveLocationRead.d.ts","sources":["../../src/react/useLiveLocationRead.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAE5F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAO3D;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,IAAI,EAAE;IAC5C,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAA;IAC/C,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,KAAK,MAAM,IAAI,CAAA;IACvD,iBAAiB,EAAE,CAClB,QAAQ,EAAE,CAAC,KAAK,EAAE,oBAAoB,KAAK,IAAI,KAC3C,MAAM,IAAI,CAAA;CACf,GAAG,kBAAkB,CAAC,CAAC,EAAE,oBAAoB,CAAC,CA+B9C","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePage.d.ts","
|
|
1
|
+
{"version":3,"file":"usePage.d.ts","sources":["../../src/react/usePage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAE5F,OAAO,EAAoB,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACrE,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAY3D,8FAA8F;AAC9F,wBAAgB,OAAO,CACtB,IAAI,EAAE,MAAM,GAAG,UAAU,GACvB,kBAAkB,CAAC,cAAc,EAAE,oBAAoB,CAAC,CAyC1D","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useParent.d.ts","
|
|
1
|
+
{"version":3,"file":"useParent.d.ts","sources":["../../src/react/useParent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAI5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAOxD;;GAEG;AACH,wBAAgB,SAAS,uFAOxB","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useQuerySubscription.d.ts","
|
|
1
|
+
{"version":3,"file":"useQuerySubscription.d.ts","sources":["../../src/react/useQuerySubscription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,0EAA0E,CAAA;AAEnI,OAAO,KAAK,EACX,eAAe,EACf,uBAAuB,EACvB,MAAM,oCAAoC,CAAA;AAG3C,MAAM,MAAM,2BAA2B,GAAG;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,0BAA0B,GACnC;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,uBAAuB,CAAA;CAAE,GACrD;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,mCAAmC,CAAA;CAAE,CAAA;AAQlE;;;;;GAKG;AACH,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,eAAe,EACtB,EAAE,KAAK,EAAE,GAAE,2BAAgC,GACzC,0BAA0B,CAsC5B","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUserFields.d.ts","
|
|
1
|
+
{"version":3,"file":"useUserFields.d.ts","sources":["../../src/react/useUserFields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAA;AACpF,OAAO,EAAuB,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAGxE,mGAAmG;AACnG,wBAAgB,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,kJAI1D;AAED,yDAAyD;AACzD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,kJAI/D;AAED,4DAA4D;AAC5D,wBAAgB,YAAY,CAAC,IAAI,EAAE,YAAY,GAAG,UAAU,2IAI3D","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useViewer.d.ts","
|
|
1
|
+
{"version":3,"file":"useViewer.d.ts","sources":["../../src/react/useViewer.ts"],"names":[],"mappings":"AAGA,yFAAyF;AACzF,wBAAgB,SAAS,wKAExB","sourceRoot":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* Use the scroll area's text tokens so locally themed surfaces get matching colors. */
|
|
2
|
+
:where(:root, *) {
|
|
3
|
+
scrollbar-color: var(
|
|
4
|
+
--notion-scrollbar-thumb,
|
|
5
|
+
color-mix(in srgb, var(--content-interactive-tertiary) 50%, transparent)
|
|
6
|
+
)
|
|
7
|
+
transparent;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where([data-contrast-mode="high"], [data-contrast-mode="high"] *) {
|
|
11
|
+
scrollbar-color: auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (forced-colors: active) {
|
|
15
|
+
:where(:root, *) {
|
|
16
|
+
scrollbar-color: auto;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotionUser.d.ts","
|
|
1
|
+
{"version":3,"file":"NotionUser.d.ts","sources":["../../src/users/NotionUser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAA;AACpF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAK5F,MAAM,MAAM,eAAe,CAAC,CAAC,IAC1B;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GAC/B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAInD,qEAAqE;AACrE,8BAAsB,UAAU;IAC/B,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,UAAU,CAE9C;IAED,QAAQ,CAAC,KAAK,IAAI,OAAO,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAA;IACxD,8EAA8E;IAC9E,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAA;IAC3D,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,CAAA;IAChE,QAAQ,CAAC,QAAQ,IAAI,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAA;CACrD;AAED,6FAA6F;AAC7F,wBAAgB,mBAAmB,CAClC,IAAI,EAAE,YAAY,GAAG,UAAU,GAC7B,YAAY,GAAG,UAAU,CAE3B","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toNotionUserDataFromBridgeUser.d.ts","
|
|
1
|
+
{"version":3,"file":"toNotionUserDataFromBridgeUser.d.ts","sources":["../../../src/users/bridge/toNotionUserDataFromBridgeUser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAA;AACtF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,wBAAgB,8BAA8B,CAC7C,IAAI,EAAE,UAAU,GACd,cAAc,CAUhB","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getUser.d.ts","
|
|
1
|
+
{"version":3,"file":"getUser.d.ts","sources":["../../src/users/getUser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAA;AAGpF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;GAEG;AACH,wBAAsB,OAAO,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAQ1E","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getViewer.d.ts","
|
|
1
|
+
{"version":3,"file":"getViewer.d.ts","sources":["../../src/users/getViewer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAA;AAE5F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE5C,qDAAqD;AACrD,MAAM,MAAM,YAAY,GACrB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,UAAU,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,WAAW,CAAA;CAAE,CAAA;AAExB,MAAM,MAAM,eAAe,GACxB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,YAAY,CAAA;CAAE,GAC1C;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,oBAAoB,CAAA;CAAE,CAAA;AAEnD,yFAAyF;AACzF,wBAAsB,SAAS,IAAI,OAAO,CAAC,eAAe,CAAC,CAoB1D","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listUsers.d.ts","
|
|
1
|
+
{"version":3,"file":"listUsers.d.ts","sources":["../../src/users/listUsers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAEhE;;GAEG;AACH,wBAAsB,SAAS,CAC9B,KAAK,GAAE,aAAkB,GACvB,OAAO,CAAC,eAAe,CAAC,CA2B1B","sourceRoot":""}
|