@airtable/blocks 0.0.0-experimental-20e3506bd-20250428

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 (1068) hide show
  1. package/README.md +28 -0
  2. package/dist/cjs/base/index.js +96 -0
  3. package/dist/cjs/base/models/abstract_model_with_async_data.js +273 -0
  4. package/dist/cjs/base/models/base.js +306 -0
  5. package/dist/cjs/base/models/create_aggregators.js +115 -0
  6. package/dist/cjs/base/models/cursor.js +393 -0
  7. package/dist/cjs/base/models/field.js +427 -0
  8. package/dist/cjs/base/models/grouped_record_query_result.js +399 -0
  9. package/dist/cjs/base/models/linked_records_query_result.js +728 -0
  10. package/dist/cjs/base/models/models.js +137 -0
  11. package/dist/cjs/base/models/mutations.js +516 -0
  12. package/dist/cjs/base/models/object_pool.js +184 -0
  13. package/dist/cjs/base/models/record.js +304 -0
  14. package/dist/cjs/base/models/record_coloring.js +112 -0
  15. package/dist/cjs/base/models/record_query_result.js +741 -0
  16. package/dist/cjs/base/models/record_store.js +825 -0
  17. package/dist/cjs/base/models/session.js +182 -0
  18. package/dist/cjs/base/models/table.js +1737 -0
  19. package/dist/cjs/base/models/table_or_view_query_result.js +1013 -0
  20. package/dist/cjs/base/models/view.js +431 -0
  21. package/dist/cjs/base/models/view_data_store.js +403 -0
  22. package/dist/cjs/base/models/view_metadata_query_result.js +224 -0
  23. package/dist/cjs/base/perform_record_action.js +257 -0
  24. package/dist/cjs/base/sdk.js +230 -0
  25. package/dist/cjs/base/settings_button.js +138 -0
  26. package/dist/cjs/base/types/aggregators.js +1 -0
  27. package/dist/cjs/base/types/airtable_interface.js +39 -0
  28. package/dist/cjs/base/types/backend_fetch_types.js +1 -0
  29. package/dist/cjs/base/types/base.js +1 -0
  30. package/dist/cjs/base/types/cursor.js +1 -0
  31. package/dist/cjs/base/types/mutations.js +112 -0
  32. package/dist/cjs/base/types/record.js +1 -0
  33. package/dist/cjs/base/types/record_action_data.js +1 -0
  34. package/dist/cjs/base/types/table.js +1 -0
  35. package/dist/cjs/base/types/undo_redo.js +12 -0
  36. package/dist/cjs/base/types/view.js +41 -0
  37. package/dist/cjs/base/types/viewport.js +1 -0
  38. package/dist/cjs/base/ui/base_provider.js +50 -0
  39. package/dist/cjs/base/ui/baymax_utils.js +133 -0
  40. package/dist/cjs/base/ui/block_wrapper.js +143 -0
  41. package/dist/cjs/base/ui/box.js +110 -0
  42. package/dist/cjs/base/ui/button.js +182 -0
  43. package/dist/cjs/base/ui/cell_renderer.js +255 -0
  44. package/dist/cjs/base/ui/choice_token.js +110 -0
  45. package/dist/cjs/base/ui/collaborator_token.js +145 -0
  46. package/dist/cjs/base/ui/color_palette.js +239 -0
  47. package/dist/cjs/base/ui/color_palette_synced.js +98 -0
  48. package/dist/cjs/base/ui/confirmation_dialog.js +153 -0
  49. package/dist/cjs/base/ui/control_sizes.js +102 -0
  50. package/dist/cjs/base/ui/create_detect_element_resize.js +207 -0
  51. package/dist/cjs/base/ui/css_helpers.js +23 -0
  52. package/dist/cjs/base/ui/dialog.js +142 -0
  53. package/dist/cjs/base/ui/dialog_close_button.js +152 -0
  54. package/dist/cjs/base/ui/expand_record.js +40 -0
  55. package/dist/cjs/base/ui/expand_record_list.js +47 -0
  56. package/dist/cjs/base/ui/expand_record_picker_async.js +100 -0
  57. package/dist/cjs/base/ui/field_icon.js +62 -0
  58. package/dist/cjs/base/ui/field_picker.js +143 -0
  59. package/dist/cjs/base/ui/field_picker_synced.js +88 -0
  60. package/dist/cjs/base/ui/form_field.js +137 -0
  61. package/dist/cjs/base/ui/geometry/geometry.js +27 -0
  62. package/dist/cjs/base/ui/geometry/point.js +21 -0
  63. package/dist/cjs/base/ui/geometry/rect.js +67 -0
  64. package/dist/cjs/base/ui/geometry/size.js +21 -0
  65. package/dist/cjs/base/ui/global_alert.js +92 -0
  66. package/dist/cjs/base/ui/heading.js +181 -0
  67. package/dist/cjs/base/ui/icon.js +129 -0
  68. package/dist/cjs/base/ui/icon_config.js +434 -0
  69. package/dist/cjs/base/ui/initialize_block.js +126 -0
  70. package/dist/cjs/base/ui/input.js +200 -0
  71. package/dist/cjs/base/ui/input_synced.js +89 -0
  72. package/dist/cjs/base/ui/key_codes.js +74 -0
  73. package/dist/cjs/base/ui/label.js +105 -0
  74. package/dist/cjs/base/ui/link.js +229 -0
  75. package/dist/cjs/base/ui/loader.js +82 -0
  76. package/dist/cjs/base/ui/modal.js +184 -0
  77. package/dist/cjs/base/ui/model_picker_select.js +83 -0
  78. package/dist/cjs/base/ui/popover.js +407 -0
  79. package/dist/cjs/base/ui/progress_bar.js +128 -0
  80. package/dist/cjs/base/ui/record_card.js +653 -0
  81. package/dist/cjs/base/ui/record_card_list.js +377 -0
  82. package/dist/cjs/base/ui/select.js +247 -0
  83. package/dist/cjs/base/ui/select_and_select_buttons_helpers.js +85 -0
  84. package/dist/cjs/base/ui/select_buttons.js +192 -0
  85. package/dist/cjs/base/ui/select_buttons_synced.js +84 -0
  86. package/dist/cjs/base/ui/select_synced.js +87 -0
  87. package/dist/cjs/base/ui/switch.js +196 -0
  88. package/dist/cjs/base/ui/switch_synced.js +75 -0
  89. package/dist/cjs/base/ui/synced.js +70 -0
  90. package/dist/cjs/base/ui/system/all_styles_set.js +100 -0
  91. package/dist/cjs/base/ui/system/appearance/appearance_set.js +30 -0
  92. package/dist/cjs/base/ui/system/appearance/background_color.js +21 -0
  93. package/dist/cjs/base/ui/system/appearance/border.js +57 -0
  94. package/dist/cjs/base/ui/system/appearance/border_radius.js +21 -0
  95. package/dist/cjs/base/ui/system/appearance/box_shadow.js +21 -0
  96. package/dist/cjs/base/ui/system/appearance/opacity.js +21 -0
  97. package/dist/cjs/base/ui/system/dimensions/dimensions_set.js +31 -0
  98. package/dist/cjs/base/ui/system/dimensions/height.js +21 -0
  99. package/dist/cjs/base/ui/system/dimensions/max_height.js +21 -0
  100. package/dist/cjs/base/ui/system/dimensions/max_width.js +21 -0
  101. package/dist/cjs/base/ui/system/dimensions/min_height.js +21 -0
  102. package/dist/cjs/base/ui/system/dimensions/min_width.js +21 -0
  103. package/dist/cjs/base/ui/system/dimensions/width.js +21 -0
  104. package/dist/cjs/base/ui/system/display.js +22 -0
  105. package/dist/cjs/base/ui/system/flex_container/align_content.js +18 -0
  106. package/dist/cjs/base/ui/system/flex_container/align_items.js +18 -0
  107. package/dist/cjs/base/ui/system/flex_container/flex_container_set.js +31 -0
  108. package/dist/cjs/base/ui/system/flex_container/flex_direction.js +18 -0
  109. package/dist/cjs/base/ui/system/flex_container/flex_wrap.js +18 -0
  110. package/dist/cjs/base/ui/system/flex_container/justify_content.js +18 -0
  111. package/dist/cjs/base/ui/system/flex_container/justify_items.js +19 -0
  112. package/dist/cjs/base/ui/system/flex_item/align_self.js +18 -0
  113. package/dist/cjs/base/ui/system/flex_item/flex.js +18 -0
  114. package/dist/cjs/base/ui/system/flex_item/flex_basis.js +18 -0
  115. package/dist/cjs/base/ui/system/flex_item/flex_grow.js +18 -0
  116. package/dist/cjs/base/ui/system/flex_item/flex_item_set.js +32 -0
  117. package/dist/cjs/base/ui/system/flex_item/flex_shrink.js +18 -0
  118. package/dist/cjs/base/ui/system/flex_item/justify_self.js +19 -0
  119. package/dist/cjs/base/ui/system/flex_item/order.js +18 -0
  120. package/dist/cjs/base/ui/system/index.js +993 -0
  121. package/dist/cjs/base/ui/system/overflow.js +24 -0
  122. package/dist/cjs/base/ui/system/position/bottom.js +26 -0
  123. package/dist/cjs/base/ui/system/position/left.js +26 -0
  124. package/dist/cjs/base/ui/system/position/position.js +18 -0
  125. package/dist/cjs/base/ui/system/position/position_set.js +31 -0
  126. package/dist/cjs/base/ui/system/position/right.js +26 -0
  127. package/dist/cjs/base/ui/system/position/top.js +26 -0
  128. package/dist/cjs/base/ui/system/position/z_index.js +21 -0
  129. package/dist/cjs/base/ui/system/spacing/margin.js +74 -0
  130. package/dist/cjs/base/ui/system/spacing/padding.js +67 -0
  131. package/dist/cjs/base/ui/system/spacing/spacing_set.js +27 -0
  132. package/dist/cjs/base/ui/system/typography/font_family.js +21 -0
  133. package/dist/cjs/base/ui/system/typography/font_size.js +21 -0
  134. package/dist/cjs/base/ui/system/typography/font_style.js +18 -0
  135. package/dist/cjs/base/ui/system/typography/font_weight.js +21 -0
  136. package/dist/cjs/base/ui/system/typography/letter_spacing.js +21 -0
  137. package/dist/cjs/base/ui/system/typography/line_height.js +18 -0
  138. package/dist/cjs/base/ui/system/typography/text_align.js +18 -0
  139. package/dist/cjs/base/ui/system/typography/text_color.js +21 -0
  140. package/dist/cjs/base/ui/system/typography/text_decoration.js +18 -0
  141. package/dist/cjs/base/ui/system/typography/text_transform.js +18 -0
  142. package/dist/cjs/base/ui/system/typography/typography_set.js +35 -0
  143. package/dist/cjs/base/ui/system/utils/create_responsive_prop_type.js +19 -0
  144. package/dist/cjs/base/ui/system/utils/create_style_prop_types.js +24 -0
  145. package/dist/cjs/base/ui/system/utils/csstype.js +1 -0
  146. package/dist/cjs/base/ui/system/utils/ensure_numbers_are_within_scale.js +40 -0
  147. package/dist/cjs/base/ui/system/utils/enum_prop_type_utils.js +35 -0
  148. package/dist/cjs/base/ui/system/utils/get_style_props_for_responsive_prop.js +113 -0
  149. package/dist/cjs/base/ui/system/utils/types.js +1 -0
  150. package/dist/cjs/base/ui/table_picker.js +95 -0
  151. package/dist/cjs/base/ui/table_picker_synced.js +84 -0
  152. package/dist/cjs/base/ui/text.js +150 -0
  153. package/dist/cjs/base/ui/text_button.js +228 -0
  154. package/dist/cjs/base/ui/theme/default_theme/button_variants.js +59 -0
  155. package/dist/cjs/base/ui/theme/default_theme/control_sizes.js +96 -0
  156. package/dist/cjs/base/ui/theme/default_theme/heading_styles.js +99 -0
  157. package/dist/cjs/base/ui/theme/default_theme/index.js +48 -0
  158. package/dist/cjs/base/ui/theme/default_theme/input_variants.js +38 -0
  159. package/dist/cjs/base/ui/theme/default_theme/link_variants.js +35 -0
  160. package/dist/cjs/base/ui/theme/default_theme/select_buttons_variants.js +72 -0
  161. package/dist/cjs/base/ui/theme/default_theme/select_variants.js +59 -0
  162. package/dist/cjs/base/ui/theme/default_theme/switch_variants.js +91 -0
  163. package/dist/cjs/base/ui/theme/default_theme/text_button_variants.js +44 -0
  164. package/dist/cjs/base/ui/theme/default_theme/text_styles.js +81 -0
  165. package/dist/cjs/base/ui/theme/default_theme/tokens.js +211 -0
  166. package/dist/cjs/base/ui/theme/theme_context.js +13 -0
  167. package/dist/cjs/base/ui/theme/use_theme.js +11 -0
  168. package/dist/cjs/base/ui/tooltip.js +215 -0
  169. package/dist/cjs/base/ui/types/aria_props.js +23 -0
  170. package/dist/cjs/base/ui/types/data_attributes_prop.js +18 -0
  171. package/dist/cjs/base/ui/types/tooltip_anchor_props.js +17 -0
  172. package/dist/cjs/base/ui/ui.js +375 -0
  173. package/dist/cjs/base/ui/unstable_standalone_ui.js +179 -0
  174. package/dist/cjs/base/ui/use_base.js +44 -0
  175. package/dist/cjs/base/ui/use_cursor.js +46 -0
  176. package/dist/cjs/base/ui/use_form_field.js +20 -0
  177. package/dist/cjs/base/ui/use_record_action_data.js +80 -0
  178. package/dist/cjs/base/ui/use_records.js +265 -0
  179. package/dist/cjs/base/ui/use_session.js +42 -0
  180. package/dist/cjs/base/ui/use_settings_button.js +53 -0
  181. package/dist/cjs/base/ui/use_styled_system.js +32 -0
  182. package/dist/cjs/base/ui/use_text_color_for_background_color.js +14 -0
  183. package/dist/cjs/base/ui/use_view_metadata.js +49 -0
  184. package/dist/cjs/base/ui/use_viewport.js +47 -0
  185. package/dist/cjs/base/ui/view_picker.js +133 -0
  186. package/dist/cjs/base/ui/view_picker_synced.js +88 -0
  187. package/dist/cjs/base/ui/viewport_constraint.js +176 -0
  188. package/dist/cjs/base/ui/with_styled_system.js +165 -0
  189. package/dist/cjs/base/undo_redo.js +48 -0
  190. package/dist/cjs/base/unstable_testing_utils.js +170 -0
  191. package/dist/cjs/base/viewport.js +397 -0
  192. package/dist/cjs/injected/airtable_interface.js +22 -0
  193. package/dist/cjs/interface/index.js +36 -0
  194. package/dist/cjs/interface/models/base.js +54 -0
  195. package/dist/cjs/interface/models/field.js +42 -0
  196. package/dist/cjs/interface/models/mutations.js +65 -0
  197. package/dist/cjs/interface/models/record.js +46 -0
  198. package/dist/cjs/interface/models/record_store.js +83 -0
  199. package/dist/cjs/interface/models/session.js +42 -0
  200. package/dist/cjs/interface/models/table.js +47 -0
  201. package/dist/cjs/interface/sdk.js +119 -0
  202. package/dist/cjs/interface/types/airtable_interface.js +36 -0
  203. package/dist/cjs/interface/types/base.js +1 -0
  204. package/dist/cjs/interface/types/mutations.js +24 -0
  205. package/dist/cjs/interface/types/record.js +1 -0
  206. package/dist/cjs/interface/types/table.js +1 -0
  207. package/dist/cjs/interface/ui/block_wrapper.js +61 -0
  208. package/dist/cjs/interface/ui/expand_record.js +26 -0
  209. package/dist/cjs/interface/ui/initialize_block.js +98 -0
  210. package/dist/cjs/interface/ui/ui.js +105 -0
  211. package/dist/cjs/interface/ui/use_base.js +43 -0
  212. package/dist/cjs/interface/ui/use_custom_properties.js +158 -0
  213. package/dist/cjs/interface/ui/use_records.js +55 -0
  214. package/dist/cjs/interface/ui/use_run_info.js +42 -0
  215. package/dist/cjs/interface/ui/use_session.js +40 -0
  216. package/dist/cjs/sdk_mode.js +1 -0
  217. package/dist/cjs/shared/color_utils.js +65 -0
  218. package/dist/cjs/shared/colors.js +184 -0
  219. package/dist/cjs/shared/error_utils.js +96 -0
  220. package/dist/cjs/shared/event_tracker.js +28 -0
  221. package/dist/cjs/shared/global_config.js +506 -0
  222. package/dist/cjs/shared/models/abstract_model.js +119 -0
  223. package/dist/cjs/shared/models/base_core.js +579 -0
  224. package/dist/cjs/shared/models/field_core.js +329 -0
  225. package/dist/cjs/shared/models/mutations_core.js +171 -0
  226. package/dist/cjs/shared/models/record_core.js +272 -0
  227. package/dist/cjs/shared/models/record_store_core.js +213 -0
  228. package/dist/cjs/shared/models/session_core.js +214 -0
  229. package/dist/cjs/shared/models/table_core.js +460 -0
  230. package/dist/cjs/shared/private_utils.js +455 -0
  231. package/dist/cjs/shared/sdk_core.js +115 -0
  232. package/dist/cjs/shared/types/airtable_interface_core.js +1 -0
  233. package/dist/cjs/shared/types/attachment.js +1 -0
  234. package/dist/cjs/shared/types/base_core.js +1 -0
  235. package/dist/cjs/shared/types/collaborator.js +1 -0
  236. package/dist/cjs/shared/types/field.js +119 -0
  237. package/dist/cjs/shared/types/global_config.js +1 -0
  238. package/dist/cjs/shared/types/hyper_ids.js +1 -0
  239. package/dist/cjs/shared/types/mutation_constants.js +11 -0
  240. package/dist/cjs/shared/types/mutations_core.js +34 -0
  241. package/dist/cjs/shared/types/permission_levels.js +17 -0
  242. package/dist/cjs/shared/types/record.js +1 -0
  243. package/dist/cjs/shared/types/stat.js +1 -0
  244. package/dist/cjs/shared/types/table_core.js +1 -0
  245. package/dist/cjs/shared/ui/global_config_synced_component_helpers.js +27 -0
  246. package/dist/cjs/shared/ui/loader.js +68 -0
  247. package/dist/cjs/shared/ui/remote_utils.js +92 -0
  248. package/dist/cjs/shared/ui/sdk_context.js +21 -0
  249. package/dist/cjs/shared/ui/use_array_identity.js +32 -0
  250. package/dist/cjs/shared/ui/use_base.js +21 -0
  251. package/dist/cjs/shared/ui/use_global_config.js +47 -0
  252. package/dist/cjs/shared/ui/use_loadable.js +240 -0
  253. package/dist/cjs/shared/ui/use_session.js +20 -0
  254. package/dist/cjs/shared/ui/use_synced.js +45 -0
  255. package/dist/cjs/shared/ui/use_watchable.js +169 -0
  256. package/dist/cjs/shared/ui/with_hooks.js +151 -0
  257. package/dist/cjs/shared/unstable_private_utils.js +51 -0
  258. package/dist/cjs/shared/warning.js +26 -0
  259. package/dist/cjs/shared/watchable.js +216 -0
  260. package/dist/cjs/stats/block_stats.js +96 -0
  261. package/dist/cjs/testing/abstract_mock_airtable_interface.js +277 -0
  262. package/dist/types/src/base/index.d.ts +13 -0
  263. package/dist/types/src/base/index.d.ts.map +1 -0
  264. package/dist/types/src/base/models/abstract_model_with_async_data.d.ts +47 -0
  265. package/dist/types/src/base/models/abstract_model_with_async_data.d.ts.map +1 -0
  266. package/dist/types/src/base/models/base.d.ts +142 -0
  267. package/dist/types/src/base/models/base.d.ts.map +1 -0
  268. package/dist/types/src/base/models/create_aggregators.d.ts +59 -0
  269. package/dist/types/src/base/models/create_aggregators.d.ts.map +1 -0
  270. package/dist/types/src/base/models/cursor.d.ts +143 -0
  271. package/dist/types/src/base/models/cursor.d.ts.map +1 -0
  272. package/dist/types/src/base/models/field.d.ts +249 -0
  273. package/dist/types/src/base/models/field.d.ts.map +1 -0
  274. package/dist/types/src/base/models/grouped_record_query_result.d.ts +60 -0
  275. package/dist/types/src/base/models/grouped_record_query_result.d.ts.map +1 -0
  276. package/dist/types/src/base/models/linked_records_query_result.d.ts +55 -0
  277. package/dist/types/src/base/models/linked_records_query_result.d.ts.map +1 -0
  278. package/dist/types/src/base/models/models.d.ts +20 -0
  279. package/dist/types/src/base/models/models.d.ts.map +1 -0
  280. package/dist/types/src/base/models/mutations.d.ts +7 -0
  281. package/dist/types/src/base/models/mutations.d.ts.map +1 -0
  282. package/dist/types/src/base/models/object_pool.d.ts +17 -0
  283. package/dist/types/src/base/models/object_pool.d.ts.map +1 -0
  284. package/dist/types/src/base/models/record.d.ts +144 -0
  285. package/dist/types/src/base/models/record.d.ts.map +1 -0
  286. package/dist/types/src/base/models/record_coloring.d.ts +97 -0
  287. package/dist/types/src/base/models/record_coloring.d.ts.map +1 -0
  288. package/dist/types/src/base/models/record_query_result.d.ts +341 -0
  289. package/dist/types/src/base/models/record_query_result.d.ts.map +1 -0
  290. package/dist/types/src/base/models/record_store.d.ts +6 -0
  291. package/dist/types/src/base/models/record_store.d.ts.map +1 -0
  292. package/dist/types/src/base/models/session.d.ts +124 -0
  293. package/dist/types/src/base/models/session.d.ts.map +1 -0
  294. package/dist/types/src/base/models/table.d.ts +1146 -0
  295. package/dist/types/src/base/models/table.d.ts.map +1 -0
  296. package/dist/types/src/base/models/table_or_view_query_result.d.ts +61 -0
  297. package/dist/types/src/base/models/table_or_view_query_result.d.ts.map +1 -0
  298. package/dist/types/src/base/models/view.d.ts +203 -0
  299. package/dist/types/src/base/models/view.d.ts.map +1 -0
  300. package/dist/types/src/base/models/view_data_store.d.ts +10 -0
  301. package/dist/types/src/base/models/view_data_store.d.ts.map +1 -0
  302. package/dist/types/src/base/models/view_metadata_query_result.d.ts +79 -0
  303. package/dist/types/src/base/models/view_metadata_query_result.d.ts.map +1 -0
  304. package/dist/types/src/base/perform_record_action.d.ts +72 -0
  305. package/dist/types/src/base/perform_record_action.d.ts.map +1 -0
  306. package/dist/types/src/base/sdk.d.ts +35 -0
  307. package/dist/types/src/base/sdk.d.ts.map +1 -0
  308. package/dist/types/src/base/settings_button.d.ts +66 -0
  309. package/dist/types/src/base/settings_button.d.ts.map +1 -0
  310. package/dist/types/src/base/types/aggregators.d.ts +4 -0
  311. package/dist/types/src/base/types/aggregators.d.ts.map +1 -0
  312. package/dist/types/src/base/types/airtable_interface.d.ts +160 -0
  313. package/dist/types/src/base/types/airtable_interface.d.ts.map +1 -0
  314. package/dist/types/src/base/types/backend_fetch_types.d.ts +17 -0
  315. package/dist/types/src/base/types/backend_fetch_types.d.ts.map +1 -0
  316. package/dist/types/src/base/types/base.d.ts +11 -0
  317. package/dist/types/src/base/types/base.d.ts.map +1 -0
  318. package/dist/types/src/base/types/cursor.d.ts +8 -0
  319. package/dist/types/src/base/types/cursor.d.ts.map +1 -0
  320. package/dist/types/src/base/types/mutations.d.ts +270 -0
  321. package/dist/types/src/base/types/mutations.d.ts.map +1 -0
  322. package/dist/types/src/base/types/record.d.ts +7 -0
  323. package/dist/types/src/base/types/record.d.ts.map +1 -0
  324. package/dist/types/src/base/types/record_action_data.d.ts +22 -0
  325. package/dist/types/src/base/types/record_action_data.d.ts.map +1 -0
  326. package/dist/types/src/base/types/table.d.ts +13 -0
  327. package/dist/types/src/base/types/table.d.ts.map +1 -0
  328. package/dist/types/src/base/types/undo_redo.d.ts +8 -0
  329. package/dist/types/src/base/types/undo_redo.d.ts.map +1 -0
  330. package/dist/types/src/base/types/view.d.ts +70 -0
  331. package/dist/types/src/base/types/view.d.ts.map +1 -0
  332. package/dist/types/src/base/types/viewport.d.ts +9 -0
  333. package/dist/types/src/base/types/viewport.d.ts.map +1 -0
  334. package/dist/types/src/base/ui/base_provider.d.ts +37 -0
  335. package/dist/types/src/base/ui/base_provider.d.ts.map +1 -0
  336. package/dist/types/src/base/ui/baymax_utils.d.ts +2 -0
  337. package/dist/types/src/base/ui/baymax_utils.d.ts.map +1 -0
  338. package/dist/types/src/base/ui/block_wrapper.d.ts +24 -0
  339. package/dist/types/src/base/ui/block_wrapper.d.ts.map +1 -0
  340. package/dist/types/src/base/ui/box.d.ts +35 -0
  341. package/dist/types/src/base/ui/box.d.ts.map +1 -0
  342. package/dist/types/src/base/ui/button.d.ts +91 -0
  343. package/dist/types/src/base/ui/button.d.ts.map +1 -0
  344. package/dist/types/src/base/ui/cell_renderer.d.ts +92 -0
  345. package/dist/types/src/base/ui/cell_renderer.d.ts.map +1 -0
  346. package/dist/types/src/base/ui/choice_token.d.ts +69 -0
  347. package/dist/types/src/base/ui/choice_token.d.ts.map +1 -0
  348. package/dist/types/src/base/ui/collaborator_token.d.ts +65 -0
  349. package/dist/types/src/base/ui/collaborator_token.d.ts.map +1 -0
  350. package/dist/types/src/base/ui/color_palette.d.ts +108 -0
  351. package/dist/types/src/base/ui/color_palette.d.ts.map +1 -0
  352. package/dist/types/src/base/ui/color_palette_synced.d.ts +44 -0
  353. package/dist/types/src/base/ui/color_palette_synced.d.ts.map +1 -0
  354. package/dist/types/src/base/ui/confirmation_dialog.d.ts +83 -0
  355. package/dist/types/src/base/ui/confirmation_dialog.d.ts.map +1 -0
  356. package/dist/types/src/base/ui/control_sizes.d.ts +17 -0
  357. package/dist/types/src/base/ui/control_sizes.d.ts.map +1 -0
  358. package/dist/types/src/base/ui/css_helpers.d.ts +6 -0
  359. package/dist/types/src/base/ui/css_helpers.d.ts.map +1 -0
  360. package/dist/types/src/base/ui/dialog.d.ts +80 -0
  361. package/dist/types/src/base/ui/dialog.d.ts.map +1 -0
  362. package/dist/types/src/base/ui/dialog_close_button.d.ts +62 -0
  363. package/dist/types/src/base/ui/dialog_close_button.d.ts.map +1 -0
  364. package/dist/types/src/base/ui/expand_record.d.ts +27 -0
  365. package/dist/types/src/base/ui/expand_record.d.ts.map +1 -0
  366. package/dist/types/src/base/ui/expand_record_list.d.ts +29 -0
  367. package/dist/types/src/base/ui/expand_record_list.d.ts.map +1 -0
  368. package/dist/types/src/base/ui/expand_record_picker_async.d.ts +45 -0
  369. package/dist/types/src/base/ui/expand_record_picker_async.d.ts.map +1 -0
  370. package/dist/types/src/base/ui/field_icon.d.ts +41 -0
  371. package/dist/types/src/base/ui/field_icon.d.ts.map +1 -0
  372. package/dist/types/src/base/ui/field_picker.d.ts +57 -0
  373. package/dist/types/src/base/ui/field_picker.d.ts.map +1 -0
  374. package/dist/types/src/base/ui/field_picker_synced.d.ts +18 -0
  375. package/dist/types/src/base/ui/field_picker_synced.d.ts.map +1 -0
  376. package/dist/types/src/base/ui/form_field.d.ts +46 -0
  377. package/dist/types/src/base/ui/form_field.d.ts.map +1 -0
  378. package/dist/types/src/base/ui/geometry/geometry.d.ts +3 -0
  379. package/dist/types/src/base/ui/geometry/geometry.d.ts.map +1 -0
  380. package/dist/types/src/base/ui/geometry/point.d.ts +2 -0
  381. package/dist/types/src/base/ui/geometry/point.d.ts.map +1 -0
  382. package/dist/types/src/base/ui/geometry/rect.d.ts +2 -0
  383. package/dist/types/src/base/ui/geometry/rect.d.ts.map +1 -0
  384. package/dist/types/src/base/ui/geometry/size.d.ts +2 -0
  385. package/dist/types/src/base/ui/geometry/size.d.ts.map +1 -0
  386. package/dist/types/src/base/ui/global_alert.d.ts +23 -0
  387. package/dist/types/src/base/ui/global_alert.d.ts.map +1 -0
  388. package/dist/types/src/base/ui/heading.d.ts +64 -0
  389. package/dist/types/src/base/ui/heading.d.ts.map +1 -0
  390. package/dist/types/src/base/ui/icon.d.ts +61 -0
  391. package/dist/types/src/base/ui/icon.d.ts.map +1 -0
  392. package/dist/types/src/base/ui/icon_config.d.ts +425 -0
  393. package/dist/types/src/base/ui/icon_config.d.ts.map +1 -0
  394. package/dist/types/src/base/ui/initialize_block.d.ts +44 -0
  395. package/dist/types/src/base/ui/initialize_block.d.ts.map +1 -0
  396. package/dist/types/src/base/ui/input.d.ts +154 -0
  397. package/dist/types/src/base/ui/input.d.ts.map +1 -0
  398. package/dist/types/src/base/ui/input_synced.d.ts +18 -0
  399. package/dist/types/src/base/ui/input_synced.d.ts.map +1 -0
  400. package/dist/types/src/base/ui/key_codes.d.ts +2 -0
  401. package/dist/types/src/base/ui/key_codes.d.ts.map +1 -0
  402. package/dist/types/src/base/ui/label.d.ts +35 -0
  403. package/dist/types/src/base/ui/label.d.ts.map +1 -0
  404. package/dist/types/src/base/ui/link.d.ts +88 -0
  405. package/dist/types/src/base/ui/link.d.ts.map +1 -0
  406. package/dist/types/src/base/ui/loader.d.ts +55 -0
  407. package/dist/types/src/base/ui/loader.d.ts.map +1 -0
  408. package/dist/types/src/base/ui/modal.d.ts +67 -0
  409. package/dist/types/src/base/ui/modal.d.ts.map +1 -0
  410. package/dist/types/src/base/ui/model_picker_select.d.ts +19 -0
  411. package/dist/types/src/base/ui/model_picker_select.d.ts.map +1 -0
  412. package/dist/types/src/base/ui/popover.d.ts +122 -0
  413. package/dist/types/src/base/ui/popover.d.ts.map +1 -0
  414. package/dist/types/src/base/ui/progress_bar.d.ts +83 -0
  415. package/dist/types/src/base/ui/progress_bar.d.ts.map +1 -0
  416. package/dist/types/src/base/ui/record_card.d.ts +102 -0
  417. package/dist/types/src/base/ui/record_card.d.ts.map +1 -0
  418. package/dist/types/src/base/ui/record_card_list.d.ts +105 -0
  419. package/dist/types/src/base/ui/record_card_list.d.ts.map +1 -0
  420. package/dist/types/src/base/ui/select.d.ts +126 -0
  421. package/dist/types/src/base/ui/select.d.ts.map +1 -0
  422. package/dist/types/src/base/ui/select_and_select_buttons_helpers.d.ts +27 -0
  423. package/dist/types/src/base/ui/select_and_select_buttons_helpers.d.ts.map +1 -0
  424. package/dist/types/src/base/ui/select_buttons.d.ts +78 -0
  425. package/dist/types/src/base/ui/select_buttons.d.ts.map +1 -0
  426. package/dist/types/src/base/ui/select_buttons_synced.d.ts +18 -0
  427. package/dist/types/src/base/ui/select_buttons_synced.d.ts.map +1 -0
  428. package/dist/types/src/base/ui/select_synced.d.ts +18 -0
  429. package/dist/types/src/base/ui/select_synced.d.ts.map +1 -0
  430. package/dist/types/src/base/ui/switch.d.ts +104 -0
  431. package/dist/types/src/base/ui/switch.d.ts.map +1 -0
  432. package/dist/types/src/base/ui/switch_synced.d.ts +18 -0
  433. package/dist/types/src/base/ui/switch_synced.d.ts.map +1 -0
  434. package/dist/types/src/base/ui/synced.d.ts +29 -0
  435. package/dist/types/src/base/ui/synced.d.ts.map +1 -0
  436. package/dist/types/src/base/ui/system/all_styles_set.d.ts +88 -0
  437. package/dist/types/src/base/ui/system/all_styles_set.d.ts.map +1 -0
  438. package/dist/types/src/base/ui/system/appearance/appearance_set.d.ts +15 -0
  439. package/dist/types/src/base/ui/system/appearance/appearance_set.d.ts.map +1 -0
  440. package/dist/types/src/base/ui/system/appearance/background_color.d.ts +13 -0
  441. package/dist/types/src/base/ui/system/appearance/background_color.d.ts.map +1 -0
  442. package/dist/types/src/base/ui/system/appearance/border.d.ts +31 -0
  443. package/dist/types/src/base/ui/system/appearance/border.d.ts.map +1 -0
  444. package/dist/types/src/base/ui/system/appearance/border_radius.d.ts +13 -0
  445. package/dist/types/src/base/ui/system/appearance/border_radius.d.ts.map +1 -0
  446. package/dist/types/src/base/ui/system/appearance/box_shadow.d.ts +13 -0
  447. package/dist/types/src/base/ui/system/appearance/box_shadow.d.ts.map +1 -0
  448. package/dist/types/src/base/ui/system/appearance/opacity.d.ts +13 -0
  449. package/dist/types/src/base/ui/system/appearance/opacity.d.ts.map +1 -0
  450. package/dist/types/src/base/ui/system/dimensions/dimensions_set.d.ts +16 -0
  451. package/dist/types/src/base/ui/system/dimensions/dimensions_set.d.ts.map +1 -0
  452. package/dist/types/src/base/ui/system/dimensions/height.d.ts +13 -0
  453. package/dist/types/src/base/ui/system/dimensions/height.d.ts.map +1 -0
  454. package/dist/types/src/base/ui/system/dimensions/max_height.d.ts +13 -0
  455. package/dist/types/src/base/ui/system/dimensions/max_height.d.ts.map +1 -0
  456. package/dist/types/src/base/ui/system/dimensions/max_width.d.ts +13 -0
  457. package/dist/types/src/base/ui/system/dimensions/max_width.d.ts.map +1 -0
  458. package/dist/types/src/base/ui/system/dimensions/min_height.d.ts +13 -0
  459. package/dist/types/src/base/ui/system/dimensions/min_height.d.ts.map +1 -0
  460. package/dist/types/src/base/ui/system/dimensions/min_width.d.ts +13 -0
  461. package/dist/types/src/base/ui/system/dimensions/min_width.d.ts.map +1 -0
  462. package/dist/types/src/base/ui/system/dimensions/width.d.ts +13 -0
  463. package/dist/types/src/base/ui/system/dimensions/width.d.ts.map +1 -0
  464. package/dist/types/src/base/ui/system/display.d.ts +14 -0
  465. package/dist/types/src/base/ui/system/display.d.ts.map +1 -0
  466. package/dist/types/src/base/ui/system/flex_container/align_content.d.ts +13 -0
  467. package/dist/types/src/base/ui/system/flex_container/align_content.d.ts.map +1 -0
  468. package/dist/types/src/base/ui/system/flex_container/align_items.d.ts +13 -0
  469. package/dist/types/src/base/ui/system/flex_container/align_items.d.ts.map +1 -0
  470. package/dist/types/src/base/ui/system/flex_container/flex_container_set.d.ts +16 -0
  471. package/dist/types/src/base/ui/system/flex_container/flex_container_set.d.ts.map +1 -0
  472. package/dist/types/src/base/ui/system/flex_container/flex_direction.d.ts +13 -0
  473. package/dist/types/src/base/ui/system/flex_container/flex_direction.d.ts.map +1 -0
  474. package/dist/types/src/base/ui/system/flex_container/flex_wrap.d.ts +13 -0
  475. package/dist/types/src/base/ui/system/flex_container/flex_wrap.d.ts.map +1 -0
  476. package/dist/types/src/base/ui/system/flex_container/justify_content.d.ts +13 -0
  477. package/dist/types/src/base/ui/system/flex_container/justify_content.d.ts.map +1 -0
  478. package/dist/types/src/base/ui/system/flex_container/justify_items.d.ts +13 -0
  479. package/dist/types/src/base/ui/system/flex_container/justify_items.d.ts.map +1 -0
  480. package/dist/types/src/base/ui/system/flex_item/align_self.d.ts +13 -0
  481. package/dist/types/src/base/ui/system/flex_item/align_self.d.ts.map +1 -0
  482. package/dist/types/src/base/ui/system/flex_item/flex.d.ts +13 -0
  483. package/dist/types/src/base/ui/system/flex_item/flex.d.ts.map +1 -0
  484. package/dist/types/src/base/ui/system/flex_item/flex_basis.d.ts +13 -0
  485. package/dist/types/src/base/ui/system/flex_item/flex_basis.d.ts.map +1 -0
  486. package/dist/types/src/base/ui/system/flex_item/flex_grow.d.ts +13 -0
  487. package/dist/types/src/base/ui/system/flex_item/flex_grow.d.ts.map +1 -0
  488. package/dist/types/src/base/ui/system/flex_item/flex_item_set.d.ts +17 -0
  489. package/dist/types/src/base/ui/system/flex_item/flex_item_set.d.ts.map +1 -0
  490. package/dist/types/src/base/ui/system/flex_item/flex_shrink.d.ts +13 -0
  491. package/dist/types/src/base/ui/system/flex_item/flex_shrink.d.ts.map +1 -0
  492. package/dist/types/src/base/ui/system/flex_item/justify_self.d.ts +13 -0
  493. package/dist/types/src/base/ui/system/flex_item/justify_self.d.ts.map +1 -0
  494. package/dist/types/src/base/ui/system/flex_item/order.d.ts +13 -0
  495. package/dist/types/src/base/ui/system/flex_item/order.d.ts.map +1 -0
  496. package/dist/types/src/base/ui/system/index.d.ts +54 -0
  497. package/dist/types/src/base/ui/system/index.d.ts.map +1 -0
  498. package/dist/types/src/base/ui/system/overflow.d.ts +18 -0
  499. package/dist/types/src/base/ui/system/overflow.d.ts.map +1 -0
  500. package/dist/types/src/base/ui/system/position/bottom.d.ts +13 -0
  501. package/dist/types/src/base/ui/system/position/bottom.d.ts.map +1 -0
  502. package/dist/types/src/base/ui/system/position/left.d.ts +13 -0
  503. package/dist/types/src/base/ui/system/position/left.d.ts.map +1 -0
  504. package/dist/types/src/base/ui/system/position/position.d.ts +13 -0
  505. package/dist/types/src/base/ui/system/position/position.d.ts.map +1 -0
  506. package/dist/types/src/base/ui/system/position/position_set.d.ts +16 -0
  507. package/dist/types/src/base/ui/system/position/position_set.d.ts.map +1 -0
  508. package/dist/types/src/base/ui/system/position/right.d.ts +13 -0
  509. package/dist/types/src/base/ui/system/position/right.d.ts.map +1 -0
  510. package/dist/types/src/base/ui/system/position/top.d.ts +13 -0
  511. package/dist/types/src/base/ui/system/position/top.d.ts.map +1 -0
  512. package/dist/types/src/base/ui/system/position/z_index.d.ts +13 -0
  513. package/dist/types/src/base/ui/system/position/z_index.d.ts.map +1 -0
  514. package/dist/types/src/base/ui/system/spacing/margin.d.ts +25 -0
  515. package/dist/types/src/base/ui/system/spacing/margin.d.ts.map +1 -0
  516. package/dist/types/src/base/ui/system/spacing/padding.d.ts +25 -0
  517. package/dist/types/src/base/ui/system/spacing/padding.d.ts.map +1 -0
  518. package/dist/types/src/base/ui/system/spacing/spacing_set.d.ts +12 -0
  519. package/dist/types/src/base/ui/system/spacing/spacing_set.d.ts.map +1 -0
  520. package/dist/types/src/base/ui/system/typography/font_family.d.ts +13 -0
  521. package/dist/types/src/base/ui/system/typography/font_family.d.ts.map +1 -0
  522. package/dist/types/src/base/ui/system/typography/font_size.d.ts +13 -0
  523. package/dist/types/src/base/ui/system/typography/font_size.d.ts.map +1 -0
  524. package/dist/types/src/base/ui/system/typography/font_style.d.ts +13 -0
  525. package/dist/types/src/base/ui/system/typography/font_style.d.ts.map +1 -0
  526. package/dist/types/src/base/ui/system/typography/font_weight.d.ts +13 -0
  527. package/dist/types/src/base/ui/system/typography/font_weight.d.ts.map +1 -0
  528. package/dist/types/src/base/ui/system/typography/letter_spacing.d.ts +13 -0
  529. package/dist/types/src/base/ui/system/typography/letter_spacing.d.ts.map +1 -0
  530. package/dist/types/src/base/ui/system/typography/line_height.d.ts +13 -0
  531. package/dist/types/src/base/ui/system/typography/line_height.d.ts.map +1 -0
  532. package/dist/types/src/base/ui/system/typography/text_align.d.ts +13 -0
  533. package/dist/types/src/base/ui/system/typography/text_align.d.ts.map +1 -0
  534. package/dist/types/src/base/ui/system/typography/text_color.d.ts +17 -0
  535. package/dist/types/src/base/ui/system/typography/text_color.d.ts.map +1 -0
  536. package/dist/types/src/base/ui/system/typography/text_decoration.d.ts +15 -0
  537. package/dist/types/src/base/ui/system/typography/text_decoration.d.ts.map +1 -0
  538. package/dist/types/src/base/ui/system/typography/text_transform.d.ts +13 -0
  539. package/dist/types/src/base/ui/system/typography/text_transform.d.ts.map +1 -0
  540. package/dist/types/src/base/ui/system/typography/typography_set.d.ts +20 -0
  541. package/dist/types/src/base/ui/system/typography/typography_set.d.ts.map +1 -0
  542. package/dist/types/src/base/ui/system/utils/create_responsive_prop_type.d.ts +2 -0
  543. package/dist/types/src/base/ui/system/utils/create_responsive_prop_type.d.ts.map +1 -0
  544. package/dist/types/src/base/ui/system/utils/create_style_prop_types.d.ts +4 -0
  545. package/dist/types/src/base/ui/system/utils/create_style_prop_types.d.ts.map +1 -0
  546. package/dist/types/src/base/ui/system/utils/csstype.d.ts +3977 -0
  547. package/dist/types/src/base/ui/system/utils/csstype.d.ts.map +1 -0
  548. package/dist/types/src/base/ui/system/utils/ensure_numbers_are_within_scale.d.ts +2 -0
  549. package/dist/types/src/base/ui/system/utils/ensure_numbers_are_within_scale.d.ts.map +1 -0
  550. package/dist/types/src/base/ui/system/utils/enum_prop_type_utils.d.ts +21 -0
  551. package/dist/types/src/base/ui/system/utils/enum_prop_type_utils.d.ts.map +1 -0
  552. package/dist/types/src/base/ui/system/utils/get_style_props_for_responsive_prop.d.ts +2 -0
  553. package/dist/types/src/base/ui/system/utils/get_style_props_for_responsive_prop.d.ts.map +1 -0
  554. package/dist/types/src/base/ui/system/utils/types.d.ts +31 -0
  555. package/dist/types/src/base/ui/system/utils/types.d.ts.map +1 -0
  556. package/dist/types/src/base/ui/table_picker.d.ts +49 -0
  557. package/dist/types/src/base/ui/table_picker.d.ts.map +1 -0
  558. package/dist/types/src/base/ui/table_picker_synced.d.ts +18 -0
  559. package/dist/types/src/base/ui/table_picker_synced.d.ts.map +1 -0
  560. package/dist/types/src/base/ui/text.d.ts +69 -0
  561. package/dist/types/src/base/ui/text.d.ts.map +1 -0
  562. package/dist/types/src/base/ui/text_button.d.ts +87 -0
  563. package/dist/types/src/base/ui/text_button.d.ts.map +1 -0
  564. package/dist/types/src/base/ui/theme/default_theme/button_variants.d.ts +8 -0
  565. package/dist/types/src/base/ui/theme/default_theme/button_variants.d.ts.map +1 -0
  566. package/dist/types/src/base/ui/theme/default_theme/control_sizes.d.ts +107 -0
  567. package/dist/types/src/base/ui/theme/default_theme/control_sizes.d.ts.map +1 -0
  568. package/dist/types/src/base/ui/theme/default_theme/heading_styles.d.ts +11 -0
  569. package/dist/types/src/base/ui/theme/default_theme/heading_styles.d.ts.map +1 -0
  570. package/dist/types/src/base/ui/theme/default_theme/index.d.ts +342 -0
  571. package/dist/types/src/base/ui/theme/default_theme/index.d.ts.map +1 -0
  572. package/dist/types/src/base/ui/theme/default_theme/input_variants.d.ts +5 -0
  573. package/dist/types/src/base/ui/theme/default_theme/input_variants.d.ts.map +1 -0
  574. package/dist/types/src/base/ui/theme/default_theme/link_variants.d.ts +7 -0
  575. package/dist/types/src/base/ui/theme/default_theme/link_variants.d.ts.map +1 -0
  576. package/dist/types/src/base/ui/theme/default_theme/select_buttons_variants.d.ts +8 -0
  577. package/dist/types/src/base/ui/theme/default_theme/select_buttons_variants.d.ts.map +1 -0
  578. package/dist/types/src/base/ui/theme/default_theme/select_variants.d.ts +5 -0
  579. package/dist/types/src/base/ui/theme/default_theme/select_variants.d.ts.map +1 -0
  580. package/dist/types/src/base/ui/theme/default_theme/switch_variants.d.ts +16 -0
  581. package/dist/types/src/base/ui/theme/default_theme/switch_variants.d.ts.map +1 -0
  582. package/dist/types/src/base/ui/theme/default_theme/text_button_variants.d.ts +7 -0
  583. package/dist/types/src/base/ui/theme/default_theme/text_button_variants.d.ts.map +1 -0
  584. package/dist/types/src/base/ui/theme/default_theme/text_styles.d.ts +76 -0
  585. package/dist/types/src/base/ui/theme/default_theme/text_styles.d.ts.map +1 -0
  586. package/dist/types/src/base/ui/theme/default_theme/tokens.d.ts +111 -0
  587. package/dist/types/src/base/ui/theme/default_theme/tokens.d.ts.map +1 -0
  588. package/dist/types/src/base/ui/theme/theme_context.d.ts +342 -0
  589. package/dist/types/src/base/ui/theme/theme_context.d.ts.map +1 -0
  590. package/dist/types/src/base/ui/theme/use_theme.d.ts +342 -0
  591. package/dist/types/src/base/ui/theme/use_theme.d.ts.map +1 -0
  592. package/dist/types/src/base/ui/tooltip.d.ts +80 -0
  593. package/dist/types/src/base/ui/tooltip.d.ts.map +1 -0
  594. package/dist/types/src/base/ui/types/aria_props.d.ts +22 -0
  595. package/dist/types/src/base/ui/types/aria_props.d.ts.map +1 -0
  596. package/dist/types/src/base/ui/types/data_attributes_prop.d.ts +14 -0
  597. package/dist/types/src/base/ui/types/data_attributes_prop.d.ts.map +1 -0
  598. package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts +19 -0
  599. package/dist/types/src/base/ui/types/tooltip_anchor_props.d.ts.map +1 -0
  600. package/dist/types/src/base/ui/ui.d.ts +46 -0
  601. package/dist/types/src/base/ui/ui.d.ts.map +1 -0
  602. package/dist/types/src/base/ui/unstable_standalone_ui.d.ts +24 -0
  603. package/dist/types/src/base/ui/unstable_standalone_ui.d.ts.map +1 -0
  604. package/dist/types/src/base/ui/use_base.d.ts +33 -0
  605. package/dist/types/src/base/ui/use_base.d.ts.map +1 -0
  606. package/dist/types/src/base/ui/use_cursor.d.ts +33 -0
  607. package/dist/types/src/base/ui/use_cursor.d.ts.map +1 -0
  608. package/dist/types/src/base/ui/use_form_field.d.ts +2 -0
  609. package/dist/types/src/base/ui/use_form_field.d.ts.map +1 -0
  610. package/dist/types/src/base/ui/use_record_action_data.d.ts +54 -0
  611. package/dist/types/src/base/ui/use_record_action_data.d.ts.map +1 -0
  612. package/dist/types/src/base/ui/use_records.d.ts +37 -0
  613. package/dist/types/src/base/ui/use_records.d.ts.map +1 -0
  614. package/dist/types/src/base/ui/use_session.d.ts +31 -0
  615. package/dist/types/src/base/ui/use_session.d.ts.map +1 -0
  616. package/dist/types/src/base/ui/use_settings_button.d.ts +30 -0
  617. package/dist/types/src/base/ui/use_settings_button.d.ts.map +1 -0
  618. package/dist/types/src/base/ui/use_styled_system.d.ts +2 -0
  619. package/dist/types/src/base/ui/use_styled_system.d.ts.map +1 -0
  620. package/dist/types/src/base/ui/use_text_color_for_background_color.d.ts +2 -0
  621. package/dist/types/src/base/ui/use_text_color_for_background_color.d.ts.map +1 -0
  622. package/dist/types/src/base/ui/use_view_metadata.d.ts +11 -0
  623. package/dist/types/src/base/ui/use_view_metadata.d.ts.map +1 -0
  624. package/dist/types/src/base/ui/use_viewport.d.ts +35 -0
  625. package/dist/types/src/base/ui/use_viewport.d.ts.map +1 -0
  626. package/dist/types/src/base/ui/view_picker.d.ts +57 -0
  627. package/dist/types/src/base/ui/view_picker.d.ts.map +1 -0
  628. package/dist/types/src/base/ui/view_picker_synced.d.ts +18 -0
  629. package/dist/types/src/base/ui/view_picker_synced.d.ts.map +1 -0
  630. package/dist/types/src/base/ui/viewport_constraint.d.ts +70 -0
  631. package/dist/types/src/base/ui/viewport_constraint.d.ts.map +1 -0
  632. package/dist/types/src/base/ui/with_styled_system.d.ts +2 -0
  633. package/dist/types/src/base/ui/with_styled_system.d.ts.map +1 -0
  634. package/dist/types/src/base/undo_redo.d.ts +18 -0
  635. package/dist/types/src/base/undo_redo.d.ts.map +1 -0
  636. package/dist/types/src/base/unstable_testing_utils.d.ts +15 -0
  637. package/dist/types/src/base/unstable_testing_utils.d.ts.map +1 -0
  638. package/dist/types/src/base/viewport.d.ts +136 -0
  639. package/dist/types/src/base/viewport.d.ts.map +1 -0
  640. package/dist/types/src/injected/airtable_interface.d.ts +4 -0
  641. package/dist/types/src/injected/airtable_interface.d.ts.map +1 -0
  642. package/dist/types/src/interface/index.d.ts +7 -0
  643. package/dist/types/src/interface/index.d.ts.map +1 -0
  644. package/dist/types/src/interface/models/base.d.ts +13 -0
  645. package/dist/types/src/interface/models/base.d.ts.map +1 -0
  646. package/dist/types/src/interface/models/field.d.ts +21 -0
  647. package/dist/types/src/interface/models/field.d.ts.map +1 -0
  648. package/dist/types/src/interface/models/mutations.d.ts +6 -0
  649. package/dist/types/src/interface/models/mutations.d.ts.map +1 -0
  650. package/dist/types/src/interface/models/record.d.ts +24 -0
  651. package/dist/types/src/interface/models/record.d.ts.map +1 -0
  652. package/dist/types/src/interface/models/record_store.d.ts +2 -0
  653. package/dist/types/src/interface/models/record_store.d.ts.map +1 -0
  654. package/dist/types/src/interface/models/session.d.ts +24 -0
  655. package/dist/types/src/interface/models/session.d.ts.map +1 -0
  656. package/dist/types/src/interface/models/table.d.ts +22 -0
  657. package/dist/types/src/interface/models/table.d.ts.map +1 -0
  658. package/dist/types/src/interface/sdk.d.ts +10 -0
  659. package/dist/types/src/interface/sdk.d.ts.map +1 -0
  660. package/dist/types/src/interface/types/airtable_interface.d.ts +66 -0
  661. package/dist/types/src/interface/types/airtable_interface.d.ts.map +1 -0
  662. package/dist/types/src/interface/types/base.d.ts +6 -0
  663. package/dist/types/src/interface/types/base.d.ts.map +1 -0
  664. package/dist/types/src/interface/types/mutations.d.ts +13 -0
  665. package/dist/types/src/interface/types/mutations.d.ts.map +1 -0
  666. package/dist/types/src/interface/types/record.d.ts +5 -0
  667. package/dist/types/src/interface/types/record.d.ts.map +1 -0
  668. package/dist/types/src/interface/types/table.d.ts +10 -0
  669. package/dist/types/src/interface/types/table.d.ts.map +1 -0
  670. package/dist/types/src/interface/ui/block_wrapper.d.ts +13 -0
  671. package/dist/types/src/interface/ui/block_wrapper.d.ts.map +1 -0
  672. package/dist/types/src/interface/ui/expand_record.d.ts +16 -0
  673. package/dist/types/src/interface/ui/expand_record.d.ts.map +1 -0
  674. package/dist/types/src/interface/ui/initialize_block.d.ts +4 -0
  675. package/dist/types/src/interface/ui/initialize_block.d.ts.map +1 -0
  676. package/dist/types/src/interface/ui/ui.d.ts +16 -0
  677. package/dist/types/src/interface/ui/ui.d.ts.map +1 -0
  678. package/dist/types/src/interface/ui/use_base.d.ts +33 -0
  679. package/dist/types/src/interface/ui/use_base.d.ts.map +1 -0
  680. package/dist/types/src/interface/ui/use_custom_properties.d.ts +45 -0
  681. package/dist/types/src/interface/ui/use_custom_properties.d.ts.map +1 -0
  682. package/dist/types/src/interface/ui/use_records.d.ts +40 -0
  683. package/dist/types/src/interface/ui/use_records.d.ts.map +1 -0
  684. package/dist/types/src/interface/ui/use_run_info.d.ts +30 -0
  685. package/dist/types/src/interface/ui/use_run_info.d.ts.map +1 -0
  686. package/dist/types/src/interface/ui/use_session.d.ts +30 -0
  687. package/dist/types/src/interface/ui/use_session.d.ts.map +1 -0
  688. package/dist/types/src/sdk_mode.d.ts +65 -0
  689. package/dist/types/src/sdk_mode.d.ts.map +1 -0
  690. package/dist/types/src/shared/color_utils.d.ts +72 -0
  691. package/dist/types/src/shared/color_utils.d.ts.map +1 -0
  692. package/dist/types/src/shared/colors.d.ts +180 -0
  693. package/dist/types/src/shared/colors.d.ts.map +1 -0
  694. package/dist/types/src/shared/error_utils.d.ts +19 -0
  695. package/dist/types/src/shared/error_utils.d.ts.map +1 -0
  696. package/dist/types/src/shared/event_tracker.d.ts +17 -0
  697. package/dist/types/src/shared/event_tracker.d.ts.map +1 -0
  698. package/dist/types/src/shared/global_config.d.ts +235 -0
  699. package/dist/types/src/shared/global_config.d.ts.map +1 -0
  700. package/dist/types/src/shared/models/abstract_model.d.ts +29 -0
  701. package/dist/types/src/shared/models/abstract_model.d.ts.map +1 -0
  702. package/dist/types/src/shared/models/base_core.d.ts +168 -0
  703. package/dist/types/src/shared/models/base_core.d.ts.map +1 -0
  704. package/dist/types/src/shared/models/field_core.d.ts +133 -0
  705. package/dist/types/src/shared/models/field_core.d.ts.map +1 -0
  706. package/dist/types/src/shared/models/mutations_core.d.ts +17 -0
  707. package/dist/types/src/shared/models/mutations_core.d.ts.map +1 -0
  708. package/dist/types/src/shared/models/record_core.d.ts +60 -0
  709. package/dist/types/src/shared/models/record_core.d.ts.map +1 -0
  710. package/dist/types/src/shared/models/record_store_core.d.ts +7 -0
  711. package/dist/types/src/shared/models/record_store_core.d.ts.map +1 -0
  712. package/dist/types/src/shared/models/session_core.d.ts +50 -0
  713. package/dist/types/src/shared/models/session_core.d.ts.map +1 -0
  714. package/dist/types/src/shared/models/table_core.d.ts +143 -0
  715. package/dist/types/src/shared/models/table_core.d.ts.map +1 -0
  716. package/dist/types/src/shared/private_utils.d.ts +168 -0
  717. package/dist/types/src/shared/private_utils.d.ts.map +1 -0
  718. package/dist/types/src/shared/sdk_core.d.ts +69 -0
  719. package/dist/types/src/shared/sdk_core.d.ts.map +1 -0
  720. package/dist/types/src/shared/types/airtable_interface_core.d.ts +91 -0
  721. package/dist/types/src/shared/types/airtable_interface_core.d.ts.map +1 -0
  722. package/dist/types/src/shared/types/attachment.d.ts +27 -0
  723. package/dist/types/src/shared/types/attachment.d.ts.map +1 -0
  724. package/dist/types/src/shared/types/base_core.d.ts +35 -0
  725. package/dist/types/src/shared/types/base_core.d.ts.map +1 -0
  726. package/dist/types/src/shared/types/collaborator.d.ts +17 -0
  727. package/dist/types/src/shared/types/collaborator.d.ts.map +1 -0
  728. package/dist/types/src/shared/types/field.d.ts +1470 -0
  729. package/dist/types/src/shared/types/field.d.ts.map +1 -0
  730. package/dist/types/src/shared/types/global_config.d.ts +44 -0
  731. package/dist/types/src/shared/types/global_config.d.ts.map +1 -0
  732. package/dist/types/src/shared/types/hyper_ids.d.ts +19 -0
  733. package/dist/types/src/shared/types/hyper_ids.d.ts.map +1 -0
  734. package/dist/types/src/shared/types/mutation_constants.d.ts +5 -0
  735. package/dist/types/src/shared/types/mutation_constants.d.ts.map +1 -0
  736. package/dist/types/src/shared/types/mutations_core.d.ts +49 -0
  737. package/dist/types/src/shared/types/mutations_core.d.ts.map +1 -0
  738. package/dist/types/src/shared/types/permission_levels.d.ts +13 -0
  739. package/dist/types/src/shared/types/permission_levels.d.ts.map +1 -0
  740. package/dist/types/src/shared/types/record.d.ts +12 -0
  741. package/dist/types/src/shared/types/record.d.ts.map +1 -0
  742. package/dist/types/src/shared/types/stat.d.ts +10 -0
  743. package/dist/types/src/shared/types/stat.d.ts.map +1 -0
  744. package/dist/types/src/shared/types/table_core.d.ts +28 -0
  745. package/dist/types/src/shared/types/table_core.d.ts.map +1 -0
  746. package/dist/types/src/shared/ui/global_config_synced_component_helpers.d.ts +9 -0
  747. package/dist/types/src/shared/ui/global_config_synced_component_helpers.d.ts.map +1 -0
  748. package/dist/types/src/shared/ui/loader.d.ts +2 -0
  749. package/dist/types/src/shared/ui/loader.d.ts.map +1 -0
  750. package/dist/types/src/shared/ui/remote_utils.d.ts +41 -0
  751. package/dist/types/src/shared/ui/remote_utils.d.ts.map +1 -0
  752. package/dist/types/src/shared/ui/sdk_context.d.ts +5 -0
  753. package/dist/types/src/shared/ui/sdk_context.d.ts.map +1 -0
  754. package/dist/types/src/shared/ui/use_array_identity.d.ts +2 -0
  755. package/dist/types/src/shared/ui/use_array_identity.d.ts.map +1 -0
  756. package/dist/types/src/shared/ui/use_base.d.ts +7 -0
  757. package/dist/types/src/shared/ui/use_base.d.ts.map +1 -0
  758. package/dist/types/src/shared/ui/use_global_config.d.ts +32 -0
  759. package/dist/types/src/shared/ui/use_global_config.d.ts.map +1 -0
  760. package/dist/types/src/shared/ui/use_loadable.d.ts +101 -0
  761. package/dist/types/src/shared/ui/use_loadable.d.ts.map +1 -0
  762. package/dist/types/src/shared/ui/use_session.d.ts +2 -0
  763. package/dist/types/src/shared/ui/use_session.d.ts.map +1 -0
  764. package/dist/types/src/shared/ui/use_synced.d.ts +28 -0
  765. package/dist/types/src/shared/ui/use_synced.d.ts.map +1 -0
  766. package/dist/types/src/shared/ui/use_watchable.d.ts +61 -0
  767. package/dist/types/src/shared/ui/use_watchable.d.ts.map +1 -0
  768. package/dist/types/src/shared/ui/with_hooks.d.ts +97 -0
  769. package/dist/types/src/shared/ui/with_hooks.d.ts.map +1 -0
  770. package/dist/types/src/shared/unstable_private_utils.d.ts +5 -0
  771. package/dist/types/src/shared/unstable_private_utils.d.ts.map +1 -0
  772. package/dist/types/src/shared/warning.d.ts +6 -0
  773. package/dist/types/src/shared/warning.d.ts.map +1 -0
  774. package/dist/types/src/shared/watchable.d.ts +38 -0
  775. package/dist/types/src/shared/watchable.d.ts.map +1 -0
  776. package/dist/types/src/stats/block_stats.d.ts +33 -0
  777. package/dist/types/src/stats/block_stats.d.ts.map +1 -0
  778. package/dist/types/src/testing/abstract_mock_airtable_interface.d.ts +87 -0
  779. package/dist/types/src/testing/abstract_mock_airtable_interface.d.ts.map +1 -0
  780. package/dist/types/stories/all_controls.stories.d.ts +10 -0
  781. package/dist/types/stories/all_controls.stories.d.ts.map +1 -0
  782. package/dist/types/stories/box/appearance.stories.d.ts +21 -0
  783. package/dist/types/stories/box/appearance.stories.d.ts.map +1 -0
  784. package/dist/types/stories/box/box.stories.d.ts +45 -0
  785. package/dist/types/stories/box/box.stories.d.ts.map +1 -0
  786. package/dist/types/stories/box/dimensions.stories.d.ts +24 -0
  787. package/dist/types/stories/box/dimensions.stories.d.ts.map +1 -0
  788. package/dist/types/stories/box/flex_container.stories.d.ts +24 -0
  789. package/dist/types/stories/box/flex_container.stories.d.ts.map +1 -0
  790. package/dist/types/stories/box/flex_item.stories.d.ts +25 -0
  791. package/dist/types/stories/box/flex_item.stories.d.ts.map +1 -0
  792. package/dist/types/stories/box/position.stories.d.ts +25 -0
  793. package/dist/types/stories/box/position.stories.d.ts.map +1 -0
  794. package/dist/types/stories/box/spacing.stories.d.ts +39 -0
  795. package/dist/types/stories/box/spacing.stories.d.ts.map +1 -0
  796. package/dist/types/stories/box/typography.stories.d.ts +33 -0
  797. package/dist/types/stories/box/typography.stories.d.ts.map +1 -0
  798. package/dist/types/stories/button.stories.d.ts +48 -0
  799. package/dist/types/stories/button.stories.d.ts.map +1 -0
  800. package/dist/types/stories/cell_renderer.stories.d.ts +11 -0
  801. package/dist/types/stories/cell_renderer.stories.d.ts.map +1 -0
  802. package/dist/types/stories/choice_token.stories.d.ts +24 -0
  803. package/dist/types/stories/choice_token.stories.d.ts.map +1 -0
  804. package/dist/types/stories/collaborator_token.stories.d.ts +29 -0
  805. package/dist/types/stories/collaborator_token.stories.d.ts.map +1 -0
  806. package/dist/types/stories/color_palette.stories.d.ts +12 -0
  807. package/dist/types/stories/color_palette.stories.d.ts.map +1 -0
  808. package/dist/types/stories/confirmation_dialog.stories.d.ts +10 -0
  809. package/dist/types/stories/confirmation_dialog.stories.d.ts.map +1 -0
  810. package/dist/types/stories/dialog.stories.d.ts +10 -0
  811. package/dist/types/stories/dialog.stories.d.ts.map +1 -0
  812. package/dist/types/stories/field_icon.stories.d.ts +10 -0
  813. package/dist/types/stories/field_icon.stories.d.ts.map +1 -0
  814. package/dist/types/stories/field_picker.stories.d.ts +12 -0
  815. package/dist/types/stories/field_picker.stories.d.ts.map +1 -0
  816. package/dist/types/stories/form_field.stories.d.ts +33 -0
  817. package/dist/types/stories/form_field.stories.d.ts.map +1 -0
  818. package/dist/types/stories/heading.size.stories.d.ts +19 -0
  819. package/dist/types/stories/heading.size.stories.d.ts.map +1 -0
  820. package/dist/types/stories/heading.stories.d.ts +33 -0
  821. package/dist/types/stories/heading.stories.d.ts.map +1 -0
  822. package/dist/types/stories/helpers/attachments.d.ts +4 -0
  823. package/dist/types/stories/helpers/attachments.d.ts.map +1 -0
  824. package/dist/types/stories/helpers/categorize_style_props.d.ts +14 -0
  825. package/dist/types/stories/helpers/categorize_style_props.d.ts.map +1 -0
  826. package/dist/types/stories/helpers/choice_options.d.ts +7 -0
  827. package/dist/types/stories/helpers/choice_options.d.ts.map +1 -0
  828. package/dist/types/stories/helpers/code_block.d.ts +5 -0
  829. package/dist/types/stories/helpers/code_block.d.ts.map +1 -0
  830. package/dist/types/stories/helpers/code_utils.d.ts +32 -0
  831. package/dist/types/stories/helpers/code_utils.d.ts.map +1 -0
  832. package/dist/types/stories/helpers/collaborator_options.d.ts +7 -0
  833. package/dist/types/stories/helpers/collaborator_options.d.ts.map +1 -0
  834. package/dist/types/stories/helpers/example.d.ts +39 -0
  835. package/dist/types/stories/helpers/example.d.ts.map +1 -0
  836. package/dist/types/stories/helpers/example_code_panel.d.ts +10 -0
  837. package/dist/types/stories/helpers/example_code_panel.d.ts.map +1 -0
  838. package/dist/types/stories/helpers/fake_cell_renderer.d.ts +7 -0
  839. package/dist/types/stories/helpers/fake_cell_renderer.d.ts.map +1 -0
  840. package/dist/types/stories/helpers/fake_foreign_record.d.ts +5 -0
  841. package/dist/types/stories/helpers/fake_foreign_record.d.ts.map +1 -0
  842. package/dist/types/stories/helpers/fake_record_card.d.ts +13 -0
  843. package/dist/types/stories/helpers/fake_record_card.d.ts.map +1 -0
  844. package/dist/types/stories/helpers/field_type.d.ts +6 -0
  845. package/dist/types/stories/helpers/field_type.d.ts.map +1 -0
  846. package/dist/types/stories/helpers/raf_throttle.d.ts +5 -0
  847. package/dist/types/stories/helpers/raf_throttle.d.ts.map +1 -0
  848. package/dist/types/stories/helpers/style_prop_list.d.ts +9 -0
  849. package/dist/types/stories/helpers/style_prop_list.d.ts.map +1 -0
  850. package/dist/types/stories/helpers/sync_source_options.d.ts +7 -0
  851. package/dist/types/stories/helpers/sync_source_options.d.ts.map +1 -0
  852. package/dist/types/stories/helpers/use_resizable_panel.d.ts +27 -0
  853. package/dist/types/stories/helpers/use_resizable_panel.d.ts.map +1 -0
  854. package/dist/types/stories/icon.stories.d.ts +18 -0
  855. package/dist/types/stories/icon.stories.d.ts.map +1 -0
  856. package/dist/types/stories/icon_example.d.ts +3 -0
  857. package/dist/types/stories/icon_example.d.ts.map +1 -0
  858. package/dist/types/stories/input.stories.d.ts +27 -0
  859. package/dist/types/stories/input.stories.d.ts.map +1 -0
  860. package/dist/types/stories/label.stories.d.ts +36 -0
  861. package/dist/types/stories/label.stories.d.ts.map +1 -0
  862. package/dist/types/stories/link.stories.d.ts +45 -0
  863. package/dist/types/stories/link.stories.d.ts.map +1 -0
  864. package/dist/types/stories/loader.stories.d.ts +21 -0
  865. package/dist/types/stories/loader.stories.d.ts.map +1 -0
  866. package/dist/types/stories/progress_bar.stories.d.ts +27 -0
  867. package/dist/types/stories/progress_bar.stories.d.ts.map +1 -0
  868. package/dist/types/stories/record_card.stories.d.ts +9 -0
  869. package/dist/types/stories/record_card.stories.d.ts.map +1 -0
  870. package/dist/types/stories/record_card_list.stories.d.ts +9 -0
  871. package/dist/types/stories/record_card_list.stories.d.ts.map +1 -0
  872. package/dist/types/stories/select.stories.d.ts +30 -0
  873. package/dist/types/stories/select.stories.d.ts.map +1 -0
  874. package/dist/types/stories/select_buttons.stories.d.ts +30 -0
  875. package/dist/types/stories/select_buttons.stories.d.ts.map +1 -0
  876. package/dist/types/stories/switch.stories.d.ts +48 -0
  877. package/dist/types/stories/switch.stories.d.ts.map +1 -0
  878. package/dist/types/stories/table_picker.stories.d.ts +12 -0
  879. package/dist/types/stories/table_picker.stories.d.ts.map +1 -0
  880. package/dist/types/stories/text.size.stories.d.ts +16 -0
  881. package/dist/types/stories/text.size.stories.d.ts.map +1 -0
  882. package/dist/types/stories/text.stories.d.ts +36 -0
  883. package/dist/types/stories/text.stories.d.ts.map +1 -0
  884. package/dist/types/stories/text_button.stories.d.ts +45 -0
  885. package/dist/types/stories/text_button.stories.d.ts.map +1 -0
  886. package/dist/types/stories/tooltip.stories.d.ts +10 -0
  887. package/dist/types/stories/tooltip.stories.d.ts.map +1 -0
  888. package/dist/types/stories/view_picker.stories.d.ts +12 -0
  889. package/dist/types/stories/view_picker.stories.d.ts.map +1 -0
  890. package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts +122 -0
  891. package/dist/types/test/airtable_interface_mocks/fixture_data.d.ts.map +1 -0
  892. package/dist/types/test/airtable_interface_mocks/linked_records.d.ts +4 -0
  893. package/dist/types/test/airtable_interface_mocks/linked_records.d.ts.map +1 -0
  894. package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts +60 -0
  895. package/dist/types/test/airtable_interface_mocks/mock_airtable_interface.d.ts.map +1 -0
  896. package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts +4 -0
  897. package/dist/types/test/airtable_interface_mocks/project_tracker.d.ts.map +1 -0
  898. package/dist/types/test/error_utils.test.d.ts +2 -0
  899. package/dist/types/test/error_utils.test.d.ts.map +1 -0
  900. package/dist/types/test/get_style_props_for_responsive_prop.test.d.ts +2 -0
  901. package/dist/types/test/get_style_props_for_responsive_prop.test.d.ts.map +1 -0
  902. package/dist/types/test/index.test.d.ts +2 -0
  903. package/dist/types/test/index.test.d.ts.map +1 -0
  904. package/dist/types/test/models/base.test.d.ts +2 -0
  905. package/dist/types/test/models/base.test.d.ts.map +1 -0
  906. package/dist/types/test/models/cursor.test.d.ts +2 -0
  907. package/dist/types/test/models/cursor.test.d.ts.map +1 -0
  908. package/dist/types/test/models/field.test.d.ts +2 -0
  909. package/dist/types/test/models/field.test.d.ts.map +1 -0
  910. package/dist/types/test/models/linked_records_query_result.test.d.ts +2 -0
  911. package/dist/types/test/models/linked_records_query_result.test.d.ts.map +1 -0
  912. package/dist/types/test/models/mutations.test.d.ts +2 -0
  913. package/dist/types/test/models/mutations.test.d.ts.map +1 -0
  914. package/dist/types/test/models/object_pool.test.d.ts +2 -0
  915. package/dist/types/test/models/object_pool.test.d.ts.map +1 -0
  916. package/dist/types/test/models/record.test.d.ts +2 -0
  917. package/dist/types/test/models/record.test.d.ts.map +1 -0
  918. package/dist/types/test/models/session.test.d.ts +2 -0
  919. package/dist/types/test/models/session.test.d.ts.map +1 -0
  920. package/dist/types/test/models/table.test.d.ts +2 -0
  921. package/dist/types/test/models/table.test.d.ts.map +1 -0
  922. package/dist/types/test/models/table_mutations.test.d.ts +2 -0
  923. package/dist/types/test/models/table_mutations.test.d.ts.map +1 -0
  924. package/dist/types/test/models/table_or_view_query_result.test.d.ts +2 -0
  925. package/dist/types/test/models/table_or_view_query_result.test.d.ts.map +1 -0
  926. package/dist/types/test/models/view.test.d.ts +2 -0
  927. package/dist/types/test/models/view.test.d.ts.map +1 -0
  928. package/dist/types/test/models/view_metadata_query_result.test.d.ts +2 -0
  929. package/dist/types/test/models/view_metadata_query_result.test.d.ts.map +1 -0
  930. package/dist/types/test/private_utils.test.d.ts +2 -0
  931. package/dist/types/test/private_utils.test.d.ts.map +1 -0
  932. package/dist/types/test/sdk.test.d.ts +2 -0
  933. package/dist/types/test/sdk.test.d.ts.map +1 -0
  934. package/dist/types/test/setup_enzyme.d.ts +2 -0
  935. package/dist/types/test/setup_enzyme.d.ts.map +1 -0
  936. package/dist/types/test/test_helpers.d.ts +11 -0
  937. package/dist/types/test/test_helpers.d.ts.map +1 -0
  938. package/dist/types/test/ui/base_provider.test.d.ts +2 -0
  939. package/dist/types/test/ui/base_provider.test.d.ts.map +1 -0
  940. package/dist/types/test/ui/block_wrapper.test.d.ts +2 -0
  941. package/dist/types/test/ui/block_wrapper.test.d.ts.map +1 -0
  942. package/dist/types/test/ui/box.test.d.ts +2 -0
  943. package/dist/types/test/ui/box.test.d.ts.map +1 -0
  944. package/dist/types/test/ui/button.test.d.ts +2 -0
  945. package/dist/types/test/ui/button.test.d.ts.map +1 -0
  946. package/dist/types/test/ui/cell_renderer.test.d.ts +2 -0
  947. package/dist/types/test/ui/cell_renderer.test.d.ts.map +1 -0
  948. package/dist/types/test/ui/choice_token.test.d.ts +2 -0
  949. package/dist/types/test/ui/choice_token.test.d.ts.map +1 -0
  950. package/dist/types/test/ui/collaborator_token.test.d.ts +2 -0
  951. package/dist/types/test/ui/collaborator_token.test.d.ts.map +1 -0
  952. package/dist/types/test/ui/color_palette.test.d.ts +2 -0
  953. package/dist/types/test/ui/color_palette.test.d.ts.map +1 -0
  954. package/dist/types/test/ui/color_palette_synced.test.d.ts +2 -0
  955. package/dist/types/test/ui/color_palette_synced.test.d.ts.map +1 -0
  956. package/dist/types/test/ui/confirmation_dialog.test.d.ts +2 -0
  957. package/dist/types/test/ui/confirmation_dialog.test.d.ts.map +1 -0
  958. package/dist/types/test/ui/dialog.test.d.ts +2 -0
  959. package/dist/types/test/ui/dialog.test.d.ts.map +1 -0
  960. package/dist/types/test/ui/expand_record.test.d.ts +2 -0
  961. package/dist/types/test/ui/expand_record.test.d.ts.map +1 -0
  962. package/dist/types/test/ui/expand_record_list.test.d.ts +2 -0
  963. package/dist/types/test/ui/expand_record_list.test.d.ts.map +1 -0
  964. package/dist/types/test/ui/expand_record_picker_async.test.d.ts +2 -0
  965. package/dist/types/test/ui/expand_record_picker_async.test.d.ts.map +1 -0
  966. package/dist/types/test/ui/field_icon.test.d.ts +2 -0
  967. package/dist/types/test/ui/field_icon.test.d.ts.map +1 -0
  968. package/dist/types/test/ui/field_picker.test.d.ts +2 -0
  969. package/dist/types/test/ui/field_picker.test.d.ts.map +1 -0
  970. package/dist/types/test/ui/field_picker_synced.test.d.ts +2 -0
  971. package/dist/types/test/ui/field_picker_synced.test.d.ts.map +1 -0
  972. package/dist/types/test/ui/form_field.test.d.ts +2 -0
  973. package/dist/types/test/ui/form_field.test.d.ts.map +1 -0
  974. package/dist/types/test/ui/global_alert.test.d.ts +2 -0
  975. package/dist/types/test/ui/global_alert.test.d.ts.map +1 -0
  976. package/dist/types/test/ui/heading.test.d.ts +2 -0
  977. package/dist/types/test/ui/heading.test.d.ts.map +1 -0
  978. package/dist/types/test/ui/icon.test.d.ts +2 -0
  979. package/dist/types/test/ui/icon.test.d.ts.map +1 -0
  980. package/dist/types/test/ui/initialize_block.test.d.ts +2 -0
  981. package/dist/types/test/ui/initialize_block.test.d.ts.map +1 -0
  982. package/dist/types/test/ui/input.test.d.ts +2 -0
  983. package/dist/types/test/ui/input.test.d.ts.map +1 -0
  984. package/dist/types/test/ui/input_synced.test.d.ts +2 -0
  985. package/dist/types/test/ui/input_synced.test.d.ts.map +1 -0
  986. package/dist/types/test/ui/label.test.d.ts +2 -0
  987. package/dist/types/test/ui/label.test.d.ts.map +1 -0
  988. package/dist/types/test/ui/link.test.d.ts +2 -0
  989. package/dist/types/test/ui/link.test.d.ts.map +1 -0
  990. package/dist/types/test/ui/loader.test.d.ts +2 -0
  991. package/dist/types/test/ui/loader.test.d.ts.map +1 -0
  992. package/dist/types/test/ui/modal.test.d.ts +2 -0
  993. package/dist/types/test/ui/modal.test.d.ts.map +1 -0
  994. package/dist/types/test/ui/popover.test.d.ts +2 -0
  995. package/dist/types/test/ui/popover.test.d.ts.map +1 -0
  996. package/dist/types/test/ui/progress_bar.test.d.ts +2 -0
  997. package/dist/types/test/ui/progress_bar.test.d.ts.map +1 -0
  998. package/dist/types/test/ui/record_card.test.d.ts +2 -0
  999. package/dist/types/test/ui/record_card.test.d.ts.map +1 -0
  1000. package/dist/types/test/ui/record_card_list.test.d.ts +2 -0
  1001. package/dist/types/test/ui/record_card_list.test.d.ts.map +1 -0
  1002. package/dist/types/test/ui/remote_utils.test.d.ts +2 -0
  1003. package/dist/types/test/ui/remote_utils.test.d.ts.map +1 -0
  1004. package/dist/types/test/ui/select.test.d.ts +2 -0
  1005. package/dist/types/test/ui/select.test.d.ts.map +1 -0
  1006. package/dist/types/test/ui/select_buttons.test.d.ts +2 -0
  1007. package/dist/types/test/ui/select_buttons.test.d.ts.map +1 -0
  1008. package/dist/types/test/ui/select_buttons_synced.test.d.ts +2 -0
  1009. package/dist/types/test/ui/select_buttons_synced.test.d.ts.map +1 -0
  1010. package/dist/types/test/ui/select_synced.test.d.ts +2 -0
  1011. package/dist/types/test/ui/select_synced.test.d.ts.map +1 -0
  1012. package/dist/types/test/ui/switch.test.d.ts +2 -0
  1013. package/dist/types/test/ui/switch.test.d.ts.map +1 -0
  1014. package/dist/types/test/ui/switch_synced.test.d.ts +2 -0
  1015. package/dist/types/test/ui/switch_synced.test.d.ts.map +1 -0
  1016. package/dist/types/test/ui/synced.test.d.ts +2 -0
  1017. package/dist/types/test/ui/synced.test.d.ts.map +1 -0
  1018. package/dist/types/test/ui/table_picker.test.d.ts +2 -0
  1019. package/dist/types/test/ui/table_picker.test.d.ts.map +1 -0
  1020. package/dist/types/test/ui/table_picker_synced.test.d.ts +2 -0
  1021. package/dist/types/test/ui/table_picker_synced.test.d.ts.map +1 -0
  1022. package/dist/types/test/ui/text.test.d.ts +2 -0
  1023. package/dist/types/test/ui/text.test.d.ts.map +1 -0
  1024. package/dist/types/test/ui/text_button.test.d.ts +2 -0
  1025. package/dist/types/test/ui/text_button.test.d.ts.map +1 -0
  1026. package/dist/types/test/ui/tooltip.test.d.ts +2 -0
  1027. package/dist/types/test/ui/tooltip.test.d.ts.map +1 -0
  1028. package/dist/types/test/ui/ui.test.d.ts +2 -0
  1029. package/dist/types/test/ui/ui.test.d.ts.map +1 -0
  1030. package/dist/types/test/ui/unstable_standalone_ui.test.d.ts +1 -0
  1031. package/dist/types/test/ui/unstable_standalone_ui.test.d.ts.map +1 -0
  1032. package/dist/types/test/ui/use_array_identity.test.d.ts +2 -0
  1033. package/dist/types/test/ui/use_array_identity.test.d.ts.map +1 -0
  1034. package/dist/types/test/ui/use_loadable.test.d.ts +2 -0
  1035. package/dist/types/test/ui/use_loadable.test.d.ts.map +1 -0
  1036. package/dist/types/test/ui/use_record_action_data.test.d.ts +2 -0
  1037. package/dist/types/test/ui/use_record_action_data.test.d.ts.map +1 -0
  1038. package/dist/types/test/ui/use_records.test.d.ts +2 -0
  1039. package/dist/types/test/ui/use_records.test.d.ts.map +1 -0
  1040. package/dist/types/test/ui/use_view_metadata.test.d.ts +2 -0
  1041. package/dist/types/test/ui/use_view_metadata.test.d.ts.map +1 -0
  1042. package/dist/types/test/ui/use_watchable.test.d.ts +2 -0
  1043. package/dist/types/test/ui/use_watchable.test.d.ts.map +1 -0
  1044. package/dist/types/test/ui/view_picker.test.d.ts +2 -0
  1045. package/dist/types/test/ui/view_picker.test.d.ts.map +1 -0
  1046. package/dist/types/test/ui/view_picker_synced.test.d.ts +2 -0
  1047. package/dist/types/test/ui/view_picker_synced.test.d.ts.map +1 -0
  1048. package/dist/types/test/ui/viewport_constraint.test.d.ts +2 -0
  1049. package/dist/types/test/ui/viewport_constraint.test.d.ts.map +1 -0
  1050. package/dist/types/test/unstable_private_utils.test.d.ts +1 -0
  1051. package/dist/types/test/unstable_private_utils.test.d.ts.map +1 -0
  1052. package/index.d.ts +14 -0
  1053. package/models.d.ts +1 -0
  1054. package/models.js +1 -0
  1055. package/package.json +190 -0
  1056. package/types/globals.d.ts +6 -0
  1057. package/types/styled-system__core.d.ts +41 -0
  1058. package/types/use-subscription.d.ts +6 -0
  1059. package/types.d.ts +18 -0
  1060. package/types.js +1 -0
  1061. package/ui.d.ts +1 -0
  1062. package/ui.js +1 -0
  1063. package/unstable_private_utils.d.ts +1 -0
  1064. package/unstable_private_utils.js +1 -0
  1065. package/unstable_standalone_ui.d.ts +1 -0
  1066. package/unstable_standalone_ui.js +1 -0
  1067. package/unstable_testing_utils.d.ts +1 -0
  1068. package/unstable_testing_utils.js +1 -0
@@ -0,0 +1,1146 @@
1
+ /** @module @airtable/blocks/models: Table */ /** */
2
+ import { TableCore } from '../../shared/models/table_core';
3
+ import { ViewType } from '../types/view';
4
+ import { ObjectMap, ObjectValues } from '../../shared/private_utils';
5
+ import { FieldId, ViewId, RecordId } from '../../shared/types/hyper_ids';
6
+ import { FieldType, FieldOptions } from '../../shared/types/field';
7
+ import { BaseSdkMode } from '../../sdk_mode';
8
+ import { PermissionCheckResult } from '../../shared/types/mutations_core';
9
+ import { RecordQueryResultOpts } from './record_query_result';
10
+ import Field from './field';
11
+ import TableOrViewQueryResult from './table_or_view_query_result';
12
+ import View from './view';
13
+ import Record from './record';
14
+ export declare const WatchableTableKeys: Readonly<{
15
+ views: "views";
16
+ name: "name";
17
+ description: "description";
18
+ fields: "fields";
19
+ }>;
20
+ /**
21
+ * A key in {@link Table} that can be watched.
22
+ * - `name`
23
+ * - `description`
24
+ * - `fields`
25
+ * - `views`
26
+ */
27
+ export type WatchableTableKey = ObjectValues<typeof WatchableTableKeys>;
28
+ /**
29
+ * Model class representing a table. Every {@link Base} has one or more tables.
30
+ *
31
+ * @docsPath models/Table
32
+ */
33
+ declare class Table extends TableCore<BaseSdkMode, WatchableTableKey> {
34
+ /**
35
+ * The URL for the table. You can visit this URL in the browser to be taken to the table in the Airtable UI.
36
+ *
37
+ * @example
38
+ * ```js
39
+ * console.log(myTable.url);
40
+ * // => 'https://airtable.com/appxxxxxxxxxxxxxx/tblxxxxxxxxxxxxxx'
41
+ * ```
42
+ */
43
+ get url(): string;
44
+ /**
45
+ * The views in this table. Can be watched to know when views are created,
46
+ * deleted, or reordered.
47
+ *
48
+ * @example
49
+ * ```js
50
+ * console.log(`This table has ${myTable.views.length} views`);
51
+ * ```
52
+ */
53
+ get views(): Array<View>;
54
+ /**
55
+ * Gets the view matching the given ID, or `null` if that view does not exist in this table.
56
+ *
57
+ * @param viewId The ID of the view.
58
+ * @example
59
+ * ```js
60
+ * const viewId = 'viwxxxxxxxxxxxxxx';
61
+ * const view = myTable.getViewByIdIfExists(viewId);
62
+ * if (view !== null) {
63
+ * console.log(view.name);
64
+ * } else {
65
+ * console.log('No view exists with that ID');
66
+ * }
67
+ * ```
68
+ */
69
+ getViewByIdIfExists(viewId: ViewId): View | null;
70
+ /**
71
+ * Gets the view matching the given ID. Throws if that view does not exist in this table. Use
72
+ * {@link getViewByIdIfExists} instead if you are unsure whether a view exists with the given
73
+ * ID.
74
+ *
75
+ * @param viewId The ID of the view.
76
+ * @example
77
+ * ```js
78
+ * const viewId = 'viwxxxxxxxxxxxxxx';
79
+ * const view = myTable.getViewById(viewId);
80
+ * console.log(view.name);
81
+ * // => 'Grid view'
82
+ * ```
83
+ */
84
+ getViewById(viewId: ViewId): View;
85
+ /**
86
+ * Gets the view matching the given name, or `null` if no view exists with that name in this
87
+ * table.
88
+ *
89
+ * @param viewName The name of the view you're looking for.
90
+ * @example
91
+ * ```js
92
+ * const view = myTable.getViewByNameIfExists('Name');
93
+ * if (view !== null) {
94
+ * console.log(view.id);
95
+ * } else {
96
+ * console.log('No view exists with that name');
97
+ * }
98
+ * ```
99
+ */
100
+ getViewByNameIfExists(viewName: string): View | null;
101
+ /**
102
+ * Gets the view matching the given name. Throws if no view exists with that name in this table.
103
+ * Use {@link getViewByNameIfExists} instead if you are unsure whether a view exists with the
104
+ * given name.
105
+ *
106
+ * @param viewName The name of the view you're looking for.
107
+ * @example
108
+ * ```js
109
+ * const view = myTable.getViewByName('Name');
110
+ * console.log(view.id);
111
+ * // => 'viwxxxxxxxxxxxxxx'
112
+ * ```
113
+ */
114
+ getViewByName(viewName: string): View;
115
+ /**
116
+ * The view matching the given ID or name. Returns `null` if no matching view exists within
117
+ * this table.
118
+ *
119
+ * This method is convenient when building an extension for a specific base, but for more generic
120
+ * extensions the best practice is to use the {@link getViewByIdIfExists} or
121
+ * {@link getViewByNameIfExists} methods instead.
122
+ *
123
+ * @param viewIdOrName The ID or name of the view you're looking for.
124
+ */
125
+ getViewIfExists(viewIdOrName: ViewId | string): View | null;
126
+ /**
127
+ * The view matching the given ID or name. Throws if no matching view exists within this table.
128
+ * Use {@link getViewIfExists} instead if you are unsure whether a view exists with the given
129
+ * name/ID.
130
+ *
131
+ * This method is convenient when building an extension for a specific base, but for more generic
132
+ * extensions the best practice is to use the {@link getViewById} or {@link getViewByName} methods
133
+ * instead.
134
+ *
135
+ * @param viewIdOrName The ID or name of the view you're looking for.
136
+ */
137
+ getView(viewIdOrName: ViewId | string): View;
138
+ /**
139
+ * Select records from the table. Returns a {@link RecordQueryResult}.
140
+ *
141
+ * Consider using {@link useRecords} or {@link useRecordIds} instead, unless you need the
142
+ * features of a QueryResult (e.g. `queryResult.getRecordById`). Record hooks handle
143
+ * loading/unloading and updating your UI automatically, but manually `select`ing records is
144
+ * useful for one-off data processing.
145
+ *
146
+ * @param opts Options for the query, such as sorts and fields.
147
+ * @example
148
+ * ```js
149
+ * import {useBase, useRecords} from '@airtable/blocks/ui';
150
+ * import React from 'react';
151
+ *
152
+ * function TodoList() {
153
+ * const base = useBase();
154
+ * const table = base.getTableByName('Tasks');
155
+ *
156
+ * const queryResult = table.selectRecords();
157
+ * const records = useRecords(queryResult);
158
+ *
159
+ * return (
160
+ * <ul>
161
+ * {records.map(record => (
162
+ * <li key={record.id}>
163
+ * {record.name || 'Unnamed record'}
164
+ * </li>
165
+ * ))}
166
+ * </ul>
167
+ * );
168
+ * }
169
+ * ```
170
+ */
171
+ selectRecords(opts?: RecordQueryResultOpts): TableOrViewQueryResult;
172
+ /**
173
+ * Select and load records from the table. Returns a {@link RecordQueryResult} promise where
174
+ * record data has been loaded.
175
+ *
176
+ * Consider using {@link useRecords} or {@link useRecordIds} instead, unless you need the
177
+ * features of a QueryResult (e.g. `queryResult.getRecordById`). Record hooks handle
178
+ * loading/unloading and updating your UI automatically, but manually `select`ing records is
179
+ * useful for one-off data processing.
180
+ *
181
+ * Once you've finished with your query, remember to call `queryResult.unloadData()`.
182
+ *
183
+ * @param opts Options for the query, such as sorts and fields.
184
+ * @example
185
+ * ```js
186
+ * async function logRecordCountAsync(table) {
187
+ * const query = await table.selectRecordsAsync();
188
+ * console.log(query.recordIds.length);
189
+ * query.unloadData();
190
+ * }
191
+ * ```
192
+ */
193
+ selectRecordsAsync(opts?: RecordQueryResultOpts): Promise<TableOrViewQueryResult>;
194
+ /**
195
+ * Returns the first view in the table where the type is one of `allowedViewTypes`, or `null` if
196
+ * no such view exists in the table.
197
+ *
198
+ * @param allowedViewTypes An array of view types or a single view type to match against.
199
+ * @param preferredViewOrViewId If a view or view ID is supplied and that view exists & has the
200
+ * correct type, that view will be returned before checking the other views in the table.
201
+ * @example
202
+ * ```js
203
+ * import {ViewType} from '@airtable/blocks/models';
204
+ * const firstCalendarView = myTable.getFirstViewOfType(ViewType.CALENDAR);
205
+ * if (firstCalendarView !== null) {
206
+ * console.log(firstCalendarView.name);
207
+ * } else {
208
+ * console.log('No calendar views exist in the table');
209
+ * }
210
+ * ```
211
+ */
212
+ getFirstViewOfType(allowedViewTypes: Array<ViewType> | ViewType, preferredViewOrViewId?: View | ViewId | null): View | null;
213
+ /**
214
+ * Checks whether the current user has permission to create a field in this table.
215
+ *
216
+ * Accepts partial input, in the same format as {@link createFieldAsync}.
217
+ *
218
+ * Returns `{hasPermission: true}` if the current user can update the specified record,
219
+ * `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
220
+ * used to display an error message to the user.
221
+ *
222
+ * @param name name for the field. must be case-insensitive unique for the table
223
+ * @param type type for the field
224
+ * @param options options for the field. omit for fields without writable options
225
+ * @param description description for the field. omit to leave blank
226
+ *
227
+ * @example
228
+ * ```js
229
+ * const createFieldCheckResult = table.checkPermissionsForCreateField();
230
+ *
231
+ * if (!createFieldCheckResult.hasPermission) {
232
+ * alert(createFieldCheckResult.reasonDisplayString);
233
+ * }
234
+ * ```
235
+ */
236
+ checkPermissionsForCreateField(name?: string, type?: FieldType, options?: FieldOptions | null, description?: string | null): PermissionCheckResult;
237
+ /**
238
+ * An alias for `checkPermissionsForCreateField(name, type, options, description).hasPermission`.
239
+ *
240
+ * Checks whether the current user has permission to create a field in this table.
241
+ *
242
+ * Accepts partial input, in the same format as {@link createFieldAsync}.
243
+ *
244
+ * @param name name for the field. must be case-insensitive unique for the table
245
+ * @param type type for the field
246
+ * @param options options for the field. omit for fields without writable options
247
+ * @param description description for the field. omit to leave blank
248
+ *
249
+ * @example
250
+ * ```js
251
+ * const canCreateField = table.hasPermissionToCreateField();
252
+ *
253
+ * if (!canCreateField) {
254
+ * alert('not allowed!');
255
+ * }
256
+ * ```
257
+ */
258
+ hasPermissionToCreateField(name?: string, type?: FieldType, options?: FieldOptions | null, description?: string | null): boolean;
259
+ /**
260
+ * Creates a new field.
261
+ *
262
+ * Similar to creating a field from the Airtable UI, the new field will not be visible
263
+ * in views that have other hidden fields and views that are publicly shared.
264
+ *
265
+ * Throws an error if the user does not have permission to create a field, if invalid
266
+ * name, type or options are provided, or if creating fields of this type is not supported.
267
+ *
268
+ * Refer to {@link FieldType} for supported field types, the write format for options, and
269
+ * other specifics for certain field types.
270
+ *
271
+ * This action is asynchronous. Unlike new records, new fields are **not** created
272
+ * optimistically locally. You must `await` the returned promise before using the new
273
+ * field in your extension.
274
+ *
275
+ * @param name name for the field. must be case-insensitive unique
276
+ * @param type type for the field
277
+ * @param options options for the field. omit for fields without writable options
278
+ * @param description description for the field. is optional and will be `''` if not specified
279
+ * or if specified as `null`.
280
+ *
281
+ * @example
282
+ * ```js
283
+ * async function createNewSingleLineTextField(table, name) {
284
+ * if (table.hasPermissionToCreateField(name, FieldType.SINGLE_LINE_TEXT)) {
285
+ * await table.createFieldAsync(name, FieldType.SINGLE_LINE_TEXT);
286
+ * }
287
+ * }
288
+ *
289
+ * async function createNewCheckboxField(table, name) {
290
+ * const options = {
291
+ * icon: 'check',
292
+ * color: 'greenBright',
293
+ * };
294
+ * if (table.hasPermissionToCreateField(name, FieldType.CHECKBOX, options)) {
295
+ * await table.createFieldAsync(name, FieldType.CHECKBOX, options);
296
+ * }
297
+ * }
298
+ *
299
+ * async function createNewDateField(table, name) {
300
+ * const options = {
301
+ * dateFormat: {
302
+ * name: 'iso',
303
+ * },
304
+ * };
305
+ * if (table.hasPermissionToCreateField(name, FieldType.DATE, options)) {
306
+ * await table.createFieldAsync(name, FieldType.DATE, options);
307
+ * }
308
+ * }
309
+ * ```
310
+ */
311
+ createFieldAsync(name: string, type: FieldType, options?: FieldOptions | null, description?: string | null): Promise<Field>;
312
+ /**
313
+ * Updates cell values for a record.
314
+ *
315
+ * Throws an error if the user does not have permission to update the given cell values in
316
+ * the record, or if invalid input is provided (eg. invalid cell values).
317
+ *
318
+ * Refer to {@link FieldType} for cell value write formats.
319
+ *
320
+ * This action is asynchronous: `await` the returned promise if you wish to wait for the updated
321
+ * cell values to be persisted to Airtable servers.
322
+ * Updates are applied optimistically locally, so your changes will be reflected in your extension
323
+ * before the promise resolves.
324
+ *
325
+ * @param recordOrRecordId the record to update
326
+ * @param fields cell values to update in that record, specified as object mapping `FieldId` or field name to value for that field.
327
+ * @example
328
+ * ```js
329
+ * function updateRecord(record, recordFields) {
330
+ * if (table.hasPermissionToUpdateRecord(record, recordFields)) {
331
+ * table.updateRecordAsync(record, recordFields);
332
+ * }
333
+ * // The updated values will now show in your extension (eg in
334
+ * // `table.selectRecords()` result) but are still being saved to Airtable
335
+ * // servers (e.g. other users may not be able to see them yet).
336
+ * }
337
+ *
338
+ * async function updateRecordAsync(record, recordFields) {
339
+ * if (table.hasPermissionToUpdateRecord(record, recordFields)) {
340
+ * await table.updateRecordAsync(record, recordFields);
341
+ * }
342
+ * // New record has been saved to Airtable servers.
343
+ * alert(`record with ID ${record.id} has been updated`);
344
+ * }
345
+ *
346
+ * // Fields can be specified by name or ID
347
+ * updateRecord(record1, {
348
+ * 'Post Title': 'How to make: orange-mango pound cake',
349
+ * 'Publication Date': '2020-01-01',
350
+ * });
351
+ * updateRecord(record2, {
352
+ * [postTitleField.id]: 'Cake decorating tips & tricks',
353
+ * [publicationDateField.id]: '2020-02-02',
354
+ * });
355
+ *
356
+ * // Cell values should generally have format matching the output of
357
+ * // record.getCellValue() for the field being updated
358
+ * updateRecord(record1, {
359
+ * 'Category (single select)': {name: 'Recipe'},
360
+ * 'Tags (multiple select)': [{name: 'Desserts'}, {id: 'someChoiceId'}],
361
+ * 'Images (attachment)': [{url: 'http://mywebsite.com/cake.png'}],
362
+ * 'Related posts (linked records)': [{id: 'someRecordId'}],
363
+ * });
364
+ * ```
365
+ */
366
+ updateRecordAsync(recordOrRecordId: Record | RecordId, fields: ObjectMap<FieldId | string, unknown>): Promise<void>;
367
+ /**
368
+ * Checks whether the current user has permission to perform the given record update.
369
+ *
370
+ * Accepts partial input, in the same format as {@link updateRecordAsync}.
371
+ * The more information provided, the more accurate the permissions check will be.
372
+ *
373
+ * Returns `{hasPermission: true}` if the current user can update the specified record,
374
+ * `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
375
+ * used to display an error message to the user.
376
+ *
377
+ * @param recordOrRecordId the record to update
378
+ * @param fields cell values to update in that record, specified as object mapping `FieldId` or field name to value for that field.
379
+ * @example
380
+ * ```js
381
+ * // Check if user can update specific fields for a specific record.
382
+ * const updateRecordCheckResult =
383
+ * table.checkPermissionsForUpdateRecord(record, {
384
+ * 'Post Title': 'How to make: orange-mango pound cake',
385
+ * 'Publication Date': '2020-01-01',
386
+ * });
387
+ * if (!updateRecordCheckResult.hasPermission) {
388
+ * alert(updateRecordCheckResult.reasonDisplayString);
389
+ * }
390
+ *
391
+ * // Like updateRecordAsync, you can use either field names or field IDs.
392
+ * const updateRecordCheckResultWithFieldIds =
393
+ * table.checkPermissionsForUpdateRecord(record, {
394
+ * [postTitleField.id]: 'Cake decorating tips & tricks',
395
+ * [publicationDateField.id]: '2020-02-02',
396
+ * });
397
+ *
398
+ * // Check if user could update a given record, when you don't know the
399
+ * // specific fields that will be updated yet (e.g. to check whether you should
400
+ * // allow a user to select a certain record to update).
401
+ * const updateUnknownFieldsCheckResult =
402
+ * table.checkPermissionsForUpdateRecord(record);
403
+ *
404
+ * // Check if user could update specific fields, when you don't know the
405
+ * // specific record that will be updated yet. (for example, if the field is
406
+ * // selected by the user and you want to check if your extension can write to it).
407
+ * const updateUnknownRecordCheckResult =
408
+ * table.checkPermissionsForUpdateRecord(undefined, {
409
+ * 'My field name': 'updated value',
410
+ * // You can use undefined if you know you're going to update a field,
411
+ * // but don't know the new cell value yet.
412
+ * 'Another field name': undefined,
413
+ * });
414
+ *
415
+ * // Check if user could perform updates within the table, without knowing the
416
+ * // specific record or fields that will be updated yet (e.g., to render your
417
+ * // extension in "read only" mode).
418
+ * const updateUnknownRecordAndFieldsCheckResult =
419
+ * table.checkPermissionsForUpdateRecord();
420
+ * ```
421
+ */
422
+ checkPermissionsForUpdateRecord(recordOrRecordId?: Record | RecordId, fields?: ObjectMap<FieldId | string, unknown | void>): PermissionCheckResult;
423
+ /**
424
+ * An alias for `checkPermissionsForUpdateRecord(recordOrRecordId, fields).hasPermission`.
425
+ *
426
+ * Checks whether the current user has permission to perform the given record update.
427
+ *
428
+ * Accepts partial input, in the same format as {@link updateRecordAsync}.
429
+ * The more information provided, the more accurate the permissions check will be.
430
+ *
431
+ * @param recordOrRecordId the record to update
432
+ * @param fields cell values to update in that record, specified as object mapping `FieldId` or field name to value for that field.
433
+ * @example
434
+ * ```js
435
+ * // Check if user can update specific fields for a specific record.
436
+ * const canUpdateRecord = table.hasPermissionToUpdateRecord(record, {
437
+ * 'Post Title': 'How to make: orange-mango pound cake',
438
+ * 'Publication Date': '2020-01-01',
439
+ * });
440
+ * if (!canUpdateRecord) {
441
+ * alert('not allowed!');
442
+ * }
443
+ *
444
+ * // Like updateRecordAsync, you can use either field names or field IDs.
445
+ * const canUpdateRecordWithFieldIds =
446
+ * table.hasPermissionToUpdateRecord(record, {
447
+ * [postTitleField.id]: 'Cake decorating tips & tricks',
448
+ * [publicationDateField.id]: '2020-02-02',
449
+ * });
450
+ *
451
+ * // Check if user could update a given record, when you don't know the
452
+ * // specific fields that will be updated yet (e.g. to check whether you should
453
+ * // allow a user to select a certain record to update).
454
+ * const canUpdateUnknownFields = table.hasPermissionToUpdateRecord(record);
455
+ *
456
+ * // Check if user could update specific fields, when you don't know the
457
+ * // specific record that will be updated yet (e.g. if the field is selected
458
+ * // by the user and you want to check if your extension can write to it).
459
+ * const canUpdateUnknownRecord =
460
+ * table.hasPermissionToUpdateRecord(undefined, {
461
+ * 'My field name': 'updated value',
462
+ * // You can use undefined if you know you're going to update a field,
463
+ * // but don't know the new cell value yet.
464
+ * 'Another field name': undefined,
465
+ * });
466
+ *
467
+ * // Check if user could perform updates within the table, without knowing the
468
+ * // specific record or fields that will be updated yet. (for example, to
469
+ * // render your extension in "read only" mode)
470
+ * const canUpdateUnknownRecordAndFields = table.hasPermissionToUpdateRecord();
471
+ * ```
472
+ */
473
+ hasPermissionToUpdateRecord(recordOrRecordId?: Record | RecordId, fields?: ObjectMap<FieldId | string, unknown | void>): boolean;
474
+ /**
475
+ * Updates cell values for records.
476
+ *
477
+ * Throws an error if the user does not have permission to update the given cell values in
478
+ * the records, or if invalid input is provided (eg. invalid cell values).
479
+ *
480
+ * Refer to {@link FieldType} for cell value write formats.
481
+ *
482
+ * You may only update up to 50 records in one call to `updateRecordsAsync`.
483
+ * See [Write back to Airtable](/guides/write-back-to-airtable) for more information
484
+ * about write limits.
485
+ *
486
+ * This action is asynchronous: `await` the returned promise if you wish to wait for the
487
+ * updates to be persisted to Airtable servers.
488
+ * Updates are applied optimistically locally, so your changes will be reflected in your extension
489
+ * before the promise resolves.
490
+ *
491
+ * @param records Array of objects containing recordId and fields/cellValues to update for that record (specified as an object mapping `FieldId` or field name to cell value)
492
+ * @example
493
+ * ```js
494
+ * const recordsToUpdate = [
495
+ * // Fields can be specified by name or ID
496
+ * {
497
+ * id: record1.id,
498
+ * fields: {
499
+ * 'Post Title': 'How to make: orange-mango pound cake',
500
+ * 'Publication Date': '2020-01-01',
501
+ * },
502
+ * },
503
+ * {
504
+ * id: record2.id,
505
+ * fields: {
506
+ * // Sets the cell values to be empty.
507
+ * 'Post Title': '',
508
+ * 'Publication Date': '',
509
+ * },
510
+ * },
511
+ * {
512
+ * id: record3.id,
513
+ * fields: {
514
+ * [postTitleField.id]: 'Cake decorating tips & tricks',
515
+ * [publicationDateField.id]: '2020-02-02',
516
+ * },
517
+ * },
518
+ * // Cell values should generally have format matching the output of
519
+ * // record.getCellValue() for the field being updated
520
+ * {
521
+ * id: record4.id,
522
+ * fields: {
523
+ * 'Category (single select)': {name: 'Recipe'},
524
+ * 'Tags (multiple select)': [{name: 'Desserts'}, {id: 'choiceId'}],
525
+ * 'Images (attachment)': [{url: 'http://mywebsite.com/cake.png'}],
526
+ * 'Related posts (linked records)': [{id: 'someRecordId'}],
527
+ * },
528
+ * },
529
+ * ];
530
+ *
531
+ * function updateRecords() {
532
+ * if (table.hasPermissionToUpdateRecords(recordsToUpdate)) {
533
+ * table.updateRecordsAsync(recordsToUpdate);
534
+ * }
535
+ * // The records are now updated within your extension (eg will be reflected in
536
+ * // `table.selectRecords()`) but are still being saved to Airtable servers
537
+ * // (e.g. they may not be updated for other users yet).
538
+ * }
539
+ *
540
+ * async function updateRecordsAsync() {
541
+ * if (table.hasPermissionToUpdateRecords(recordsToUpdate)) {
542
+ * await table.updateRecordsAsync(recordsToUpdate);
543
+ * }
544
+ * // Record updates have been saved to Airtable servers.
545
+ * alert('records have been updated');
546
+ * }
547
+ * ```
548
+ */
549
+ updateRecordsAsync(records: ReadonlyArray<{
550
+ readonly id: RecordId;
551
+ readonly fields: ObjectMap<FieldId | string, unknown>;
552
+ }>): Promise<void>;
553
+ /**
554
+ * Checks whether the current user has permission to perform the given record updates.
555
+ *
556
+ * Accepts partial input, in the same format as {@link updateRecordsAsync}.
557
+ * The more information provided, the more accurate the permissions check will be.
558
+ *
559
+ * Returns `{hasPermission: true}` if the current user can update the specified records,
560
+ * `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
561
+ * used to display an error message to the user.
562
+ *
563
+ * @param records Array of objects containing recordId and fields/cellValues to update for that record (specified as an object mapping `FieldId` or field name to cell value)
564
+ * @example
565
+ * ```js
566
+ * const recordsToUpdate = [
567
+ * {
568
+ * // Validating a complete record update
569
+ * id: record1.id,
570
+ * fields: {
571
+ * 'Post Title': 'How to make: orange-mango pound cake',
572
+ * 'Publication Date': '2020-01-01',
573
+ * },
574
+ * },
575
+ * {
576
+ * // Like updateRecordsAsync, fields can be specified by name or ID
577
+ * id: record2.id,
578
+ * fields: {
579
+ * [postTitleField.id]: 'Cake decorating tips & tricks',
580
+ * [publicationDateField.id]: '2020-02-02',
581
+ * },
582
+ * },
583
+ * {
584
+ * // Validating an update to a specific record, not knowing what
585
+ * // fields will be updated
586
+ * id: record3.id,
587
+ * },
588
+ * {
589
+ * // Validating an update to specific cell values, not knowing what
590
+ * // record will be updated
591
+ * fields: {
592
+ * 'My field name': 'updated value for unknown record',
593
+ * // You can use undefined if you know you're going to update a
594
+ * // field, but don't know the new cell value yet.
595
+ * 'Another field name': undefined,
596
+ * },
597
+ * },
598
+ * ];
599
+ *
600
+ * const updateRecordsCheckResult =
601
+ * table.checkPermissionsForUpdateRecords(recordsToUpdate);
602
+ * if (!updateRecordsCheckResult.hasPermission) {
603
+ * alert(updateRecordsCheckResult.reasonDisplayString);
604
+ * }
605
+ *
606
+ * // Check if user could potentially update records.
607
+ * // Equivalent to table.checkPermissionsForUpdateRecord()
608
+ * const updateUnknownRecordAndFieldsCheckResult =
609
+ * table.checkPermissionsForUpdateRecords();
610
+ * ```
611
+ */
612
+ checkPermissionsForUpdateRecords(records?: ReadonlyArray<{
613
+ readonly id?: RecordId | void;
614
+ readonly fields?: ObjectMap<FieldId | string, unknown | void> | void;
615
+ }>): PermissionCheckResult;
616
+ /**
617
+ * An alias for `checkPermissionsForUpdateRecords(records).hasPermission`.
618
+ *
619
+ * Checks whether the current user has permission to perform the given record updates.
620
+ *
621
+ * Accepts partial input, in the same format as {@link updateRecordsAsync}.
622
+ * The more information provided, the more accurate the permissions check will be.
623
+ *
624
+ * @param records Array of objects containing recordId and fields/cellValues to update for that record (specified as an object mapping `FieldId` or field name to cell value)
625
+ * @example
626
+ * ```js
627
+ * const recordsToUpdate = [
628
+ * {
629
+ * // Validating a complete record update
630
+ * id: record1.id,
631
+ * fields: {
632
+ * 'Post Title': 'How to make: orange-mango pound cake',
633
+ * 'Publication Date': '2020-01-01',
634
+ * },
635
+ * },
636
+ * {
637
+ * // Like updateRecordsAsync, fields can be specified by name or ID
638
+ * id: record2.id,
639
+ * fields: {
640
+ * [postTitleField.id]: 'Cake decorating tips & tricks',
641
+ * [publicationDateField.id]: '2020-02-02',
642
+ * },
643
+ * },
644
+ * {
645
+ * // Validating an update to a specific record, not knowing what
646
+ * // fields will be updated
647
+ * id: record3.id,
648
+ * },
649
+ * {
650
+ * // Validating an update to specific cell values, not knowing what
651
+ * // record will be updated
652
+ * fields: {
653
+ * 'My field name': 'updated value for unknown record',
654
+ * // You can use undefined if you know you're going to update a
655
+ * // field, but don't know the new cell value yet.
656
+ * 'Another field name': undefined,
657
+ * },
658
+ * },
659
+ * ];
660
+ *
661
+ * const canUpdateRecords = table.hasPermissionToUpdateRecords(recordsToUpdate);
662
+ * if (!canUpdateRecords) {
663
+ * alert('not allowed');
664
+ * }
665
+ *
666
+ * // Check if user could potentially update records.
667
+ * // Equivalent to table.hasPermissionToUpdateRecord()
668
+ * const canUpdateUnknownRecordsAndFields =
669
+ * table.hasPermissionToUpdateRecords();
670
+ * ```
671
+ */
672
+ hasPermissionToUpdateRecords(records?: ReadonlyArray<{
673
+ readonly id?: RecordId | void;
674
+ readonly fields?: ObjectMap<FieldId | string, unknown | void> | void;
675
+ }>): boolean;
676
+ /**
677
+ * Delete the given record.
678
+ *
679
+ * Throws an error if the user does not have permission to delete the given record.
680
+ *
681
+ * This action is asynchronous: `await` the returned promise if you wish to wait for the
682
+ * delete to be persisted to Airtable servers.
683
+ * Updates are applied optimistically locally, so your changes will be reflected in your extension
684
+ * before the promise resolves.
685
+ *
686
+ * @param recordOrRecordId the record to be deleted
687
+ * @example
688
+ * ```js
689
+ * function deleteRecord(record) {
690
+ * if (table.hasPermissionToDeleteRecord(record)) {
691
+ * table.deleteRecordAsync(record);
692
+ * }
693
+ * // The record is now deleted within your extension (eg will not be returned
694
+ * // in `table.selectRecords`) but it is still being saved to Airtable
695
+ * // servers (e.g. it may not look deleted to other users yet).
696
+ * }
697
+ *
698
+ * async function deleteRecordAsync(record) {
699
+ * if (table.hasPermissionToDeleteRecord(record)) {
700
+ * await table.deleteRecordAsync(record);
701
+ * }
702
+ * // Record deletion has been saved to Airtable servers.
703
+ * alert('record has been deleted');
704
+ * }
705
+ * ```
706
+ */
707
+ deleteRecordAsync(recordOrRecordId: Record | RecordId): Promise<void>;
708
+ /**
709
+ * Checks whether the current user has permission to delete the specified record.
710
+ *
711
+ * Accepts optional input, in the same format as {@link deleteRecordAsync}.
712
+ * The more information provided, the more accurate the permissions check will be.
713
+ *
714
+ * Returns `{hasPermission: true}` if the current user can delete the specified record,
715
+ * `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
716
+ * used to display an error message to the user.
717
+ *
718
+ * @param recordOrRecordId the record to be deleted
719
+ * @example
720
+ * ```js
721
+ * // Check if user can delete a specific record
722
+ * const deleteRecordCheckResult =
723
+ * table.checkPermissionsForDeleteRecord(record);
724
+ * if (!deleteRecordCheckResult.hasPermission) {
725
+ * alert(deleteRecordCheckResult.reasonDisplayString);
726
+ * }
727
+ *
728
+ * // Check if user could potentially delete a record.
729
+ * // Use when you don't know the specific record you want to delete yet (for
730
+ * // example, to show/hide UI controls that let you select a record to delete).
731
+ * const deleteUnknownRecordCheckResult =
732
+ * table.checkPermissionsForDeleteRecord();
733
+ * ```
734
+ */
735
+ checkPermissionsForDeleteRecord(recordOrRecordId?: Record | RecordId): PermissionCheckResult;
736
+ /**
737
+ * An alias for `checkPermissionsForDeleteRecord(recordOrRecordId).hasPermission`.
738
+ *
739
+ * Checks whether the current user has permission to delete the specified record.
740
+ *
741
+ * Accepts optional input, in the same format as {@link deleteRecordAsync}.
742
+ * The more information provided, the more accurate the permissions check will be.
743
+ *
744
+ * @param recordOrRecordId the record to be deleted
745
+ * @example
746
+ * ```js
747
+ * // Check if user can delete a specific record
748
+ * const canDeleteRecord = table.hasPermissionToDeleteRecord(record);
749
+ * if (!canDeleteRecord) {
750
+ * alert('not allowed');
751
+ * }
752
+ *
753
+ * // Check if user could potentially delete a record.
754
+ * // Use when you don't know the specific record you want to delete yet (for
755
+ * // example, to show/hide UI controls that let you select a record to delete).
756
+ * const canDeleteUnknownRecord = table.hasPermissionToDeleteRecord();
757
+ * ```
758
+ */
759
+ hasPermissionToDeleteRecord(recordOrRecordId?: Record | RecordId): boolean;
760
+ /**
761
+ * Delete the given records.
762
+ *
763
+ * Throws an error if the user does not have permission to delete the given records.
764
+ *
765
+ * You may only delete up to 50 records in one call to `deleteRecordsAsync`.
766
+ * See [Write back to Airtable](/guides/write-back-to-airtable#size-limits-rate-limits) for
767
+ * more information about write limits.
768
+ *
769
+ * This action is asynchronous: `await` the returned promise if you wish to wait for the
770
+ * delete to be persisted to Airtable servers.
771
+ * Updates are applied optimistically locally, so your changes will be reflected in your extension
772
+ * before the promise resolves.
773
+ *
774
+ * @param recordsOrRecordIds Array of Records and RecordIds
775
+ * @example
776
+ * ```js
777
+ *
778
+ * function deleteRecords(records) {
779
+ * if (table.hasPermissionToDeleteRecords(records)) {
780
+ * table.deleteRecordsAsync(records);
781
+ * }
782
+ * // The records are now deleted within your extension (eg will not be
783
+ * // returned in `table.selectRecords()`) but are still being saved to
784
+ * // Airtable servers (e.g. they may not look deleted to other users yet).
785
+ * }
786
+ *
787
+ * async function deleteRecordsAsync(records) {
788
+ * if (table.hasPermissionToDeleteRecords(records)) {
789
+ * await table.deleteRecordsAsync(records);
790
+ * }
791
+ * // Record deletions have been saved to Airtable servers.
792
+ * alert('records have been deleted');
793
+ * }
794
+ * ```
795
+ */
796
+ deleteRecordsAsync(recordsOrRecordIds: ReadonlyArray<Record | RecordId>): Promise<void>;
797
+ /**
798
+ * Checks whether the current user has permission to delete the specified records.
799
+ *
800
+ * Accepts optional input, in the same format as {@link deleteRecordsAsync}.
801
+ * The more information provided, the more accurate the permissions check will be.
802
+ *
803
+ * Returns `{hasPermission: true}` if the current user can delete the specified records,
804
+ * `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
805
+ * used to display an error message to the user.
806
+ *
807
+ * @param recordsOrRecordIds the records to be deleted
808
+ * @example
809
+ * ```js
810
+ * // Check if user can delete specific records
811
+ * const deleteRecordsCheckResult =
812
+ * table.checkPermissionsForDeleteRecords([record1, record2]);
813
+ * if (!deleteRecordsCheckResult.hasPermission) {
814
+ * alert(deleteRecordsCheckResult.reasonDisplayString);
815
+ * }
816
+ *
817
+ * // Check if user could potentially delete records.
818
+ * // Use when you don't know the specific records you want to delete yet (for
819
+ * // example, to show/hide UI controls that let you select records to delete).
820
+ * // Equivalent to table.hasPermissionToDeleteRecord()
821
+ * const deleteUnknownRecordsCheckResult =
822
+ * table.checkPermissionsForDeleteRecords();
823
+ * ```
824
+ */
825
+ checkPermissionsForDeleteRecords(recordsOrRecordIds?: ReadonlyArray<Record | RecordId>): PermissionCheckResult;
826
+ /**
827
+ * An alias for `checkPermissionsForDeleteRecords(recordsOrRecordIds).hasPermission`.
828
+ *
829
+ * Checks whether the current user has permission to delete the specified records.
830
+ *
831
+ * Accepts optional input, in the same format as {@link deleteRecordsAsync}.
832
+ * The more information provided, the more accurate the permissions check will be.
833
+ *
834
+ * @param recordsOrRecordIds the records to be deleted
835
+ * @example
836
+ * ```js
837
+ * // Check if user can delete specific records
838
+ * const canDeleteRecords =
839
+ * table.hasPermissionToDeleteRecords([record1, record2]);
840
+ * if (!canDeleteRecords) {
841
+ * alert('not allowed!');
842
+ * }
843
+ *
844
+ * // Check if user could potentially delete records.
845
+ * // Use when you don't know the specific records you want to delete yet (for
846
+ * // example, to show/hide UI controls that let you select records to delete).
847
+ * // Equivalent to table.hasPermissionToDeleteRecord()
848
+ * const canDeleteUnknownRecords = table.hasPermissionToDeleteRecords();
849
+ * ```
850
+ */
851
+ hasPermissionToDeleteRecords(recordsOrRecordIds?: ReadonlyArray<Record | RecordId>): boolean;
852
+ /**
853
+ * Creates a new record with the specified cell values.
854
+ *
855
+ * Throws an error if the user does not have permission to create the given records, or
856
+ * if invalid input is provided (eg. invalid cell values).
857
+ *
858
+ * Refer to {@link FieldType} for cell value write formats.
859
+ *
860
+ * This action is asynchronous: `await` the returned promise if you wish to wait for the new
861
+ * record to be persisted to Airtable servers.
862
+ * Updates are applied optimistically locally, so your changes will be reflected in your extension
863
+ * before the promise resolves.
864
+ *
865
+ * The returned promise will resolve to the RecordId of the new record once it is persisted.
866
+ *
867
+ * @param fields object mapping `FieldId` or field name to value for that field.
868
+ * @example
869
+ * ```js
870
+ * function createNewRecord(recordFields) {
871
+ * if (table.hasPermissionToCreateRecord(recordFields)) {
872
+ * table.createRecordAsync(recordFields);
873
+ * }
874
+ * // You can now access the new record in your extension (eg
875
+ * // `table.selectRecords()`) but it is still being saved to Airtable
876
+ * // servers (e.g. other users may not be able to see it yet).
877
+ * }
878
+ *
879
+ * async function createNewRecordAsync(recordFields) {
880
+ * if (table.hasPermissionToCreateRecord(recordFields)) {
881
+ * const newRecordId = await table.createRecordAsync(recordFields);
882
+ * }
883
+ * // New record has been saved to Airtable servers.
884
+ * alert(`new record with ID ${newRecordId} has been created`);
885
+ * }
886
+ *
887
+ * // Fields can be specified by name or ID
888
+ * createNewRecord({
889
+ * 'Project Name': 'Advertising campaign',
890
+ * 'Budget': 100,
891
+ * });
892
+ * createNewRecord({
893
+ * [projectNameField.id]: 'Cat video',
894
+ * [budgetField.id]: 200,
895
+ * });
896
+ *
897
+ * // Cell values should generally have format matching the output of
898
+ * // record.getCellValue() for the field being updated
899
+ * createNewRecord({
900
+ * 'Project Name': 'Cat video 2'
901
+ * 'Category (single select)': {name: 'Video'},
902
+ * 'Tags (multiple select)': [{name: 'Cats'}, {id: 'someChoiceId'}],
903
+ * 'Assets (attachment)': [{url: 'http://mywebsite.com/cats.mp4'}],
904
+ * 'Related projects (linked records)': [{id: 'someRecordId'}],
905
+ * });
906
+ * ```
907
+ */
908
+ createRecordAsync(fields?: ObjectMap<FieldId | string, unknown>): Promise<RecordId>;
909
+ /**
910
+ * Checks whether the current user has permission to create the specified record.
911
+ *
912
+ * Accepts partial input, in the same format as {@link createRecordAsync}.
913
+ * The more information provided, the more accurate the permissions check will be.
914
+ *
915
+ * Returns `{hasPermission: true}` if the current user can create the specified record,
916
+ * `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
917
+ * used to display an error message to the user.
918
+ *
919
+ * @param fields object mapping `FieldId` or field name to value for that field.
920
+ * @example
921
+ * ```js
922
+ * // Check if user can create a specific record, when you already know what
923
+ * // fields/cell values will be set for the record.
924
+ * const createRecordCheckResult = table.checkPermissionsForCreateRecord({
925
+ * 'Project Name': 'Advertising campaign',
926
+ * 'Budget': 100,
927
+ * });
928
+ * if (!createRecordCheckResult.hasPermission) {
929
+ * alert(createRecordCheckResult.reasonDisplayString);
930
+ * }
931
+ *
932
+ * // Like createRecordAsync, you can use either field names or field IDs.
933
+ * const checkResultWithFieldIds = table.checkPermissionsForCreateRecord({
934
+ * [projectNameField.id]: 'Cat video',
935
+ * [budgetField.id]: 200,
936
+ * });
937
+ *
938
+ * // Check if user could potentially create a record.
939
+ * // Use when you don't know the specific fields/cell values yet (for example,
940
+ * // to show or hide UI controls that let you start creating a record.)
941
+ * const createUnknownRecordCheckResult =
942
+ * table.checkPermissionsForCreateRecord();
943
+ * ```
944
+ */
945
+ checkPermissionsForCreateRecord(fields?: ObjectMap<FieldId | string, unknown | void>): PermissionCheckResult;
946
+ /**
947
+ * An alias for `checkPermissionsForCreateRecord(fields).hasPermission`.
948
+ *
949
+ * Checks whether the current user has permission to create the specified record.
950
+ *
951
+ * Accepts partial input, in the same format as {@link createRecordAsync}.
952
+ * The more information provided, the more accurate the permissions check will be.
953
+ *
954
+ * @param fields object mapping `FieldId` or field name to value for that field.
955
+ * @example
956
+ * ```js
957
+ * // Check if user can create a specific record, when you already know what
958
+ * // fields/cell values will be set for the record.
959
+ * const canCreateRecord = table.hasPermissionToCreateRecord({
960
+ * 'Project Name': 'Advertising campaign',
961
+ * 'Budget': 100,
962
+ * });
963
+ * if (!canCreateRecord) {
964
+ * alert('not allowed!');
965
+ * }
966
+ *
967
+ * // Like createRecordAsync, you can use either field names or field IDs.
968
+ * const canCreateRecordWithFieldIds = table.hasPermissionToCreateRecord({
969
+ * [projectNameField.id]: 'Cat video',
970
+ * [budgetField.id]: 200,
971
+ * });
972
+ *
973
+ * // Check if user could potentially create a record.
974
+ * // Use when you don't know the specific fields/cell values yet (for example,
975
+ * // to show or hide UI controls that let you start creating a record.)
976
+ * const canCreateUnknownRecord = table.hasPermissionToCreateRecord();
977
+ * ```
978
+ */
979
+ hasPermissionToCreateRecord(fields?: ObjectMap<FieldId | string, unknown | void>): boolean;
980
+ /**
981
+ * Creates new records with the specified cell values.
982
+ *
983
+ * Throws an error if the user does not have permission to create the given records, or
984
+ * if invalid input is provided (eg. invalid cell values).
985
+ *
986
+ * Refer to {@link FieldType} for cell value write formats.
987
+ *
988
+ * You may only create up to 50 records in one call to `createRecordsAsync`.
989
+ * See [Write back to Airtable](/guides/write-back-to-airtable#size-limits-rate-limits) for
990
+ * more information about write limits.
991
+ *
992
+ * This action is asynchronous: `await` the returned promise if you wish to wait for the new
993
+ * record to be persisted to Airtable servers.
994
+ * Updates are applied optimistically locally, so your changes will be reflected in your extension
995
+ * before the promise resolves.
996
+ *
997
+ * The returned promise will resolve to an array of RecordIds of the new records once the new
998
+ * records are persisted.
999
+ *
1000
+ * @param records Array of objects with a `fields` key mapping `FieldId` or field name to value for that field.
1001
+ * @example
1002
+ * ```js
1003
+ * const recordDefs = [
1004
+ * // Fields can be specified by name or ID
1005
+ * {
1006
+ * fields: {
1007
+ * 'Project Name': 'Advertising campaign',
1008
+ * 'Budget': 100,
1009
+ * },
1010
+ * },
1011
+ * {
1012
+ * fields: {
1013
+ * [projectNameField.id]: 'Cat video',
1014
+ * [budgetField.id]: 200,
1015
+ * },
1016
+ * },
1017
+ * // Specifying no fields will create a new record with no cell values set
1018
+ * {
1019
+ * fields: {},
1020
+ * },
1021
+ * // Cell values should generally have format matching the output of
1022
+ * // record.getCellValue() for the field being updated
1023
+ * {
1024
+ * fields: {
1025
+ * 'Project Name': 'Cat video 2'
1026
+ * 'Category (single select)': {name: 'Video'},
1027
+ * 'Tags (multiple select)': [{name: 'Cats'}, {id: 'choiceId'}],
1028
+ * 'Assets (attachment)': [{url: 'http://mywebsite.com/cats.mp4'}],
1029
+ * 'Related projects (linked records)': [{id: 'someRecordId'}],
1030
+ * },
1031
+ * },
1032
+ * ];
1033
+ *
1034
+ * function createNewRecords() {
1035
+ * if (table.hasPermissionToCreateRecords(recordDefs)) {
1036
+ * table.createRecordsAsync(recordDefs);
1037
+ * }
1038
+ * // You can now access the new records in your extension (e.g.
1039
+ * // `table.selectRecords()`) but they are still being saved to Airtable
1040
+ * // servers (e.g. other users may not be able to see them yet.)
1041
+ * }
1042
+ *
1043
+ * async function createNewRecordsAsync() {
1044
+ * if (table.hasPermissionToCreateRecords(recordDefs)) {
1045
+ * const newRecordIds = await table.createRecordsAsync(recordDefs);
1046
+ * }
1047
+ * // New records have been saved to Airtable servers.
1048
+ * alert(`new records with IDs ${newRecordIds} have been created`);
1049
+ * }
1050
+ * ```
1051
+ */
1052
+ createRecordsAsync(records: ReadonlyArray<{
1053
+ fields: ObjectMap<FieldId | string, unknown>;
1054
+ }>): Promise<Array<RecordId>>;
1055
+ /**
1056
+ * Checks whether the current user has permission to create the specified records.
1057
+ *
1058
+ * Accepts partial input, in the same format as {@link createRecordsAsync}.
1059
+ * The more information provided, the more accurate the permissions check will be.
1060
+ *
1061
+ * Returns `{hasPermission: true}` if the current user can create the specified records,
1062
+ * `{hasPermission: false, reasonDisplayString: string}` otherwise. `reasonDisplayString` may be
1063
+ * used to display an error message to the user.
1064
+ *
1065
+ * @param records Array of objects mapping `FieldId` or field name to value for that field.
1066
+ * @example
1067
+ * ```js
1068
+ * // Check if user can create specific records, when you already know what
1069
+ * // fields/cell values will be set for the records.
1070
+ * const createRecordsCheckResult = table.checkPermissionsForCreateRecords([
1071
+ * // Like createRecordsAsync, fields can be specified by name or ID
1072
+ * {
1073
+ * fields: {
1074
+ * 'Project Name': 'Advertising campaign',
1075
+ * 'Budget': 100,
1076
+ * },
1077
+ * },
1078
+ * {
1079
+ * fields: {
1080
+ * [projectNameField.id]: 'Cat video',
1081
+ * [budgetField.id]: 200,
1082
+ * },
1083
+ * },
1084
+ * {},
1085
+ * ]);
1086
+ * if (!createRecordsCheckResult.hasPermission) {
1087
+ * alert(createRecordsCheckResult.reasonDisplayString);
1088
+ * }
1089
+ *
1090
+ * // Check if user could potentially create records.
1091
+ * // Use when you don't know the specific fields/cell values yet (for example,
1092
+ * // to show or hide UI controls that let you start creating records.)
1093
+ * // Equivalent to table.checkPermissionsForCreateRecord()
1094
+ * const createUnknownRecordCheckResult =
1095
+ * table.checkPermissionsForCreateRecords();
1096
+ * ```
1097
+ */
1098
+ checkPermissionsForCreateRecords(records?: ReadonlyArray<{
1099
+ readonly fields?: ObjectMap<FieldId | string, unknown | void> | void;
1100
+ }>): PermissionCheckResult;
1101
+ /**
1102
+ * An alias for `checkPermissionsForCreateRecords(records).hasPermission`.
1103
+ *
1104
+ * Checks whether the current user has permission to create the specified records.
1105
+ *
1106
+ * Accepts partial input, in the same format as {@link createRecordsAsync}.
1107
+ * The more information provided, the more accurate the permissions check will be.
1108
+ *
1109
+ * @param records Array of objects mapping `FieldId` or field name to value for that field.
1110
+ * @example
1111
+ * ```js
1112
+ * // Check if user can create specific records, when you already know what fields/cell values
1113
+ * // will be set for the records.
1114
+ * const canCreateRecords = table.hasPermissionToCreateRecords([
1115
+ * // Like createRecordsAsync, fields can be specified by name or ID
1116
+ * {
1117
+ * fields: {
1118
+ * 'Project Name': 'Advertising campaign',
1119
+ * 'Budget': 100,
1120
+ * }
1121
+ * },
1122
+ * {
1123
+ * fields: {
1124
+ * [projectNameField.id]: 'Cat video',
1125
+ * [budgetField.id]: 200,
1126
+ * }
1127
+ * },
1128
+ * {},
1129
+ * ]);
1130
+ * if (!canCreateRecords) {
1131
+ * alert('not allowed');
1132
+ * }
1133
+ *
1134
+ * // Check if user could potentially create records.
1135
+ * // Use when you don't know the specific fields/cell values yet (for example,
1136
+ * // to show or hide UI controls that let you start creating records).
1137
+ * // Equivalent to table.hasPermissionToCreateRecord()
1138
+ * const canCreateUnknownRecords = table.hasPermissionToCreateRecords();
1139
+ * ```
1140
+ */
1141
+ hasPermissionToCreateRecords(records?: ReadonlyArray<{
1142
+ readonly fields?: ObjectMap<FieldId | string, unknown | void> | void;
1143
+ }>): boolean;
1144
+ }
1145
+ export default Table;
1146
+ //# sourceMappingURL=table.d.ts.map