@planningcenter/chat-react-native 4.5.1-qa-1062.0 → 4.5.1-qa-staging.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/components/conversation/attachments/attachment_card.d.ts +9 -0
- package/build/components/conversation/attachments/attachment_card.d.ts.map +1 -0
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts +2 -0
- package/build/components/conversation/attachments/attachment_deleting_overlay.d.ts.map +1 -0
- package/build/components/conversation/attachments/audio_attachment.d.ts +7 -0
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/constants.d.ts +3 -0
- package/build/components/conversation/attachments/constants.d.ts.map +1 -0
- package/build/components/conversation/attachments/expanded_link.d.ts +6 -0
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -0
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +7 -0
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts +6 -0
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/image_attachment.d.ts +14 -0
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -0
- package/build/components/conversation/attachments/video_attachment.d.ts +7 -0
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -0
- package/build/components/conversation/conversation_start_banner.d.ts +9 -0
- package/build/components/conversation/conversation_start_banner.d.ts.map +1 -0
- package/build/components/conversation/empty_conversation_blank_state.d.ts +2 -0
- package/build/components/conversation/empty_conversation_blank_state.d.ts.map +1 -0
- package/build/components/conversation/jump_to_bottom_button.d.ts +7 -0
- package/build/components/conversation/jump_to_bottom_button.d.ts.map +1 -0
- package/build/components/conversation/message.d.ts +17 -0
- package/build/components/conversation/message.d.ts.map +1 -0
- package/build/components/conversation/message_attachments.d.ts +9 -0
- package/build/components/conversation/message_attachments.d.ts.map +1 -0
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts +10 -0
- package/build/components/conversation/message_form/message_form_attachment_file.d.ts.map +1 -0
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +12 -0
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -0
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +9 -0
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -0
- package/build/components/conversation/message_form.d.ts +24 -0
- package/build/components/conversation/message_form.d.ts.map +1 -0
- package/build/components/conversation/message_list.d.ts +24 -0
- package/build/components/conversation/message_list.d.ts.map +1 -0
- package/build/components/conversation/message_list.js +155 -123
- package/build/components/conversation/message_list.js.map +1 -1
- package/build/components/conversation/message_markdown.d.ts +6 -0
- package/build/components/conversation/message_markdown.d.ts.map +1 -0
- package/build/components/conversation/message_reaction.d.ts +34 -0
- package/build/components/conversation/message_reaction.d.ts.map +1 -0
- package/build/components/conversation/message_read_receipts.d.ts +6 -0
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -0
- package/build/components/conversation/messages_disabled_banners.d.ts +14 -0
- package/build/components/conversation/messages_disabled_banners.d.ts.map +1 -0
- package/build/components/conversation/missing_message.d.ts +2 -0
- package/build/components/conversation/missing_message.d.ts.map +1 -0
- package/build/components/conversation/reply_connectors.d.ts +10 -0
- package/build/components/conversation/reply_connectors.d.ts.map +1 -0
- package/build/components/conversation/reply_shadow_message.d.ts +12 -0
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -0
- package/build/components/conversation/system_message.d.ts +9 -0
- package/build/components/conversation/system_message.d.ts.map +1 -0
- package/build/components/conversation/typing_indicator.d.ts +6 -0
- package/build/components/conversation/typing_indicator.d.ts.map +1 -0
- package/build/components/conversations/archived_results_footer.d.ts +6 -0
- package/build/components/conversations/archived_results_footer.d.ts.map +1 -0
- package/build/components/conversations/conversation_actions.d.ts +11 -0
- package/build/components/conversations/conversation_actions.d.ts.map +1 -0
- package/build/components/conversations/conversation_preview.d.ts +12 -0
- package/build/components/conversations/conversation_preview.d.ts.map +1 -0
- package/build/components/conversations/conversations.d.ts +7 -0
- package/build/components/conversations/conversations.d.ts.map +1 -0
- package/build/components/conversations/conversations.js +1 -0
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/conversations_blank_state.d.ts +7 -0
- package/build/components/conversations/conversations_blank_state.d.ts.map +1 -0
- package/build/components/conversations/filtered_results_footer.d.ts +2 -0
- package/build/components/conversations/filtered_results_footer.d.ts.map +1 -0
- package/build/components/conversations/mute_indicator.d.ts +4 -0
- package/build/components/conversations/mute_indicator.d.ts.map +1 -0
- package/build/components/conversations/swipeable_toggle_button.d.ts +20 -0
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -0
- package/build/components/conversations/unread_count_badge.d.ts +6 -0
- package/build/components/conversations/unread_count_badge.d.ts.map +1 -0
- package/build/components/display/action_button.d.ts +15 -0
- package/build/components/display/action_button.d.ts.map +1 -0
- package/build/components/display/adult_requirement_notice.d.ts +7 -0
- package/build/components/display/adult_requirement_notice.d.ts.map +1 -0
- package/build/components/display/avatar.d.ts +15 -0
- package/build/components/display/avatar.d.ts.map +1 -0
- package/build/components/display/avatar_group.d.ts +14 -0
- package/build/components/display/avatar_group.d.ts.map +1 -0
- package/build/components/display/badge.d.ts +55 -0
- package/build/components/display/badge.d.ts.map +1 -0
- package/build/components/display/banner.d.ts +38 -0
- package/build/components/display/banner.d.ts.map +1 -0
- package/build/components/display/banner_collapsible.d.ts +11 -0
- package/build/components/display/banner_collapsible.d.ts.map +1 -0
- package/build/components/display/button.d.ts +67 -0
- package/build/components/display/button.d.ts.map +1 -0
- package/build/components/display/child_notice.d.ts +10 -0
- package/build/components/display/child_notice.d.ts.map +1 -0
- package/build/components/display/conversation_avatar.d.ts +17 -0
- package/build/components/display/conversation_avatar.d.ts.map +1 -0
- package/build/components/display/conversation_avatar.js +77 -66
- package/build/components/display/conversation_avatar.js.map +1 -1
- package/build/components/display/emoji_avatar.d.ts +11 -0
- package/build/components/display/emoji_avatar.d.ts.map +1 -0
- package/build/components/display/file_attachment_preview.d.ts +11 -0
- package/build/components/display/file_attachment_preview.d.ts.map +1 -0
- package/build/components/display/filter_dropdown.d.ts +36 -0
- package/build/components/display/filter_dropdown.d.ts.map +1 -0
- package/build/components/display/heading.d.ts +10 -0
- package/build/components/display/heading.d.ts.map +1 -0
- package/build/components/display/icon.d.ts +64 -0
- package/build/components/display/icon.d.ts.map +1 -0
- package/build/components/display/icon_avatar.d.ts +11 -0
- package/build/components/display/icon_avatar.d.ts.map +1 -0
- package/build/components/display/icon_button.d.ts +56 -0
- package/build/components/display/icon_button.d.ts.map +1 -0
- package/build/components/display/icon_tile.d.ts +13 -0
- package/build/components/display/icon_tile.d.ts.map +1 -0
- package/build/components/display/image.d.ts +39 -0
- package/build/components/display/image.d.ts.map +1 -0
- package/build/components/display/image.js +47 -44
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.d.ts +13 -0
- package/build/components/display/image_attachment_preview.d.ts.map +1 -0
- package/build/components/display/index.d.ts +34 -0
- package/build/components/display/index.d.ts.map +1 -0
- package/build/components/display/keyboard_scroll_view.d.ts +5 -0
- package/build/components/display/keyboard_scroll_view.d.ts.map +1 -0
- package/build/components/display/keyboard_scroll_view.js +1 -0
- package/build/components/display/keyboard_scroll_view.js.map +1 -1
- package/build/components/display/keyboard_view.d.ts +5 -0
- package/build/components/display/keyboard_view.d.ts.map +1 -0
- package/build/components/display/person.d.ts +9 -0
- package/build/components/display/person.d.ts.map +1 -0
- package/build/components/display/platform_modal_header_buttons.d.ts +61 -0
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -0
- package/build/components/display/popover_menu_view.d.ts +8 -0
- package/build/components/display/popover_menu_view.d.ts.map +1 -0
- package/build/components/display/pressable_row.d.ts +14 -0
- package/build/components/display/pressable_row.d.ts.map +1 -0
- package/build/components/display/spinner.d.ts +22 -0
- package/build/components/display/spinner.d.ts.map +1 -0
- package/build/components/display/switch.d.ts +3 -0
- package/build/components/display/switch.d.ts.map +1 -0
- package/build/components/display/tabs.d.ts +17 -0
- package/build/components/display/tabs.d.ts.map +1 -0
- package/build/components/display/text.d.ts +25 -0
- package/build/components/display/text.d.ts.map +1 -0
- package/build/components/display/text_button.d.ts +39 -0
- package/build/components/display/text_button.d.ts.map +1 -0
- package/build/components/display/text_inline_button.d.ts +11 -0
- package/build/components/display/text_inline_button.d.ts.map +1 -0
- package/build/components/display/text_input.d.ts +8 -0
- package/build/components/display/text_input.d.ts.map +1 -0
- package/build/components/display/toggle_button.d.ts +55 -0
- package/build/components/display/toggle_button.d.ts.map +1 -0
- package/build/components/display/utils/avatar_gradient_colors.d.ts +17 -0
- package/build/components/display/utils/avatar_gradient_colors.d.ts.map +1 -0
- package/build/components/display/utils/button_colors.d.ts +39 -0
- package/build/components/display/utils/button_colors.d.ts.map +1 -0
- package/build/components/display/utils/status_colors.d.ts +17 -0
- package/build/components/display/utils/status_colors.d.ts.map +1 -0
- package/build/components/display/version_footer.d.ts +2 -0
- package/build/components/display/version_footer.d.ts.map +1 -0
- package/build/components/display/video_attachment_preview.d.ts +11 -0
- package/build/components/display/video_attachment_preview.d.ts.map +1 -0
- package/build/components/group_conversation_list.d.ts +23 -0
- package/build/components/group_conversation_list.d.ts.map +1 -0
- package/build/components/index.d.ts +7 -0
- package/build/components/index.d.ts.map +1 -0
- package/build/components/page/component_error_boundary.d.ts +4 -0
- package/build/components/page/component_error_boundary.d.ts.map +1 -0
- package/build/components/page/error_boundary.d.ts +20 -0
- package/build/components/page/error_boundary.d.ts.map +1 -0
- package/build/components/page/loading.d.ts +2 -0
- package/build/components/page/loading.d.ts.map +1 -0
- package/build/components/page/page_error_boundary.d.ts +12 -0
- package/build/components/page/page_error_boundary.d.ts.map +1 -0
- package/build/components/page/page_error_boundary.js +56 -31
- package/build/components/page/page_error_boundary.js.map +1 -1
- package/build/components/primitive/avatar_primitive.d.ts +51 -0
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -0
- package/build/components/primitive/banner_primitive.d.ts +48 -0
- package/build/components/primitive/banner_primitive.d.ts.map +1 -0
- package/build/components/primitive/blank_state_primitive.d.ts +41 -0
- package/build/components/primitive/blank_state_primitive.d.ts.map +1 -0
- package/build/components/primitive/form_sheet.d.ts +75 -0
- package/build/components/primitive/form_sheet.d.ts.map +1 -0
- package/build/components/safe_area_modal.d.ts +7 -0
- package/build/components/safe_area_modal.d.ts.map +1 -0
- package/build/contexts/api_provider.d.ts +7 -0
- package/build/contexts/api_provider.d.ts.map +1 -0
- package/build/contexts/api_provider.js +11 -5
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +37 -0
- package/build/contexts/chat_context.d.ts.map +1 -0
- package/build/contexts/conversation_context.d.ts +13 -0
- package/build/contexts/conversation_context.d.ts.map +1 -0
- package/build/contexts/conversations_context.d.ts +16 -0
- package/build/contexts/conversations_context.d.ts.map +1 -0
- package/build/contexts/session_context.d.ts +44 -0
- package/build/contexts/session_context.d.ts.map +1 -0
- package/build/hooks/attachments/fallback_chat_configuration.d.ts +5 -0
- package/build/hooks/attachments/fallback_chat_configuration.d.ts.map +1 -0
- package/build/hooks/direct_messages/find_direct_message_conversation.d.ts +14 -0
- package/build/hooks/direct_messages/find_direct_message_conversation.d.ts.map +1 -0
- package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts +16 -0
- package/build/hooks/direct_messages/resolve_message_available_members_link.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_affiliations.d.ts +6 -0
- package/build/hooks/direct_messages/use_direct_message_affiliations.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_candidates.d.ts +4 -0
- package/build/hooks/direct_messages/use_direct_message_candidates.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_direct_message_conversation_validate.d.ts +11 -0
- package/build/hooks/direct_messages/use_direct_message_conversation_validate.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts +13 -0
- package/build/hooks/direct_messages/use_find_or_create_direct_message_conversation.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_message_available_members.d.ts +6 -0
- package/build/hooks/direct_messages/use_message_available_members.d.ts.map +1 -0
- package/build/hooks/direct_messages/use_message_available_members_action.d.ts +6 -0
- package/build/hooks/direct_messages/use_message_available_members_action.d.ts.map +1 -0
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts +168 -0
- package/build/hooks/groups/use_group_chat_conversation_payload.d.ts.map +1 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +232 -0
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -0
- package/build/hooks/groups/use_groups_conversation_create.d.ts +10 -0
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -0
- package/build/hooks/index.d.ts +34 -0
- package/build/hooks/index.d.ts.map +1 -0
- package/build/hooks/index.js +1 -0
- package/build/hooks/index.js.map +1 -1
- package/build/hooks/paginator_meta.d.ts +4 -0
- package/build/hooks/paginator_meta.d.ts.map +1 -0
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts +138 -0
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -0
- package/build/hooks/services/use_services_chat_conversation_payload.d.ts +164 -0
- package/build/hooks/services/use_services_chat_conversation_payload.d.ts.map +1 -0
- package/build/hooks/services/use_services_team.d.ts +4 -0
- package/build/hooks/services/use_services_team.d.ts.map +1 -0
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts +176 -0
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts.map +1 -0
- package/build/hooks/services/use_team_plans.d.ts +17 -0
- package/build/hooks/services/use_team_plans.d.ts.map +1 -0
- package/build/hooks/use_animated_message_background_color.d.ts +9 -0
- package/build/hooks/use_animated_message_background_color.d.ts.map +1 -0
- package/build/hooks/use_api.d.ts +391 -0
- package/build/hooks/use_api.d.ts.map +1 -0
- package/build/hooks/use_api_client.d.ts +7 -0
- package/build/hooks/use_api_client.d.ts.map +1 -0
- package/build/hooks/use_app_name.d.ts +3 -0
- package/build/hooks/use_app_name.d.ts.map +1 -0
- package/build/hooks/use_app_state.d.ts +2 -0
- package/build/hooks/use_app_state.d.ts.map +1 -0
- package/build/hooks/use_async_storage.d.ts +4 -0
- package/build/hooks/use_async_storage.d.ts.map +1 -0
- package/build/hooks/use_at_font_scale_breakpoint.d.ts +2 -0
- package/build/hooks/use_at_font_scale_breakpoint.d.ts.map +1 -0
- package/build/hooks/use_attachment_uploader.d.ts +22 -0
- package/build/hooks/use_attachment_uploader.d.ts.map +1 -0
- package/build/hooks/use_broadcast_typing_status.d.ts +9 -0
- package/build/hooks/use_broadcast_typing_status.d.ts.map +1 -0
- package/build/hooks/use_can_browse_archived_conversations.d.ts +2 -0
- package/build/hooks/use_can_browse_archived_conversations.d.ts.map +1 -0
- package/build/hooks/use_chat_configuration.d.ts +7 -0
- package/build/hooks/use_chat_configuration.d.ts.map +1 -0
- package/build/hooks/use_chat_permissions.d.ts +190 -0
- package/build/hooks/use_chat_permissions.d.ts.map +1 -0
- package/build/hooks/use_clear_conversation_filters.d.ts +2 -0
- package/build/hooks/use_clear_conversation_filters.d.ts.map +1 -0
- package/build/hooks/use_conversation.d.ts +275 -0
- package/build/hooks/use_conversation.d.ts.map +1 -0
- package/build/hooks/use_conversation_avatar_update.d.ts +27 -0
- package/build/hooks/use_conversation_avatar_update.d.ts.map +1 -0
- package/build/hooks/use_conversation_avatar_update.js +146 -48
- package/build/hooks/use_conversation_avatar_update.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.d.ts +6 -0
- package/build/hooks/use_conversation_jolt_events.d.ts.map +1 -0
- package/build/hooks/use_conversation_membership.d.ts +5 -0
- package/build/hooks/use_conversation_membership.d.ts.map +1 -0
- package/build/hooks/use_conversation_message.d.ts +12 -0
- package/build/hooks/use_conversation_message.d.ts.map +1 -0
- package/build/hooks/use_conversation_messages.d.ts +23 -0
- package/build/hooks/use_conversation_messages.d.ts.map +1 -0
- package/build/hooks/use_conversation_messages_jolt_events.d.ts +6 -0
- package/build/hooks/use_conversation_messages_jolt_events.d.ts.map +1 -0
- package/build/hooks/use_conversation_validate.d.ts +12 -0
- package/build/hooks/use_conversation_validate.d.ts.map +1 -0
- package/build/hooks/use_conversations.d.ts +12 -0
- package/build/hooks/use_conversations.d.ts.map +1 -0
- package/build/hooks/use_conversations_actions.d.ts +221 -0
- package/build/hooks/use_conversations_actions.d.ts.map +1 -0
- package/build/hooks/use_conversations_cache.d.ts +20 -0
- package/build/hooks/use_conversations_cache.d.ts.map +1 -0
- package/build/hooks/use_conversations_jolt_events.d.ts +2 -0
- package/build/hooks/use_conversations_jolt_events.d.ts.map +1 -0
- package/build/hooks/use_create_android_ripple_color.d.ts +4 -0
- package/build/hooks/use_create_android_ripple_color.d.ts.map +1 -0
- package/build/hooks/use_current_person.d.ts +18 -0
- package/build/hooks/use_current_person.d.ts.map +1 -0
- package/build/hooks/use_debounced_search_term.d.ts +2 -0
- package/build/hooks/use_debounced_search_term.d.ts.map +1 -0
- package/build/hooks/use_deleting_ids.d.ts +4 -0
- package/build/hooks/use_deleting_ids.d.ts.map +1 -0
- package/build/hooks/use_direct_message_eligibility.d.ts +14 -0
- package/build/hooks/use_direct_message_eligibility.d.ts.map +1 -0
- package/build/hooks/use_direct_messages_eligible.d.ts +2 -0
- package/build/hooks/use_direct_messages_eligible.d.ts.map +1 -0
- package/build/hooks/use_enrich_people.d.ts +13 -0
- package/build/hooks/use_enrich_people.d.ts.map +1 -0
- package/build/hooks/use_features.d.ts +38 -0
- package/build/hooks/use_features.d.ts.map +1 -0
- package/build/hooks/use_filter_dropdown_enabled.d.ts +2 -0
- package/build/hooks/use_filter_dropdown_enabled.d.ts.map +1 -0
- package/build/hooks/use_font_scale.d.ts +5 -0
- package/build/hooks/use_font_scale.d.ts.map +1 -0
- package/build/hooks/use_giphy.d.ts +9 -0
- package/build/hooks/use_giphy.d.ts.map +1 -0
- package/build/hooks/use_groups.d.ts +214 -0
- package/build/hooks/use_groups.d.ts.map +1 -0
- package/build/hooks/use_groups_groups.d.ts +208 -0
- package/build/hooks/use_groups_groups.d.ts.map +1 -0
- package/build/hooks/use_has_direct_messages.d.ts +2 -0
- package/build/hooks/use_has_direct_messages.d.ts.map +1 -0
- package/build/hooks/use_interaction_tinted_background_color.d.ts +2 -0
- package/build/hooks/use_interaction_tinted_background_color.d.ts.map +1 -0
- package/build/hooks/use_jolt.d.ts +11 -0
- package/build/hooks/use_jolt.d.ts.map +1 -0
- package/build/hooks/use_live_relative_time.d.ts +3 -0
- package/build/hooks/use_live_relative_time.d.ts.map +1 -0
- package/build/hooks/use_manual_archiving_enabled.d.ts +2 -0
- package/build/hooks/use_manual_archiving_enabled.d.ts.map +1 -0
- package/build/hooks/use_mark_latest_message_read.d.ts +9 -0
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -0
- package/build/hooks/use_message_create_or_update.d.ts +110 -0
- package/build/hooks/use_message_create_or_update.d.ts.map +1 -0
- package/build/hooks/use_message_draft.d.ts +13 -0
- package/build/hooks/use_message_draft.d.ts.map +1 -0
- package/build/hooks/use_message_reaction_toggle.d.ts +21 -0
- package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -0
- package/build/hooks/use_my_gender.d.ts +7 -0
- package/build/hooks/use_my_gender.d.ts.map +1 -0
- package/build/hooks/use_new_conversation_entry.d.ts +8 -0
- package/build/hooks/use_new_conversation_entry.d.ts.map +1 -0
- package/build/hooks/use_new_conversation_from_filter.d.ts +12 -0
- package/build/hooks/use_new_conversation_from_filter.d.ts.map +1 -0
- package/build/hooks/use_organization.d.ts +39 -0
- package/build/hooks/use_organization.d.ts.map +1 -0
- package/build/hooks/use_people_person.d.ts +18 -0
- package/build/hooks/use_people_person.d.ts.map +1 -0
- package/build/hooks/use_person_settings.d.ts +6 -0
- package/build/hooks/use_person_settings.d.ts.map +1 -0
- package/build/hooks/use_preview_avatar_diameter.d.ts +2 -0
- package/build/hooks/use_preview_avatar_diameter.d.ts.map +1 -0
- package/build/hooks/use_product_analytics.d.ts +24 -0
- package/build/hooks/use_product_analytics.d.ts.map +1 -0
- package/build/hooks/use_qualified_by_age.d.ts +2 -0
- package/build/hooks/use_qualified_by_age.d.ts.map +1 -0
- package/build/hooks/use_read_receipts.d.ts +40 -0
- package/build/hooks/use_read_receipts.d.ts.map +1 -0
- package/build/hooks/use_reduce_motion.d.ts +2 -0
- package/build/hooks/use_reduce_motion.d.ts.map +1 -0
- package/build/hooks/use_report_bug_action.d.ts +6 -0
- package/build/hooks/use_report_bug_action.d.ts.map +1 -0
- package/build/hooks/use_report_message.d.ts +6 -0
- package/build/hooks/use_report_message.d.ts.map +1 -0
- package/build/hooks/use_rest_away_from_dismiss_edge.d.ts +19 -0
- package/build/hooks/use_rest_away_from_dismiss_edge.d.ts.map +1 -0
- package/build/hooks/use_scalable_number_of_lines.d.ts +2 -0
- package/build/hooks/use_scalable_number_of_lines.d.ts.map +1 -0
- package/build/hooks/use_search_enabled.d.ts +2 -0
- package/build/hooks/use_search_enabled.d.ts.map +1 -0
- package/build/hooks/use_search_results.d.ts +19 -0
- package/build/hooks/use_search_results.d.ts.map +1 -0
- package/build/hooks/use_selected_chip_background_color.d.ts +2 -0
- package/build/hooks/use_selected_chip_background_color.d.ts.map +1 -0
- package/build/hooks/use_storage.d.ts +9 -0
- package/build/hooks/use_storage.d.ts.map +1 -0
- package/build/hooks/use_submit_age_check.d.ts +78 -0
- package/build/hooks/use_submit_age_check.d.ts.map +1 -0
- package/build/hooks/use_suspense_api.d.ts +86 -0
- package/build/hooks/use_suspense_api.d.ts.map +1 -0
- package/build/hooks/use_system_message_people.d.ts +14 -0
- package/build/hooks/use_system_message_people.d.ts.map +1 -0
- package/build/hooks/use_system_message_people.js +101 -0
- package/build/hooks/use_system_message_people.js.map +1 -0
- package/build/hooks/use_teams.d.ts +207 -0
- package/build/hooks/use_teams.d.ts.map +1 -0
- package/build/hooks/use_theme.d.ts +3 -0
- package/build/hooks/use_theme.d.ts.map +1 -0
- package/build/hooks/use_typing_indicators.d.ts +13 -0
- package/build/hooks/use_typing_indicators.d.ts.map +1 -0
- package/build/hooks/use_typing_status_cache.d.ts +14 -0
- package/build/hooks/use_typing_status_cache.d.ts.map +1 -0
- package/build/hooks/use_unarchive_conversation_action.d.ts +7 -0
- package/build/hooks/use_unarchive_conversation_action.d.ts.map +1 -0
- package/build/hooks/use_upload_client.d.ts +32 -0
- package/build/hooks/use_upload_client.d.ts.map +1 -0
- package/build/hooks/use_video_moderation_jolt_events.d.ts +4 -0
- package/build/hooks/use_video_moderation_jolt_events.d.ts.map +1 -0
- package/build/icons/font_awesome.d.ts +2 -0
- package/build/icons/font_awesome.d.ts.map +1 -0
- package/build/index.d.ts +20 -0
- package/build/index.d.ts.map +1 -0
- package/build/jest.d.ts +18 -0
- package/build/jest.d.ts.map +1 -0
- package/build/navigation/chat_access_gate.d.ts +3 -0
- package/build/navigation/chat_access_gate.d.ts.map +1 -0
- package/build/navigation/index.d.ts +392 -0
- package/build/navigation/index.d.ts.map +1 -0
- package/build/navigation/index.js +3 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/page_error_fallbacks.d.ts +7 -0
- package/build/navigation/page_error_fallbacks.d.ts.map +1 -0
- package/build/navigation/page_error_fallbacks.js +7 -0
- package/build/navigation/page_error_fallbacks.js.map +1 -0
- package/build/navigation/screenLayout.d.ts +8 -0
- package/build/navigation/screenLayout.d.ts.map +1 -0
- package/build/navigation/screenLayout.js +10 -6
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/CustomEvent.d.ts +21 -0
- package/build/polyfills/events/CustomEvent.d.ts.map +1 -0
- package/build/polyfills/events/Event.d.ts +45 -0
- package/build/polyfills/events/Event.d.ts.map +1 -0
- package/build/polyfills/events/EventHandlerAttributes.d.ts +8 -0
- package/build/polyfills/events/EventHandlerAttributes.d.ts.map +1 -0
- package/build/polyfills/events/EventTarget.d.ts +30 -0
- package/build/polyfills/events/EventTarget.d.ts.map +1 -0
- package/build/polyfills/events/internals/EventInternals.d.ts +30 -0
- package/build/polyfills/events/internals/EventInternals.d.ts.map +1 -0
- package/build/polyfills/events/internals/EventTargetInternals.d.ts +9 -0
- package/build/polyfills/events/internals/EventTargetInternals.d.ts.map +1 -0
- package/build/polyfills/webidl/PlatformObjects.d.ts +31 -0
- package/build/polyfills/webidl/PlatformObjects.d.ts.map +1 -0
- package/build/screens/age_check/age_check_required_screen.d.ts +2 -0
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -0
- package/build/screens/age_check/age_check_required_screen.js +1 -0
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts +5 -0
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -0
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts +10 -0
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -0
- package/build/screens/age_check/index.d.ts +3 -0
- package/build/screens/age_check/index.d.ts.map +1 -0
- package/build/screens/age_check/screen_props.d.ts +5 -0
- package/build/screens/age_check/screen_props.d.ts.map +1 -0
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts +12 -0
- package/build/screens/attachment_actions/attachment_actions_screen.d.ts.map +1 -0
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.d.ts +10 -0
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.d.ts.map +1 -0
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts +11 -0
- package/build/screens/avatar_picker/avatar_picker_screen.d.ts.map +1 -0
- package/build/screens/avatar_picker/avatar_picker_screen.js +76 -66
- package/build/screens/avatar_picker/avatar_picker_screen.js.map +1 -1
- package/build/screens/avatar_picker/avatar_picker_state.d.ts +38 -0
- package/build/screens/avatar_picker/avatar_picker_state.d.ts.map +1 -0
- package/build/screens/avatar_picker/avatar_preview.d.ts +9 -0
- package/build/screens/avatar_picker/avatar_preview.d.ts.map +1 -0
- package/build/screens/avatar_picker/color_picker.d.ts +8 -0
- package/build/screens/avatar_picker/color_picker.d.ts.map +1 -0
- package/build/screens/avatar_picker/constants.d.ts +3 -0
- package/build/screens/avatar_picker/constants.d.ts.map +1 -0
- package/build/screens/avatar_picker/emoji_tab.d.ts +6 -0
- package/build/screens/avatar_picker/emoji_tab.d.ts.map +1 -0
- package/build/screens/avatar_picker/icon_grid.d.ts +7 -0
- package/build/screens/avatar_picker/icon_grid.d.ts.map +1 -0
- package/build/screens/avatar_picker/upload_tab.d.ts +8 -0
- package/build/screens/avatar_picker/upload_tab.d.ts.map +1 -0
- package/build/screens/bug_report_screen.d.ts +4 -0
- package/build/screens/bug_report_screen.d.ts.map +1 -0
- package/build/screens/conversation/message_read_receipts_screen.d.ts +8 -0
- package/build/screens/conversation/message_read_receipts_screen.d.ts.map +1 -0
- package/build/screens/conversation_details_screen.d.ts +6 -0
- package/build/screens/conversation_details_screen.d.ts.map +1 -0
- package/build/screens/conversation_details_screen.js +1 -0
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +11 -0
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +11 -0
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts +4 -0
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +10 -0
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +176 -0
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map +1 -0
- package/build/screens/conversation_filter_recipients/types.d.ts +48 -0
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -0
- package/build/screens/conversation_filters/components/conversation_filters.d.ts +2 -0
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -0
- package/build/screens/conversation_filters/components/rows.d.ts +42 -0
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +27 -0
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -0
- package/build/screens/conversation_filters/filter_types.d.ts +9 -0
- package/build/screens/conversation_filters/filter_types.d.ts.map +1 -0
- package/build/screens/conversation_filters/group_filters.d.ts +5 -0
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -0
- package/build/screens/conversation_filters/hooks/filters.d.ts +415 -0
- package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -0
- package/build/screens/conversation_filters/screen_props.d.ts +16 -0
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -0
- package/build/screens/conversation_filters/team_filters.d.ts +5 -0
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -0
- package/build/screens/conversation_filters_screen.d.ts +5 -0
- package/build/screens/conversation_filters_screen.d.ts.map +1 -0
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts +11 -0
- package/build/screens/conversation_new/components/avatar_selection_row.d.ts.map +1 -0
- package/build/screens/conversation_new/components/filter_by_plan.d.ts +22 -0
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -0
- package/build/screens/conversation_new/components/form_list.d.ts +13 -0
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -0
- package/build/screens/conversation_new/components/form_list.js +1 -0
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts +9 -0
- package/build/screens/conversation_new/components/gender_filter_toggle.d.ts.map +1 -0
- package/build/screens/conversation_new/components/groups_form.d.ts +10 -0
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -0
- package/build/screens/conversation_new/components/services_form.d.ts +11 -0
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -0
- package/build/screens/conversation_new/components/source_app_error_card.d.ts +2 -0
- package/build/screens/conversation_new/components/source_app_error_card.d.ts.map +1 -0
- package/build/screens/conversation_new/conversation_new_screen.d.ts +18 -0
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -0
- package/build/screens/conversation_notification_level_select_screen.d.ts +7 -0
- package/build/screens/conversation_notification_level_select_screen.d.ts.map +1 -0
- package/build/screens/conversation_screen.d.ts +28 -0
- package/build/screens/conversation_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +8 -0
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts +11 -0
- package/build/screens/conversation_select_recipients/components/recipient_link_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +7 -0
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/results_heading.d.ts +6 -0
- package/build/screens/conversation_select_recipients/components/results_heading.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +8 -0
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts +8 -0
- package/build/screens/conversation_select_recipients/components/view_more_link_row.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts +3 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +1 -0
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts +3 -0
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js +332 -291
- package/build/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts +3 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts +3 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.d.ts.map +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +1 -0
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts +11 -0
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -0
- package/build/screens/conversation_select_type_screen.d.ts +12 -0
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -0
- package/build/screens/conversations/components/chat_group_badge.d.ts +4 -0
- package/build/screens/conversations/components/chat_group_badge.d.ts.map +1 -0
- package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts +2 -0
- package/build/screens/conversations/components/filter_dropdown_list_header_component.d.ts.map +1 -0
- package/build/screens/conversations/components/list_header_action_button.d.ts +19 -0
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -0
- package/build/screens/conversations/components/list_header_component.d.ts +2 -0
- package/build/screens/conversations/components/list_header_component.d.ts.map +1 -0
- package/build/screens/conversations/components/search_list_header_component.d.ts +2 -0
- package/build/screens/conversations/components/search_list_header_component.d.ts.map +1 -0
- package/build/screens/conversations/conversations_screen.d.ts +13 -0
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -0
- package/build/screens/design_system_screen.d.ts +2 -0
- package/build/screens/design_system_screen.d.ts.map +1 -0
- package/build/screens/get_help_screen.d.ts +10 -0
- package/build/screens/get_help_screen.d.ts.map +1 -0
- package/build/screens/get_help_screen.js +56 -62
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.d.ts +7 -0
- package/build/screens/group_notification_level_select_screen.d.ts.map +1 -0
- package/build/screens/group_notification_settings_screen.d.ts +7 -0
- package/build/screens/group_notification_settings_screen.d.ts.map +1 -0
- package/build/screens/group_notification_settings_screen.js +3 -2
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/index.d.ts +25 -0
- package/build/screens/index.d.ts.map +1 -0
- package/build/screens/message_actions_screen.d.ts +12 -0
- package/build/screens/message_actions_screen.d.ts.map +1 -0
- package/build/screens/message_report/components/message_preview.d.ts +9 -0
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -0
- package/build/screens/message_report/components/report_reason_list.d.ts +8 -0
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -0
- package/build/screens/message_report_screen.d.ts +9 -0
- package/build/screens/message_report_screen.d.ts.map +1 -0
- package/build/screens/not_found.d.ts +2 -0
- package/build/screens/not_found.d.ts.map +1 -0
- package/build/screens/notification_settings/hooks/groups.d.ts +96 -0
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -0
- package/build/screens/notification_settings_screen.d.ts +4 -0
- package/build/screens/notification_settings_screen.d.ts.map +1 -0
- package/build/screens/notification_settings_screen.js +1 -0
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts +39 -0
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts.map +1 -0
- package/build/screens/preferred_app_selection_screen.d.ts +9 -0
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -0
- package/build/screens/preferred_app_selection_screen.js +45 -39
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.d.ts +9 -0
- package/build/screens/reactions_screen.d.ts.map +1 -0
- package/build/screens/search/components/conversation_result_row.d.ts +8 -0
- package/build/screens/search/components/conversation_result_row.d.ts.map +1 -0
- package/build/screens/search/components/conversation_results.d.ts +8 -0
- package/build/screens/search/components/conversation_results.d.ts.map +1 -0
- package/build/screens/search/components/message_result_row.d.ts +8 -0
- package/build/screens/search/components/message_result_row.d.ts.map +1 -0
- package/build/screens/search/components/result_row.d.ts +10 -0
- package/build/screens/search/components/result_row.d.ts.map +1 -0
- package/build/screens/search/components/results_section.d.ts +9 -0
- package/build/screens/search/components/results_section.d.ts.map +1 -0
- package/build/screens/search/components/search_blank_states.d.ts +7 -0
- package/build/screens/search/components/search_blank_states.d.ts.map +1 -0
- package/build/screens/search/components/search_field.d.ts +7 -0
- package/build/screens/search/components/search_field.d.ts.map +1 -0
- package/build/screens/search/components/search_results_list.d.ts +16 -0
- package/build/screens/search/components/search_results_list.d.ts.map +1 -0
- package/build/screens/search/components/search_results_list.js +136 -110
- package/build/screens/search/components/search_results_list.js.map +1 -1
- package/build/screens/search/components/snippet.d.ts +8 -0
- package/build/screens/search/components/snippet.d.ts.map +1 -0
- package/build/screens/search/search_screen.d.ts +5 -0
- package/build/screens/search/search_screen.d.ts.map +1 -0
- package/build/screens/search/search_screen.js +21 -28
- package/build/screens/search/search_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.d.ts +9 -0
- package/build/screens/send_giphy_screen.d.ts.map +1 -0
- package/build/screens/settings_screen.d.ts +4 -0
- package/build/screens/settings_screen.d.ts.map +1 -0
- package/build/screens/settings_screen.js +7 -6
- package/build/screens/settings_screen.js.map +1 -1
- package/build/screens/system_message_people_screen.d.ts +8 -0
- package/build/screens/system_message_people_screen.d.ts.map +1 -0
- package/build/screens/system_message_people_screen.js +33 -96
- package/build/screens/system_message_people_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.d.ts +8 -0
- package/build/screens/team_conversation_screen.d.ts.map +1 -0
- package/build/types/api_primitives.d.ts +45 -0
- package/build/types/api_primitives.d.ts.map +1 -0
- package/build/types/index.d.ts +4 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/jolt_events/attachment_events.d.ts +14 -0
- package/build/types/jolt_events/attachment_events.d.ts.map +1 -0
- package/build/types/jolt_events/conversation_events.d.ts +42 -0
- package/build/types/jolt_events/conversation_events.d.ts.map +1 -0
- package/build/types/jolt_events/index.d.ts +14 -0
- package/build/types/jolt_events/index.d.ts.map +1 -0
- package/build/types/jolt_events/message_events.d.ts +44 -0
- package/build/types/jolt_events/message_events.d.ts.map +1 -0
- package/build/types/jolt_events/reaction_events.d.ts +27 -0
- package/build/types/jolt_events/reaction_events.d.ts.map +1 -0
- package/build/types/jolt_events/typing_events.d.ts +16 -0
- package/build/types/jolt_events/typing_events.d.ts.map +1 -0
- package/build/types/product_analytics.d.ts +6 -0
- package/build/types/product_analytics.d.ts.map +1 -0
- package/build/types/resources/analytics_metadata.d.ts +5 -0
- package/build/types/resources/analytics_metadata.d.ts.map +1 -0
- package/build/types/resources/app_grant.d.ts +8 -0
- package/build/types/resources/app_grant.d.ts.map +1 -0
- package/build/types/resources/app_name.d.ts +2 -0
- package/build/types/resources/app_name.d.ts.map +1 -0
- package/build/types/resources/chat_configuration_resource.d.ts +9 -0
- package/build/types/resources/chat_configuration_resource.d.ts.map +1 -0
- package/build/types/resources/conversation.d.ts +48 -0
- package/build/types/resources/conversation.d.ts.map +1 -0
- package/build/types/resources/conversation_badge.d.ts +12 -0
- package/build/types/resources/conversation_badge.d.ts.map +1 -0
- package/build/types/resources/conversation_membership.d.ts +16 -0
- package/build/types/resources/conversation_membership.d.ts.map +1 -0
- package/build/types/resources/conversation_validate.d.ts +10 -0
- package/build/types/resources/conversation_validate.d.ts.map +1 -0
- package/build/types/resources/denormalized_attachment_resource.d.ts +65 -0
- package/build/types/resources/denormalized_attachment_resource.d.ts.map +1 -0
- package/build/types/resources/denormalized_attachment_resource_for_create.d.ts +53 -0
- package/build/types/resources/denormalized_attachment_resource_for_create.d.ts.map +1 -0
- package/build/types/resources/direct_message_affiliations.d.ts +9 -0
- package/build/types/resources/direct_message_affiliations.d.ts.map +1 -0
- package/build/types/resources/direct_message_candidate.d.ts +13 -0
- package/build/types/resources/direct_message_candidate.d.ts.map +1 -0
- package/build/types/resources/feature_resource.d.ts +7 -0
- package/build/types/resources/feature_resource.d.ts.map +1 -0
- package/build/types/resources/group_membership.d.ts +13 -0
- package/build/types/resources/group_membership.d.ts.map +1 -0
- package/build/types/resources/group_resource.d.ts +18 -0
- package/build/types/resources/group_resource.d.ts.map +1 -0
- package/build/types/resources/groups/groups_group_resource.d.ts +15 -0
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -0
- package/build/types/resources/groups/groups_member_resource_with_person.d.ts +15 -0
- package/build/types/resources/groups/groups_member_resource_with_person.d.ts.map +1 -0
- package/build/types/resources/groups/index.d.ts +2 -0
- package/build/types/resources/groups/index.d.ts.map +1 -0
- package/build/types/resources/index.d.ts +18 -0
- package/build/types/resources/index.d.ts.map +1 -0
- package/build/types/resources/member.d.ts +16 -0
- package/build/types/resources/member.d.ts.map +1 -0
- package/build/types/resources/member_ability.d.ts +12 -0
- package/build/types/resources/member_ability.d.ts.map +1 -0
- package/build/types/resources/message.d.ts +44 -0
- package/build/types/resources/message.d.ts.map +1 -0
- package/build/types/resources/message_report.d.ts +19 -0
- package/build/types/resources/message_report.d.ts.map +1 -0
- package/build/types/resources/oauth_token.d.ts +9 -0
- package/build/types/resources/oauth_token.d.ts.map +1 -0
- package/build/types/resources/organization.d.ts +8 -0
- package/build/types/resources/organization.d.ts.map +1 -0
- package/build/types/resources/person.d.ts +24 -0
- package/build/types/resources/person.d.ts.map +1 -0
- package/build/types/resources/reaction.d.ts +10 -0
- package/build/types/resources/reaction.d.ts.map +1 -0
- package/build/types/resources/read_receipt.d.ts +7 -0
- package/build/types/resources/read_receipt.d.ts.map +1 -0
- package/build/types/resources/search_result.d.ts +29 -0
- package/build/types/resources/search_result.d.ts.map +1 -0
- package/build/types/resources/services/chat_resource.d.ts +53 -0
- package/build/types/resources/services/chat_resource.d.ts.map +1 -0
- package/build/types/resources/services/index.d.ts +3 -0
- package/build/types/resources/services/index.d.ts.map +1 -0
- package/build/types/resources/services/team_resource.d.ts +19 -0
- package/build/types/resources/services/team_resource.d.ts.map +1 -0
- package/build/types/utils/index.d.ts +5 -0
- package/build/types/utils/index.d.ts.map +1 -0
- package/build/utils/archived_conversation.d.ts +5 -0
- package/build/utils/archived_conversation.d.ts.map +1 -0
- package/build/utils/assert_keys_are_numbers.d.ts +2 -0
- package/build/utils/assert_keys_are_numbers.d.ts.map +1 -0
- package/build/utils/attachment_kind.d.ts +5 -0
- package/build/utils/attachment_kind.d.ts.map +1 -0
- package/build/utils/auth_events.d.ts +7 -0
- package/build/utils/auth_events.d.ts.map +1 -0
- package/build/utils/cache/index.d.ts +2 -0
- package/build/utils/cache/index.d.ts.map +1 -0
- package/build/utils/cache/messages_cache.d.ts +13 -0
- package/build/utils/cache/messages_cache.d.ts.map +1 -0
- package/build/utils/cache/messages_window.d.ts +11 -0
- package/build/utils/cache/messages_window.d.ts.map +1 -0
- package/build/utils/cache/optimistically_create_message.d.ts +12 -0
- package/build/utils/cache/optimistically_create_message.d.ts.map +1 -0
- package/build/utils/cache/optimistically_update_message.d.ts +8 -0
- package/build/utils/cache/optimistically_update_message.d.ts.map +1 -0
- package/build/utils/cache/page_mutations.d.ts +96 -0
- package/build/utils/cache/page_mutations.d.ts.map +1 -0
- package/build/utils/can_submit_message.d.ts +10 -0
- package/build/utils/can_submit_message.d.ts.map +1 -0
- package/build/utils/chat_type_label.d.ts +2 -0
- package/build/utils/chat_type_label.d.ts.map +1 -0
- package/build/utils/client/client.d.ts +30 -0
- package/build/utils/client/client.d.ts.map +1 -0
- package/build/utils/client/index.d.ts +3 -0
- package/build/utils/client/index.d.ts.map +1 -0
- package/build/utils/client/instrumented_fetch.d.ts +2 -0
- package/build/utils/client/instrumented_fetch.d.ts.map +1 -0
- package/build/utils/client/request_helpers.d.ts +28 -0
- package/build/utils/client/request_helpers.d.ts.map +1 -0
- package/build/utils/client/transform_request_data.d.ts +13 -0
- package/build/utils/client/transform_request_data.d.ts.map +1 -0
- package/build/utils/client/transform_response.d.ts +3 -0
- package/build/utils/client/transform_response.d.ts.map +1 -0
- package/build/utils/client/types.d.ts +62 -0
- package/build/utils/client/types.d.ts.map +1 -0
- package/build/utils/client/utils.d.ts +5 -0
- package/build/utils/client/utils.d.ts.map +1 -0
- package/build/utils/conversation_safety_constants.d.ts +2 -0
- package/build/utils/conversation_safety_constants.d.ts.map +1 -0
- package/build/utils/convert_attachments_for_create.d.ts +12 -0
- package/build/utils/convert_attachments_for_create.d.ts.map +1 -0
- package/build/utils/date.d.ts +11 -0
- package/build/utils/date.d.ts.map +1 -0
- package/build/utils/dayjs.d.ts +3 -0
- package/build/utils/dayjs.d.ts.map +1 -0
- package/build/utils/deepCamelCaseKeys.d.ts +4 -0
- package/build/utils/deepCamelCaseKeys.d.ts.map +1 -0
- package/build/utils/deep_snake_case_keys.d.ts +4 -0
- package/build/utils/deep_snake_case_keys.d.ts.map +1 -0
- package/build/utils/destructure_chat_group_graph_id.d.ts +10 -0
- package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -0
- package/build/utils/gender_display_label.d.ts +2 -0
- package/build/utils/gender_display_label.d.ts.map +1 -0
- package/build/utils/generate_placeholder_ulid.d.ts +10 -0
- package/build/utils/generate_placeholder_ulid.d.ts.map +1 -0
- package/build/utils/group_messages.d.ts +22 -0
- package/build/utils/group_messages.d.ts.map +1 -0
- package/build/utils/host_bridge.d.ts +20 -0
- package/build/utils/host_bridge.d.ts.map +1 -0
- package/build/utils/index.d.ts +21 -0
- package/build/utils/index.d.ts.map +1 -0
- package/build/utils/is_input_editable.d.ts +6 -0
- package/build/utils/is_input_editable.d.ts.map +1 -0
- package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts +7 -0
- package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts.map +1 -0
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +12 -0
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts.map +1 -0
- package/build/utils/liquid_glass.d.ts +3 -0
- package/build/utils/liquid_glass.d.ts.map +1 -0
- package/build/utils/membership_sync_info_text.d.ts +2 -0
- package/build/utils/membership_sync_info_text.d.ts.map +1 -0
- package/build/utils/message_text.d.ts +3 -0
- package/build/utils/message_text.d.ts.map +1 -0
- package/build/utils/native_adapters/audio.d.ts +14 -0
- package/build/utils/native_adapters/audio.d.ts.map +1 -0
- package/build/utils/native_adapters/clipboard.d.ts +6 -0
- package/build/utils/native_adapters/clipboard.d.ts.map +1 -0
- package/build/utils/native_adapters/configuration.d.ts +36 -0
- package/build/utils/native_adapters/configuration.d.ts.map +1 -0
- package/build/utils/native_adapters/document_picker.d.ts +28 -0
- package/build/utils/native_adapters/document_picker.d.ts.map +1 -0
- package/build/utils/native_adapters/haptic.d.ts +23 -0
- package/build/utils/native_adapters/haptic.d.ts.map +1 -0
- package/build/utils/native_adapters/image_picker.d.ts +31 -0
- package/build/utils/native_adapters/image_picker.d.ts.map +1 -0
- package/build/utils/native_adapters/index.d.ts +12 -0
- package/build/utils/native_adapters/index.d.ts.map +1 -0
- package/build/utils/native_adapters/linking.d.ts +15 -0
- package/build/utils/native_adapters/linking.d.ts.map +1 -0
- package/build/utils/native_adapters/log.d.ts +26 -0
- package/build/utils/native_adapters/log.d.ts.map +1 -0
- package/build/utils/native_adapters/menu.d.ts +40 -0
- package/build/utils/native_adapters/menu.d.ts.map +1 -0
- package/build/utils/native_adapters/storage_adapter.d.ts +17 -0
- package/build/utils/native_adapters/storage_adapter.d.ts.map +1 -0
- package/build/utils/native_adapters/video.d.ts +22 -0
- package/build/utils/native_adapters/video.d.ts.map +1 -0
- package/build/utils/package_version.d.ts +2 -0
- package/build/utils/package_version.d.ts.map +1 -0
- package/build/utils/parse_simple_markdown.d.ts +7 -0
- package/build/utils/parse_simple_markdown.d.ts.map +1 -0
- package/build/utils/performance_tracking.d.ts +26 -0
- package/build/utils/performance_tracking.d.ts.map +1 -0
- package/build/utils/pluralize.d.ts +2 -0
- package/build/utils/pluralize.d.ts.map +1 -0
- package/build/utils/reaction_constants.d.ts +3 -0
- package/build/utils/reaction_constants.d.ts.map +1 -0
- package/build/utils/replace_equal_by_id.d.ts +6 -0
- package/build/utils/replace_equal_by_id.d.ts.map +1 -0
- package/build/utils/request/conversation.d.ts +12 -0
- package/build/utils/request/conversation.d.ts.map +1 -0
- package/build/utils/request/get_chat_configuration.d.ts +10 -0
- package/build/utils/request/get_chat_configuration.d.ts.map +1 -0
- package/build/utils/request/get_features.d.ts +17 -0
- package/build/utils/request/get_features.d.ts.map +1 -0
- package/build/utils/request/get_message.d.ts +20 -0
- package/build/utils/request/get_message.d.ts.map +1 -0
- package/build/utils/request/get_messages.d.ts +21 -0
- package/build/utils/request/get_messages.d.ts.map +1 -0
- package/build/utils/request/get_search_results.d.ts +13 -0
- package/build/utils/request/get_search_results.d.ts.map +1 -0
- package/build/utils/request/messages_data_options.d.ts +7 -0
- package/build/utils/request/messages_data_options.d.ts.map +1 -0
- package/build/utils/response_error.d.ts +11 -0
- package/build/utils/response_error.d.ts.map +1 -0
- package/build/utils/session.d.ts +38 -0
- package/build/utils/session.d.ts.map +1 -0
- package/build/utils/session_manager.d.ts +21 -0
- package/build/utils/session_manager.d.ts.map +1 -0
- package/build/utils/sha_256.d.ts +31 -0
- package/build/utils/sha_256.d.ts.map +1 -0
- package/build/utils/styles.d.ts +11 -0
- package/build/utils/styles.d.ts.map +1 -0
- package/build/utils/system_messages.d.ts +17 -0
- package/build/utils/system_messages.d.ts.map +1 -0
- package/build/utils/theme.d.ts +88 -0
- package/build/utils/theme.d.ts.map +1 -0
- package/build/utils/time.d.ts +9 -0
- package/build/utils/time.d.ts.map +1 -0
- package/build/utils/upload_uri.d.ts +24 -0
- package/build/utils/upload_uri.d.ts.map +1 -0
- package/build/utils/uri.d.ts +29 -0
- package/build/utils/uri.d.ts.map +1 -0
- package/build/vendor/font_awesome_pro_solid_icons.d.ts +53 -0
- package/build/vendor/font_awesome_pro_solid_icons.d.ts.map +1 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts +89 -0
- package/build/vendor/tapestry/alias_tokens_color_map.d.ts.map +1 -0
- package/build/vendor/tapestry/tokens.d.ts +121 -0
- package/build/vendor/tapestry/tokens.d.ts.map +1 -0
- package/package.json +8 -12
- package/src/__tests__/utils/theme.ts +2 -5
- package/src/__utils__/render_with_query_client.tsx +13 -0
- package/src/components/conversation/__tests__/message_list.test.tsx +4 -0
- package/src/components/conversation/message_list.tsx +6 -0
- package/src/components/conversations/__tests__/conversation_preview.test.tsx +2 -2
- package/src/components/conversations/conversations.tsx +1 -0
- package/src/components/display/__tests__/conversation_avatar.test.tsx +94 -0
- package/src/components/display/conversation_avatar.tsx +9 -2
- package/src/components/display/image.tsx +10 -19
- package/src/components/display/keyboard_scroll_view.tsx +1 -0
- package/src/components/page/__tests__/page_error_boundary.test.tsx +33 -0
- package/src/components/page/page_error_boundary.tsx +43 -12
- package/src/contexts/__tests__/configured_retry.test.ts +39 -0
- package/src/contexts/api_provider.tsx +12 -5
- package/src/hooks/__tests__/use_conversation_avatar_update.test.tsx +40 -0
- package/src/hooks/__tests__/use_system_message_people.test.tsx +79 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use_conversation_avatar_update.ts +67 -11
- package/src/hooks/use_system_message_people.ts +55 -0
- package/src/navigation/index.tsx +6 -2
- package/src/navigation/page_error_fallbacks.ts +14 -0
- package/src/navigation/screenLayout.tsx +3 -1
- package/src/screens/age_check/age_check_required_screen.tsx +5 -1
- package/src/screens/avatar_picker/__tests__/avatar_picker_screen.test.tsx +67 -0
- package/src/screens/avatar_picker/avatar_picker_screen.tsx +7 -1
- package/src/screens/conversation_details_screen.tsx +1 -0
- package/src/screens/conversation_new/components/form_list.tsx +1 -0
- package/src/screens/conversation_select_recipients/__tests__/conversation_select_direct_message_recipients_screen.test.tsx +100 -0
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -1
- package/src/screens/conversation_select_recipients/conversation_select_direct_message_recipients_screen.tsx +78 -68
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +1 -0
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +1 -0
- package/src/screens/get_help_screen.tsx +4 -4
- package/src/screens/group_notification_settings_screen.tsx +3 -3
- package/src/screens/notification_settings_screen.tsx +1 -0
- package/src/screens/preferred_app_selection_screen.tsx +4 -4
- package/src/screens/search/__tests__/search_screen.test.tsx +11 -12
- package/src/screens/search/components/__tests__/conversation_results.test.tsx +14 -5
- package/src/screens/search/components/__tests__/message_result_row.test.tsx +5 -4
- package/src/screens/search/components/__tests__/search_results_list.test.tsx +10 -5
- package/src/screens/search/components/search_results_list.tsx +34 -13
- package/src/screens/search/search_screen.tsx +8 -18
- package/src/screens/settings_screen.tsx +25 -25
- package/src/screens/system_message_people_screen.tsx +6 -20
|
@@ -1,13 +1,46 @@
|
|
|
1
1
|
import { c as _c } from "react/compiler-runtime";
|
|
2
|
-
import { useMutation, useQueryClient } from '@tanstack/react-query';
|
|
3
|
-
import { Alert } from 'react-native';
|
|
2
|
+
import { useMutation, useMutationState, useQueryClient } from '@tanstack/react-query';
|
|
3
|
+
import { Alert, Image } from 'react-native';
|
|
4
|
+
import { updateAllRecordsInPagesData } from '../utils/cache/page_mutations';
|
|
4
5
|
import { transformGetToPost } from '../utils/client/request_helpers';
|
|
5
6
|
import { useApiClient } from './use_api_client';
|
|
6
7
|
import { getConversationRequestArgs } from './use_conversation';
|
|
7
8
|
import { getRequestQueryKey } from './use_suspense_api';
|
|
8
9
|
import { useUploadClient } from './use_upload_client';
|
|
10
|
+
const MUTATION_KEY = 'updateConversationAvatar';
|
|
11
|
+
export const usePendingConversationAvatarUpdate = conversationId => {
|
|
12
|
+
const $ = _c(4);
|
|
13
|
+
let t0;
|
|
14
|
+
if ($[0] !== conversationId) {
|
|
15
|
+
t0 = {
|
|
16
|
+
filters: {
|
|
17
|
+
mutationKey: [MUTATION_KEY, conversationId],
|
|
18
|
+
exact: true
|
|
19
|
+
},
|
|
20
|
+
select: _temp
|
|
21
|
+
};
|
|
22
|
+
$[0] = conversationId;
|
|
23
|
+
$[1] = t0;
|
|
24
|
+
} else {
|
|
25
|
+
t0 = $[1];
|
|
26
|
+
}
|
|
27
|
+
const t1 = useMutationState(t0);
|
|
28
|
+
let t2;
|
|
29
|
+
if ($[2] !== t1) {
|
|
30
|
+
t2 = t1.at(-1);
|
|
31
|
+
$[2] = t1;
|
|
32
|
+
$[3] = t2;
|
|
33
|
+
} else {
|
|
34
|
+
t2 = $[3];
|
|
35
|
+
}
|
|
36
|
+
const newest = t2;
|
|
37
|
+
if (conversationId === undefined || newest?.status !== "pending") {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
return newest.variables;
|
|
41
|
+
};
|
|
9
42
|
export const useConversationAvatarUpdate = t0 => {
|
|
10
|
-
const $ = _c(
|
|
43
|
+
const $ = _c(31);
|
|
11
44
|
const {
|
|
12
45
|
conversationId
|
|
13
46
|
} = t0;
|
|
@@ -30,18 +63,34 @@ export const useConversationAvatarUpdate = t0 => {
|
|
|
30
63
|
}
|
|
31
64
|
const queryKey = t1;
|
|
32
65
|
let t2;
|
|
33
|
-
if ($[3] !== conversationId) {
|
|
34
|
-
t2 =
|
|
66
|
+
if ($[3] !== conversationId || $[4] !== queryClient) {
|
|
67
|
+
t2 = payload => queryClient.getMutationCache().findAll({
|
|
68
|
+
mutationKey: [MUTATION_KEY, conversationId],
|
|
69
|
+
exact: true
|
|
70
|
+
}).at(-1)?.state.variables !== payload;
|
|
35
71
|
$[3] = conversationId;
|
|
36
|
-
$[4] =
|
|
72
|
+
$[4] = queryClient;
|
|
73
|
+
$[5] = t2;
|
|
37
74
|
} else {
|
|
38
|
-
t2 = $[
|
|
75
|
+
t2 = $[5];
|
|
39
76
|
}
|
|
77
|
+
const isSuperseded = t2;
|
|
40
78
|
let t3;
|
|
41
|
-
if ($[
|
|
42
|
-
t3 =
|
|
79
|
+
if ($[6] !== conversationId) {
|
|
80
|
+
t3 = [MUTATION_KEY, conversationId];
|
|
81
|
+
$[6] = conversationId;
|
|
82
|
+
$[7] = t3;
|
|
83
|
+
} else {
|
|
84
|
+
t3 = $[7];
|
|
85
|
+
}
|
|
86
|
+
let t4;
|
|
87
|
+
if ($[8] !== apiClient || $[9] !== conversationId || $[10] !== isSuperseded || $[11] !== requestArgs || $[12] !== uploadClient) {
|
|
88
|
+
t4 = async payload_0 => {
|
|
43
89
|
const postArgs = transformGetToPost(requestArgs).data;
|
|
44
|
-
const attributes = await buildAttributes(
|
|
90
|
+
const attributes = await buildAttributes(payload_0, uploadClient);
|
|
91
|
+
if (isSuperseded(payload_0)) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
45
94
|
return apiClient.chat.patch({
|
|
46
95
|
url: `/me/conversations/${conversationId}/`,
|
|
47
96
|
data: {
|
|
@@ -53,19 +102,18 @@ export const useConversationAvatarUpdate = t0 => {
|
|
|
53
102
|
}
|
|
54
103
|
});
|
|
55
104
|
};
|
|
56
|
-
$[
|
|
57
|
-
$[
|
|
58
|
-
$[
|
|
59
|
-
$[
|
|
60
|
-
$[
|
|
105
|
+
$[8] = apiClient;
|
|
106
|
+
$[9] = conversationId;
|
|
107
|
+
$[10] = isSuperseded;
|
|
108
|
+
$[11] = requestArgs;
|
|
109
|
+
$[12] = uploadClient;
|
|
110
|
+
$[13] = t4;
|
|
61
111
|
} else {
|
|
62
|
-
|
|
112
|
+
t4 = $[13];
|
|
63
113
|
}
|
|
64
|
-
let t4;
|
|
65
114
|
let t5;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
t4 = async payload_0 => {
|
|
115
|
+
if ($[14] !== queryClient || $[15] !== queryKey) {
|
|
116
|
+
t5 = async payload_1 => {
|
|
69
117
|
await queryClient.cancelQueries({
|
|
70
118
|
queryKey
|
|
71
119
|
});
|
|
@@ -76,54 +124,89 @@ export const useConversationAvatarUpdate = t0 => {
|
|
|
76
124
|
}
|
|
77
125
|
return {
|
|
78
126
|
...prev,
|
|
79
|
-
data:
|
|
127
|
+
data: applyAvatarUpdate(prev.data, payload_1)
|
|
80
128
|
};
|
|
81
129
|
});
|
|
82
130
|
return {
|
|
83
131
|
previous
|
|
84
132
|
};
|
|
85
133
|
};
|
|
86
|
-
|
|
134
|
+
$[14] = queryClient;
|
|
135
|
+
$[15] = queryKey;
|
|
136
|
+
$[16] = t5;
|
|
137
|
+
} else {
|
|
138
|
+
t5 = $[16];
|
|
139
|
+
}
|
|
140
|
+
let t6;
|
|
141
|
+
if ($[17] !== conversationId || $[18] !== queryClient || $[19] !== queryKey) {
|
|
142
|
+
t6 = async (response, _payload, _context) => {
|
|
143
|
+
if (!response) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
87
146
|
queryClient.setQueryData(queryKey, () => response);
|
|
147
|
+
queryClient.setQueriesData({
|
|
148
|
+
queryKey: ["/me/conversations"]
|
|
149
|
+
}, prev_0 => {
|
|
150
|
+
if (!prev_0?.pages) {
|
|
151
|
+
return prev_0;
|
|
152
|
+
}
|
|
153
|
+
return updateAllRecordsInPagesData({
|
|
154
|
+
data: prev_0,
|
|
155
|
+
processRecord: record => record.id === conversationId ? applySavedAvatar(record, response.data) : record
|
|
156
|
+
});
|
|
157
|
+
});
|
|
88
158
|
queryClient.invalidateQueries({
|
|
89
159
|
queryKey: ["/me/conversations"]
|
|
90
160
|
});
|
|
161
|
+
const imageUrl = response.data.customAvatarImageUrl;
|
|
162
|
+
if (imageUrl) {
|
|
163
|
+
await Image.prefetch(imageUrl).catch(_temp2);
|
|
164
|
+
}
|
|
91
165
|
};
|
|
92
|
-
|
|
166
|
+
$[17] = conversationId;
|
|
167
|
+
$[18] = queryClient;
|
|
168
|
+
$[19] = queryKey;
|
|
169
|
+
$[20] = t6;
|
|
170
|
+
} else {
|
|
171
|
+
t6 = $[20];
|
|
172
|
+
}
|
|
173
|
+
let t7;
|
|
174
|
+
if ($[21] !== isSuperseded || $[22] !== queryClient || $[23] !== queryKey) {
|
|
175
|
+
t7 = (_error, payload_2, context) => {
|
|
176
|
+
if (isSuperseded(payload_2)) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
93
179
|
if (context?.previous) {
|
|
94
180
|
queryClient.setQueryData(queryKey, context.previous);
|
|
95
181
|
}
|
|
96
182
|
Alert.alert("Error", "Failed to update conversation avatar. Please try again.");
|
|
97
183
|
};
|
|
98
|
-
$[
|
|
99
|
-
$[
|
|
100
|
-
$[
|
|
101
|
-
$[
|
|
102
|
-
$[14] = t6;
|
|
184
|
+
$[21] = isSuperseded;
|
|
185
|
+
$[22] = queryClient;
|
|
186
|
+
$[23] = queryKey;
|
|
187
|
+
$[24] = t7;
|
|
103
188
|
} else {
|
|
104
|
-
|
|
105
|
-
t5 = $[13];
|
|
106
|
-
t6 = $[14];
|
|
189
|
+
t7 = $[24];
|
|
107
190
|
}
|
|
108
|
-
let
|
|
109
|
-
if ($[
|
|
110
|
-
|
|
111
|
-
mutationKey:
|
|
112
|
-
mutationFn:
|
|
113
|
-
onMutate:
|
|
114
|
-
onSuccess:
|
|
115
|
-
onError:
|
|
191
|
+
let t8;
|
|
192
|
+
if ($[25] !== t3 || $[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== t7) {
|
|
193
|
+
t8 = {
|
|
194
|
+
mutationKey: t3,
|
|
195
|
+
mutationFn: t4,
|
|
196
|
+
onMutate: t5,
|
|
197
|
+
onSuccess: t6,
|
|
198
|
+
onError: t7
|
|
116
199
|
};
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
200
|
+
$[25] = t3;
|
|
201
|
+
$[26] = t4;
|
|
202
|
+
$[27] = t5;
|
|
203
|
+
$[28] = t6;
|
|
204
|
+
$[29] = t7;
|
|
205
|
+
$[30] = t8;
|
|
123
206
|
} else {
|
|
124
|
-
|
|
207
|
+
t8 = $[30];
|
|
125
208
|
}
|
|
126
|
-
return useMutation(
|
|
209
|
+
return useMutation(t8);
|
|
127
210
|
};
|
|
128
211
|
export async function patchConversationAvatar(apiClient, uploadClient, conversationId, payload) {
|
|
129
212
|
const requestArgs = getConversationRequestArgs({
|
|
@@ -146,7 +229,16 @@ export async function patchConversationAvatar(apiClient, uploadClient, conversat
|
|
|
146
229
|
Alert.alert('Avatar not saved', 'The conversation was created, but the avatar could not be saved. You can update it from the conversation details.');
|
|
147
230
|
}
|
|
148
231
|
}
|
|
149
|
-
function
|
|
232
|
+
function applySavedAvatar(data, saved) {
|
|
233
|
+
return {
|
|
234
|
+
...data,
|
|
235
|
+
customAvatarType: saved.customAvatarType,
|
|
236
|
+
customAvatarKey: saved.customAvatarKey,
|
|
237
|
+
customAvatarColor: saved.customAvatarColor,
|
|
238
|
+
customAvatarImageUrl: saved.customAvatarImageUrl
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
export function applyAvatarUpdate(data, payload) {
|
|
150
242
|
switch (payload.kind) {
|
|
151
243
|
case 'icon':
|
|
152
244
|
return {
|
|
@@ -217,4 +309,10 @@ async function buildAttributes(payload, uploadClient) {
|
|
|
217
309
|
};
|
|
218
310
|
}
|
|
219
311
|
}
|
|
312
|
+
function _temp(mutation) {
|
|
313
|
+
return mutation.state;
|
|
314
|
+
}
|
|
315
|
+
function _temp2() {
|
|
316
|
+
return false;
|
|
317
|
+
}
|
|
220
318
|
//# sourceMappingURL=use_conversation_avatar_update.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_conversation_avatar_update.js","names":["useMutation","useQueryClient","Alert","transformGetToPost","useApiClient","getConversationRequestArgs","getRequestQueryKey","useUploadClient","useConversationAvatarUpdate","t0","$","_c","conversationId","apiClient","uploadClient","queryClient","requestArgs","t1","conversation_id","queryKey","t2","t3","payload","postArgs","data","attributes","buildAttributes","chat","patch","url","type","t4","t5","t6","payload_0","cancelQueries","previous","getQueryData","setQueryData","prev","buildOptimisticData","response","_payload","_context","invalidateQueries","_error","_payload_0","context","alert","t7","mutationKey","mutationFn","onMutate","onSuccess","onError","patchConversationAvatar","kind","customAvatarType","customAvatarKey","key","customAvatarColor","color","customAvatarImageUrl","imageAsset","uri","custom_avatar_type","custom_avatar_key","custom_avatar_color","uploaded","uploadFile","name","fileName","mimeType","avatar_uploaded_file_id","id"],"sources":["../../src/hooks/use_conversation_avatar_update.ts"],"sourcesContent":["import { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { Alert } from 'react-native'\nimport type { ConversationResource } from '../types'\nimport type { ApiResource } from '../types'\nimport { transformGetToPost } from '../utils/client/request_helpers'\nimport type { ImagePickerAsset } from '../utils/native_adapters/image_picker'\nimport { ApiClient, useApiClient } from './use_api_client'\nimport { getConversationRequestArgs } from './use_conversation'\nimport { getRequestQueryKey } from './use_suspense_api'\nimport { useUploadClient } from './use_upload_client'\n\nexport type AvatarType = 'icon' | 'emoji' | 'image'\n\nexport type AvatarUpdatePayload =\n | { kind: Extract<AvatarType, 'icon' | 'emoji'>; key: string; color: string }\n | { kind: Extract<AvatarType, 'image'>; imageAsset: ImagePickerAsset; color: string }\n | { kind: 'clear' }\n\nexport const useConversationAvatarUpdate = ({ conversationId }: { conversationId: number }) => {\n const apiClient = useApiClient()\n const uploadClient = useUploadClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id: conversationId })\n const queryKey = getRequestQueryKey(requestArgs)\n\n return useMutation({\n mutationKey: ['updateConversationAvatar', conversationId],\n mutationFn: async (payload: AvatarUpdatePayload) => {\n const postArgs = transformGetToPost(requestArgs).data\n const attributes = await buildAttributes(payload, uploadClient)\n\n return apiClient.chat.patch<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversationId}/`,\n data: { data: { type: '', attributes }, ...postArgs },\n })\n },\n onMutate: async (payload: AvatarUpdatePayload) => {\n await queryClient.cancelQueries({ queryKey })\n\n const previous = queryClient.getQueryData<ApiResource<ConversationResource>>(queryKey)\n\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n return { ...prev, data: buildOptimisticData(prev.data, payload) }\n })\n\n return { previous }\n },\n onSuccess: (response, _payload, _context) => {\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, () => response)\n queryClient.invalidateQueries({ queryKey: ['/me/conversations'] })\n },\n onError: (_error, _payload, context) => {\n if (context?.previous) {\n queryClient.setQueryData(queryKey, context.previous)\n }\n\n Alert.alert('Error', 'Failed to update conversation avatar. Please try again.')\n },\n })\n}\n\nexport async function patchConversationAvatar(\n apiClient: ApiClient,\n uploadClient: ReturnType<typeof useUploadClient>,\n conversationId: number,\n payload: Exclude<AvatarUpdatePayload, { kind: 'clear' }>\n) {\n const requestArgs = getConversationRequestArgs({ conversation_id: conversationId })\n const postArgs = transformGetToPost(requestArgs).data\n\n try {\n const attributes = await buildAttributes(payload, uploadClient)\n await apiClient.chat.patch({\n url: `/me/conversations/${conversationId}/`,\n data: { data: { type: '', attributes }, ...postArgs },\n })\n } catch {\n Alert.alert(\n 'Avatar not saved',\n 'The conversation was created, but the avatar could not be saved. You can update it from the conversation details.'\n )\n }\n}\n\nfunction buildOptimisticData(\n data: ConversationResource,\n payload: AvatarUpdatePayload\n): ConversationResource {\n switch (payload.kind) {\n case 'icon':\n return {\n ...data,\n customAvatarType: 'icon',\n customAvatarKey: payload.key,\n customAvatarColor: payload.color,\n customAvatarImageUrl: null,\n }\n case 'emoji':\n return {\n ...data,\n customAvatarType: 'emoji',\n customAvatarKey: payload.key,\n customAvatarColor: payload.color,\n customAvatarImageUrl: null,\n }\n case 'image':\n return {\n ...data,\n customAvatarType: 'image',\n customAvatarKey: null,\n customAvatarColor: payload.color,\n customAvatarImageUrl: payload.imageAsset.uri,\n }\n case 'clear':\n return {\n ...data,\n customAvatarType: null,\n customAvatarKey: null,\n customAvatarColor: null,\n customAvatarImageUrl: null,\n }\n }\n}\n\nasync function buildAttributes(\n payload: AvatarUpdatePayload,\n uploadClient: ReturnType<typeof useUploadClient>\n) {\n switch (payload.kind) {\n case 'icon':\n return {\n custom_avatar_type: 'icon',\n custom_avatar_key: payload.key,\n custom_avatar_color: payload.color,\n }\n case 'emoji':\n return {\n custom_avatar_type: 'emoji',\n custom_avatar_key: payload.key,\n custom_avatar_color: payload.color,\n }\n case 'image': {\n const uploaded = await uploadClient.uploadFile({\n uri: payload.imageAsset.uri,\n name: payload.imageAsset.fileName || 'avatar.jpg',\n type: payload.imageAsset.mimeType || 'image/jpeg',\n })\n\n return {\n custom_avatar_type: 'image',\n custom_avatar_color: payload.color,\n avatar_uploaded_file_id: uploaded.id,\n }\n }\n case 'clear':\n return {\n custom_avatar_type: null,\n custom_avatar_key: null,\n custom_avatar_color: null,\n }\n }\n}\n"],"mappings":";AAAA,SAASA,WAAW,EAAEC,cAAc,QAAQ,uBAAuB;AACnE,SAASC,KAAK,QAAQ,cAAc;AAGpC,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE,SAAoBC,YAAY,QAAQ,kBAAkB;AAC1D,SAASC,0BAA0B,QAAQ,oBAAoB;AAC/D,SAASC,kBAAkB,QAAQ,oBAAoB;AACvD,SAASC,eAAe,QAAQ,qBAAqB;AASrD,OAAO,MAAMC,2BAA2B,GAAGC,EAAA;EAAA,MAAAC,CAAA,GAAAC,EAAA;EAAC;IAAAC;EAAA,IAAAH,EAA8C;EACxF,MAAAI,SAAA,GAAkBT,YAAY,CAAC,CAAC;EAChC,MAAAU,YAAA,GAAqBP,eAAe,CAAC,CAAC;EACtC,MAAAQ,WAAA,GAAoBd,cAAc,CAAC,CAAC;EAAA,IAAAe,WAAA;EAAA,IAAAC,EAAA;EAAA,IAAAP,CAAA,QAAAE,cAAA;IACpCI,WAAA,GAAoBX,0BAA0B,CAAC;MAAAa,eAAA,EAAmBN;IAAe,CAAC,CAAC;IAClEK,EAAA,GAAAX,kBAAkB,CAACU,WAAW,CAAC;IAAAN,CAAA,MAAAE,cAAA;IAAAF,CAAA,MAAAM,WAAA;IAAAN,CAAA,MAAAO,EAAA;EAAA;IA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AACQ,QAAQ,IAAI,YAAY;UACjDzC,IAAI,EAAER,OAAO,CAACyC,UAAU,CAACS,QAAQ,IAAI;QACvC,CAAC,CAAC;QAEF,OAAO;UACLP,kBAAkB,EAAE,OAAO;UAC3BE,mBAAmB,EAAE7C,OAAO,CAACuC,KAAK;UAClCY,uBAAuB,EAAEL,QAAQ,CAACM;QACpC,CAAC;MACH;IACA,KAAK,OAAO;MACV,OAAO;QACLT,kBAAkB,EAAE,IAAI;QACxBC,iBAAiB,EAAE,IAAI;QACvBC,mBAAmB,EAAE;MACvB,CAAC;EACL;AACF","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"use_conversation_avatar_update.js","names":["useMutation","useMutationState","useQueryClient","Alert","Image","updateAllRecordsInPagesData","transformGetToPost","useApiClient","getConversationRequestArgs","getRequestQueryKey","useUploadClient","MUTATION_KEY","usePendingConversationAvatarUpdate","conversationId","$","_c","t0","filters","mutationKey","exact","select","_temp","t1","t2","at","newest","undefined","status","variables","useConversationAvatarUpdate","apiClient","uploadClient","queryClient","requestArgs","conversation_id","queryKey","payload","getMutationCache","findAll","state","isSuperseded","t3","t4","payload_0","postArgs","data","attributes","buildAttributes","chat","patch","url","type","t5","payload_1","cancelQueries","previous","getQueryData","setQueryData","prev","applyAvatarUpdate","t6","response","_payload","_context","setQueriesData","prev_0","pages","processRecord","record","id","applySavedAvatar","invalidateQueries","imageUrl","customAvatarImageUrl","prefetch","catch","_temp2","t7","_error","payload_2","context","alert","t8","mutationFn","onMutate","onSuccess","onError","patchConversationAvatar","saved","customAvatarType","customAvatarKey","customAvatarColor","kind","key","color","imageAsset","uri","custom_avatar_type","custom_avatar_key","custom_avatar_color","uploaded","uploadFile","name","fileName","mimeType","avatar_uploaded_file_id","mutation"],"sources":["../../src/hooks/use_conversation_avatar_update.ts"],"sourcesContent":["import { InfiniteData, useMutation, useMutationState, useQueryClient } from '@tanstack/react-query'\nimport { Alert, Image } from 'react-native'\nimport type {\n ApiCollection,\n ApiResource,\n ConversationAvatarData,\n ConversationResource,\n} from '../types'\nimport { updateAllRecordsInPagesData } from '../utils/cache/page_mutations'\nimport { transformGetToPost } from '../utils/client/request_helpers'\nimport type { ImagePickerAsset } from '../utils/native_adapters/image_picker'\nimport { ApiClient, useApiClient } from './use_api_client'\nimport { getConversationRequestArgs } from './use_conversation'\nimport { getRequestQueryKey } from './use_suspense_api'\nimport { useUploadClient } from './use_upload_client'\n\nexport type AvatarType = 'icon' | 'emoji' | 'image'\n\nexport type AvatarUpdatePayload =\n | { kind: Extract<AvatarType, 'icon' | 'emoji'>; key: string; color: string }\n | { kind: Extract<AvatarType, 'image'>; imageAsset: ImagePickerAsset; color: string }\n | { kind: 'clear' }\n\nconst MUTATION_KEY = 'updateConversationAvatar'\n\nexport const usePendingConversationAvatarUpdate = (conversationId: number | undefined) => {\n const newest = useMutationState({\n filters: { mutationKey: [MUTATION_KEY, conversationId], exact: true },\n select: mutation => mutation.state,\n }).at(-1)\n\n if (conversationId === undefined || newest?.status !== 'pending') return undefined\n return newest.variables as AvatarUpdatePayload\n}\n\nexport const useConversationAvatarUpdate = ({ conversationId }: { conversationId: number }) => {\n const apiClient = useApiClient()\n const uploadClient = useUploadClient()\n const queryClient = useQueryClient()\n const requestArgs = getConversationRequestArgs({ conversation_id: conversationId })\n const queryKey = getRequestQueryKey(requestArgs)\n\n const isSuperseded = (payload: AvatarUpdatePayload) =>\n queryClient\n .getMutationCache()\n .findAll({ mutationKey: [MUTATION_KEY, conversationId], exact: true })\n .at(-1)?.state.variables !== payload\n\n return useMutation({\n mutationKey: [MUTATION_KEY, conversationId],\n mutationFn: async (payload: AvatarUpdatePayload) => {\n const postArgs = transformGetToPost(requestArgs).data\n const attributes = await buildAttributes(payload, uploadClient)\n if (isSuperseded(payload)) return null\n\n return apiClient.chat.patch<ApiResource<ConversationResource>>({\n url: `/me/conversations/${conversationId}/`,\n data: { data: { type: '', attributes }, ...postArgs },\n })\n },\n onMutate: async (payload: AvatarUpdatePayload) => {\n await queryClient.cancelQueries({ queryKey })\n\n const previous = queryClient.getQueryData<ApiResource<ConversationResource>>(queryKey)\n\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, prev => {\n if (!prev?.data) return prev\n return { ...prev, data: applyAvatarUpdate(prev.data, payload) }\n })\n\n return { previous }\n },\n onSuccess: async (response, _payload, _context) => {\n if (!response) return\n\n queryClient.setQueryData<ApiResource<ConversationResource>>(queryKey, () => response)\n queryClient.setQueriesData<InfiniteData<ApiCollection<ConversationResource>>>(\n { queryKey: ['/me/conversations'] },\n prev => {\n if (!prev?.pages) return prev\n\n return updateAllRecordsInPagesData({\n data: prev,\n processRecord: record =>\n record.id === conversationId ? applySavedAvatar(record, response.data) : record,\n })\n }\n )\n queryClient.invalidateQueries({ queryKey: ['/me/conversations'] })\n\n const imageUrl = response.data.customAvatarImageUrl\n if (imageUrl) await Image.prefetch(imageUrl).catch(() => false)\n },\n onError: (_error, payload, context) => {\n if (isSuperseded(payload)) return\n\n if (context?.previous) {\n queryClient.setQueryData(queryKey, context.previous)\n }\n\n Alert.alert('Error', 'Failed to update conversation avatar. Please try again.')\n },\n })\n}\n\nexport async function patchConversationAvatar(\n apiClient: ApiClient,\n uploadClient: ReturnType<typeof useUploadClient>,\n conversationId: number,\n payload: Exclude<AvatarUpdatePayload, { kind: 'clear' }>\n) {\n const requestArgs = getConversationRequestArgs({ conversation_id: conversationId })\n const postArgs = transformGetToPost(requestArgs).data\n\n try {\n const attributes = await buildAttributes(payload, uploadClient)\n await apiClient.chat.patch({\n url: `/me/conversations/${conversationId}/`,\n data: { data: { type: '', attributes }, ...postArgs },\n })\n } catch {\n Alert.alert(\n 'Avatar not saved',\n 'The conversation was created, but the avatar could not be saved. You can update it from the conversation details.'\n )\n }\n}\n\nfunction applySavedAvatar<T extends ConversationAvatarData>(\n data: T,\n saved: ConversationAvatarData\n): T {\n return {\n ...data,\n customAvatarType: saved.customAvatarType,\n customAvatarKey: saved.customAvatarKey,\n customAvatarColor: saved.customAvatarColor,\n customAvatarImageUrl: saved.customAvatarImageUrl,\n }\n}\n\nexport function applyAvatarUpdate<T extends ConversationAvatarData>(\n data: T,\n payload: AvatarUpdatePayload\n): T {\n switch (payload.kind) {\n case 'icon':\n return {\n ...data,\n customAvatarType: 'icon',\n customAvatarKey: payload.key,\n customAvatarColor: payload.color,\n customAvatarImageUrl: null,\n }\n case 'emoji':\n return {\n ...data,\n customAvatarType: 'emoji',\n customAvatarKey: payload.key,\n customAvatarColor: payload.color,\n customAvatarImageUrl: null,\n }\n case 'image':\n return {\n ...data,\n customAvatarType: 'image',\n customAvatarKey: null,\n customAvatarColor: payload.color,\n customAvatarImageUrl: payload.imageAsset.uri,\n }\n case 'clear':\n return {\n ...data,\n customAvatarType: null,\n customAvatarKey: null,\n customAvatarColor: null,\n customAvatarImageUrl: null,\n }\n }\n}\n\nasync function buildAttributes(\n payload: AvatarUpdatePayload,\n uploadClient: ReturnType<typeof useUploadClient>\n) {\n switch (payload.kind) {\n case 'icon':\n return {\n custom_avatar_type: 'icon',\n custom_avatar_key: payload.key,\n custom_avatar_color: payload.color,\n }\n case 'emoji':\n return {\n custom_avatar_type: 'emoji',\n custom_avatar_key: payload.key,\n custom_avatar_color: payload.color,\n }\n case 'image': {\n const uploaded = await uploadClient.uploadFile({\n uri: payload.imageAsset.uri,\n name: payload.imageAsset.fileName || 'avatar.jpg',\n type: payload.imageAsset.mimeType || 'image/jpeg',\n })\n\n return {\n custom_avatar_type: 'image',\n custom_avatar_color: payload.color,\n avatar_uploaded_file_id: uploaded.id,\n }\n }\n case 'clear':\n return {\n custom_avatar_type: null,\n custom_avatar_key: null,\n custom_avatar_color: null,\n }\n }\n}\n"],"mappings":";AAAA,SAAuBA,WAAW,EAAEC,gBAAgB,EAAEC,cAAc,QAAQ,uBAAuB;AACnG,SAASC,KAAK,EAAEC,KAAK,QAAQ,cAAc;AAO3C,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,kBAAkB,QAAQ,iCAAiC;AAEpE,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,QAAQ,CAAC/B;QACpC,CAAC;MACH;IACA,KAAK,OAAO;MACV,OAAO;QACL4B,kBAAkB,EAAE,IAAI;QACxBC,iBAAiB,EAAE,IAAI;QACvBC,mBAAmB,EAAE;MACvB,CAAC;EACL;AACF;AAjMkD,SAAA9E,MAAAqF,QAAA;EAAA,OAG1BA,QAAQ,CAAAnE,KAAM;AAAA;AAOK,SAAAqC,OAAA;EAAA,OAwDoB,KAAK;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_conversation_jolt_events.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_jolt_events.ts"],"names":[],"mappings":"AAWA,UAAU,KAAK;IACb,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,wBAAgB,yBAAyB,CAAC,EAAE,cAAc,EAAE,EAAE,KAAK,QAuGlE"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ApiResource, ConversationMembershipResource } from '../types';
|
|
2
|
+
export declare const useConversationMembershipUpdate: ({ conversation_id, }: {
|
|
3
|
+
conversation_id: number;
|
|
4
|
+
}) => import("@tanstack/react-query").UseMutationResult<ApiResource<ConversationMembershipResource>, Error, Partial<ConversationMembershipResource>, Promise<undefined> | undefined>;
|
|
5
|
+
//# sourceMappingURL=use_conversation_membership.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_conversation_membership.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_membership.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,8BAA8B,EAAwB,MAAM,UAAU,CAAA;AAO5F,eAAO,MAAM,+BAA+B,GAAI,sBAE7C;IACD,eAAe,EAAE,MAAM,CAAA;CACxB,mLAyCA,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MessageResource } from '../types';
|
|
2
|
+
export declare const useConversationMessage: ({ conversation_id, messageId, enabled, }: {
|
|
3
|
+
conversation_id: number;
|
|
4
|
+
messageId: string;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}) => {
|
|
7
|
+
message: MessageResource | undefined;
|
|
8
|
+
isError: boolean;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
queryKey: import("./use_suspense_api").RequestQueryKey;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=use_conversation_message.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_conversation_message.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_message.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAI1C,eAAO,MAAM,sBAAsB,GAAI,0CAIpC;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;;;;;CASA,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ApiCollection, MessageResource } from '../types';
|
|
2
|
+
import { SuspensePaginatorOptions } from './use_suspense_api';
|
|
3
|
+
type WindowOptions = {
|
|
4
|
+
conversation_id: number;
|
|
5
|
+
reply_root_id?: string | null;
|
|
6
|
+
};
|
|
7
|
+
type Options = WindowOptions & {
|
|
8
|
+
anchor?: string | null;
|
|
9
|
+
};
|
|
10
|
+
export declare const useConversationMessages: ({ conversation_id, reply_root_id, anchor }: Options, opts?: SuspensePaginatorOptions) => {
|
|
11
|
+
messages: MessageResource[];
|
|
12
|
+
behind: boolean;
|
|
13
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<import("@tanstack/query-core").InfiniteData<ApiCollection<MessageResource>, Partial<import("..").RequestData> | undefined>, Response>>;
|
|
14
|
+
isRefetching: boolean;
|
|
15
|
+
fetchNextPage: () => Promise<import("@tanstack/query-core").InfiniteQueryObserverResult<import("@tanstack/query-core").InfiniteData<ApiCollection<MessageResource>, Partial<import("..").RequestData> | undefined>, Response>>;
|
|
16
|
+
fetchNewer: () => Promise<void>;
|
|
17
|
+
fetchLiveWindow: () => Promise<void>;
|
|
18
|
+
hasNextPage: boolean;
|
|
19
|
+
queryKey: import("./use_suspense_api").RequestQueryKey;
|
|
20
|
+
};
|
|
21
|
+
export declare const dropMessagesWindowIfBehind: (options: WindowOptions) => void;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=use_conversation_messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_conversation_messages.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_messages.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAazD,OAAO,EAAE,wBAAwB,EAAwB,MAAM,oBAAoB,CAAA;AAEnF,KAAK,aAAa,GAAG;IAAE,eAAe,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAC/E,KAAK,OAAO,GAAG,aAAa,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAEzD,eAAO,MAAM,uBAAuB,GAClC,4CAA4C,OAAO,EACnD,OAAO,wBAAwB;;;;;;;;;;CA0EhC,CAAA;AAmBD,eAAO,MAAM,0BAA0B,GAAI,SAAS,aAAa,SAIhE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_conversation_messages_jolt_events.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_messages_jolt_events.ts"],"names":[],"mappings":"AA2BA,UAAU,KAAK;IACb,cAAc,EAAE,MAAM,CAAA;CACvB;AAED,wBAAgB,iCAAiC,CAAC,EAAE,cAAc,EAAE,EAAE,KAAK,QA8G1E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
payload: string | undefined;
|
|
3
|
+
isLoadingPayload?: boolean;
|
|
4
|
+
genderId?: string | null;
|
|
5
|
+
enabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function useConversationValidate({ payload, isLoadingPayload, genderId, enabled, }: Props): {
|
|
8
|
+
warnings: import("..").ConversationWarning[];
|
|
9
|
+
validationPending: boolean;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=use_conversation_validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_conversation_validate.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversation_validate.ts"],"names":[],"mappings":"AAIA,UAAU,KAAK;IACb,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,uBAAuB,CAAC,EACtC,OAAO,EACP,gBAAwB,EACxB,QAAQ,EACR,OAAc,GACf,EAAE,KAAK;;;EA4BP"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InfiniteData, UseInfiniteQueryResult } from '@tanstack/react-query';
|
|
2
|
+
import { ApiCollection, ConversationResource } from '../types';
|
|
3
|
+
import { ConversationRequestArgs } from '../utils/request/conversation';
|
|
4
|
+
import { ResponseError } from '../utils/response_error';
|
|
5
|
+
import { ApiGetQueryOptions } from './use_api';
|
|
6
|
+
export type ConversationPaginationResult = UseInfiniteQueryResult<InfiniteData<ApiCollection<ConversationResource>, unknown>, ResponseError>;
|
|
7
|
+
export type UseConversationsValue = Pick<ConversationPaginationResult, 'isFetching' | 'isError' | 'isLoading' | 'error' | 'fetchNextPage' | 'hasNextPage' | 'isFetched' | 'isRefetching'> & {
|
|
8
|
+
conversations: ConversationResource[];
|
|
9
|
+
refetch: () => Promise<any>;
|
|
10
|
+
};
|
|
11
|
+
export declare function useConversations(args?: Partial<ConversationRequestArgs>, opts?: ApiGetQueryOptions): UseConversationsValue;
|
|
12
|
+
//# sourceMappingURL=use_conversations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use_conversations.d.ts","sourceRoot":"","sources":["../../src/hooks/use_conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAE5E,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAA+B,MAAM,+BAA+B,CAAA;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAmB,MAAM,WAAW,CAAA;AAE/D,MAAM,MAAM,4BAA4B,GAAG,sBAAsB,CAC/D,YAAY,CAAC,aAAa,CAAC,oBAAoB,CAAC,EAAE,OAAO,CAAC,EAC1D,aAAa,CACd,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,4BAA4B,EAC1B,YAAY,GACZ,SAAS,GACT,WAAW,GACX,OAAO,GACP,eAAe,GACf,aAAa,GACb,WAAW,GACX,cAAc,CACjB,GAAG;IACF,aAAa,EAAE,oBAAoB,EAAE,CAAA;IACrC,OAAO,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;CAC5B,CAAA;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,EACvC,IAAI,CAAC,EAAE,kBAAkB,GACxB,qBAAqB,CAOvB"}
|