@notionhq/custom-blocks 0.3.5 → 0.5.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.
Files changed (192) hide show
  1. package/README.md +2 -2
  2. package/dist/bridge/SandboxBridge.d.ts +4 -39
  3. package/dist/bridge/SandboxBridge.d.ts.map +1 -1
  4. package/dist/bridge/SandboxBridge.js +36 -142
  5. package/dist/bridge/requests.d.ts +35 -0
  6. package/dist/bridge/requests.d.ts.map +1 -0
  7. package/dist/bridge/requests.js +97 -0
  8. package/dist/dataSources/bridge/resolveDataSourceQuery.d.ts.map +1 -1
  9. package/dist/dataSources/bridge/resolveDataSourceQuery.js +18 -4
  10. package/dist/dataSources/bridge/resolveDataSources.js +4 -4
  11. package/dist/dataSources/createDataSourcePage.d.ts.map +1 -1
  12. package/dist/dataSources/createDataSourcePage.js +5 -1
  13. package/dist/dataSources/filters/resolveFilter.d.ts.map +1 -1
  14. package/dist/dataSources/filters/resolveFilter.js +13 -3
  15. package/dist/dataSources/filters/types.d.ts +9 -3
  16. package/dist/dataSources/filters/types.d.ts.map +1 -1
  17. package/dist/dataSources/properties/resolvePropertyAddress.js +1 -1
  18. package/dist/dataSources/properties/resolvePropertyWriteMapForDataSource.js +1 -1
  19. package/dist/dataSources/resolvePageDataSource.js +2 -2
  20. package/dist/dataSources/subscribeToDataSource.d.ts +1 -4
  21. package/dist/dataSources/subscribeToDataSource.d.ts.map +1 -1
  22. package/dist/dataSources/subscribeToDataSource.js +2 -3
  23. package/dist/dataSources/types.d.ts +2 -0
  24. package/dist/dataSources/types.d.ts.map +1 -1
  25. package/dist/files/files.d.ts +2 -0
  26. package/dist/files/files.d.ts.map +1 -0
  27. package/dist/files/files.js +1 -0
  28. package/dist/files/icons.d.ts +2 -0
  29. package/dist/files/icons.d.ts.map +1 -0
  30. package/dist/files/icons.js +1 -0
  31. package/dist/index.d.ts +5 -4
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/initialization/getInitBindingError.js +2 -2
  34. package/dist/manifest/types.d.ts +5 -4
  35. package/dist/manifest/types.d.ts.map +1 -1
  36. package/dist/navigation/openExternalUrl.d.ts.map +1 -1
  37. package/dist/navigation/openExternalUrl.js +2 -1
  38. package/dist/pages/bridge/getPageForDataSource.d.ts.map +1 -1
  39. package/dist/pages/bridge/getPageForDataSource.js +3 -2
  40. package/dist/pages/bridge/sendCreatePageRequest.d.ts.map +1 -1
  41. package/dist/pages/bridge/sendCreatePageRequest.js +2 -1
  42. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts +14 -2
  43. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.d.ts.map +1 -1
  44. package/dist/pages/bridge/toNotionPageFieldsFromBridgePage.js +0 -1
  45. package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.d.ts.map +1 -1
  46. package/dist/pages/bridge/toNotionPagePropertyFromBridgeProperty.js +0 -8
  47. package/dist/pages/bridge/updatePage.d.ts.map +1 -1
  48. package/dist/pages/bridge/updatePage.js +20 -5
  49. package/dist/pages/createPage.d.ts.map +1 -1
  50. package/dist/pages/createPage.js +5 -1
  51. package/dist/pages/openPage.d.ts.map +1 -1
  52. package/dist/pages/openPage.js +2 -1
  53. package/dist/pages/properties/getPropertyByKey.js +2 -2
  54. package/dist/pages/types.d.ts +10 -14
  55. package/dist/pages/types.d.ts.map +1 -1
  56. package/dist/protocol/compatibility/protocol3To10/dataSourceBindings.d.ts +530 -0
  57. package/dist/protocol/compatibility/protocol3To10/dataSourceBindings.js +25 -0
  58. package/dist/protocol/compatibility/protocol3To5/bridgePage.d.ts +12 -11
  59. package/dist/protocol/compatibility/protocol3To5/bridgePage.js +3 -3
  60. package/dist/protocol/context/containingPage.d.ts +3 -0
  61. package/dist/protocol/context/messages/pageChanged.d.ts +3 -0
  62. package/dist/protocol/context/messages/parentChanged.d.ts +3 -0
  63. package/dist/protocol/context/parent.d.ts +5 -0
  64. package/dist/protocol/context/parent.js +6 -1
  65. package/dist/protocol/dataSources/bridgeArchiveStatus.d.ts +3 -0
  66. package/dist/protocol/dataSources/bridgeArchiveStatus.js +6 -0
  67. package/dist/protocol/dataSources/bridgeDataSourceBinding.d.ts +3 -11
  68. package/dist/protocol/dataSources/bridgeDataSourceBinding.js +5 -5
  69. package/dist/protocol/dataSources/bridgeDataSourceBindings.d.ts +2 -10
  70. package/dist/protocol/dataSources/{collectionPointer.d.ts → dataSourcePointer.d.ts} +2 -2
  71. package/dist/protocol/dataSources/{collectionPointer.js → dataSourcePointer.js} +1 -1
  72. package/dist/protocol/dataSources/{collectionSchema.d.ts → dataSourceSchema.d.ts} +2 -10
  73. package/dist/protocol/dataSources/{collectionSchema.js → dataSourceSchema.js} +1 -1
  74. package/dist/protocol/dataSources/filters/bridgeDataSourceFilter.d.ts +1458 -12
  75. package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.d.ts +729 -6
  76. package/dist/protocol/dataSources/filters/bridgeDataSourceFilterCondition.js +14 -2
  77. package/dist/protocol/dataSources/filters/peopleFilterOperator.d.ts +3 -3
  78. package/dist/protocol/dataSources/filters/peopleFilterOperator.js +1 -1
  79. package/dist/protocol/dataSources/filters/timestampFilterOperator.d.ts +354 -0
  80. package/dist/protocol/dataSources/filters/timestampFilterOperator.js +4 -0
  81. package/dist/protocol/dataSources/messages/dataSourcesChanged.d.ts +2 -10
  82. package/dist/protocol/dataSources/messages/queryDataSource.d.ts +1485 -38
  83. package/dist/protocol/dataSources/messages/queryDataSource.js +2 -0
  84. package/dist/protocol/dataSources/notionDataSource.d.ts +3 -19
  85. package/dist/protocol/dataSources/notionDataSource.js +5 -5
  86. package/dist/protocol/dataSources/properties/propertySchema.d.ts +4 -13
  87. package/dist/protocol/dataSources/properties/propertySchema.js +2 -6
  88. package/dist/protocol/dataSources/resolveDataSourceBinding.d.ts +4 -4
  89. package/dist/protocol/dataSources/resolveDataSourceBinding.js +2 -2
  90. package/dist/protocol/files.d.ts +32 -0
  91. package/dist/protocol/files.js +17 -0
  92. package/dist/protocol/handshake/connect.d.ts +15 -4
  93. package/dist/protocol/handshake/init.d.ts +23 -14
  94. package/dist/protocol/icons.d.ts +32 -0
  95. package/dist/protocol/icons.js +39 -0
  96. package/dist/protocol/index.d.ts +25 -19
  97. package/dist/protocol/index.js +15 -9
  98. package/dist/protocol/manifest/grants.d.ts +48 -0
  99. package/dist/protocol/manifest/grants.js +19 -0
  100. package/dist/protocol/manifest/manifest.d.ts +39 -16
  101. package/dist/protocol/manifest/manifest.js +17 -11
  102. package/dist/protocol/messages/hostToSandbox.d.ts +196 -177
  103. package/dist/protocol/messages/invalidHostMessage.d.ts +2 -0
  104. package/dist/protocol/messages/invalidHostMessage.js +2 -0
  105. package/dist/protocol/messages/invalidSandboxMessage.d.ts +2 -0
  106. package/dist/protocol/messages/invalidSandboxMessage.js +2 -0
  107. package/dist/protocol/messages/sandboxToHost.d.ts +1571 -50
  108. package/dist/protocol/navigation/openExternalUrl.d.ts +2 -2
  109. package/dist/protocol/pages/bridgePage.d.ts +12 -12
  110. package/dist/protocol/pages/bridgePage.js +3 -4
  111. package/dist/protocol/pages/makeBridgePage.d.ts +3 -1
  112. package/dist/protocol/pages/messages/createPage.d.ts +645 -62
  113. package/dist/protocol/pages/messages/createPage.js +27 -13
  114. package/dist/protocol/pages/messages/getPage.d.ts +38 -37
  115. package/dist/protocol/pages/messages/openPage.d.ts +2 -2
  116. package/dist/protocol/pages/messages/updatePage.d.ts +47 -48
  117. package/dist/protocol/pages/messages/updatePage.js +3 -3
  118. package/dist/protocol/pages/pageAppearance.d.ts +9 -28
  119. package/dist/protocol/pages/pageAppearance.js +11 -31
  120. package/dist/protocol/pages/properties/bridgePagePropertyMaps.d.ts +4 -20
  121. package/dist/protocol/pages/properties/bridgePagePropertyValue.d.ts +2 -10
  122. package/dist/protocol/pages/properties/bridgePagePropertyValue.js +2 -12
  123. package/dist/protocol/users/makeBridgeUser.d.ts +3 -1
  124. package/dist/protocol/users/messages/getUser.d.ts +2 -2
  125. package/dist/protocol/users/messages/listUsers.d.ts +2 -2
  126. package/dist/protocol/utils/errors.d.ts +6 -4
  127. package/dist/protocol/utils/errors.js +3 -3
  128. package/dist/protocol/utils/ids.d.ts +2 -0
  129. package/dist/protocol/utils/ids.js +1 -0
  130. package/dist/protocol/utils/protocolVersion.d.ts +3 -1
  131. package/dist/protocol/utils/protocolVersion.js +5 -1
  132. package/dist/protocol/utils/readRequestId.d.ts +2 -0
  133. package/dist/protocol/utils/readRequestId.js +7 -0
  134. package/dist/react/NotionCustomBlock.d.ts.map +1 -1
  135. package/dist/react/NotionCustomBlock.js +1 -15
  136. package/dist/users/getUser.d.ts.map +1 -1
  137. package/dist/users/getUser.js +2 -1
  138. package/dist/users/listUsers.d.ts.map +1 -1
  139. package/dist/users/listUsers.js +4 -2
  140. package/dist/utils/version.js +1 -1
  141. package/docs/data-sources.md +85 -83
  142. package/docs/deployment.md +4 -5
  143. package/docs/errors.md +47 -5
  144. package/docs/grants.md +127 -0
  145. package/docs/pages.md +105 -56
  146. package/docs/users.md +2 -2
  147. package/package.json +1 -1
  148. package/src/bridge/SandboxBridge.ts +44 -243
  149. package/src/bridge/requests.ts +138 -0
  150. package/src/dataSources/bridge/resolveDataSourceQuery.ts +24 -4
  151. package/src/dataSources/bridge/resolveDataSources.ts +4 -4
  152. package/src/dataSources/createDataSourcePage.ts +5 -1
  153. package/src/dataSources/filters/resolveFilter.ts +12 -3
  154. package/src/dataSources/filters/types.ts +7 -4
  155. package/src/dataSources/properties/resolvePropertyAddress.ts +1 -1
  156. package/src/dataSources/properties/resolvePropertyWriteMapForDataSource.ts +1 -1
  157. package/src/dataSources/resolvePageDataSource.ts +2 -2
  158. package/src/dataSources/subscribeToDataSource.ts +7 -19
  159. package/src/dataSources/types.ts +3 -0
  160. package/src/files/files.ts +5 -0
  161. package/src/files/icons.ts +9 -0
  162. package/src/index.ts +10 -11
  163. package/src/initialization/getInitBindingError.ts +2 -2
  164. package/src/manifest/types.ts +10 -4
  165. package/src/navigation/openExternalUrl.ts +5 -1
  166. package/src/pages/bridge/getPageForDataSource.ts +6 -2
  167. package/src/pages/bridge/sendCreatePageRequest.ts +5 -1
  168. package/src/pages/bridge/toNotionPageFieldsFromBridgePage.ts +0 -1
  169. package/src/pages/bridge/toNotionPagePropertyFromBridgeProperty.ts +0 -8
  170. package/src/pages/bridge/updatePage.ts +29 -9
  171. package/src/pages/createPage.ts +5 -1
  172. package/src/pages/openPage.ts +5 -1
  173. package/src/pages/properties/getPropertyByKey.ts +2 -2
  174. package/src/pages/types.ts +14 -16
  175. package/src/react/NotionCustomBlock.tsx +1 -16
  176. package/src/users/getUser.ts +5 -1
  177. package/src/users/listUsers.ts +9 -4
  178. package/dist/bridge/pendingRequests.d.ts +0 -14
  179. package/dist/bridge/pendingRequests.d.ts.map +0 -1
  180. package/dist/bridge/pendingRequests.js +0 -28
  181. package/dist/protocol/dataSources/filters/createdByFilterOperator.d.ts +0 -17
  182. package/dist/protocol/dataSources/filters/createdByFilterOperator.js +0 -11
  183. package/dist/protocol/manifest/capabilities.d.ts +0 -37
  184. package/dist/protocol/manifest/capabilities.js +0 -13
  185. package/dist/protocol/pages/properties/fileInput.d.ts +0 -16
  186. package/dist/protocol/pages/properties/fileInput.js +0 -16
  187. package/dist/react/DebugMessageLog.d.ts +0 -2
  188. package/dist/react/DebugMessageLog.d.ts.map +0 -1
  189. package/dist/react/DebugMessageLog.js +0 -23
  190. package/docs/capabilities.md +0 -111
  191. package/src/bridge/pendingRequests.ts +0 -28
  192. package/src/react/DebugMessageLog.tsx +0 -34
@@ -1,7 +1,6 @@
1
1
  import * as v from "valibot";
2
2
  import { customBlockCheckboxFilterOperatorSchema } from "./checkboxFilterOperator.js";
3
3
  import { customBlockContainsFilterOperatorSchema } from "./containsFilterOperator.js";
4
- import { customBlockCreatedByFilterOperatorSchema } from "./createdByFilterOperator.js";
5
4
  import { customBlockDateFilterOperatorSchema } from "./dateFilterOperator.js";
6
5
  import { customBlockNumberFilterOperatorSchema } from "./numberFilterOperator.js";
7
6
  import { customBlockOptionFilterOperatorSchema } from "./optionFilterOperator.js";
@@ -9,14 +8,27 @@ import { customBlockPeopleFilterOperatorSchema } from "./peopleFilterOperator.js
9
8
  import { customBlockRelationFilterOperatorSchema } from "./relationFilterOperator.js";
10
9
  import { customBlockStatusFilterOperatorSchema } from "./statusFilterOperator.js";
11
10
  import { customBlockTextFilterOperatorSchema } from "./textFilterOperator.js";
11
+ import { customBlockTimestampFilterOperatorSchema } from "./timestampFilterOperator.js";
12
12
  export const bridgeDataSourceFilterConditionSchema = v.union([
13
+ v.strictObject({
14
+ propertyId: v.string(),
15
+ last_edited_by: customBlockPeopleFilterOperatorSchema,
16
+ }),
17
+ v.strictObject({
18
+ propertyId: v.string(),
19
+ created_time: customBlockTimestampFilterOperatorSchema,
20
+ }),
21
+ v.strictObject({
22
+ propertyId: v.string(),
23
+ last_edited_time: customBlockTimestampFilterOperatorSchema,
24
+ }),
13
25
  v.strictObject({
14
26
  propertyId: v.string(),
15
27
  relation: customBlockRelationFilterOperatorSchema,
16
28
  }),
17
29
  v.strictObject({
18
30
  propertyId: v.string(),
19
- created_by: customBlockCreatedByFilterOperatorSchema,
31
+ created_by: customBlockPeopleFilterOperatorSchema,
20
32
  }),
21
33
  v.strictObject({
22
34
  propertyId: v.string(),
@@ -1,18 +1,18 @@
1
1
  import * as v from "valibot";
2
2
  declare const customBlockPersonFilterValueSchema: v.StrictObjectSchema<{
3
3
  readonly object: v.PicklistSchema<["user", "group"], undefined>;
4
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
4
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
5
5
  }, undefined>;
6
6
  export type CustomBlockPersonFilterValue = v.InferOutput<typeof customBlockPersonFilterValueSchema>;
7
7
  export declare const customBlockPeopleFilterOperatorSchema: v.UnionSchema<[v.StrictObjectSchema<{
8
8
  readonly contains: v.StrictObjectSchema<{
9
9
  readonly object: v.PicklistSchema<["user", "group"], undefined>;
10
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
10
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
11
11
  }, undefined>;
12
12
  }, undefined>, v.StrictObjectSchema<{
13
13
  readonly does_not_contain: v.StrictObjectSchema<{
14
14
  readonly object: v.PicklistSchema<["user", "group"], undefined>;
15
- readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>]>;
15
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 2000, undefined>]>;
16
16
  }, undefined>;
17
17
  }, undefined>, v.UnionSchema<[v.StrictObjectSchema<{
18
18
  readonly is_empty: v.LiteralSchema<true, undefined>;
@@ -2,7 +2,7 @@ import * as v from "valibot";
2
2
  import { emptyOperatorSchema } from "./emptyOperator.js";
3
3
  const customBlockPersonFilterValueSchema = v.strictObject({
4
4
  object: v.picklist(["user", "group"]),
5
- id: v.pipe(v.string(), v.minLength(1)),
5
+ id: v.pipe(v.string(), v.minLength(1), v.maxLength(2_000)),
6
6
  });
7
7
  export const customBlockPeopleFilterOperatorSchema = v.union([
8
8
  v.strictObject({ contains: customBlockPersonFilterValueSchema }),
@@ -0,0 +1,354 @@
1
+ import * as v from "valibot";
2
+ /** Timestamp columns use the Date operators, without range endpoint selection. */
3
+ export declare const customBlockTimestampFilterOperatorSchema: v.UnionSchema<((Omit<v.StrictObjectSchema<{
4
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
5
+ readonly equals: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
6
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
7
+ readonly entries: Omit<{
8
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
9
+ readonly equals: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
10
+ }, "target">;
11
+ readonly "~standard": v.StandardProps<{
12
+ equals: string;
13
+ }, {
14
+ equals: string;
15
+ }>;
16
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
17
+ equals: string;
18
+ }, v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>>;
19
+ readonly "~types"?: {
20
+ readonly input: {
21
+ equals: string;
22
+ };
23
+ readonly output: {
24
+ equals: string;
25
+ };
26
+ readonly issue: v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>;
27
+ } | undefined;
28
+ }) | (Omit<v.StrictObjectSchema<{
29
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
30
+ readonly before: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
31
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
32
+ readonly entries: Omit<{
33
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
34
+ readonly before: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
35
+ }, "target">;
36
+ readonly "~standard": v.StandardProps<{
37
+ before: string;
38
+ }, {
39
+ before: string;
40
+ }>;
41
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
42
+ before: string;
43
+ }, v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>>;
44
+ readonly "~types"?: {
45
+ readonly input: {
46
+ before: string;
47
+ };
48
+ readonly output: {
49
+ before: string;
50
+ };
51
+ readonly issue: v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>;
52
+ } | undefined;
53
+ }) | (Omit<v.StrictObjectSchema<{
54
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
55
+ readonly after: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
56
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
57
+ readonly entries: Omit<{
58
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
59
+ readonly after: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
60
+ }, "target">;
61
+ readonly "~standard": v.StandardProps<{
62
+ after: string;
63
+ }, {
64
+ after: string;
65
+ }>;
66
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
67
+ after: string;
68
+ }, v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>>;
69
+ readonly "~types"?: {
70
+ readonly input: {
71
+ after: string;
72
+ };
73
+ readonly output: {
74
+ after: string;
75
+ };
76
+ readonly issue: v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>;
77
+ } | undefined;
78
+ }) | (Omit<v.StrictObjectSchema<{
79
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
80
+ readonly on_or_before: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
81
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
82
+ readonly entries: Omit<{
83
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
84
+ readonly on_or_before: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
85
+ }, "target">;
86
+ readonly "~standard": v.StandardProps<{
87
+ on_or_before: string;
88
+ }, {
89
+ on_or_before: string;
90
+ }>;
91
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
92
+ on_or_before: string;
93
+ }, v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>>;
94
+ readonly "~types"?: {
95
+ readonly input: {
96
+ on_or_before: string;
97
+ };
98
+ readonly output: {
99
+ on_or_before: string;
100
+ };
101
+ readonly issue: v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>;
102
+ } | undefined;
103
+ }) | (Omit<v.StrictObjectSchema<{
104
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
105
+ readonly on_or_after: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
106
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
107
+ readonly entries: Omit<{
108
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
109
+ readonly on_or_after: v.UnionSchema<[v.PicklistSchema<["today", "tomorrow", "yesterday", "one_week_ago", "one_week_from_now", "one_month_ago", "one_month_from_now"], undefined>, v.StringSchema<undefined>], undefined>;
110
+ }, "target">;
111
+ readonly "~standard": v.StandardProps<{
112
+ on_or_after: string;
113
+ }, {
114
+ on_or_after: string;
115
+ }>;
116
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
117
+ on_or_after: string;
118
+ }, v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>>;
119
+ readonly "~types"?: {
120
+ readonly input: {
121
+ on_or_after: string;
122
+ };
123
+ readonly output: {
124
+ on_or_after: string;
125
+ };
126
+ readonly issue: v.PicklistIssue | v.StrictObjectIssue | v.StringIssue | v.UnionIssue<v.PicklistIssue | v.StringIssue>;
127
+ } | undefined;
128
+ }) | (Omit<v.StrictObjectSchema<{
129
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
130
+ readonly this_week: v.StrictObjectSchema<{}, undefined>;
131
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
132
+ readonly entries: Omit<{
133
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
134
+ readonly this_week: v.StrictObjectSchema<{}, undefined>;
135
+ }, "target">;
136
+ readonly "~standard": v.StandardProps<{
137
+ this_week: {};
138
+ }, {
139
+ this_week: {};
140
+ }>;
141
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
142
+ this_week: {};
143
+ }, v.StrictObjectIssue>;
144
+ readonly "~types"?: {
145
+ readonly input: {
146
+ this_week: {};
147
+ };
148
+ readonly output: {
149
+ this_week: {};
150
+ };
151
+ readonly issue: v.StrictObjectIssue;
152
+ } | undefined;
153
+ }) | (Omit<v.StrictObjectSchema<{
154
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
155
+ readonly past_week: v.StrictObjectSchema<{}, undefined>;
156
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
157
+ readonly entries: Omit<{
158
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
159
+ readonly past_week: v.StrictObjectSchema<{}, undefined>;
160
+ }, "target">;
161
+ readonly "~standard": v.StandardProps<{
162
+ past_week: {};
163
+ }, {
164
+ past_week: {};
165
+ }>;
166
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
167
+ past_week: {};
168
+ }, v.StrictObjectIssue>;
169
+ readonly "~types"?: {
170
+ readonly input: {
171
+ past_week: {};
172
+ };
173
+ readonly output: {
174
+ past_week: {};
175
+ };
176
+ readonly issue: v.StrictObjectIssue;
177
+ } | undefined;
178
+ }) | (Omit<v.StrictObjectSchema<{
179
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
180
+ readonly past_month: v.StrictObjectSchema<{}, undefined>;
181
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
182
+ readonly entries: Omit<{
183
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
184
+ readonly past_month: v.StrictObjectSchema<{}, undefined>;
185
+ }, "target">;
186
+ readonly "~standard": v.StandardProps<{
187
+ past_month: {};
188
+ }, {
189
+ past_month: {};
190
+ }>;
191
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
192
+ past_month: {};
193
+ }, v.StrictObjectIssue>;
194
+ readonly "~types"?: {
195
+ readonly input: {
196
+ past_month: {};
197
+ };
198
+ readonly output: {
199
+ past_month: {};
200
+ };
201
+ readonly issue: v.StrictObjectIssue;
202
+ } | undefined;
203
+ }) | (Omit<v.StrictObjectSchema<{
204
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
205
+ readonly past_year: v.StrictObjectSchema<{}, undefined>;
206
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
207
+ readonly entries: Omit<{
208
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
209
+ readonly past_year: v.StrictObjectSchema<{}, undefined>;
210
+ }, "target">;
211
+ readonly "~standard": v.StandardProps<{
212
+ past_year: {};
213
+ }, {
214
+ past_year: {};
215
+ }>;
216
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
217
+ past_year: {};
218
+ }, v.StrictObjectIssue>;
219
+ readonly "~types"?: {
220
+ readonly input: {
221
+ past_year: {};
222
+ };
223
+ readonly output: {
224
+ past_year: {};
225
+ };
226
+ readonly issue: v.StrictObjectIssue;
227
+ } | undefined;
228
+ }) | (Omit<v.StrictObjectSchema<{
229
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
230
+ readonly next_week: v.StrictObjectSchema<{}, undefined>;
231
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
232
+ readonly entries: Omit<{
233
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
234
+ readonly next_week: v.StrictObjectSchema<{}, undefined>;
235
+ }, "target">;
236
+ readonly "~standard": v.StandardProps<{
237
+ next_week: {};
238
+ }, {
239
+ next_week: {};
240
+ }>;
241
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
242
+ next_week: {};
243
+ }, v.StrictObjectIssue>;
244
+ readonly "~types"?: {
245
+ readonly input: {
246
+ next_week: {};
247
+ };
248
+ readonly output: {
249
+ next_week: {};
250
+ };
251
+ readonly issue: v.StrictObjectIssue;
252
+ } | undefined;
253
+ }) | (Omit<v.StrictObjectSchema<{
254
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
255
+ readonly next_month: v.StrictObjectSchema<{}, undefined>;
256
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
257
+ readonly entries: Omit<{
258
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
259
+ readonly next_month: v.StrictObjectSchema<{}, undefined>;
260
+ }, "target">;
261
+ readonly "~standard": v.StandardProps<{
262
+ next_month: {};
263
+ }, {
264
+ next_month: {};
265
+ }>;
266
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
267
+ next_month: {};
268
+ }, v.StrictObjectIssue>;
269
+ readonly "~types"?: {
270
+ readonly input: {
271
+ next_month: {};
272
+ };
273
+ readonly output: {
274
+ next_month: {};
275
+ };
276
+ readonly issue: v.StrictObjectIssue;
277
+ } | undefined;
278
+ }) | (Omit<v.StrictObjectSchema<{
279
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
280
+ readonly next_year: v.StrictObjectSchema<{}, undefined>;
281
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
282
+ readonly entries: Omit<{
283
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
284
+ readonly next_year: v.StrictObjectSchema<{}, undefined>;
285
+ }, "target">;
286
+ readonly "~standard": v.StandardProps<{
287
+ next_year: {};
288
+ }, {
289
+ next_year: {};
290
+ }>;
291
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
292
+ next_year: {};
293
+ }, v.StrictObjectIssue>;
294
+ readonly "~types"?: {
295
+ readonly input: {
296
+ next_year: {};
297
+ };
298
+ readonly output: {
299
+ next_year: {};
300
+ };
301
+ readonly issue: v.StrictObjectIssue;
302
+ } | undefined;
303
+ }) | (Omit<v.StrictObjectSchema<{
304
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
305
+ readonly is_empty: v.LiteralSchema<true, undefined>;
306
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
307
+ readonly entries: Omit<{
308
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
309
+ readonly is_empty: v.LiteralSchema<true, undefined>;
310
+ }, "target">;
311
+ readonly "~standard": v.StandardProps<{
312
+ is_empty: true;
313
+ }, {
314
+ is_empty: true;
315
+ }>;
316
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
317
+ is_empty: true;
318
+ }, v.LiteralIssue | v.StrictObjectIssue>;
319
+ readonly "~types"?: {
320
+ readonly input: {
321
+ is_empty: true;
322
+ };
323
+ readonly output: {
324
+ is_empty: true;
325
+ };
326
+ readonly issue: v.LiteralIssue | v.StrictObjectIssue;
327
+ } | undefined;
328
+ }) | (Omit<v.StrictObjectSchema<{
329
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
330
+ readonly is_not_empty: v.LiteralSchema<true, undefined>;
331
+ }, undefined>, "entries" | "~run" | "~standard" | "~types"> & {
332
+ readonly entries: Omit<{
333
+ readonly target: v.OptionalSchema<v.PicklistSchema<["start_date", "end_date"], undefined>, undefined>;
334
+ readonly is_not_empty: v.LiteralSchema<true, undefined>;
335
+ }, "target">;
336
+ readonly "~standard": v.StandardProps<{
337
+ is_not_empty: true;
338
+ }, {
339
+ is_not_empty: true;
340
+ }>;
341
+ readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
342
+ is_not_empty: true;
343
+ }, v.LiteralIssue | v.StrictObjectIssue>;
344
+ readonly "~types"?: {
345
+ readonly input: {
346
+ is_not_empty: true;
347
+ };
348
+ readonly output: {
349
+ is_not_empty: true;
350
+ };
351
+ readonly issue: v.LiteralIssue | v.StrictObjectIssue;
352
+ } | undefined;
353
+ }))[], undefined>;
354
+ export type CustomBlockTimestampFilterOperator = v.InferOutput<typeof customBlockTimestampFilterOperatorSchema>;
@@ -0,0 +1,4 @@
1
+ import * as v from "valibot";
2
+ import { customBlockDateFilterOperatorSchema } from "./dateFilterOperator.js";
3
+ /** Timestamp columns use the Date operators, without range endpoint selection. */
4
+ export const customBlockTimestampFilterOperatorSchema = v.union(customBlockDateFilterOperatorSchema.options.map(option => v.omit(option, ["target"])));
@@ -8,12 +8,12 @@ export declare const dataSourcesChangedMessageSchema: v.ObjectSchema<{
8
8
  readonly type: v.LiteralSchema<"dataSourcesChanged", undefined>;
9
9
  readonly dataSources: v.ObjectSchema<{
10
10
  readonly bindings: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
11
- readonly collectionPointer: v.OptionalSchema<v.ObjectSchema<{
11
+ readonly dataSourcePointer: v.OptionalSchema<v.ObjectSchema<{
12
12
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>;
13
13
  readonly table: v.StringSchema<undefined>;
14
14
  readonly spaceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionSpaceId">]>, undefined>;
15
15
  }, undefined>, undefined>;
16
- readonly collectionSchema: v.OptionalSchema<v.ObjectSchema<{
16
+ readonly dataSourceSchema: v.OptionalSchema<v.ObjectSchema<{
17
17
  readonly id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.BrandAction<string, "NotionDataSourceId">]>, undefined>;
18
18
  readonly propertiesById: v.RecordSchema<v.StringSchema<undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
19
19
  readonly name: v.StringSchema<undefined>;
@@ -124,14 +124,6 @@ export declare const dataSourcesChangedMessageSchema: v.ObjectSchema<{
124
124
  readonly name: v.StringSchema<undefined>;
125
125
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
126
126
  readonly type: v.LiteralSchema<"verification", undefined>;
127
- }, undefined>, v.ObjectSchema<{
128
- readonly name: v.StringSchema<undefined>;
129
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
130
- readonly type: v.LiteralSchema<"last_visited_time", undefined>;
131
- }, undefined>, v.ObjectSchema<{
132
- readonly name: v.StringSchema<undefined>;
133
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
134
- readonly type: v.LiteralSchema<"location", undefined>;
135
127
  }, undefined>, v.ObjectSchema<{
136
128
  readonly name: v.StringSchema<undefined>;
137
129
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;