@planningcenter/chat-react-native 3.30.0-rc.0 → 3.30.0-rc.2
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.js +3 -3
- package/build/components/conversation/attachments/attachment_card.js.map +1 -1
- package/build/components/conversation/attachments/attachment_deleting_overlay.js +2 -2
- package/build/components/conversation/attachments/attachment_deleting_overlay.js.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/audio_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/audio_attachment.js +4 -4
- package/build/components/conversation/attachments/audio_attachment.js.map +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts +1 -1
- package/build/components/conversation/attachments/expanded_link.d.ts.map +1 -1
- package/build/components/conversation/attachments/expanded_link.js +4 -4
- package/build/components/conversation/attachments/expanded_link.js.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/generic_file_attachment.js +5 -5
- package/build/components/conversation/attachments/generic_file_attachment.js.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/giphy_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/giphy_attachment.js +5 -5
- package/build/components/conversation/attachments/giphy_attachment.js.map +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/image_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/image_attachment.js +8 -8
- package/build/components/conversation/attachments/image_attachment.js.map +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts +1 -1
- package/build/components/conversation/attachments/video_attachment.d.ts.map +1 -1
- package/build/components/conversation/attachments/video_attachment.js +6 -6
- package/build/components/conversation/attachments/video_attachment.js.map +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js +1 -1
- package/build/components/conversation/empty_conversation_blank_state.js.map +1 -1
- package/build/components/conversation/jump_to_bottom_button.js +3 -3
- package/build/components/conversation/jump_to_bottom_button.js.map +1 -1
- package/build/components/conversation/message.d.ts +1 -1
- package/build/components/conversation/message.d.ts.map +1 -1
- package/build/components/conversation/message.js +14 -14
- package/build/components/conversation/message.js.map +1 -1
- package/build/components/conversation/message_attachments.d.ts +1 -1
- package/build/components/conversation/message_attachments.d.ts.map +1 -1
- package/build/components/conversation/message_attachments.js +4 -4
- package/build/components/conversation/message_attachments.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_image.js.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.d.ts.map +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js +1 -1
- package/build/components/conversation/message_form/message_form_attachment_video.js.map +1 -1
- package/build/components/conversation/message_form.d.ts +1 -1
- package/build/components/conversation/message_form.d.ts.map +1 -1
- package/build/components/conversation/message_form.js +13 -13
- package/build/components/conversation/message_form.js.map +1 -1
- package/build/components/conversation/message_markdown.js +3 -3
- package/build/components/conversation/message_markdown.js.map +1 -1
- package/build/components/conversation/message_reaction.d.ts +2 -2
- package/build/components/conversation/message_reaction.d.ts.map +1 -1
- package/build/components/conversation/message_reaction.js +6 -6
- package/build/components/conversation/message_reaction.js.map +1 -1
- package/build/components/conversation/message_read_receipts.d.ts +1 -1
- package/build/components/conversation/message_read_receipts.d.ts.map +1 -1
- package/build/components/conversation/message_read_receipts.js +2 -2
- package/build/components/conversation/message_read_receipts.js.map +1 -1
- package/build/components/conversation/messages_disabled_banners.js +2 -2
- package/build/components/conversation/messages_disabled_banners.js.map +1 -1
- package/build/components/conversation/reply_connectors.d.ts +1 -1
- package/build/components/conversation/reply_connectors.d.ts.map +1 -1
- package/build/components/conversation/reply_connectors.js +2 -2
- package/build/components/conversation/reply_connectors.js.map +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts +1 -1
- package/build/components/conversation/reply_shadow_message.d.ts.map +1 -1
- package/build/components/conversation/reply_shadow_message.js +8 -8
- package/build/components/conversation/reply_shadow_message.js.map +1 -1
- package/build/components/conversation/typing_indicator.js +3 -3
- package/build/components/conversation/typing_indicator.js.map +1 -1
- package/build/components/conversations/conversation_actions.d.ts +1 -1
- package/build/components/conversations/conversation_actions.d.ts.map +1 -1
- package/build/components/conversations/conversation_actions.js +5 -5
- package/build/components/conversations/conversation_actions.js.map +1 -1
- package/build/components/conversations/conversation_preview.d.ts +1 -1
- package/build/components/conversations/conversation_preview.d.ts.map +1 -1
- package/build/components/conversations/conversation_preview.js +4 -4
- package/build/components/conversations/conversation_preview.js.map +1 -1
- package/build/components/conversations/conversations.js +5 -5
- package/build/components/conversations/conversations.js.map +1 -1
- package/build/components/conversations/mute_indicator.js +3 -3
- package/build/components/conversations/mute_indicator.js.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts +1 -1
- package/build/components/conversations/swipeable_toggle_button.d.ts.map +1 -1
- package/build/components/conversations/swipeable_toggle_button.js +5 -5
- package/build/components/conversations/swipeable_toggle_button.js.map +1 -1
- package/build/components/conversations/unread_count_badge.js +3 -3
- package/build/components/conversations/unread_count_badge.js.map +1 -1
- package/build/components/display/action_button.d.ts.map +1 -1
- package/build/components/display/action_button.js +4 -4
- package/build/components/display/action_button.js.map +1 -1
- package/build/components/display/avatar.d.ts +1 -1
- package/build/components/display/avatar.d.ts.map +1 -1
- package/build/components/display/avatar.js +1 -1
- package/build/components/display/avatar.js.map +1 -1
- package/build/components/display/avatar_group.d.ts +1 -1
- package/build/components/display/avatar_group.d.ts.map +1 -1
- package/build/components/display/avatar_group.js +1 -1
- package/build/components/display/avatar_group.js.map +1 -1
- package/build/components/display/badge.d.ts.map +1 -1
- package/build/components/display/badge.js +3 -3
- package/build/components/display/badge.js.map +1 -1
- package/build/components/display/banner.d.ts +1 -1
- package/build/components/display/banner.d.ts.map +1 -1
- package/build/components/display/banner.js +1 -1
- package/build/components/display/banner.js.map +1 -1
- package/build/components/display/banner_collapsible.js +1 -1
- package/build/components/display/banner_collapsible.js.map +1 -1
- package/build/components/display/button.d.ts.map +1 -1
- package/build/components/display/button.js +3 -3
- package/build/components/display/button.js.map +1 -1
- package/build/components/display/child_notice.d.ts +1 -1
- package/build/components/display/child_notice.d.ts.map +1 -1
- package/build/components/display/child_notice.js +3 -3
- package/build/components/display/child_notice.js.map +1 -1
- package/build/components/display/heading.d.ts.map +1 -1
- package/build/components/display/heading.js +3 -3
- package/build/components/display/heading.js.map +1 -1
- package/build/components/display/icon.d.ts +4 -4
- package/build/components/display/icon.d.ts.map +1 -1
- package/build/components/display/icon.js +5 -5
- package/build/components/display/icon.js.map +1 -1
- package/build/components/display/icon_button.d.ts.map +1 -1
- package/build/components/display/icon_button.js +2 -2
- package/build/components/display/icon_button.js.map +1 -1
- package/build/components/display/image.js +1 -1
- package/build/components/display/image.js.map +1 -1
- package/build/components/display/image_attachment_preview.js +4 -4
- package/build/components/display/image_attachment_preview.js.map +1 -1
- package/build/components/display/keyboard_view.js +1 -1
- package/build/components/display/keyboard_view.js.map +1 -1
- package/build/components/display/person.d.ts +1 -1
- package/build/components/display/person.d.ts.map +1 -1
- package/build/components/display/person.js +2 -2
- package/build/components/display/person.js.map +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts +1 -1
- package/build/components/display/platform_modal_header_buttons.d.ts.map +1 -1
- package/build/components/display/platform_modal_header_buttons.js +3 -3
- package/build/components/display/platform_modal_header_buttons.js.map +1 -1
- package/build/components/display/pressable_row.d.ts.map +1 -1
- package/build/components/display/pressable_row.js +1 -1
- package/build/components/display/pressable_row.js.map +1 -1
- package/build/components/display/spinner.js +1 -1
- package/build/components/display/spinner.js.map +1 -1
- package/build/components/display/switch.js +1 -1
- package/build/components/display/switch.js.map +1 -1
- package/build/components/display/tabs.js +1 -1
- package/build/components/display/tabs.js.map +1 -1
- package/build/components/display/text.d.ts.map +1 -1
- package/build/components/display/text.js +2 -2
- package/build/components/display/text.js.map +1 -1
- package/build/components/display/text_button.d.ts.map +1 -1
- package/build/components/display/text_button.js +2 -2
- package/build/components/display/text_button.js.map +1 -1
- package/build/components/display/text_inline_button.d.ts.map +1 -1
- package/build/components/display/text_inline_button.js +3 -3
- package/build/components/display/text_inline_button.js.map +1 -1
- package/build/components/display/toggle_button.d.ts.map +1 -1
- package/build/components/display/toggle_button.js +5 -5
- package/build/components/display/toggle_button.js.map +1 -1
- package/build/components/display/utils/button_colors.js +1 -1
- package/build/components/display/utils/button_colors.js.map +1 -1
- package/build/components/display/utils/status_colors.js +1 -1
- package/build/components/display/utils/status_colors.js.map +1 -1
- package/build/components/display/video_attachment_preview.js +5 -5
- package/build/components/display/video_attachment_preview.js.map +1 -1
- package/build/components/group_conversation_list.d.ts +1 -1
- package/build/components/group_conversation_list.d.ts.map +1 -1
- package/build/components/group_conversation_list.js +2 -2
- package/build/components/group_conversation_list.js.map +1 -1
- package/build/components/page/error_boundary.d.ts +1 -1
- package/build/components/page/error_boundary.d.ts.map +1 -1
- package/build/components/page/error_boundary.js +2 -2
- package/build/components/page/error_boundary.js.map +1 -1
- package/build/components/page/loading.js +1 -1
- package/build/components/page/loading.js.map +1 -1
- package/build/components/primitive/avatar_primitive.d.ts +2 -2
- package/build/components/primitive/avatar_primitive.d.ts.map +1 -1
- package/build/components/primitive/avatar_primitive.js +5 -5
- package/build/components/primitive/avatar_primitive.js.map +1 -1
- package/build/components/primitive/banner_primitive.d.ts +2 -2
- package/build/components/primitive/banner_primitive.d.ts.map +1 -1
- package/build/components/primitive/banner_primitive.js +8 -8
- package/build/components/primitive/banner_primitive.js.map +1 -1
- package/build/components/primitive/blank_state_primitive.d.ts +1 -1
- package/build/components/primitive/blank_state_primitive.d.ts.map +1 -1
- package/build/components/primitive/blank_state_primitive.js +2 -2
- package/build/components/primitive/blank_state_primitive.js.map +1 -1
- package/build/components/primitive/form_sheet.d.ts +2 -2
- package/build/components/primitive/form_sheet.d.ts.map +1 -1
- package/build/components/primitive/form_sheet.js +3 -3
- package/build/components/primitive/form_sheet.js.map +1 -1
- package/build/components/safe_area_modal.js +1 -1
- package/build/components/safe_area_modal.js.map +1 -1
- package/build/contexts/api_provider.js +4 -4
- package/build/contexts/api_provider.js.map +1 -1
- package/build/contexts/chat_context.d.ts +6 -6
- package/build/contexts/chat_context.d.ts.map +1 -1
- package/build/contexts/chat_context.js +3 -3
- package/build/contexts/chat_context.js.map +1 -1
- package/build/contexts/conversations_context.d.ts +2 -2
- package/build/contexts/conversations_context.d.ts.map +1 -1
- package/build/contexts/conversations_context.js +1 -1
- package/build/contexts/conversations_context.js.map +1 -1
- package/build/contexts/session_context.d.ts +3 -3
- package/build/contexts/session_context.d.ts.map +1 -1
- package/build/contexts/session_context.js +6 -6
- package/build/contexts/session_context.js.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts +7 -7
- package/build/hooks/groups/use_group_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/groups/use_group_members_for_new_conversation.js +2 -2
- package/build/hooks/groups/use_group_members_for_new_conversation.js.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts +1 -1
- package/build/hooks/groups/use_groups_conversation_create.d.ts.map +1 -1
- package/build/hooks/groups/use_groups_conversation_create.js +2 -2
- package/build/hooks/groups/use_groups_conversation_create.js.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts +2 -2
- package/build/hooks/services/use_find_or_create_services_conversation.d.ts.map +1 -1
- package/build/hooks/services/use_find_or_create_services_conversation.js +3 -3
- package/build/hooks/services/use_find_or_create_services_conversation.js.map +1 -1
- package/build/hooks/services/use_services_team.d.ts +1 -1
- package/build/hooks/services/use_services_team.d.ts.map +1 -1
- package/build/hooks/services/use_services_team.js +1 -1
- package/build/hooks/services/use_services_team.js.map +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts +21 -21
- package/build/hooks/services/use_team_members_for_new_conversation.d.ts.map +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js +1 -1
- package/build/hooks/services/use_team_members_for_new_conversation.js.map +1 -1
- package/build/hooks/services/use_team_plans.d.ts +1 -1
- package/build/hooks/services/use_team_plans.js +2 -2
- package/build/hooks/services/use_team_plans.js.map +1 -1
- package/build/hooks/use_api.d.ts +2 -2
- package/build/hooks/use_api.d.ts.map +1 -1
- package/build/hooks/use_api.js.map +1 -1
- package/build/hooks/use_api_client.d.ts +1 -1
- package/build/hooks/use_api_client.d.ts.map +1 -1
- package/build/hooks/use_api_client.js +3 -3
- package/build/hooks/use_api_client.js.map +1 -1
- package/build/hooks/use_async_storage.js +1 -1
- package/build/hooks/use_async_storage.js.map +1 -1
- package/build/hooks/use_attachment_uploader.d.ts +1 -1
- package/build/hooks/use_attachment_uploader.d.ts.map +1 -1
- package/build/hooks/use_attachment_uploader.js +1 -1
- package/build/hooks/use_attachment_uploader.js.map +1 -1
- package/build/hooks/use_broadcast_typing_status.js +1 -1
- package/build/hooks/use_broadcast_typing_status.js.map +1 -1
- package/build/hooks/use_chat_permissions.d.ts +21 -21
- package/build/hooks/use_chat_permissions.d.ts.map +1 -1
- package/build/hooks/use_chat_permissions.js.map +1 -1
- package/build/hooks/use_conversation.d.ts +5 -5
- package/build/hooks/use_conversation.d.ts.map +1 -1
- package/build/hooks/use_conversation.js +4 -3
- package/build/hooks/use_conversation.js.map +1 -1
- package/build/hooks/use_conversation_jolt_events.js +1 -1
- package/build/hooks/use_conversation_jolt_events.js.map +1 -1
- package/build/hooks/use_conversation_membership.d.ts +1 -1
- package/build/hooks/use_conversation_membership.d.ts.map +1 -1
- package/build/hooks/use_conversation_membership.js +2 -2
- package/build/hooks/use_conversation_membership.js.map +1 -1
- package/build/hooks/use_conversation_message.d.ts +1 -1
- package/build/hooks/use_conversation_message.d.ts.map +1 -1
- package/build/hooks/use_conversation_message.js +1 -1
- package/build/hooks/use_conversation_message.js.map +1 -1
- package/build/hooks/use_conversation_messages.d.ts +3 -3
- package/build/hooks/use_conversation_messages.d.ts.map +1 -1
- package/build/hooks/use_conversation_messages.js +1 -1
- package/build/hooks/use_conversation_messages.js.map +1 -1
- package/build/hooks/use_conversation_messages_jolt_events.js +8 -8
- package/build/hooks/use_conversation_messages_jolt_events.js.map +1 -1
- package/build/hooks/use_conversations.d.ts +2 -2
- package/build/hooks/use_conversations.d.ts.map +1 -1
- package/build/hooks/use_conversations.js +1 -1
- package/build/hooks/use_conversations.js.map +1 -1
- package/build/hooks/use_conversations_actions.d.ts +19 -19
- package/build/hooks/use_conversations_actions.d.ts.map +1 -1
- package/build/hooks/use_conversations_actions.js +1 -1
- package/build/hooks/use_conversations_actions.js.map +1 -1
- package/build/hooks/use_conversations_cache.d.ts +2 -2
- package/build/hooks/use_conversations_cache.d.ts.map +1 -1
- package/build/hooks/use_conversations_cache.js +2 -2
- package/build/hooks/use_conversations_cache.js.map +1 -1
- package/build/hooks/use_conversations_jolt_events.js +2 -2
- package/build/hooks/use_conversations_jolt_events.js.map +1 -1
- package/build/hooks/use_create_android_ripple_color.js +1 -1
- package/build/hooks/use_create_android_ripple_color.js.map +1 -1
- package/build/hooks/use_current_person.d.ts +1 -1
- package/build/hooks/use_current_person.d.ts.map +1 -1
- package/build/hooks/use_current_person.js.map +1 -1
- package/build/hooks/use_features.d.ts +2 -2
- package/build/hooks/use_features.d.ts.map +1 -1
- package/build/hooks/use_features.js +2 -2
- package/build/hooks/use_features.js.map +1 -1
- package/build/hooks/use_font_scale.js +1 -1
- package/build/hooks/use_font_scale.js.map +1 -1
- package/build/hooks/use_giphy.d.ts +1 -1
- package/build/hooks/use_giphy.d.ts.map +1 -1
- package/build/hooks/use_giphy.js +1 -1
- package/build/hooks/use_giphy.js.map +1 -1
- package/build/hooks/use_groups.d.ts +2 -2
- package/build/hooks/use_groups.d.ts.map +1 -1
- package/build/hooks/use_groups.js.map +1 -1
- package/build/hooks/use_groups_groups.d.ts +33 -33
- package/build/hooks/use_groups_groups.d.ts.map +1 -1
- package/build/hooks/use_groups_groups.js.map +1 -1
- package/build/hooks/use_interaction_ghost_color.js +1 -1
- package/build/hooks/use_interaction_ghost_color.js.map +1 -1
- package/build/hooks/use_jolt.js +2 -2
- package/build/hooks/use_jolt.js.map +1 -1
- package/build/hooks/use_live_relative_time.d.ts +1 -1
- package/build/hooks/use_live_relative_time.d.ts.map +1 -1
- package/build/hooks/use_live_relative_time.js +2 -2
- package/build/hooks/use_live_relative_time.js.map +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts +1 -1
- package/build/hooks/use_mark_latest_message_read.d.ts.map +1 -1
- package/build/hooks/use_mark_latest_message_read.js.map +1 -1
- package/build/hooks/use_message_create_or_update.d.ts +2 -2
- package/build/hooks/use_message_create_or_update.d.ts.map +1 -1
- package/build/hooks/use_message_create_or_update.js +7 -7
- package/build/hooks/use_message_create_or_update.js.map +1 -1
- package/build/hooks/use_message_draft.d.ts +1 -1
- package/build/hooks/use_message_draft.d.ts.map +1 -1
- package/build/hooks/use_message_draft.js +1 -1
- package/build/hooks/use_message_draft.js.map +1 -1
- package/build/hooks/use_message_reaction_toggle.d.ts +2 -2
- package/build/hooks/use_message_reaction_toggle.d.ts.map +1 -1
- package/build/hooks/use_message_reaction_toggle.js +2 -2
- package/build/hooks/use_message_reaction_toggle.js.map +1 -1
- package/build/hooks/use_my_gender.js.map +1 -1
- package/build/hooks/use_organization.d.ts +5 -5
- package/build/hooks/use_organization.d.ts.map +1 -1
- package/build/hooks/use_organization.js.map +1 -1
- package/build/hooks/use_people_person.d.ts +1 -1
- package/build/hooks/use_people_person.d.ts.map +1 -1
- package/build/hooks/use_people_person.js.map +1 -1
- package/build/hooks/use_product_analytics.d.ts +1 -1
- package/build/hooks/use_product_analytics.d.ts.map +1 -1
- package/build/hooks/use_product_analytics.js +3 -3
- package/build/hooks/use_product_analytics.js.map +1 -1
- package/build/hooks/use_qualified_by_age.js +1 -1
- package/build/hooks/use_qualified_by_age.js.map +1 -1
- package/build/hooks/use_read_receipts.d.ts +2 -2
- package/build/hooks/use_read_receipts.d.ts.map +1 -1
- package/build/hooks/use_read_receipts.js.map +1 -1
- package/build/hooks/use_report_message.d.ts +1 -1
- package/build/hooks/use_report_message.d.ts.map +1 -1
- package/build/hooks/use_report_message.js +1 -1
- package/build/hooks/use_report_message.js.map +1 -1
- package/build/hooks/use_storage.d.ts +1 -1
- package/build/hooks/use_storage.d.ts.map +1 -1
- package/build/hooks/use_storage.js.map +1 -1
- package/build/hooks/use_submit_age_check.d.ts +1 -1
- package/build/hooks/use_submit_age_check.d.ts.map +1 -1
- package/build/hooks/use_submit_age_check.js +2 -2
- package/build/hooks/use_submit_age_check.js.map +1 -1
- package/build/hooks/use_suspense_api.d.ts +5 -5
- package/build/hooks/use_suspense_api.d.ts.map +1 -1
- package/build/hooks/use_suspense_api.js +2 -2
- package/build/hooks/use_suspense_api.js.map +1 -1
- package/build/hooks/use_teams.d.ts +1 -1
- package/build/hooks/use_teams.d.ts.map +1 -1
- package/build/hooks/use_teams.js.map +1 -1
- package/build/hooks/use_theme.d.ts +1 -1
- package/build/hooks/use_theme.d.ts.map +1 -1
- package/build/hooks/use_theme.js +1 -1
- package/build/hooks/use_theme.js.map +1 -1
- package/build/hooks/use_typing_indicators.d.ts.map +1 -1
- package/build/hooks/use_typing_indicators.js +1 -1
- package/build/hooks/use_typing_indicators.js.map +1 -1
- package/build/hooks/use_typing_status_cache.d.ts +1 -1
- package/build/hooks/use_typing_status_cache.d.ts.map +1 -1
- package/build/hooks/use_typing_status_cache.js.map +1 -1
- package/build/hooks/use_upload_client.d.ts +1 -1
- package/build/hooks/use_upload_client.d.ts.map +1 -1
- package/build/hooks/use_upload_client.js +3 -3
- package/build/hooks/use_upload_client.js.map +1 -1
- package/build/navigation/chat_access_gate.js +7 -7
- package/build/navigation/chat_access_gate.js.map +1 -1
- package/build/navigation/index.d.ts +25 -25
- package/build/navigation/index.d.ts.map +1 -1
- package/build/navigation/index.js +28 -28
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/screenLayout.js +2 -2
- package/build/navigation/screenLayout.js.map +1 -1
- package/build/polyfills/events/Event.js +1 -1
- package/build/polyfills/events/Event.js.map +1 -1
- package/build/polyfills/events/EventTarget.js +1 -1
- package/build/polyfills/events/EventTarget.js.map +1 -1
- package/build/polyfills/events/internals/EventInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventInternals.d.ts.map +1 -1
- package/build/polyfills/events/internals/EventInternals.js.map +1 -1
- package/build/polyfills/events/internals/EventTargetInternals.d.ts +2 -2
- package/build/polyfills/events/internals/EventTargetInternals.d.ts.map +1 -1
- package/build/polyfills/events/internals/EventTargetInternals.js.map +1 -1
- package/build/screens/age_check/age_check_required_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_required_screen.js +9 -9
- package/build/screens/age_check/age_check_required_screen.js.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.d.ts.map +1 -1
- package/build/screens/age_check/age_check_underage_screen.js +4 -4
- package/build/screens/age_check/age_check_underage_screen.js.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.d.ts.map +1 -1
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js +4 -4
- package/build/screens/age_check/components/age_check_select_birthdate_modal.js.map +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js +1 -1
- package/build/screens/attachment_actions/attachment_actions_screen.js.map +1 -1
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js +4 -4
- package/build/screens/attachment_actions/hooks/useDeleteAttachment.js.map +1 -1
- package/build/screens/bug_report_screen.d.ts +1 -1
- package/build/screens/bug_report_screen.d.ts.map +1 -1
- package/build/screens/bug_report_screen.js +13 -13
- package/build/screens/bug_report_screen.js.map +1 -1
- package/build/screens/conversation/message_read_receipts_screen.js +5 -5
- package/build/screens/conversation/message_read_receipts_screen.js.map +1 -1
- package/build/screens/conversation_details_screen.d.ts.map +1 -1
- package/build/screens/conversation_details_screen.js +37 -9
- package/build/screens/conversation_details_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js +4 -4
- package/build/screens/conversation_filter_recipients/components/checkbox_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/components/header_row.js +5 -5
- package/build/screens/conversation_filter_recipients/components/header_row.js.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js +6 -6
- package/build/screens/conversation_filter_recipients/conversation_filter_recipients_screen.js.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.js.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts +22 -22
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js +2 -2
- package/build/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.js.map +1 -1
- package/build/screens/conversation_filter_recipients/types.d.ts +2 -2
- package/build/screens/conversation_filter_recipients/types.d.ts.map +1 -1
- package/build/screens/conversation_filter_recipients/types.js.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/conversation_filters.js +5 -5
- package/build/screens/conversation_filters/components/conversation_filters.js.map +1 -1
- package/build/screens/conversation_filters/components/rows.d.ts +4 -4
- package/build/screens/conversation_filters/components/rows.d.ts.map +1 -1
- package/build/screens/conversation_filters/components/rows.js +5 -5
- package/build/screens/conversation_filters/components/rows.js.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.d.ts.map +1 -1
- package/build/screens/conversation_filters/context/conversation_filter_context.js +2 -2
- package/build/screens/conversation_filters/context/conversation_filter_context.js.map +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts +1 -1
- package/build/screens/conversation_filters/group_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/group_filters.js +2 -2
- package/build/screens/conversation_filters/group_filters.js.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.d.ts +54 -54
- package/build/screens/conversation_filters/hooks/filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/hooks/filters.js +3 -3
- package/build/screens/conversation_filters/hooks/filters.js.map +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts +1 -1
- package/build/screens/conversation_filters/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_filters/screen_props.js.map +1 -1
- package/build/screens/conversation_filters/team_filters.d.ts.map +1 -1
- package/build/screens/conversation_filters/team_filters.js +1 -1
- package/build/screens/conversation_filters/team_filters.js.map +1 -1
- package/build/screens/conversation_filters_screen.js +2 -2
- package/build/screens/conversation_filters_screen.js.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.d.ts.map +1 -1
- package/build/screens/conversation_new/components/filter_by_plan.js +8 -8
- package/build/screens/conversation_new/components/filter_by_plan.js.map +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts +1 -1
- package/build/screens/conversation_new/components/form_list.d.ts.map +1 -1
- package/build/screens/conversation_new/components/form_list.js +2 -2
- package/build/screens/conversation_new/components/form_list.js.map +1 -1
- package/build/screens/conversation_new/components/gender_filter_toggle.js +3 -3
- package/build/screens/conversation_new/components/gender_filter_toggle.js.map +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts +1 -1
- package/build/screens/conversation_new/components/groups_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/groups_form.js +10 -10
- package/build/screens/conversation_new/components/groups_form.js.map +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts +1 -1
- package/build/screens/conversation_new/components/services_form.d.ts.map +1 -1
- package/build/screens/conversation_new/components/services_form.js +10 -10
- package/build/screens/conversation_new/components/services_form.js.map +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js +1 -1
- package/build/screens/conversation_new/components/source_app_error_card.js.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.d.ts +3 -3
- package/build/screens/conversation_new/conversation_new_screen.d.ts.map +1 -1
- package/build/screens/conversation_new/conversation_new_screen.js.map +1 -1
- package/build/screens/conversation_notification_level_select_screen.js +5 -5
- package/build/screens/conversation_notification_level_select_screen.js.map +1 -1
- package/build/screens/conversation_screen.d.ts +3 -3
- package/build/screens/conversation_screen.d.ts.map +1 -1
- package/build/screens/conversation_screen.js +21 -21
- package/build/screens/conversation_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/groups_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/recipient_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js +3 -3
- package/build/screens/conversation_select_recipients/components/restricted_group_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/team_recipient_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js +1 -1
- package/build/screens/conversation_select_recipients/components/view_more_link_row.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js +4 -4
- package/build/screens/conversation_select_recipients/conversation_new_entry_screen.js.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_group_recipients_screen.js +2 -2
- 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.map +1 -1
- package/build/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.js +4 -4
- 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 +2 -2
- package/build/screens/conversation_select_recipients/types/screen_props.d.ts.map +1 -1
- package/build/screens/conversation_select_recipients/types/screen_props.js.map +1 -1
- package/build/screens/conversation_select_type_screen.d.ts +3 -3
- package/build/screens/conversation_select_type_screen.d.ts.map +1 -1
- package/build/screens/conversation_select_type_screen.js +3 -3
- package/build/screens/conversation_select_type_screen.js.map +1 -1
- package/build/screens/conversations/components/chat_group_badge.js +2 -2
- package/build/screens/conversations/components/chat_group_badge.js.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts +1 -1
- package/build/screens/conversations/components/list_header_action_button.d.ts.map +1 -1
- package/build/screens/conversations/components/list_header_action_button.js +4 -4
- package/build/screens/conversations/components/list_header_action_button.js.map +1 -1
- package/build/screens/conversations/components/list_header_component.js +9 -9
- package/build/screens/conversations/components/list_header_component.js.map +1 -1
- package/build/screens/conversations/conversations_screen.d.ts +2 -2
- package/build/screens/conversations/conversations_screen.d.ts.map +1 -1
- package/build/screens/conversations/conversations_screen.js +3 -3
- package/build/screens/conversations/conversations_screen.js.map +1 -1
- package/build/screens/design_system_screen.js +6 -6
- package/build/screens/design_system_screen.js.map +1 -1
- package/build/screens/get_help_screen.js +4 -4
- package/build/screens/get_help_screen.js.map +1 -1
- package/build/screens/group_notification_level_select_screen.js +3 -3
- package/build/screens/group_notification_level_select_screen.js.map +1 -1
- package/build/screens/group_notification_settings_screen.js +3 -3
- package/build/screens/group_notification_settings_screen.js.map +1 -1
- package/build/screens/message_actions_screen.js +10 -10
- package/build/screens/message_actions_screen.js.map +1 -1
- package/build/screens/message_report/components/message_preview.d.ts +1 -1
- package/build/screens/message_report/components/message_preview.d.ts.map +1 -1
- package/build/screens/message_report/components/message_preview.js +2 -2
- package/build/screens/message_report/components/message_preview.js.map +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts +1 -1
- package/build/screens/message_report/components/report_reason_list.d.ts.map +1 -1
- package/build/screens/message_report/components/report_reason_list.js +5 -5
- package/build/screens/message_report/components/report_reason_list.js.map +1 -1
- package/build/screens/message_report_screen.d.ts +2 -2
- package/build/screens/message_report_screen.d.ts.map +1 -1
- package/build/screens/message_report_screen.js +8 -8
- package/build/screens/message_report_screen.js.map +1 -1
- package/build/screens/not_found.d.ts.map +1 -1
- package/build/screens/not_found.js +1 -1
- package/build/screens/not_found.js.map +1 -1
- package/build/screens/notification_settings/hooks/groups.d.ts +7 -7
- package/build/screens/notification_settings/hooks/groups.d.ts.map +1 -1
- package/build/screens/notification_settings/hooks/groups.js +4 -4
- package/build/screens/notification_settings/hooks/groups.js.map +1 -1
- package/build/screens/notification_settings_screen.js +4 -4
- package/build/screens/notification_settings_screen.js.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts +5 -5
- package/build/screens/preferred_app/hooks/use_chat_types.d.ts.map +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.js +1 -1
- package/build/screens/preferred_app/hooks/use_chat_types.js.map +1 -1
- package/build/screens/preferred_app_selection_screen.d.ts.map +1 -1
- package/build/screens/preferred_app_selection_screen.js +7 -7
- package/build/screens/preferred_app_selection_screen.js.map +1 -1
- package/build/screens/reactions_screen.js +7 -7
- package/build/screens/reactions_screen.js.map +1 -1
- package/build/screens/send_giphy_screen.js +8 -8
- package/build/screens/send_giphy_screen.js.map +1 -1
- package/build/screens/team_conversation_screen.js +3 -3
- package/build/screens/team_conversation_screen.js.map +1 -1
- package/build/types/jolt_events/message_events.d.ts +1 -1
- package/build/types/jolt_events/message_events.d.ts.map +1 -1
- package/build/types/jolt_events/message_events.js.map +1 -1
- package/build/types/jolt_events/reaction_events.d.ts +1 -1
- package/build/types/jolt_events/reaction_events.d.ts.map +1 -1
- package/build/types/jolt_events/reaction_events.js.map +1 -1
- package/build/types/resources/app_grant.d.ts +1 -1
- package/build/types/resources/app_grant.d.ts.map +1 -1
- package/build/types/resources/app_grant.js.map +1 -1
- package/build/types/resources/conversation.d.ts +1 -0
- package/build/types/resources/conversation.d.ts.map +1 -1
- package/build/types/resources/conversation.js.map +1 -1
- package/build/types/resources/conversation_membership.d.ts +1 -1
- package/build/types/resources/conversation_membership.d.ts.map +1 -1
- package/build/types/resources/conversation_membership.js.map +1 -1
- package/build/types/resources/group_membership.d.ts +1 -1
- package/build/types/resources/group_membership.d.ts.map +1 -1
- package/build/types/resources/group_membership.js.map +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts +1 -1
- package/build/types/resources/groups/groups_group_resource.d.ts.map +1 -1
- package/build/types/resources/groups/groups_group_resource.js.map +1 -1
- package/build/types/resources/organization.d.ts +1 -1
- package/build/types/resources/organization.d.ts.map +1 -1
- package/build/types/resources/organization.js.map +1 -1
- package/build/types/resources/person.d.ts +1 -1
- package/build/types/resources/person.d.ts.map +1 -1
- package/build/types/resources/person.js.map +1 -1
- package/build/types/resources/services/chat_resource.d.ts +1 -1
- package/build/types/resources/services/chat_resource.d.ts.map +1 -1
- package/build/types/resources/services/chat_resource.js.map +1 -1
- package/build/types/resources/services/team_resource.d.ts +1 -1
- package/build/types/resources/services/team_resource.d.ts.map +1 -1
- package/build/types/resources/services/team_resource.js.map +1 -1
- package/build/utils/cache/messages_cache.d.ts +3 -3
- package/build/utils/cache/messages_cache.d.ts.map +1 -1
- package/build/utils/cache/messages_cache.js +4 -4
- package/build/utils/cache/messages_cache.js.map +1 -1
- package/build/utils/cache/optimistically_create_message.d.ts +2 -2
- package/build/utils/cache/optimistically_create_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_create_message.js +4 -4
- package/build/utils/cache/optimistically_create_message.js.map +1 -1
- package/build/utils/cache/optimistically_update_message.d.ts +1 -1
- package/build/utils/cache/optimistically_update_message.d.ts.map +1 -1
- package/build/utils/cache/optimistically_update_message.js +2 -2
- package/build/utils/cache/optimistically_update_message.js.map +1 -1
- package/build/utils/cache/page_mutations.d.ts +5 -5
- package/build/utils/cache/page_mutations.d.ts.map +1 -1
- package/build/utils/cache/page_mutations.js.map +1 -1
- package/build/utils/client/client.d.ts +1 -1
- package/build/utils/client/client.d.ts.map +1 -1
- package/build/utils/client/client.js.map +1 -1
- package/build/utils/client/transform_request_data.d.ts.map +1 -1
- package/build/utils/client/transform_request_data.js.map +1 -1
- package/build/utils/convert_attachments_for_create.d.ts +2 -2
- package/build/utils/convert_attachments_for_create.d.ts.map +1 -1
- package/build/utils/convert_attachments_for_create.js.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.d.ts +2 -2
- package/build/utils/destructure_chat_group_graph_id.d.ts.map +1 -1
- package/build/utils/destructure_chat_group_graph_id.js.map +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts +2 -2
- package/build/utils/jolt/transform_message_event_data_to_message_resource.d.ts.map +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.js +1 -1
- package/build/utils/jolt/transform_message_event_data_to_message_resource.js.map +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts +3 -3
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.d.ts.map +1 -1
- package/build/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.js.map +1 -1
- package/build/utils/native_adapters/configuration.d.ts +3 -3
- package/build/utils/native_adapters/configuration.d.ts.map +1 -1
- package/build/utils/native_adapters/configuration.js +5 -5
- package/build/utils/native_adapters/configuration.js.map +1 -1
- package/build/utils/performance_tracking.d.ts +1 -1
- package/build/utils/performance_tracking.d.ts.map +1 -1
- package/build/utils/performance_tracking.js +1 -1
- package/build/utils/performance_tracking.js.map +1 -1
- package/build/utils/reaction_constants.d.ts +1 -1
- package/build/utils/reaction_constants.d.ts.map +1 -1
- package/build/utils/reaction_constants.js.map +1 -1
- package/build/utils/request/conversation.d.ts +2 -2
- package/build/utils/request/conversation.d.ts.map +1 -1
- package/build/utils/request/conversation.js.map +1 -1
- package/build/utils/request/get_features.d.ts +1 -1
- package/build/utils/request/get_features.d.ts.map +1 -1
- package/build/utils/request/get_features.js +1 -1
- package/build/utils/request/get_features.js.map +1 -1
- package/build/utils/request/get_message.d.ts +1 -1
- package/build/utils/request/get_message.d.ts.map +1 -1
- package/build/utils/request/get_message.js +1 -1
- package/build/utils/request/get_message.js.map +1 -1
- package/build/utils/request/get_messages.d.ts +1 -1
- package/build/utils/request/get_messages.d.ts.map +1 -1
- package/build/utils/request/get_messages.js +1 -1
- package/build/utils/request/get_messages.js.map +1 -1
- package/build/utils/response_error.d.ts +1 -1
- package/build/utils/response_error.d.ts.map +1 -1
- package/build/utils/response_error.js.map +1 -1
- package/build/utils/session.d.ts +1 -1
- package/build/utils/session.d.ts.map +1 -1
- package/build/utils/session.js.map +1 -1
- package/build/utils/session_manager.d.ts +1 -1
- package/build/utils/session_manager.d.ts.map +1 -1
- package/build/utils/session_manager.js.map +1 -1
- package/build/utils/styles.js +1 -1
- package/build/utils/styles.js.map +1 -1
- package/build/utils/theme.d.ts +1 -1
- package/build/utils/theme.d.ts.map +1 -1
- package/build/utils/theme.js +2 -2
- package/build/utils/theme.js.map +1 -1
- package/package.json +3 -2
- package/src/__tests__/contexts/session_context.tsx +7 -7
- package/src/__tests__/event-polyfill.test.ts +3 -4
- package/src/__tests__/hooks/useTheme.tsx +3 -3
- package/src/__tests__/hooks/use_async_storage.test.tsx +3 -3
- package/src/__tests__/hooks/use_conversation_messages.ts +2 -2
- package/src/__tests__/hooks/use_font_scale.test.ts +1 -1
- package/src/__tests__/utils/cache/page_mutations.ts +1 -1
- package/src/__tests__/utils/client.ts +5 -5
- package/src/__tests__/utils/native_adapters/configuration.ts +4 -4
- package/src/__tests__/utils/parse_simple_markdown.ts +1 -1
- package/src/__tests__/utils/pluralize.tsx +1 -1
- package/src/__tests__/utils/session.ts +2 -2
- package/src/__tests__/utils/uri.ts +1 -1
- package/src/__utils__/handlers.ts +1 -1
- package/src/components/conversation/attachments/attachment_card.tsx +3 -3
- package/src/components/conversation/attachments/attachment_deleting_overlay.tsx +2 -2
- package/src/components/conversation/attachments/audio_attachment.tsx +5 -5
- package/src/components/conversation/attachments/expanded_link.tsx +5 -5
- package/src/components/conversation/attachments/generic_file_attachment.tsx +6 -6
- package/src/components/conversation/attachments/giphy_attachment.tsx +6 -6
- package/src/components/conversation/attachments/image_attachment.tsx +9 -9
- package/src/components/conversation/attachments/video_attachment.tsx +7 -7
- package/src/components/conversation/empty_conversation_blank_state.tsx +1 -1
- package/src/components/conversation/jump_to_bottom_button.tsx +3 -3
- package/src/components/conversation/message.tsx +21 -21
- package/src/components/conversation/message_attachments.tsx +8 -8
- package/src/components/conversation/message_form/message_form_attachment_image.tsx +2 -2
- package/src/components/conversation/message_form/message_form_attachment_video.tsx +2 -2
- package/src/components/conversation/message_form.tsx +21 -23
- package/src/components/conversation/message_markdown.tsx +3 -3
- package/src/components/conversation/message_reaction.tsx +8 -8
- package/src/components/conversation/message_read_receipts.tsx +3 -3
- package/src/components/conversation/messages_disabled_banners.tsx +2 -2
- package/src/components/conversation/reply_connectors.tsx +3 -3
- package/src/components/conversation/reply_shadow_message.tsx +12 -12
- package/src/components/conversation/typing_indicator.tsx +3 -3
- package/src/components/conversations/conversation_actions.tsx +6 -9
- package/src/components/conversations/conversation_preview.tsx +5 -10
- package/src/components/conversations/conversations.tsx +6 -6
- package/src/components/conversations/mute_indicator.tsx +3 -3
- package/src/components/conversations/swipeable_toggle_button.tsx +5 -5
- package/src/components/conversations/unread_count_badge.tsx +3 -3
- package/src/components/display/action_button.tsx +5 -5
- package/src/components/display/avatar.tsx +2 -2
- package/src/components/display/avatar_group.tsx +2 -2
- package/src/components/display/badge.tsx +3 -3
- package/src/components/display/banner.tsx +2 -2
- package/src/components/display/banner_collapsible.tsx +1 -1
- package/src/components/display/button.tsx +3 -3
- package/src/components/display/child_notice.tsx +4 -4
- package/src/components/display/heading.tsx +3 -3
- package/src/components/display/icon.tsx +7 -8
- package/src/components/display/icon_button.tsx +2 -2
- package/src/components/display/image.tsx +1 -1
- package/src/components/display/image_attachment_preview.tsx +4 -4
- package/src/components/display/keyboard_view.tsx +1 -1
- package/src/components/display/person.tsx +3 -3
- package/src/components/display/platform_modal_header_buttons.tsx +4 -4
- package/src/components/display/pressable_row.tsx +1 -1
- package/src/components/display/spinner.tsx +1 -1
- package/src/components/display/switch.tsx +1 -1
- package/src/components/display/tabs.tsx +1 -1
- package/src/components/display/text.tsx +2 -2
- package/src/components/display/text_button.tsx +2 -2
- package/src/components/display/text_inline_button.tsx +3 -3
- package/src/components/display/toggle_button.tsx +5 -5
- package/src/components/display/utils/button_colors.ts +1 -1
- package/src/components/display/utils/status_colors.ts +1 -1
- package/src/components/display/video_attachment_preview.tsx +5 -5
- package/src/components/group_conversation_list.tsx +3 -3
- package/src/components/page/error_boundary.tsx +2 -2
- package/src/components/page/loading.tsx +1 -1
- package/src/components/primitive/avatar_primitive.tsx +5 -5
- package/src/components/primitive/banner_primitive.tsx +8 -8
- package/src/components/primitive/blank_state_primitive.tsx +2 -2
- package/src/components/primitive/form_sheet.tsx +4 -4
- package/src/components/safe_area_modal.tsx +1 -1
- package/src/contexts/api_provider.tsx +4 -4
- package/src/contexts/chat_context.tsx +7 -7
- package/src/contexts/conversations_context.tsx +4 -4
- package/src/contexts/session_context.tsx +9 -9
- package/src/hooks/groups/use_group_members_for_new_conversation.ts +4 -4
- package/src/hooks/groups/use_groups_conversation_create.ts +3 -3
- package/src/hooks/services/use_find_or_create_services_conversation.ts +4 -4
- package/src/hooks/services/use_services_team.ts +2 -2
- package/src/hooks/services/use_team_members_for_new_conversation.ts +2 -2
- package/src/hooks/services/use_team_plans.ts +3 -3
- package/src/hooks/use_api.ts +2 -2
- package/src/hooks/use_api_client.ts +3 -3
- package/src/hooks/use_async_storage.ts +1 -1
- package/src/hooks/use_attachment_uploader.ts +3 -3
- package/src/hooks/use_broadcast_typing_status.ts +1 -1
- package/src/hooks/use_chat_permissions.ts +1 -1
- package/src/hooks/use_conversation.ts +5 -4
- package/src/hooks/use_conversation_jolt_events.ts +3 -3
- package/src/hooks/use_conversation_membership.ts +3 -3
- package/src/hooks/use_conversation_message.ts +2 -2
- package/src/hooks/use_conversation_messages.ts +2 -2
- package/src/hooks/use_conversation_messages_jolt_events.ts +14 -14
- package/src/hooks/use_conversations.ts +2 -2
- package/src/hooks/use_conversations_actions.ts +2 -2
- package/src/hooks/use_conversations_cache.ts +5 -5
- package/src/hooks/use_conversations_jolt_events.ts +4 -4
- package/src/hooks/use_create_android_ripple_color.ts +1 -1
- package/src/hooks/use_current_person.ts +2 -2
- package/src/hooks/use_features.ts +4 -4
- package/src/hooks/use_font_scale.ts +1 -1
- package/src/hooks/use_giphy.ts +2 -2
- package/src/hooks/use_groups.ts +2 -2
- package/src/hooks/use_groups_groups.ts +1 -1
- package/src/hooks/use_interaction_ghost_color.ts +1 -1
- package/src/hooks/use_jolt.ts +3 -3
- package/src/hooks/use_live_relative_time.ts +2 -2
- package/src/hooks/use_mark_latest_message_read.ts +1 -1
- package/src/hooks/use_message_create_or_update.ts +10 -10
- package/src/hooks/use_message_draft.ts +2 -2
- package/src/hooks/use_message_reaction_toggle.ts +4 -4
- package/src/hooks/use_my_gender.ts +1 -1
- package/src/hooks/use_organization.ts +2 -2
- package/src/hooks/use_people_person.ts +1 -1
- package/src/hooks/use_product_analytics.ts +5 -5
- package/src/hooks/use_qualified_by_age.ts +1 -1
- package/src/hooks/use_read_receipts.ts +1 -1
- package/src/hooks/use_report_message.ts +2 -2
- package/src/hooks/use_storage.ts +1 -1
- package/src/hooks/use_submit_age_check.ts +3 -3
- package/src/hooks/use_suspense_api.ts +5 -5
- package/src/hooks/use_teams.ts +1 -1
- package/src/hooks/use_theme.tsx +2 -2
- package/src/hooks/use_typing_indicators.ts +2 -2
- package/src/hooks/use_typing_status_cache.ts +1 -1
- package/src/hooks/use_upload_client.ts +3 -3
- package/src/navigation/chat_access_gate.tsx +7 -7
- package/src/navigation/index.tsx +34 -37
- package/src/navigation/screenLayout.tsx +2 -2
- package/src/polyfills/events/Event.ts +1 -1
- package/src/polyfills/events/EventTarget.ts +1 -1
- package/src/polyfills/events/internals/EventInternals.ts +2 -2
- package/src/polyfills/events/internals/EventTargetInternals.ts +2 -2
- package/src/screens/age_check/age_check_required_screen.tsx +9 -9
- package/src/screens/age_check/age_check_underage_screen.tsx +4 -4
- package/src/screens/age_check/components/age_check_select_birthdate_modal.tsx +4 -4
- package/src/screens/attachment_actions/attachment_actions_screen.tsx +1 -1
- package/src/screens/attachment_actions/hooks/useDeleteAttachment.tsx +4 -4
- package/src/screens/bug_report_screen.tsx +18 -18
- package/src/screens/conversation/message_read_receipts_screen.tsx +6 -6
- package/src/screens/conversation_details_screen.tsx +47 -13
- package/src/screens/conversation_filter_recipients/components/checkbox_row.tsx +9 -5
- package/src/screens/conversation_filter_recipients/components/header_row.tsx +6 -6
- package/src/screens/conversation_filter_recipients/conversation_filter_recipients_screen.tsx +6 -6
- package/src/screens/conversation_filter_recipients/hooks/use_flattened_array_of_service_types_with_teams.tsx +5 -1
- package/src/screens/conversation_filter_recipients/hooks/use_service_types_with_teams.ts +6 -3
- package/src/screens/conversation_filter_recipients/types.tsx +2 -2
- package/src/screens/conversation_filters/components/conversation_filters.tsx +8 -5
- package/src/screens/conversation_filters/components/rows.tsx +9 -14
- package/src/screens/conversation_filters/context/conversation_filter_context.tsx +6 -3
- package/src/screens/conversation_filters/group_filters.tsx +4 -4
- package/src/screens/conversation_filters/hooks/filters.ts +5 -5
- package/src/screens/conversation_filters/screen_props.ts +1 -1
- package/src/screens/conversation_filters/team_filters.tsx +1 -1
- package/src/screens/conversation_filters_screen.tsx +2 -2
- package/src/screens/conversation_new/components/filter_by_plan.tsx +8 -8
- package/src/screens/conversation_new/components/form_list.tsx +3 -3
- package/src/screens/conversation_new/components/gender_filter_toggle.tsx +3 -3
- package/src/screens/conversation_new/components/groups_form.tsx +14 -14
- package/src/screens/conversation_new/components/services_form.tsx +12 -12
- package/src/screens/conversation_new/components/source_app_error_card.tsx +1 -1
- package/src/screens/conversation_new/conversation_new_screen.tsx +3 -3
- package/src/screens/conversation_notification_level_select_screen.tsx +6 -6
- package/src/screens/conversation_screen.tsx +23 -23
- package/src/screens/conversation_select_recipients/components/groups_recipient_row.tsx +2 -2
- package/src/screens/conversation_select_recipients/components/recipient_link_row.tsx +3 -3
- package/src/screens/conversation_select_recipients/components/restricted_group_row.tsx +4 -4
- package/src/screens/conversation_select_recipients/components/team_recipient_row.tsx +2 -2
- package/src/screens/conversation_select_recipients/components/view_more_link_row.tsx +1 -1
- package/src/screens/conversation_select_recipients/conversation_new_entry_screen.tsx +4 -4
- package/src/screens/conversation_select_recipients/conversation_select_group_recipients_screen.tsx +4 -4
- package/src/screens/conversation_select_recipients/conversation_select_teams_i_lead_recipients_screen.tsx +8 -5
- package/src/screens/conversation_select_recipients/types/screen_props.tsx +2 -2
- package/src/screens/conversation_select_type_screen.tsx +5 -5
- package/src/screens/conversations/components/chat_group_badge.tsx +4 -4
- package/src/screens/conversations/components/list_header_action_button.tsx +4 -4
- package/src/screens/conversations/components/list_header_component.tsx +10 -10
- package/src/screens/conversations/conversations_screen.tsx +5 -5
- package/src/screens/design_system_screen.tsx +6 -6
- package/src/screens/get_help_screen.tsx +5 -5
- package/src/screens/group_notification_level_select_screen.tsx +3 -3
- package/src/screens/group_notification_settings_screen.tsx +4 -4
- package/src/screens/message_actions_screen.tsx +12 -12
- package/src/screens/message_report/components/message_preview.tsx +3 -3
- package/src/screens/message_report/components/report_reason_list.tsx +5 -8
- package/src/screens/message_report_screen.tsx +15 -15
- package/src/screens/not_found.tsx +1 -1
- package/src/screens/notification_settings/hooks/groups.ts +6 -6
- package/src/screens/notification_settings_screen.tsx +4 -4
- package/src/screens/preferred_app/hooks/use_chat_types.ts +2 -2
- package/src/screens/preferred_app_selection_screen.tsx +7 -7
- package/src/screens/reactions_screen.tsx +9 -9
- package/src/screens/send_giphy_screen.tsx +8 -8
- package/src/screens/team_conversation_screen.tsx +3 -3
- package/src/types/jolt_events/message_events.ts +1 -1
- package/src/types/jolt_events/reaction_events.ts +1 -1
- package/src/types/resources/app_grant.ts +1 -1
- package/src/types/resources/conversation.ts +1 -0
- package/src/types/resources/conversation_membership.ts +1 -1
- package/src/types/resources/group_membership.ts +1 -1
- package/src/types/resources/groups/groups_group_resource.ts +1 -1
- package/src/types/resources/organization.ts +1 -1
- package/src/types/resources/person.ts +1 -1
- package/src/types/resources/services/chat_resource.ts +1 -1
- package/src/types/resources/services/team_resource.ts +1 -1
- package/src/utils/__tests__/convert_attachments_for_create.test.ts +3 -3
- package/src/utils/__tests__/session_manager.test.ts +3 -3
- package/src/utils/__tests__/sha_256.test.ts +1 -1
- package/src/utils/cache/messages_cache.ts +6 -6
- package/src/utils/cache/optimistically_create_message.ts +7 -7
- package/src/utils/cache/optimistically_update_message.ts +3 -3
- package/src/utils/cache/page_mutations.ts +1 -1
- package/src/utils/client/client.ts +1 -2
- package/src/utils/client/transform_request_data.ts +1 -1
- package/src/utils/convert_attachments_for_create.ts +2 -2
- package/src/utils/destructure_chat_group_graph_id.ts +2 -2
- package/src/utils/jolt/transform_message_event_data_to_message_resource.ts +4 -4
- package/src/utils/jolt/transform_reaction_event_data_to_reaction_count_resource.ts +3 -3
- package/src/utils/native_adapters/configuration.ts +5 -5
- package/src/utils/performance_tracking.ts +2 -2
- package/src/utils/reaction_constants.ts +1 -1
- package/src/utils/request/conversation.ts +2 -2
- package/src/utils/request/get_features.ts +1 -1
- package/src/utils/request/get_message.ts +1 -1
- package/src/utils/request/get_messages.ts +1 -1
- package/src/utils/response_error.ts +1 -1
- package/src/utils/session.ts +1 -1
- package/src/utils/session_manager.ts +1 -1
- package/src/utils/styles.ts +1 -1
- package/src/utils/theme.ts +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversation_membership.js","sourceRoot":"","sources":["../../../src/types/resources/conversation_membership.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"conversation_membership.js","sourceRoot":"","sources":["../../../src/types/resources/conversation_membership.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '@/types/api_primitives'\n\nexport type NotificationLevelValue = 'everything' | 'nothing'\nexport type NotificationLevelDescription = string\n\nexport interface ConversationMembershipResource extends ResourceObject {\n type: 'ConversationMembership'\n lastReadMessageSortKey: string\n muted: boolean\n notificationLevel: NotificationLevelValue\n notificationLevelDescription: NotificationLevelDescription\n notificationLevelOptions: Array<{\n description: NotificationLevelDescription\n enabled: boolean\n value: NotificationLevelValue\n }>\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_membership.d.ts","sourceRoot":"","sources":["../../../src/types/resources/group_membership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"group_membership.d.ts","sourceRoot":"","sources":["../../../src/types/resources/group_membership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,UAAU,4BAA4B;IACpC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,WAAW,eAAgB,SAAQ,cAAc;IACrD,iBAAiB,EAAE,MAAM,CAAA;IACzB,4BAA4B,EAAE,MAAM,CAAA;IACpC,wBAAwB,EAAE,4BAA4B,EAAE,CAAA;CACzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group_membership.js","sourceRoot":"","sources":["../../../src/types/resources/group_membership.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"group_membership.js","sourceRoot":"","sources":["../../../src/types/resources/group_membership.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '@/types/api_primitives'\n\ninterface GroupNotificationLevelOption {\n value: string\n description: string\n enabled: boolean\n}\n\nexport interface GroupMembership extends ResourceObject {\n notificationLevel: string\n notificationLevelDescription: string\n notificationLevelOptions: GroupNotificationLevelOption[]\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups_group_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/groups/groups_group_resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"groups_group_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/groups/groups_group_resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,WAAW,mBAAoB,SAAQ,cAAc;IACzD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;QACd,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,EAAE,MAAM,CAAA;IACxB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,+BAA+B,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groups_group_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/groups/groups_group_resource.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"groups_group_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/groups/groups_group_resource.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '@/types/api_primitives'\n\nexport interface GroupsGroupResource extends ResourceObject {\n id: number\n type: 'Group'\n headerImage: {\n thumbnail: string\n medium: string\n original: string\n }\n name: string\n membershipsCount: number\n canCreateConversation: boolean\n canCreateConversationReasonCode: string | null\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/types/resources/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../../src/types/resources/organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,IAAI,EAAE,cAAc,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../src/types/resources/organization.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["../../../src/types/resources/organization.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '@/types/api_primitives'\n\nexport interface OrganizationResource extends ResourceObject {\n type: 'Organization'\n contactEmail?: string\n name?: string\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.d.ts","sourceRoot":"","sources":["../../../src/types/resources/person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"person.d.ts","sourceRoot":"","sources":["../../../src/types/resources/person.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,eAAO,MAAM,sBAAsB;;;;CAIzB,CAAA;AAEV,MAAM,MAAM,sBAAsB,GAChC,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,OAAO,sBAAsB,CAAC,CAAA;AAEtE,MAAM,WAAW,cAAe,SAAQ,cAAc;IACpD,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,QAAQ,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,cAAc;IAC3D,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;CAChD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"person.js","sourceRoot":"","sources":["../../../src/types/resources/person.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;CACV,CAAA","sourcesContent":["import { ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"person.js","sourceRoot":"","sources":["../../../src/types/resources/person.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,SAAS,EAAE,WAAW;IACtB,YAAY,EAAE,cAAc;IAC5B,OAAO,EAAE,SAAS;CACV,CAAA","sourcesContent":["import { ResourceObject } from '@/types/api_primitives'\n\nexport const AgeQualificationStatus = {\n QUALIFIED: 'qualified',\n DISQUALIFIED: 'disqualified',\n UNKNOWN: 'unknown',\n} as const\n\nexport type AgeQualificationStatus =\n (typeof AgeQualificationStatus)[keyof typeof AgeQualificationStatus]\n\nexport interface PersonResource extends ResourceObject {\n id: number\n type: 'Person'\n name: string\n avatar: string\n}\n\nexport interface CurrentPersonResource extends PersonResource {\n canChat: boolean\n unreadCount: number\n pcoChatEnabled: boolean\n ageQualificationStatus?: AgeQualificationStatus\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/services/chat_resource.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"chat_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/services/chat_resource.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,WAAW,oBAAqB,SAAQ,cAAc;IAC1D,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC/B,KAAK,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC1B,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAA;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE;QACL,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,MAAM,CAAA;QACrB,cAAc,EAAE,MAAM,EAAE,CAAA;KACzB,CAAA;IACD,eAAe,EAAE,MAAM,CAAA;IACvB,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,mBAAmB,EAAE,MAAM,EAAE,CAAA;IAC7B,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,KAAK,EAAE,sBAAsB,EAAE,CAAA;CAChC;AAED,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC9D,KAAK,EAAE,+BAA+B,CAAA;CACvC;AAED,MAAM,MAAM,+BAA+B,GAAG,cAAc,GAAG,aAAa,CAAA;AAE5E,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACzD,KAAK,EAAE,iBAAiB,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,kBAAmB,SAAQ,oBAAoB;IAC9D,MAAM,EAAE,sBAAsB,EAAE,CAAA;CACjC;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;IAC3B,KAAK,EAAE,OAAO,CAAA;CACf;AAED,MAAM,WAAW,2BAA4B,SAAQ,oBAAoB;IACvE,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,oCAAqC,SAAQ,oBAAoB;IAChF,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/services/chat_resource.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,kFAAkF;AAClF,6DAA6D;AAC7D,wGAAwG;AACxG,2FAA2F","sourcesContent":["// All of our calls out to services go out to /chat, which isn't a typical pco-api vertex.\n// They all have a shared type of 'Chat' which has the following array attributes:\n// group_identifiers, people, plans, teams and, teams_i_lead.\n// All of these have a type array, are only rendered on request, and are exclusively used for this form.\n// There is also a payload which is a string, and is used to create a conversation in chat.\n\nimport { ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"chat_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/services/chat_resource.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,kFAAkF;AAClF,6DAA6D;AAC7D,wGAAwG;AACxG,2FAA2F","sourcesContent":["// All of our calls out to services go out to /chat, which isn't a typical pco-api vertex.\n// They all have a shared type of 'Chat' which has the following array attributes:\n// group_identifiers, people, plans, teams and, teams_i_lead.\n// All of these have a type array, are only rendered on request, and are exclusively used for this form.\n// There is also a payload which is a string, and is used to create a conversation in chat.\n\nimport { ResourceObject } from '@/types/api_primitives'\n\nexport interface ServicesChatResource extends ResourceObject {\n type: 'Chat'\n teamsILead?: TeamResponseItem[] // on request\n teams?: TeamResponseItem[] // on request\n myTeams?: TeamResponseItem[] // on request\n}\n\nexport interface TeamResponseItem {\n name: string\n value: {\n teamId: number\n serviceTypeId: number // deprecated\n serviceTypeIds: number[]\n }\n serviceTypeName: string // deprecated\n serviceTypeNames: string[]\n serviceTypeAcronyms: string[]\n teamName: string\n order: [number, string, string] // [serviceTypeId, serviceTypeName, teamName]\n}\n\nexport interface TeamOptionResource extends ServicesChatResource {\n teams: TeamOptionResponseItem[]\n}\n\nexport interface TeamOptionResponseItem extends TeamResponseItem {\n group: TeamOptionResponseItemGroupName\n}\n\nexport type TeamOptionResponseItemGroupName = 'teams_i_lead' | 'other_teams'\n\nexport interface PlansResource extends ServicesChatResource {\n plans: PlansResponseItem[]\n}\n\nexport interface PlansResponseItem {\n value: number\n name: string\n}\n\nexport interface TeamPeopleResource extends ServicesChatResource {\n people: TeamPersonResponseItem[]\n}\n\nexport interface TeamPersonResponseItem {\n id: number\n name: string\n avatar: string\n badges: { title: string }[]\n child: boolean\n}\n\nexport interface ServicesChatPayloadResource extends ServicesChatResource {\n payload: string\n}\n\nexport interface ServicesChatGroupIdentifiersResource extends ServicesChatResource {\n groupIdentifiers: string[]\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/services/team_resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"team_resource.d.ts","sourceRoot":"","sources":["../../../../src/types/resources/services/team_resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAGvD,MAAM,WAAW,IAAK,SAAQ,cAAc;IAC1C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,WAAW,CAAA;IACxB,aAAa,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;CAChC;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,aAAa,CAAA;IACnB,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAA;KACb,CAAA;IACD,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"team_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/services/team_resource.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"team_resource.js","sourceRoot":"","sources":["../../../../src/types/resources/services/team_resource.ts"],"names":[],"mappings":"","sourcesContent":["import { ResourceObject } from '@/types/api_primitives'\n\n// Returned by /me/teams\nexport interface Team extends ResourceObject {\n id: number // equivalent to TeamResponseItem.value.teamId\n name: string\n serviceType: ServiceType\n serviceTypeId: number // equivalent to TeamResponseItem.value.serviceTypeId\n serviceTypeName: string\n teamName: string\n order: [number, string, string] // [serviceTypeId, serviceTypeName, teamName]\n}\n\nexport interface ServiceType {\n id: number\n type: 'ServiceType'\n links: {\n self: string\n }\n name: string\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { QueryClient } from '@tanstack/react-query';
|
|
2
|
-
import { MessageResource } from '
|
|
3
|
-
import { JoltReactionEvent } from '
|
|
2
|
+
import { MessageResource } from '@/types';
|
|
3
|
+
import { JoltReactionEvent } from '@/types/jolt_events';
|
|
4
4
|
export declare function updateCacheWithMessage(queryClient: QueryClient, queryKey: unknown[], message: MessageResource, event: 'message.created' | 'message.updated'): void;
|
|
5
5
|
export declare function updateCacheWithIndividualMessage(queryClient: QueryClient, queryKey: unknown[], message: MessageResource): void;
|
|
6
6
|
export declare function updateCacheWithReaction(queryClient: QueryClient, queryKey: unknown[], event: JoltReactionEvent, currentPersonId: number): void;
|
|
7
7
|
export declare function isTemporaryMessageId(messageId?: string | null): boolean;
|
|
8
8
|
export declare function isNewMessage(message?: MessageResource): boolean;
|
|
9
|
-
export declare function getThreadedMessagesQueryKey(conversationId: number, replyRootId: string): import("
|
|
9
|
+
export declare function getThreadedMessagesQueryKey(conversationId: number, replyRootId: string): import("@/hooks/use_suspense_api").RequestQueryKey;
|
|
10
10
|
export declare function mergeMessageUpdate(record: MessageResource, current?: MessageResource): MessageResource;
|
|
11
11
|
//# sourceMappingURL=messages_cache.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages_cache.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/messages_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"messages_cache.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/messages_cache.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAIjE,OAAO,EAA8B,eAAe,EAAE,MAAM,SAAS,CAAA;AACrE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAIvD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,eAAe,EACxB,KAAK,EAAE,iBAAiB,GAAG,iBAAiB,QAkC7C;AAID,wBAAgB,gCAAgC,CAC9C,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,eAAe,QAgBzB;AAED,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,OAAO,EAAE,EACnB,KAAK,EAAE,iBAAiB,EACxB,eAAe,EAAE,MAAM,QAuCxB;AAGD,wBAAgB,oBAAoB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAEvE;AACD,wBAAgB,YAAY,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,OAAO,CAE/D;AAED,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,sDAMtF;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,eAAe,GACxB,eAAe,CAWjB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { deleteRecordInPagesData } from './page_mutations';
|
|
2
1
|
import { updateOrCreateRecordInPagesData, updateRecordInPagesData } from './page_mutations';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { deleteRecordInPagesData } from './page_mutations';
|
|
3
|
+
import { getRequestQueryKey } from '@/hooks/use_suspense_api';
|
|
4
|
+
import { transformReactionEventDataToReactionCountResource } from '@/utils/jolt/transform_reaction_event_data_to_reaction_count_resource';
|
|
5
|
+
import { getMessagesRequestArgs } from '@/utils/request/get_messages';
|
|
6
6
|
export function updateCacheWithMessage(queryClient, queryKey, message, event) {
|
|
7
7
|
queryClient.setQueryData(queryKey, prev => {
|
|
8
8
|
if (event === 'message.created') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages_cache.js","sourceRoot":"","sources":["../../../src/utils/cache/messages_cache.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"messages_cache.js","sourceRoot":"","sources":["../../../src/utils/cache/messages_cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAG7D,OAAO,EAAE,iDAAiD,EAAE,MAAM,uEAAuE,CAAA;AACzI,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAErE,MAAM,UAAU,sBAAsB,CACpC,WAAwB,EACxB,QAAmB,EACnB,OAAwB,EACxB,KAA4C;IAE5C,WAAW,CAAC,YAAY,CAAoB,QAAQ,EAAE,IAAI,CAAC,EAAE;QAC3D,IAAI,KAAK,KAAK,iBAAiB,EAAE,CAAC;YAChC,uEAAuE;YACvE,gEAAgE;YAChE,IAAI,oBAAoB,GAAG,IAAI,CAAA;YAC/B,IAAI,IAAI,IAAI,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBACzC,oBAAoB,GAAG,uBAAuB,CAAC;oBAC7C,IAAI,EAAE,IAAI;oBACV,MAAM,EAAE,OAAO;oBACf,OAAO,EAAE,CAAC,eAAe,EAAE,OAAO,EAAE,EAAE;wBACpC,OAAO,CACL,oBAAoB,CAAC,eAAe,CAAC,EAAE,CAAC;4BACxC,eAAe,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI;4BACrC,eAAe,CAAC,IAAI,CACrB,CAAA;oBACH,CAAC;iBACF,CAAC,CAAA;YACJ,CAAC;YAED,OAAO,+BAA+B,CAAC;gBACrC,IAAI,EAAE,oBAAoB;gBAC1B,MAAM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rF,MAAM,WAAW,GAAG,sBAAsB,CAAC;QACzC,eAAe,EAAE,cAAc;QAC/B,aAAa,EAAE,WAAW;KAC3B,CAAC,CAAA;IACF,OAAO,kBAAkB,CAAC,WAAW,CAAC,CAAA;AACxC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,MAAuB,EACvB,OAAyB;IAEzB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,MAAM,CAAA;IACf,CAAC;IAED,OAAO;QACL,GAAG,OAAO;QACV,GAAG,MAAM;QACT,+EAA+E;QAC/E,cAAc,EAAE,OAAO,CAAC,cAAc,IAAI,EAAE;KAC7C,CAAA;AACH,CAAC","sourcesContent":["import { InfiniteData, QueryClient } from '@tanstack/react-query'\nimport { updateOrCreateRecordInPagesData, updateRecordInPagesData } from './page_mutations'\nimport { deleteRecordInPagesData } from './page_mutations'\nimport { getRequestQueryKey } from '@/hooks/use_suspense_api'\nimport { ApiCollection, ApiResource, MessageResource } from '@/types'\nimport { JoltReactionEvent } from '@/types/jolt_events'\nimport { transformReactionEventDataToReactionCountResource } from '@/utils/jolt/transform_reaction_event_data_to_reaction_count_resource'\nimport { getMessagesRequestArgs } from '@/utils/request/get_messages'\n\nexport function updateCacheWithMessage(\n queryClient: QueryClient,\n queryKey: unknown[],\n message: MessageResource,\n event: 'message.created' | 'message.updated'\n) {\n queryClient.setQueryData<MessagesQueryData>(queryKey, prev => {\n if (event === 'message.created') {\n // Before adding the new message, remove any pending temporary messages\n // with matching text to prevent duplicates from race conditions\n let dataAfterTempRemoval = prev\n if (prev && message.text && message.mine) {\n dataAfterTempRemoval = deleteRecordInPagesData({\n data: prev,\n record: message,\n matchFn: (existingMessage, _record) => {\n return (\n isTemporaryMessageId(existingMessage.id) &&\n existingMessage.text === message.text &&\n existingMessage.mine\n )\n },\n })\n }\n\n return updateOrCreateRecordInPagesData({\n data: dataAfterTempRemoval,\n record: message,\n processRecord: (record, current) => mergeMessageUpdate(record, current),\n })\n } else {\n return updateRecordInPagesData({\n data: prev,\n record: message,\n processRecord: (record, current) => mergeMessageUpdate(record, current),\n })\n }\n })\n}\n\ntype IndividualMessageQueryData = ApiResource<MessageResource>\n\nexport function updateCacheWithIndividualMessage(\n queryClient: QueryClient,\n queryKey: unknown[],\n message: MessageResource\n) {\n queryClient.setQueryData<IndividualMessageQueryData>(queryKey, prev => {\n if (!prev) {\n return {\n data: message,\n links: {},\n meta: {},\n }\n }\n\n return {\n ...prev,\n data: mergeMessageUpdate(message, prev.data),\n }\n })\n}\n\nexport function updateCacheWithReaction(\n queryClient: QueryClient,\n queryKey: unknown[],\n event: JoltReactionEvent,\n currentPersonId: number\n) {\n const message = { id: event.data.data.message_sort_key } as MessageResource\n queryClient.setQueryData<MessagesQueryData>(queryKey, prev =>\n updateRecordInPagesData({\n data: prev,\n record: message,\n processRecord: (record, oldMessage) => {\n const reactionCounts = oldMessage.reactionCounts || []\n let foundMatch = false\n let newReactionCounts = reactionCounts.map(reactionCount => {\n if (reactionCount.value === event.data.data.value) {\n foundMatch = true\n return transformReactionEventDataToReactionCountResource({\n data: event.data.data,\n oldData: reactionCount,\n event: event.event,\n currentPersonId,\n })\n }\n return reactionCount\n })\n\n if (!foundMatch) {\n const newReactionCount = transformReactionEventDataToReactionCountResource({\n data: event.data.data,\n event: event.event,\n currentPersonId,\n })\n\n if (newReactionCount?.count) {\n newReactionCounts = [...newReactionCounts, newReactionCount]\n }\n }\n\n return { ...oldMessage, reactionCounts: newReactionCounts }\n },\n })\n )\n}\n\ntype MessagesQueryData = InfiniteData<ApiCollection<MessageResource>>\nexport function isTemporaryMessageId(messageId?: string | null): boolean {\n return !!messageId && messageId.endsWith('-temp')\n}\nexport function isNewMessage(message?: MessageResource): boolean {\n return !message?.id || isTemporaryMessageId(message.id)\n}\n\nexport function getThreadedMessagesQueryKey(conversationId: number, replyRootId: string) {\n const requestArgs = getMessagesRequestArgs({\n conversation_id: conversationId,\n reply_root_id: replyRootId,\n })\n return getRequestQueryKey(requestArgs)\n}\n\nexport function mergeMessageUpdate(\n record: MessageResource,\n current?: MessageResource\n): MessageResource {\n if (!current) {\n return record\n }\n\n return {\n ...current,\n ...record,\n // Preserve reactions from cache - they're managed via separate reaction events\n reactionCounts: current.reactionCounts || [],\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CurrentPersonResource, MessageResource } from '
|
|
2
|
-
import { DenormalizedAttachmentResourceForCreate } from '
|
|
1
|
+
import { CurrentPersonResource, MessageResource } from '@/types';
|
|
2
|
+
import { DenormalizedAttachmentResourceForCreate } from '@/types/resources/denormalized_attachment_resource_for_create';
|
|
3
3
|
export declare function optimisticallyCreateMessage({ conversationId, text, attachments, currentPerson, message, replyRootId, }: {
|
|
4
4
|
conversationId: number;
|
|
5
5
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimistically_create_message.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_create_message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"optimistically_create_message.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_create_message.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,qBAAqB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE/E,OAAO,EAAE,uCAAuC,EAAE,MAAM,+DAA+D,CAAA;AAKvH,wBAAgB,2BAA2B,CAAC,EAC1C,cAAc,EACd,IAAI,EACJ,WAAW,EACX,aAAa,EACb,OAAO,EACP,WAAW,GACZ,EAAE;IACD,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,uCAAuC,EAAE,CAAA;IACvD,aAAa,EAAE,qBAAqB,CAAA;IACpC,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B,mBA+CA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { getMessagesQueryKey } from '../../utils/request/get_messages';
|
|
2
|
-
import { chatQueryClient } from '../../contexts/api_provider';
|
|
3
1
|
import { updateOrCreateRecordInPagesData } from './page_mutations';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { chatQueryClient } from '@/contexts/api_provider';
|
|
3
|
+
import { convertAttachmentsForCreate } from '@/utils/convert_attachments_for_create';
|
|
4
|
+
import { generatePlaceholderUlid } from '@/utils/generate_placeholder_ulid';
|
|
5
|
+
import { getMessagesQueryKey } from '@/utils/request/get_messages';
|
|
6
6
|
export function optimisticallyCreateMessage({ conversationId, text, attachments, currentPerson, message, replyRootId, }) {
|
|
7
7
|
const id = message?.id || generateTempMessageId();
|
|
8
8
|
// Convert attachments to denormalized format for optimistic UI
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimistically_create_message.js","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_create_message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"optimistically_create_message.js","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_create_message.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAIzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAA;AACpF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAA;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAElE,MAAM,UAAU,2BAA2B,CAAC,EAC1C,cAAc,EACd,IAAI,EACJ,WAAW,EACX,aAAa,EACb,OAAO,EACP,WAAW,GAQZ;IACC,MAAM,EAAE,GAAG,OAAO,EAAE,EAAE,IAAI,qBAAqB,EAAE,CAAA;IAEjD,+DAA+D;IAC/D,MAAM,oBAAoB,GAAqC,2BAA2B,CACxF,WAAW,IAAI,EAAE,CAClB,CAAA;IAED,+BAA+B;IAC/B,MAAM,iBAAiB,GAAoB;QACzC,GAAG,OAAO;QACV,IAAI,EAAE,SAAS;QACf,EAAE;QACF,IAAI;QACJ,IAAI,EAAE,EAAE,EAAE,2BAA2B;QACrC,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,IAAI;QAClB,IAAI,EAAE,IAAI;QACV,WAAW,EAAE,oBAAoB;QACjC,oBAAoB,EAAE,WAAW,IAAI,EAAE;QACvC,MAAM,EAAE,aAAa;QACrB,cAAc,EAAE,EAAE;QAClB,YAAY,EAAE,KAAK;QACnB,UAAU,EAAE,IAAI;QAChB,sBAAsB,EAAE,IAAI;QAC5B,WAAW,EAAE,IAAI;QACjB,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,WAAW,IAAI,IAAI;KACjC,CAAA;IAID,MAAM,QAAQ,GAAG,mBAAmB,CAAC;QACnC,eAAe,EAAE,cAAc;QAC/B,aAAa,EAAE,WAAW;KAC3B,CAAC,CAAA;IAEF,eAAe,CAAC,YAAY,CAAY,QAAQ,EAAE,IAAI,CAAC,EAAE,CACvD,+BAA+B,CAAC;QAC9B,IAAI;QACJ,MAAM,EAAE,iBAAoC;KAC7C,CAAC,CACH,CAAA;IAED,OAAO,iBAAiB,CAAA;AAC1B,CAAC;AAED,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACjC,0FAA0F;IAC1F,sEAAsE;IACtE,OAAO,GAAG,uBAAuB,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,OAAO,CAAA;AAC9D,CAAC,CAAA","sourcesContent":["import { InfiniteData } from '@tanstack/react-query'\nimport { updateOrCreateRecordInPagesData } from './page_mutations'\nimport { chatQueryClient } from '@/contexts/api_provider'\nimport { ApiCollection, CurrentPersonResource, MessageResource } from '@/types'\nimport { DenormalizedAttachmentResource } from '@/types/resources/denormalized_attachment_resource'\nimport { DenormalizedAttachmentResourceForCreate } from '@/types/resources/denormalized_attachment_resource_for_create'\nimport { convertAttachmentsForCreate } from '@/utils/convert_attachments_for_create'\nimport { generatePlaceholderUlid } from '@/utils/generate_placeholder_ulid'\nimport { getMessagesQueryKey } from '@/utils/request/get_messages'\n\nexport function optimisticallyCreateMessage({\n conversationId,\n text,\n attachments,\n currentPerson,\n message,\n replyRootId,\n}: {\n conversationId: number\n text: string\n attachments?: DenormalizedAttachmentResourceForCreate[]\n currentPerson: CurrentPersonResource\n message?: MessageResource\n replyRootId?: string | null\n}) {\n const id = message?.id || generateTempMessageId()\n\n // Convert attachments to denormalized format for optimistic UI\n const decoratedAttachments: DenormalizedAttachmentResource[] = convertAttachmentsForCreate(\n attachments || []\n )\n\n // Create an optimistic message\n const optimisticMessage: MessageResource = {\n ...message,\n type: 'Message',\n id,\n text,\n html: '', // Will be filled by server\n createdAt: new Date().toISOString(),\n deletedAt: null,\n textEditedAt: null,\n mine: true,\n attachments: decoratedAttachments,\n attachmentsForCreate: attachments || [],\n author: currentPerson,\n reactionCounts: [],\n renderAuthor: false,\n renderTime: true,\n myLatestInConversation: true,\n lastInGroup: true,\n pending: true,\n replyCount: 0,\n replyRootId: replyRootId || null,\n }\n\n // Add the optimistic message to the cache\n type QueryData = InfiniteData<ApiCollection<MessageResource>>\n const queryKey = getMessagesQueryKey({\n conversation_id: conversationId,\n reply_root_id: replyRootId,\n })\n\n chatQueryClient.setQueryData<QueryData>(queryKey, data =>\n updateOrCreateRecordInPagesData({\n data,\n record: optimisticMessage as MessageResource,\n })\n )\n\n return optimisticMessage\n}\n\nconst generateTempMessageId = () => {\n // Put it 5 seconds in the future to account for server lag of previously created messages\n // that are still pending. This gets overwritten by the server anyway.\n return `${generatePlaceholderUlid({ offsetMs: 5000 })}-temp`\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimistically_update_message.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_update_message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"optimistically_update_message.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_update_message.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,eAAe,EAAE,MAAM,SAAS,CAAA;AAGxD,wBAAgB,2BAA2B,CAAC,EAC1C,cAAc,EACd,OAAO,EACP,IAAI,EACJ,WAAW,GACZ,EAAE;IACD,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,eAAe,CAAA;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B,mBA0BA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getMessagesQueryKey } from '../../utils/request/get_messages';
|
|
2
|
-
import { chatQueryClient } from '../../contexts/api_provider';
|
|
3
1
|
import { updateOrCreateRecordInPagesData } from './page_mutations';
|
|
2
|
+
import { chatQueryClient } from '@/contexts/api_provider';
|
|
3
|
+
import { getMessagesQueryKey } from '@/utils/request/get_messages';
|
|
4
4
|
export function optimisticallyUpdateMessage({ conversationId, message, text, replyRootId, }) {
|
|
5
5
|
const queryKey = getMessagesQueryKey({
|
|
6
6
|
conversation_id: conversationId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optimistically_update_message.js","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_update_message.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"optimistically_update_message.js","sourceRoot":"","sources":["../../../src/utils/cache/optimistically_update_message.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,kBAAkB,CAAA;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAEzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AAElE,MAAM,UAAU,2BAA2B,CAAC,EAC1C,cAAc,EACd,OAAO,EACP,IAAI,EACJ,WAAW,GAMZ;IAGC,MAAM,QAAQ,GAAG,mBAAmB,CAAC;QACnC,eAAe,EAAE,cAAc;QAC/B,aAAa,EAAE,WAAW;KAC3B,CAAC,CAAA;IAEF,IAAI,iBAAiB,GAAG,OAAO,CAAA;IAE/B,eAAe,CAAC,YAAY,CAAY,QAAQ,EAAE,IAAI,CAAC,EAAE,CACvD,+BAA+B,CAAC;QAC9B,IAAI;QACJ,MAAM,EAAE,OAAO;QACf,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,EAAE;YAC5B,iBAAiB,GAAG;gBAClB,GAAG,CAAC,IAAI,IAAI,IAAI,CAAC;gBACjB,IAAI;gBACJ,OAAO,EAAE,IAAI;aACd,CAAA;YACD,OAAO,iBAAiB,CAAA;QAC1B,CAAC;KACF,CAAC,CACH,CAAA;IAED,OAAO,iBAAiB,CAAA;AAC1B,CAAC","sourcesContent":["import { InfiniteData } from '@tanstack/react-query'\nimport { updateOrCreateRecordInPagesData } from './page_mutations'\nimport { chatQueryClient } from '@/contexts/api_provider'\nimport { ApiCollection, MessageResource } from '@/types'\nimport { getMessagesQueryKey } from '@/utils/request/get_messages'\n\nexport function optimisticallyUpdateMessage({\n conversationId,\n message,\n text,\n replyRootId,\n}: {\n conversationId: number\n message: MessageResource\n text: string\n replyRootId?: string | null\n}) {\n type QueryData = InfiniteData<ApiCollection<MessageResource>>\n\n const queryKey = getMessagesQueryKey({\n conversation_id: conversationId,\n reply_root_id: replyRootId,\n })\n\n let optimisticMessage = message\n\n chatQueryClient.setQueryData<QueryData>(queryKey, data =>\n updateOrCreateRecordInPagesData({\n data,\n record: message,\n processRecord: (next, prev) => {\n optimisticMessage = {\n ...(prev || next),\n text,\n pending: true,\n }\n return optimisticMessage\n },\n })\n )\n\n return optimisticMessage\n}\n"]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Messages are ordered by ULID on the client so we may
|
|
4
4
|
* have diverging logic from other kinds of api data
|
|
5
5
|
*/
|
|
6
|
-
import { ApiCollection, ResourceObject } from '
|
|
6
|
+
import { ApiCollection, ResourceObject } from '@/types';
|
|
7
7
|
/**
|
|
8
8
|
* updateRecordInPagesData
|
|
9
9
|
* Updates record if found in the cache, otherwise noops.
|
|
@@ -19,7 +19,7 @@ export declare function updateRecordInPagesData<T extends ResourceObject>({ data
|
|
|
19
19
|
pages: {
|
|
20
20
|
data: T[];
|
|
21
21
|
links: Record<string, string>;
|
|
22
|
-
meta: import("
|
|
22
|
+
meta: import("@/types").CollectionMeta;
|
|
23
23
|
}[];
|
|
24
24
|
pageParams: any;
|
|
25
25
|
} | undefined;
|
|
@@ -38,7 +38,7 @@ export declare function updateOrCreateRecordInPagesData<T extends ResourceObject
|
|
|
38
38
|
pages: {
|
|
39
39
|
data: T[];
|
|
40
40
|
links: Record<string, string>;
|
|
41
|
-
meta: import("
|
|
41
|
+
meta: import("@/types").CollectionMeta;
|
|
42
42
|
}[];
|
|
43
43
|
pageParams: any;
|
|
44
44
|
} | undefined;
|
|
@@ -56,7 +56,7 @@ export declare function updateAllRecordsInPagesData<T extends ResourceObject>({
|
|
|
56
56
|
pages: {
|
|
57
57
|
data: T[];
|
|
58
58
|
links: Record<string, string>;
|
|
59
|
-
meta: import("
|
|
59
|
+
meta: import("@/types").CollectionMeta;
|
|
60
60
|
}[];
|
|
61
61
|
pageParams: any;
|
|
62
62
|
} | undefined;
|
|
@@ -89,7 +89,7 @@ export declare function deleteRecordInPagesData<T extends ResourceObject>({ data
|
|
|
89
89
|
pages: {
|
|
90
90
|
data: T[];
|
|
91
91
|
links: Record<string, string>;
|
|
92
|
-
meta: import("
|
|
92
|
+
meta: import("@/types").CollectionMeta;
|
|
93
93
|
}[];
|
|
94
94
|
pageParams: any;
|
|
95
95
|
} | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page_mutations.d.ts","sourceRoot":"","sources":["../../../src/utils/cache/page_mutations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file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AC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAA2B,EAChE,IAAI,EACJ,MAAM,EACN,OAAO,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAKlD;IACC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACzC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QAClC,CAAC,CAAC,CAAA;QAEF,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;IACnC,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;AACrC,CAAC","sourcesContent":["/**\n * Helpers to handle updating messages in the cache\n * Messages are ordered by ULID on the client so we may\n * have diverging logic from other kinds of api data\n */\n\nimport { ApiCollection, ResourceObject } from '
|
|
1
|
+
{"version":3,"file":"page_mutations.js","sourceRoot":"","sources":["../../../src/utils/cache/page_mutations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAA2B,EAChE,IAAI,EACJ,MAAM,EACN,aAAa,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,GAKvB;IACC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;YACtC,IAAI,OAAO,CAAC,EAAE,KAAK,MAAM,CAAC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AE,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,GAKlD;IACC,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACrC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE;YACzC,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QAClC,CAAC,CAAC,CAAA;QAEF,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,CAAA;IACnC,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAA;AACrC,CAAC","sourcesContent":["/**\n * Helpers to handle updating messages in the cache\n * Messages are ordered by ULID on the client so we may\n * have diverging logic from other kinds of api data\n */\n\nimport { ApiCollection, ResourceObject } from '@/types'\n\n/**\n * updateRecordInPagesData\n * Updates record if found in the cache, otherwise noops.\n */\nexport function updateRecordInPagesData<T extends ResourceObject>({\n data,\n record,\n processRecord = r => r,\n}: {\n data?: { pages: ApiCollection<T>[]; pageParams: any }\n record: T\n processRecord?: (_next: T, _prev: T) => T\n}) {\n if (!data) return data\n\n const newPages = data.pages.map(page => {\n const newData = page.data.map(message => {\n if (message.id === record.id) {\n return processRecord(record, message)\n }\n return message\n })\n\n return { ...page, data: newData }\n })\n\n return { ...data, pages: newPages }\n}\n\n/**\n * updateOrCreateRecordInPagesData\n * Updates record if found in the cache, otherwise inserts.\n */\nexport function updateOrCreateRecordInPagesData<T extends ResourceObject>({\n data,\n record,\n processRecord = r => r,\n}: {\n data?: { pages: ApiCollection<T>[]; pageParams: any }\n record: T\n processRecord?: (_next: T, _prev?: T) => T\n}) {\n if (!data) return data\n\n let foundRecord = false\n const newPages = data.pages.map(page => {\n const newData = page.data.map(message => {\n if (message.id === record.id) {\n foundRecord = true\n return processRecord(record, message)\n }\n return message\n })\n\n return { ...page, data: newData }\n })\n\n if (!foundRecord) {\n // This is a fallback for when the record is not found in the cache.\n const firstPage = { ...newPages[0] }\n firstPage.data = [processRecord(record), ...firstPage.data]\n newPages[0] = firstPage\n }\n\n return { ...data, pages: newPages }\n}\n\n/**\n * updateAllRecordsInPagesData\n * Updates all records in the cache using the provided processRecord function.\n */\nexport function updateAllRecordsInPagesData<T extends ResourceObject>({\n data,\n processRecord = r => r,\n}: {\n data?: { pages: ApiCollection<T>[]; pageParams: any }\n processRecord?: (_next: T) => T\n}) {\n if (!data) return data\n\n const newPages = data.pages.map(page => {\n const newData = page.data.map(processRecord)\n\n return { ...page, data: newData }\n })\n\n return { ...data, pages: newPages }\n}\n\nexport function addRecordInPagesData<T extends ResourceObject>({\n data,\n record,\n processRecord = r => r,\n}: {\n data?: { pages: ApiCollection<T>[]; pageParams: any }\n record: T\n processRecord?: (_next: T) => T\n}) {\n if (!data) return data\n\n const newPages = [...data.pages]\n const firstPage = { ...newPages[0] }\n firstPage.data = [processRecord(record), ...firstPage.data]\n\n newPages[0] = firstPage\n\n return { ...data, pages: newPages }\n}\n\n/**\n * deleteRecordInPagesData\n */\nexport function deleteRecordInPagesData<T extends ResourceObject>({\n data,\n record,\n matchFn = (message, rec) => message.id === rec.id,\n}: {\n data?: { pages: ApiCollection<T>[]; pageParams: any }\n record: { id: string | number }\n matchFn?: (message: T, record: { id: string | number }) => boolean\n}) {\n if (!data) return data\n\n const newPages = data.pages.map(page => {\n const newData = page.data.filter(message => {\n return !matchFn(message, record)\n })\n\n return { ...page, data: newData }\n })\n\n return { ...data, pages: newPages }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiCollection, ApiResource, FailedResponse } from '../../types';
|
|
2
1
|
import { DeleteRequest, GetRequest, PatchRequest, PostRequest } from './types';
|
|
2
|
+
import { ApiCollection, ApiResource, FailedResponse } from '@/types';
|
|
3
3
|
export type OnUnauthorizedResponse = (_response: FailedResponse) => void;
|
|
4
4
|
type ClientArgs = {
|
|
5
5
|
version: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/utils/client/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/utils/client/client.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAe,MAAM,SAAS,CAAA;AAC3F,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAEpE,MAAM,MAAM,sBAAsB,GAAG,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAA;AAExE,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACvC,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAED,qBAAa,MAAM;IACjB,OAAO,EAAE,MAAM,CAAK;IACpB,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAK;IAC3C,sBAAsB,CAAC,EAAE,sBAAsB,CAAA;IAC/C,IAAI,CAAC,EAAE,MAAM,CAAA;gBAED,EAAE,OAAO,EAAE,cAAmB,EAAE,sBAAsB,EAAE,IAAI,EAAE,EAAE,UAAU;IAOhF,GAAG,CAAC,CAAC,SAAS,aAAa,GAAG,WAAW,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC,CAAC;IA2CxE,KAAK,CAAC,CAAC,SAAS,aAAa,GAAG,WAAW,EAAE,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,CAAC,CAAC;IAW5E,IAAI,CAAC,CAAC,SAAS,aAAa,GAAG,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC;IAW1E,MAAM,CAAC,IAAI,EAAE,aAAa;IAShC,WAAW,aAAoB,QAAQ,oBAUtC;IAED,kBAAkB,aAAoB,QAAQ,KAAG,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAMhF;IAED,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,IAAI,OAAO;;;;MAOV;CACF;AAED,eAAe,MAAM,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/utils/client/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/utils/client/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,WAAW,EAEX,yBAAyB,EACzB,uBAAuB,GACxB,MAAM,mBAAmB,CAAA;AAa1B,MAAM,OAAO,MAAM;IACjB,OAAO,GAAW,EAAE,CAAA;IACpB,cAAc,GAA2B,EAAE,CAAA;IAC3C,sBAAsB,CAAyB;IAC/C,IAAI,CAAS;IAEb,YAAY,EAAE,OAAO,EAAE,cAAc,GAAG,EAAE,EAAE,sBAAsB,EAAE,IAAI,EAAc;QACpF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;QACpC,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAA;QACpD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAED,KAAK,CAAC,GAAG,CAAwC,IAAgB;QAC/D,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,IAAI,CAAA;QACnC,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAC/B,MAAM,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI,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,IAAI,OAAO;QACT,OAAO;YACL,MAAM,EAAE,0BAA0B;YAClC,cAAc,EAAE,kBAAkB;YAClC,mBAAmB,EAAE,IAAI,CAAC,OAAO;YACjC,GAAG,IAAI,CAAC,cAAc;SACvB,CAAA;IACH,CAAC;CACF;AAED,eAAe,MAAM,CAAA","sourcesContent":["import {\n concatRecords,\n ensureNoQueryParamsInDev,\n makeRequest,\n MakeRequestArgs,\n throwErrorIfFieldsMissing,\n throwErrorIfQueryParams,\n} from './request_helpers'\nimport { DeleteRequest, GetRequest, PatchRequest, PostRequest, WalkRequest } from './types'\nimport { ApiCollection, ApiResource, FailedResponse } from '@/types'\n\nexport type OnUnauthorizedResponse = (_response: FailedResponse) => void\n\ntype ClientArgs = {\n version: string\n defaultHeaders?: Record<string, string>\n onUnauthorizedResponse?: OnUnauthorizedResponse\n root?: string\n}\n\nexport class Client {\n version: string = ''\n defaultHeaders: Record<string, string> = {}\n onUnauthorizedResponse?: OnUnauthorizedResponse\n root?: string\n\n constructor({ version, defaultHeaders = {}, onUnauthorizedResponse, root }: ClientArgs) {\n this.version = version\n this.defaultHeaders = defaultHeaders\n this.onUnauthorizedResponse = onUnauthorizedResponse\n this.root = root\n }\n\n async get<T extends ApiCollection | ApiResource>(args: GetRequest): Promise<T> {\n const { walk, ...data } = args.data\n const isWalking = Boolean(walk)\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n await throwErrorIfQueryParams(url)\n\n const requestArgs: MakeRequestArgs = { data, url, action: 'GET', headers }\n\n const walkRequest = ({\n url: requestUrl,\n data: d = { fields: {} },\n acc = { data: [], included: [], meta: {}, links: {} },\n ...options\n }: WalkRequest): Promise<T> => {\n return makeRequest({\n action: 'GET',\n data: d,\n url: requestUrl,\n ...options,\n headers,\n }).then(({ links, ...rest }) => {\n const records = Array.isArray(rest.data) ? concatRecords(acc, rest) : rest\n\n // `next` will have our params in the link so we do not want to pass them back in\n if (links?.next) {\n return walkRequest({ ...options, data: d, url: links.next, acc: records })\n } else {\n return records\n }\n })\n }\n\n const handler = isWalking\n ? (a: MakeRequestArgs | WalkRequest) => walkRequest(a as WalkRequest)\n : (a: MakeRequestArgs | WalkRequest) => makeRequest(a as MakeRequestArgs)\n\n return throwErrorIfFieldsMissing(handler, requestArgs)\n .then(response => response as T)\n .catch(this.handleNotOk)\n }\n\n async patch<T extends ApiCollection | ApiResource>(args: PatchRequest): Promise<T> {\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n const requestArgs: MakeRequestArgs = { data: args.data, url, action: 'PATCH', headers }\n\n return ensureNoQueryParamsInDev(makeRequest, requestArgs)\n .then(response => response as T)\n .catch(this.handleNotOk)\n }\n\n async post<T extends ApiCollection | ApiResource>(args: PostRequest): Promise<T> {\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n const requestArgs: MakeRequestArgs = { ...args, data: args.data, url, action: 'POST', headers }\n\n return ensureNoQueryParamsInDev(makeRequest, requestArgs)\n .then(response => response as T)\n .catch(this.handleNotOk)\n }\n\n async delete(args: DeleteRequest) {\n const headers = { ...this.headers, ...args.headers }\n const url = this.appUrl(args.url)\n\n const requestArgs: MakeRequestArgs = { url, action: 'DELETE', headers }\n\n return makeRequest(requestArgs).catch(this.handleNotOk)\n }\n\n handleNotOk = async (response: Response) => {\n if (response.status === 401) {\n const errorData = await this.parseErrorResponse(response)\n this.onUnauthorizedResponse?.({\n ...response,\n errors: errorData.errors || [],\n } as FailedResponse)\n }\n\n return Promise.reject(response)\n }\n\n parseErrorResponse = async (response: Response): Promise<Partial<FailedResponse>> => {\n try {\n return (await response.clone().json()) as FailedResponse\n } catch {\n return {}\n }\n }\n\n appUrl(url: string) {\n return `${this.root}${url}`\n }\n\n get headers() {\n return {\n Accept: 'application/vnd.api+json',\n 'Content-Type': 'application/json',\n 'X-PCO-API-Version': this.version,\n ...this.defaultHeaders,\n }\n }\n}\n\nexport default Client\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform_request_data.d.ts","sourceRoot":"","sources":["../../../src/utils/client/transform_request_data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transform_request_data.d.ts","sourceRoot":"","sources":["../../../src/utils/client/transform_request_data.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAGrC,eAAO,MAAM,oBAAoB,qDAM9B,OAAO,CAAC,WAAW,CAAC;;CAOtB,CAAA;AAED,wBAAgB,gBAAgB,CAC9B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,EAC1E,GAAG,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,CAAC,MAajC;AAED,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,GAAG,EAAE,CAAA;CAClD,CAAA;AACD,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAA;AAE5D,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,SAAS,GAAG,WAAW,CAajE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transform_request_data.js","sourceRoot":"","sources":["../../../src/utils/client/transform_request_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"transform_request_data.js","sourceRoot":"","sources":["../../../src/utils/client/transform_request_data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAElD,OAAO,EAAE,eAAe,EAAE,MAAM,S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AC5D,OAAO,IAAI,CAAC,MAAM,CAChB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;YAChB,GAAG,GAAG;YACN,GAAG,UAAU,CAAC,EAAE,GAAG,EAAE,GAAG,GAAG,IAAI,MAAM,GAAG,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;SAClE,CAAC,EACF,EAAE,CACH,CAAA;IACH,CAAC;IACD,OAAO,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAA;AACzB,CAAC","sourcesContent":["import { isObject, reduce, isArray } from 'lodash'\nimport { RequestData } from './types'\nimport { keysToSnakeCase } from './utils'\n\nexport const transformRequestData = ({\n fields,\n where,\n include,\n perPage = 100,\n ...restData\n}: Partial<RequestData>) => {\n return {\n ...flattenAttribute(fields, 'fields'),\n ...flattenAttribute(where, 'where'),\n ...keysToSnakeCase({ perPage, ...restData }),\n include: Array.isArray(include) ? include.join(',') : include,\n }\n}\n\nexport function flattenAttribute<\n T extends Record<string, string | number | (string | number)[] | string[]>,\n>(obj: T | undefined, key: keyof T) {\n if (!isObject(obj)) return { [key]: obj }\n\n return reduce(\n obj,\n (acc, value, attr) => {\n return {\n ...acc,\n ...buildQuery({ key: `${String(key)}[${attr}]`, value }),\n }\n },\n {}\n )\n}\n\ntype QueryArgs = {\n key: string\n value: string | number | boolean | object | any[]\n}\ntype QueryReturn = Record<string, string | number | boolean>\n\nexport function buildQuery({ key, value }: QueryArgs): QueryReturn {\n if (isArray(value)) return { [key]: value.join(',') }\n if (isObject(value)) {\n const keys = Object.keys(value) as Array<keyof typeof value>\n return keys.reduce(\n (acc, subKey) => ({\n ...acc,\n ...buildQuery({ key: `${key}[${subKey}]`, value: value[subKey] }),\n }),\n {}\n )\n }\n return { [key]: value }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DenormalizedAttachmentResource } from '
|
|
2
|
-
import { DenormalizedAttachmentResourceForCreate } from '
|
|
1
|
+
import { DenormalizedAttachmentResource } from '@/types/resources/denormalized_attachment_resource';
|
|
2
|
+
import { DenormalizedAttachmentResourceForCreate } from '@/types/resources/denormalized_attachment_resource_for_create';
|
|
3
3
|
/**
|
|
4
4
|
* Converts an array of DenormalizedAttachmentResourceForCreate to DenormalizedAttachmentResource.
|
|
5
5
|
* This is used to create optimistic UI attachments that match the server format.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert_attachments_for_create.d.ts","sourceRoot":"","sources":["../../src/utils/convert_attachments_for_create.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAI/B,MAAM,
|
|
1
|
+
{"version":3,"file":"convert_attachments_for_create.d.ts","sourceRoot":"","sources":["../../src/utils/convert_attachments_for_create.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAI/B,MAAM,oDAAoD,CAAA;AAC3D,OAAO,EACL,uCAAuC,EAGxC,MAAM,+DAA+D,CAAA;AAEtE;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,uCAAuC,EAAE,GACrD,8BAA8B,EAAE,CAElC;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,uCAAuC,GAClD,8BAA8B,CAahC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convert_attachments_for_create.js","sourceRoot":"","sources":["../../src/utils/convert_attachments_for_create.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,WAAsD;IAEtD,OAAO,WAAW,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,UAAmD;IAEnD,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,mBAAmB;YACtB,OAAO,iCAAiC,CAAC,UAAU,CAAC,CAAA;QACtD,KAAK,OAAO;YACV,OAAO,+BAA+B,CAAC,UAAU,CA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AK,CAAC,kBAAkB;YACrD,sBAAsB,EAAE,UAAU,CAAC,KAAK,CAAC,wBAAwB;YACjE,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,WAAW;YACxC,eAAe,EAAE,UAAU,CAAC,KAAK,CAAC,iBAAiB;YACnD,qBAAqB,EAAE,UAAU,CAAC,KAAK,CAAC,uBAAuB;SAChE;KACF,CAAA;AACH,CAAC","sourcesContent":["import {\n DenormalizedAttachmentResource,\n DenormalizedMessageAttachmentResource,\n DenormalizedGiphyAttachmentResource,\n DenormalizedExpandedLinkAttachmentResource,\n} from '
|
|
1
|
+
{"version":3,"file":"convert_attachments_for_create.js","sourceRoot":"","sources":["../../src/utils/convert_attachments_for_create.ts"],"names":[],"mappings":"AAYA;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CACzC,WAAsD;IAEtD,OAAO,WAAW,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,UAAmD;IAEnD,QAAQ,UAAU,CAAC,IAAI,EAAE,CAAC;QACxB,KAAK,mBAAmB;YACtB,OAAO,iCAAiC,CAAC,UAAU,CAAC,CAAA;QACtD,KAAK,OAAO;YACV,OAAO,+BAA+B,CAAC,UAAU,CAAC,CAAA;QACpD,KAAK,cAAc;YACjB,gDAAgD;YAChD,OAAO,UAAwD,CAAA;QACjE;YACE,yDAAyD;YACzD,MAAM,IAAI,KAAK,CAAC,4BAA6B,UAAkB,CAAC,IAAI,EAAE,CAAC,CAAA;IAC3E,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAS,iCAAiC,CACxC,UAA0D;IAE1D,OAAO;QACL,IAAI,EAAE,mBAAmB;QACzB,EAAE,EAAE,UAAU,CAAC,EAAE;QACjB,UAAU,EAAE;YACV,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI;YAC9B,GAAG,EAAE,EAAE,EAAE,2BAA2B;YACpC,WAAW,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI;YACjC,QAAQ,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI;YAC9B,QAAQ,EAAE,EAAE,EAAE,2BAA2B;YACzC,GAAG,EAAE,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,uCAAuC;YACjE,QAAQ,EAAE;gBACR,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,KAAK;gBAC5B,MAAM,EAAE,UAAU,CAAC,IAAI,CAAC,MAAM;gBAC9B,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;aAClB;SACF;KACF,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAS,+BAA+B,CACtC,UAAwD;IAExD,OAAO;QACL,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,UAAU,CAAC,EAAE;QACjB,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,kBAAkB,EAAE,UAAU,CAAC,oBAAoB;QACnD,SAAS,EAAE,UAAU,CAAC,UAAU;QAChC,QAAQ,EAAE,UAAU,CAAC,SAAS;QAC9B,KAAK,EAAE;YACL,QAAQ,EAAE,UAAU,CAAC,KAAK,CAAC,QAAQ;YACnC,WAAW,EAAE,UAAU,CAAC,KAAK,CAAC,YAAY;YAC1C,gBAAgB,EAAE,UAAU,CAAC,KAAK,CAAC,kBAAkB;YACrD,sBAAsB,EAAE,UAAU,CAAC,KAAK,CAAC,wBAAwB;YACjE,UAAU,EAAE,UAAU,CAAC,KAAK,CAAC,WAAW;YACxC,eAAe,EAAE,UAAU,CAAC,KAAK,CAAC,iBAAiB;YACnD,qBAAqB,EAAE,UAAU,CAAC,KAAK,CAAC,uBAAuB;SAChE;KACF,CAAA;AACH,CAAC","sourcesContent":["import {\n DenormalizedAttachmentResource,\n DenormalizedMessageAttachmentResource,\n DenormalizedGiphyAttachmentResource,\n DenormalizedExpandedLinkAttachmentResource,\n} from '@/types/resources/denormalized_attachment_resource'\nimport {\n DenormalizedAttachmentResourceForCreate,\n DenormalizedMessageAttachmentResourceForCreate,\n DenormalizedGiphyAttachmentResourceForCreate,\n} from '@/types/resources/denormalized_attachment_resource_for_create'\n\n/**\n * Converts an array of DenormalizedAttachmentResourceForCreate to DenormalizedAttachmentResource.\n * This is used to create optimistic UI attachments that match the server format.\n */\nexport function convertAttachmentsForCreate(\n attachments: DenormalizedAttachmentResourceForCreate[]\n): DenormalizedAttachmentResource[] {\n return attachments.map(convertAttachmentForCreate)\n}\n\n/**\n * Converts a single DenormalizedAttachmentResourceForCreate to DenormalizedAttachmentResource.\n */\nexport function convertAttachmentForCreate(\n attachment: DenormalizedAttachmentResourceForCreate\n): DenormalizedAttachmentResource {\n switch (attachment.type) {\n case 'MessageAttachment':\n return convertMessageAttachmentForCreate(attachment)\n case 'giphy':\n return convertGiphyAttachmentForCreate(attachment)\n case 'ExpandedLink':\n // ExpandedLink is already in the correct format\n return attachment as DenormalizedExpandedLinkAttachmentResource\n default:\n // This should never happen with proper TypeScript typing\n throw new Error(`Unknown attachment type: ${(attachment as any).type}`)\n }\n}\n\n/**\n * Converts a MessageAttachment from \"for create\" format to denormalized format.\n */\nfunction convertMessageAttachmentForCreate(\n attachment: DenormalizedMessageAttachmentResourceForCreate\n): DenormalizedMessageAttachmentResource {\n return {\n type: 'MessageAttachment',\n id: attachment.id,\n attributes: {\n filename: attachment.file.name,\n key: '', // Will be filled by server\n contentType: attachment.file.type,\n byteSize: attachment.file.size,\n checksum: '', // Will be filled by server\n url: attachment.file.uri, // Use local file URI for optimistic UI\n metadata: {\n width: attachment.file.width,\n height: attachment.file.height,\n analyzed: false,\n identified: false,\n },\n },\n }\n}\n\n/**\n * Converts a GiphyAttachment from \"for create\" format to denormalized format.\n */\nfunction convertGiphyAttachmentForCreate(\n attachment: DenormalizedGiphyAttachmentResourceForCreate\n): DenormalizedGiphyAttachmentResource {\n return {\n type: 'giphy',\n id: attachment.id,\n title: attachment.title,\n originalGiphyTitle: attachment.original_giphy_title,\n titleLink: attachment.title_link,\n thumbUrl: attachment.thumb_url,\n giphy: {\n original: attachment.giphy.original,\n fixedHeight: attachment.giphy.fixed_height,\n fixedHeightStill: attachment.giphy.fixed_height_still,\n fixedHeightDownsampled: attachment.giphy.fixed_height_downsampled,\n fixedWidth: attachment.giphy.fixed_width,\n fixedWidthStill: attachment.giphy.fixed_width_still,\n fixedWidthDownsampled: attachment.giphy.fixed_width_downsampled,\n },\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AppName } from '
|
|
2
|
-
import { SourceType, GraphId } from '
|
|
1
|
+
import { AppName } from '@/types/resources/app_name';
|
|
2
|
+
import { SourceType, GraphId } from '@/types/resources/group_resource';
|
|
3
3
|
interface DestructuredChatGroupGraphIdType {
|
|
4
4
|
sourceAppName?: AppName;
|
|
5
5
|
sourceType?: SourceType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destructure_chat_group_graph_id.d.ts","sourceRoot":"","sources":["../../src/utils/destructure_chat_group_graph_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"destructure_chat_group_graph_id.d.ts","sourceRoot":"","sources":["../../src/utils/destructure_chat_group_graph_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;AACpD,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAA;AAEtE,UAAU,gCAAgC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,wBAAgB,2BAA2B,CACzC,gBAAgB,CAAC,EAAE,OAAO,GACzB,gCAAgC,CAalC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"destructure_chat_group_graph_id.js","sourceRoot":"","sources":["../../src/utils/destructure_chat_group_graph_id.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,2BAA2B,CACzC,gBAA0B;IAE1B,IAAI,CAAC,gBAAgB;QACnB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;IAEjF,MAAM,CAAC,aAAa,EAAE,UAAU,EAAE,cAAc,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAI7E,CAAA;IAED,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;IAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAA;AAChE,CAAC","sourcesContent":["import { AppName } from '
|
|
1
|
+
{"version":3,"file":"destructure_chat_group_graph_id.js","sourceRoot":"","sources":["../../src/utils/destructure_chat_group_graph_id.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,2BAA2B,CACzC,gBAA0B;IAE1B,IAAI,CAAC,gBAAgB;QACnB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,CAAA;IAEjF,MAAM,CAAC,aAAa,EAAE,UAAU,EAAE,cAAc,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAI7E,CAAA;IAED,MAAM,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;IAE7C,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAA;AAChE,CAAC","sourcesContent":["import { AppName } from '@/types/resources/app_name'\nimport { SourceType, GraphId } from '@/types/resources/group_resource'\n\ninterface DestructuredChatGroupGraphIdType {\n sourceAppName?: AppName\n sourceType?: SourceType\n sourceId?: number\n}\n\nexport function destructureChatGroupGraphId(\n chatGroupGraphId?: GraphId\n): DestructuredChatGroupGraphIdType {\n if (!chatGroupGraphId)\n return { sourceAppName: undefined, sourceType: undefined, sourceId: undefined }\n\n const [sourceAppName, sourceType, sourceIdString] = chatGroupGraphId.split('-') as [\n AppName,\n SourceType,\n string,\n ]\n\n const sourceIdNumber = Number(sourceIdString)\n\n return { sourceAppName, sourceType, sourceId: sourceIdNumber }\n}\n"]}
|