@pitcher/js-api 1.28.0 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -662,3 +662,183 @@ export interface PiaSearchAnswerResult {
662
662
  */
663
663
  source: 'on_device' | 'online';
664
664
  }
665
+ /**
666
+ * Error codes returned on a rejected `stt.start` / `stt.stop` — cross-platform
667
+ * (iOS bridge AND the web host engines). Surfaced verbatim in the rejected
668
+ * request's error body (iOS: `error_code`/`errorCode`; web: the error `message` /
669
+ * `reason` string — read them uniformly via `api.sttErrorCode`).
670
+ *
671
+ * - `STT_DISABLED` — the `enable_stt_dictation` config flag is off for this instance.
672
+ * - `STT_DEVICE_UNSUPPORTED` — the device can't run the on-device model.
673
+ * - `STT_MODEL_NOT_READY` — the whisper model isn't downloaded yet. Trigger a
674
+ * model download (`ai.download_model` with `"whisper"`), then retry `stt.start`.
675
+ * - `STT_BUSY` — the mic is held by another session (a live call recording, or
676
+ * another dictation). Surface a "mic in use" hint / prompt to stop the other session.
677
+ * - `STT_MIC_PERMISSION_DENIED` — microphone permission was denied.
678
+ * - `STT_NOT_RECORDING` — `stt.stop` for a `session_id` that isn't active.
679
+ * - `STT_CAPTURE_FAILED` / `STT_ERROR` — generic capture / other failure.
680
+ */
681
+ export type SttErrorCode = 'STT_DISABLED' | 'STT_DEVICE_UNSUPPORTED' | 'STT_MODEL_NOT_READY' | 'STT_BUSY' | 'STT_MIC_PERMISSION_DENIED' | 'STT_NOT_RECORDING' | 'STT_CAPTURE_FAILED' | 'STT_ERROR';
682
+ /**
683
+ * Payload for `stt.start` — cross-platform (identical shape on iOS and web).
684
+ * Keys are already snake_case, so `LowLevelApi`'s `snakeCaseKeys` transform is a
685
+ * no-op (no `RAW_PAYLOAD_METHODS` entry needed; the `vocabulary` string values
686
+ * are left untouched by the key-only transform).
687
+ */
688
+ export interface SttStartPayload {
689
+ /**
690
+ * Caller-chosen session id. All `stt.partial` / `stt.interrupted` events and
691
+ * the matching `stt.stop` are keyed by it. Re-starting with the same id
692
+ * replaces that session.
693
+ */
694
+ session_id: string;
695
+ /**
696
+ * ISO 639-1 code (e.g. `"en"`) to force a language. Omit/`null` for
697
+ * auto-detect (the default, like native iOS dictation).
698
+ */
699
+ language?: string | null;
700
+ /**
701
+ * Proper nouns likely to be spoken (the current call's CRM contact / account
702
+ * / product names). Biases recognition toward correct spelling (e.g.
703
+ * "Dr. Sarah O'Brien" instead of "Dr. Starwhop Brine"). Send the relevant
704
+ * names, not the whole CRM — it's length-capped on the native side.
705
+ */
706
+ vocabulary?: string[];
707
+ }
708
+ /**
709
+ * Payload for `stt.stop` — cross-platform.
710
+ */
711
+ export interface SttStopPayload {
712
+ /**
713
+ * The `session_id` passed to the matching `stt.start`.
714
+ */
715
+ session_id: string;
716
+ }
717
+ /**
718
+ * Result of `stt.stop` — cross-platform.
719
+ */
720
+ export interface SttStopResult {
721
+ /**
722
+ * The final, full transcript for the session.
723
+ */
724
+ transcript: string;
725
+ }
726
+ /**
727
+ * Body of the `stt.partial` event (host → JS; native bridge on iOS, the Impact
728
+ * host engine on web). Fires roughly every ~2s while recording.
729
+ */
730
+ export interface SttPartialEvent {
731
+ /**
732
+ * Session the partial belongs to.
733
+ */
734
+ session_id: string;
735
+ /**
736
+ * The FULL transcript so far — NOT a delta. Replace the field's dictation
737
+ * content with it, don't append.
738
+ */
739
+ text: string;
740
+ /**
741
+ * Per-session monotonic counter (only advances when `text` changes) for
742
+ * ordering / de-dupe.
743
+ */
744
+ index: number;
745
+ }
746
+ /**
747
+ * Body of the `stt.interrupted` event (host → JS; native bridge on iOS, the
748
+ * Impact host engine on web). Fires only when a session ends WITHOUT a
749
+ * `stt.stop` — a normal `stt.stop` does NOT fire this.
750
+ */
751
+ export interface SttInterruptedEvent {
752
+ /**
753
+ * Session that was interrupted.
754
+ */
755
+ session_id: string;
756
+ /**
757
+ * Why the session ended — an opaque, host-specific string; don't parse it,
758
+ * just stop waiting for partials and reset the field. Known values:
759
+ * - iOS: `"preempted"` — a higher-priority call recording took the mic.
760
+ * - web: `"error:capture_ended"` (mic/track ended), `"error:<code>"` (a fatal
761
+ * Web Speech recognition error, e.g. `"error:network"`), `"error:restart_failed"`.
762
+ */
763
+ reason: string;
764
+ }
765
+ /**
766
+ * Which engine answers `stt.start` on the current platform: `"native"` (iOS
767
+ * on-device Speech), `"whisper"` (web on-device Whisper) or `"webspeech"` (web
768
+ * cloud fallback, audio leaves the device).
769
+ */
770
+ export type SttEngineKind = 'native' | 'whisper' | 'webspeech';
771
+ /**
772
+ * Why dictation is unavailable: `"disabled"` (the `enable_stt_dictation`
773
+ * instance flag is off) or `"unsupported"` (no engine can run on this device).
774
+ */
775
+ export type SttUnavailableReason = 'disabled' | 'unsupported';
776
+ /**
777
+ * Result of `stt.availability` — a side-effect-free capability check an app
778
+ * should call BEFORE offering a mic button. It does NOT prompt for the
779
+ * microphone or download any model; it only reports whether dictation could be
780
+ * started, so the UI can hide/disable the control up front.
781
+ */
782
+ export interface SttAvailabilityResult {
783
+ /**
784
+ * Dictation can be started right now — the feature is enabled AND an engine
785
+ * can run on this device.
786
+ */
787
+ available: boolean;
788
+ /**
789
+ * The engine that would answer `stt.start`, or `null` when unavailable. Note
790
+ * `"webspeech"` sends audio off-device, so a UI may want to reflect that.
791
+ */
792
+ engine: SttEngineKind | null;
793
+ /**
794
+ * Present when `available` is `false`: `"disabled"` (feature flag off) or
795
+ * `"unsupported"` (no engine on this device / browser).
796
+ */
797
+ reason?: SttUnavailableReason;
798
+ }
799
+ /**
800
+ * Error codes returned on `tts.speak` — as a bridge APIError
801
+ * (`{ code, message, details }`) on iOS, or in the host `{ reason }` on web.
802
+ *
803
+ * - `TTS_EMPTY_TEXT` — no text was provided.
804
+ * - `TTS_VOICE_UNAVAILABLE` — a `language` was requested but no installed voice
805
+ * matches. The message tells the user to download it (iOS Settings ›
806
+ * Accessibility › Spoken Content › Voices) — surface it so the UI can prompt.
807
+ * - `TTS_ERROR` — unexpected fallback.
808
+ */
809
+ export type TtsErrorCode = 'TTS_EMPTY_TEXT' | 'TTS_VOICE_UNAVAILABLE' | 'TTS_ERROR';
810
+ /**
811
+ * Payload for `tts.speak`. The exact native wire contract — keys are single
812
+ * words, so LowLevelApi's `snakeCaseKeys` transform is a no-op; no
813
+ * `RAW_PAYLOAD_METHODS` entry is needed.
814
+ */
815
+ export interface TtsSpeakPayload {
816
+ /**
817
+ * The text to speak. Empty/whitespace rejects with `TTS_EMPTY_TEXT`.
818
+ */
819
+ text: string;
820
+ /**
821
+ * BCP-47/ISO language tag (e.g. `"en-US"`). If given, an installed offline
822
+ * voice is required, else the call rejects with `TTS_VOICE_UNAVAILABLE`. Omit
823
+ * to use the system voice.
824
+ */
825
+ language?: string;
826
+ /**
827
+ * Speech rate; clamped to the platform min…max.
828
+ */
829
+ rate?: number;
830
+ /**
831
+ * Speech pitch; clamped `0.5`…`2.0` (`1.0` = normal).
832
+ */
833
+ pitch?: number;
834
+ }
835
+ /**
836
+ * Result of `tts.speak`. The promise resolves when the utterance FINISHES.
837
+ */
838
+ export interface TtsSpeakResult {
839
+ /**
840
+ * `true` → finished speaking naturally; `false` → it was stopped (`tts.stop`)
841
+ * or replaced by a newer `tts.speak` (only one utterance is active at a time).
842
+ */
843
+ completed: boolean;
844
+ }
@@ -1,4 +1,3 @@
1
- import { CanvasRetrieve, User } from '../../types/openapi';
2
1
  export interface GetCanvasesParams {
3
2
  search?: string;
4
3
  account__id?: string;
@@ -19,11 +18,9 @@ export interface GetCanvasesParams {
19
18
  template__id?: string;
20
19
  }
21
20
  export interface CanvasMetadataRetrieve {
22
- canvas_id: CanvasRetrieve['id'];
23
21
  config: Record<string, any> & {
24
22
  presentation_component_metadata: Record<string, any>;
25
23
  };
26
- owner_id: User['id'];
27
24
  }
28
25
  export declare enum CanvasesViewsTypes {
29
26
  SAVED = "saved",
@@ -1,4 +1,4 @@
1
- export type LaunchDarklyBooleanFlagKey = 'ai_image_generation_model' | 'ai_video_generation_model' | 'allow_ai_prompts_in_canvas_text' | 'allow_bulk_actions_canvases_files' | 'allow_content_grid_autofill' | 'allow_canvas_duplication' | 'allow_canvases_tables_columns_settings' | 'allow_table_column_resizing' | 'allow_creating_canvas_with_no_template' | 'allow_dynamic_data_table_for_scribble_component' | 'allow_html_for_scribble_component' | 'allow_embeddable_for_scribble_component' | 'allow_embeddable_hiding' | 'allow_multimedia_for_scribble_component' | 'allow_note_taking' | 'allow_rep_canvas_metadata_edit' | 'allow_rep_file_distributions' | 'allow_rep_file_rating' | 'allow_rep_file_upload' | 'allow_saving_annotations_in_personal_layer' | 'allow_user_to_edit_font_size_and_color_in_canvas_tokens' | 'are_sections_system_controlled' | 'enable_canvas_core_distributions' | 'copy_context_to_canvas' | 'copy_template_metadata_to_canvas' | 'disable_canvas_edit_for_reps' | 'disable_custom_tooltips' | 'disable_file_edit_content' | 'enable_inline_wopi_edit_button' | 'disable_fullscreen_canvas_builder' | 'disable_impact_web_browser_fullscreen' | 'disable_user_invitations' | 'display_section_list_name' | 'disable_download_canvas' | 'enable_ai_generated_thumbnails' | 'enable_analytics' | 'enable_app_developer_role' | 'enable_algolia_search' | 'enable_background_image_theme_options' | 'enable_better_canvas_builder_control_bars_on_zoom' | 'enable_bulk_update_file_attributes' | 'enable_canvas_as_home' | 'enable_canvas_blocks' | 'enable_canvas_node_debugging' | 'enable_canvas_freeze' | 'enable_canvas_locks' | 'enable_canvas_template_edit_in_impact' | 'enable_canvas_tokens' | 'enable_collaborations' | 'enable_collection_player_data_accessor' | 'enable_content_grid_data_accessor' | 'enable_content_type_change_in_content_selector' | 'enable_cross_tab_instance_reload_for_ld_sync' | 'enable_create_section_from_section_template' | 'enable_custom_display_overrides' | 'enable_default_crm_shape' | 'enable_detailed_date_format' | 'enable_dsr_readonly_annotations' | 'enable_dnd_html_editor' | 'enable_dynamic_content_component' | 'enable_dynamic_data_table_component' | 'enable_custom_data_tables' | 'enable_embedded_video_autoplay' | 'enable_embedded_video' | 'enable_enhanced_canvas_drawer_app' | 'enable_enhanced_indicators' | 'enable_enhanced_section_execution_states' | 'enable_experimental_canvas_builder_dnd' | 'enable_extra_file_data' | 'enable_file_copy' | 'enable_file_pages_metadata' | 'enable_file_revisions' | 'enable_file_divisible_permission' | 'enable_folder_details_edit' | 'enable_folder_distributions' | 'enable_handlebar_template_support' | 'enable_height_in_component_theming' | 'enable_home_customization' | 'enable_hotspot_visibility' | 'enable_improved_canvas_node_updating' | 'enable_individual_users_in_file_distribution' | 'enable_inline_filter_options' | 'enable_insearch_in_section_selector' | 'enable_instance_cloner' | 'enable_advanced_cloner' | 'enable_content_promotion' | 'enable_instance_editor_role' | 'enable_instance_navigation_from_management' | 'enable_knock_notifications' | 'enable_maintain_section_theme_control' | 'enable_metadata_in_file_uploads_with_default_values' | 'enable_more_intuitive_component_spacing' | 'enable_multi_destination_upload' | 'enable_multimedia_component_ai_images' | 'enable_new_meeting_bar' | 'enable_provider_agnostic_meeting_bar' | 'enable_original_pdf_link' | 'enable_scale_content' | 'enable_sorting_in_tiptap_table' | 'enable_theme_assets' | 'enable_toc_enhancements_to_support_same_section_in_section_list' | 'enable_pia_assistant' | 'enable_pipe_character_multi_search' | 'enable_popup_apps' | 'enable_pre_send_validation' | 'enable_reorder_search' | 'enable_reorder_scribble_isolation' | 'enable_reorder_component_options_menu' | 'enable_resizable_multimedia_component' | 'enable_responsive_scribble_component' | 'enable_saved_canvases_filters' | 'enable_short_tag_column_in_tables' | 'enable_scribble_component' | 'enable_scribble_content_as_background' | 'enable_search_and_filters_in_multimedia_component' | 'enable_section_context_in_dsr' | 'enable_selectors_dnd' | 'enable_section_selector_edit_section' | 'enable_smart_folders' | 'enable_smart_folders_for_sections' | 'enable_smart_folders_in_section_selector' | 'enable_smart_folders_in_files' | 'enable_sorting_in_sections' | 'enable_suggested_tags' | 'enable_template_component_permissions' | 'enable_template_folders' | 'enable_theme_options_border_radius' | 'enable_themes' | 'hide_asset_uploader' | 'hide_user_feedback_widget' | 'include_files_content_in_print' | 'interpolate_rep_canvases_on_edit_mode' | 'is_timeline_component_allowed' | 'launch_in_full_screen_on_present_mode' | 'prefer_online_handlers' | 'restrict_owned_files_from_admins' | 'show_asset_manager_for_multimedia' | 'show_clear_all_annotations_button' | 'show_content_selector_list_view' | 'show_metadata_filters_in_all_canvas_things' | 'show_only_preview_mode_for_html_component' | 'show_popularity_icons' | 'use_core_endpoint_for_analytics' | 'convert_pptx_to_section_with_scribble_pdfjs' | 'use_short_url_for_shared_link' | 'use_zoho_instead_of_ms_wopi' | 'enable_new_section_list' | 'enable_sharebox_apps' | 'enable_sharebox_bulk_filtering' | 'enable_back_to_previous_location_in_canvas' | 'enable_crm_shape_for_external_links' | 'enable_adaptive_popup_apps' | 'enable_file_version_polling' | 'skip_pspdfkit_wait_for_high_res_thumbs' | 'enable_reactive_scribble_component_toolbar' | 'enable_embeddable_full_screen_mode' | 'enable_enhanced_user_management' | 'enable_impersonation' | 'enable_instance_admin_user_assignment' | 'keep_static_pptx_editable' | 'enable_canvas_pdf_dimensions' | 'enable_editable_pptx_of_canvas' | 'enable_editable_pptx_of_canvas_with_fonts' | 'enable_aspose_pptx_of_canvas' | 'enable_canvas_control_bars_collapse' | 'enable_rep_app_visibility_order' | 'enable_file_sharing_print_permissions' | 'enable_section_sharing_print_permissions' | 'enable_marketplace_tab' | 'enable_sfdc_account_visibility_for_canvases' | 'sfdc_offline_enabled' | 'enable_granular_permissions' | 'enable_hub_collections' | 'enable_hub_recommended_smart_folder' | 'enable_custom_user_properties';
1
+ export type LaunchDarklyBooleanFlagKey = 'ai_image_generation_model' | 'ai_video_generation_model' | 'allow_ai_prompts_in_canvas_text' | 'allow_bulk_actions_canvases_files' | 'allow_content_grid_autofill' | 'allow_canvas_duplication' | 'allow_canvases_tables_columns_settings' | 'allow_table_column_resizing' | 'allow_creating_canvas_with_no_template' | 'allow_dynamic_data_table_for_scribble_component' | 'allow_html_for_scribble_component' | 'allow_embeddable_for_scribble_component' | 'allow_embeddable_hiding' | 'allow_multimedia_for_scribble_component' | 'allow_note_taking' | 'allow_rep_canvas_metadata_edit' | 'allow_rep_file_distributions' | 'allow_rep_file_rating' | 'allow_rep_file_upload' | 'allow_saving_annotations_in_personal_layer' | 'allow_user_to_edit_font_size_and_color_in_canvas_tokens' | 'are_sections_system_controlled' | 'enable_canvas_core_distributions' | 'copy_context_to_canvas' | 'copy_template_metadata_to_canvas' | 'disable_canvas_edit_for_reps' | 'disable_custom_tooltips' | 'disable_file_edit_content' | 'enable_inline_wopi_edit_button' | 'disable_fullscreen_canvas_builder' | 'disable_impact_web_browser_fullscreen' | 'disable_user_invitations' | 'display_section_list_name' | 'disable_download_canvas' | 'enable_ai_generated_thumbnails' | 'enable_analytics' | 'enable_app_developer_role' | 'enable_algolia_search' | 'enable_background_image_theme_options' | 'enable_better_canvas_builder_control_bars_on_zoom' | 'enable_bulk_update_file_attributes' | 'enable_canvas_as_home' | 'enable_canvas_blocks' | 'enable_canvas_node_debugging' | 'enable_canvas_freeze' | 'enable_canvas_locks' | 'enable_canvas_template_edit_in_impact' | 'enable_canvas_tokens' | 'enable_collaborations' | 'enable_collection_player_data_accessor' | 'enable_content_grid_data_accessor' | 'enable_content_type_change_in_content_selector' | 'enable_cross_tab_instance_reload_for_ld_sync' | 'enable_create_section_from_section_template' | 'enable_custom_display_overrides' | 'enable_default_crm_shape' | 'enable_detailed_date_format' | 'enable_dsr_readonly_annotations' | 'enable_dnd_html_editor' | 'enable_dynamic_content_component' | 'enable_dynamic_data_table_component' | 'enable_custom_data_tables' | 'enable_embedded_video_autoplay' | 'enable_embedded_video' | 'enable_enhanced_canvas_drawer_app' | 'enable_enhanced_indicators' | 'enable_enhanced_section_execution_states' | 'enable_experimental_canvas_builder_dnd' | 'enable_extra_file_data' | 'enable_file_copy' | 'enable_file_pages_metadata' | 'enable_file_revisions' | 'enable_file_divisible_permission' | 'enable_folder_details_edit' | 'enable_folder_distributions' | 'enable_handlebar_template_support' | 'enable_height_in_component_theming' | 'enable_home_customization' | 'enable_hotspot_visibility' | 'enable_improved_canvas_node_updating' | 'enable_individual_users_in_file_distribution' | 'enable_inline_filter_options' | 'enable_insearch_in_section_selector' | 'enable_instance_cloner' | 'enable_advanced_cloner' | 'enable_content_promotion' | 'enable_instance_editor_role' | 'enable_instance_navigation_from_management' | 'enable_knock_notifications' | 'enable_maintain_section_theme_control' | 'enable_metadata_in_file_uploads_with_default_values' | 'enable_more_intuitive_component_spacing' | 'enable_multi_destination_upload' | 'enable_multimedia_component_ai_images' | 'enable_new_meeting_bar' | 'enable_provider_agnostic_meeting_bar' | 'enable_original_pdf_link' | 'enable_scale_content' | 'enable_sorting_in_tiptap_table' | 'enable_stt_dictation' | 'enable_cloud_stt_fallback' | 'enable_theme_assets' | 'enable_toc_enhancements_to_support_same_section_in_section_list' | 'enable_pia_assistant' | 'enable_pipe_character_multi_search' | 'enable_popup_apps' | 'enable_pre_send_validation' | 'enable_reorder_search' | 'enable_reorder_scribble_isolation' | 'enable_reorder_component_options_menu' | 'enable_resizable_multimedia_component' | 'enable_responsive_scribble_component' | 'enable_saved_canvases_filters' | 'enable_short_tag_column_in_tables' | 'enable_scribble_component' | 'enable_scribble_content_as_background' | 'enable_search_and_filters_in_multimedia_component' | 'enable_section_context_in_dsr' | 'enable_selectors_dnd' | 'enable_section_selector_edit_section' | 'enable_smart_folders' | 'enable_smart_folders_for_sections' | 'enable_smart_folders_in_section_selector' | 'enable_smart_folders_in_files' | 'enable_sorting_in_sections' | 'enable_suggested_tags' | 'enable_template_component_permissions' | 'enable_template_folders' | 'enable_theme_options_border_radius' | 'enable_themes' | 'hide_asset_uploader' | 'hide_user_feedback_widget' | 'include_files_content_in_print' | 'interpolate_rep_canvases_on_edit_mode' | 'is_timeline_component_allowed' | 'launch_in_full_screen_on_present_mode' | 'prefer_online_handlers' | 'restrict_owned_files_from_admins' | 'show_asset_manager_for_multimedia' | 'show_clear_all_annotations_button' | 'show_content_selector_list_view' | 'show_metadata_filters_in_all_canvas_things' | 'show_only_preview_mode_for_html_component' | 'show_popularity_icons' | 'use_core_endpoint_for_analytics' | 'convert_pptx_to_section_with_scribble_pdfjs' | 'use_short_url_for_shared_link' | 'use_zoho_instead_of_ms_wopi' | 'enable_new_section_list' | 'enable_sharebox_apps' | 'enable_sharebox_bulk_filtering' | 'enable_back_to_previous_location_in_canvas' | 'enable_crm_shape_for_external_links' | 'enable_adaptive_popup_apps' | 'enable_file_version_polling' | 'skip_pspdfkit_wait_for_high_res_thumbs' | 'skip_pspdfkit_tile_size_workaround' | 'enable_reactive_scribble_component_toolbar' | 'enable_embeddable_full_screen_mode' | 'enable_enhanced_user_management' | 'enable_impersonation' | 'enable_instance_admin_user_assignment' | 'keep_static_pptx_editable' | 'enable_canvas_pdf_dimensions' | 'enable_editable_pptx_of_canvas' | 'enable_editable_pptx_of_canvas_with_fonts' | 'enable_aspose_pptx_of_canvas' | 'enable_canvas_control_bars_collapse' | 'enable_rep_app_visibility_order' | 'enable_file_sharing_print_permissions' | 'enable_section_sharing_print_permissions' | 'enable_marketplace_tab' | 'enable_sfdc_account_visibility_for_canvases' | 'sfdc_offline_enabled' | 'enable_granular_permissions' | 'enable_hub_collections' | 'enable_hub_recommended_smart_folder' | 'enable_custom_user_properties';
2
2
  export type LaunchDarklyNumberFlagKey = 'canvas_section_selector_page_size' | 'canvas_section_selector_selected_items_with_thumbnail_size';
3
3
  /** How PIA Search serves inference (PIT-6863). */
4
4
  export type PiaSearchMode = 'off' | 'on_device' | 'online';
@@ -96,6 +96,21 @@ export type SfContact = {
96
96
  MailingAddress?: string;
97
97
  Phone?: string;
98
98
  };
99
+ /**
100
+ * Meeting-bar contacts live in a dual id-space: `Id` is the roster record the
101
+ * user picked — a standard Contact (`003…`) when the org's
102
+ * `contact_visibility_query` targets Contact, or a custom-object record (e.g.
103
+ * Demant's `Contact_Customer_Detail__c`, `a1i…`). `ContactMirrorId` is the
104
+ * standard Contact (`003…`) the roster record mirrors (its `Contact__r`
105
+ * lookup), when known — the only id that may ever be written to
106
+ * `Event.WhoId` / `EventWhoIds`. For standard-Contact rosters the roster id IS
107
+ * the mirror id. Hoisted in slotty-ui-ng's `resolveCustomAccountRelation`;
108
+ * synthetic (never written back to Salesforce), deliberately not `__c`-suffixed
109
+ * so it can't collide with a real custom field API name. PIT-7250.
110
+ */
111
+ export type SfRosterContact = SfContact & {
112
+ ContactMirrorId?: string | null;
113
+ };
99
114
  export interface SfContactBasic {
100
115
  AccountId: string;
101
116
  Email: string;
@@ -1,4 +1,40 @@
1
+ /**
2
+ * Escape a user-typed search term for interpolation into a SOQL LIKE pattern or
3
+ * SOSL FIND term. Escapes the LIKE wildcards `%` and `_` in addition to quotes
4
+ * and control characters — do NOT use it for equality/IN comparison values,
5
+ * where escaping the wildcards would change the compared value; use
6
+ * `soqlLiteral` / `soqlIn` / `soqlEq` for those.
7
+ */
1
8
  export declare const escapeSoqlString: (input: string) => string;
9
+ /**
10
+ * Quote a value as a SOQL string literal for equality/IN comparisons, e.g.
11
+ * `WHERE Id = ${soqlLiteral(id)}`. Escapes backslashes (first, so escaped
12
+ * quotes aren't doubled), single quotes, and newline/tab control characters.
13
+ * Deliberately does NOT escape the LIKE wildcards `%`/`_` — inside an equality
14
+ * literal those are ordinary characters, and escaping them would change the
15
+ * compared value. For LIKE patterns / SOSL FIND terms use `escapeSoqlString`.
16
+ */
17
+ export declare const soqlLiteral: (value: string) => string;
18
+ /**
19
+ * Build the parenthesized value list for a SOQL IN clause, e.g.
20
+ * `WHERE Id IN ${soqlIn(ids)}`. An empty input yields `('')` — valid SOQL that
21
+ * matches no record — so callers don't need an empty-array branch.
22
+ */
23
+ export declare const soqlIn: (values: string[]) => string;
24
+ /**
25
+ * True when `name` is a plain SObject field API name (letters, digits,
26
+ * underscores, leading letter). Field identifiers cannot be escaped as string
27
+ * literals, so anything interpolated as a field/relationship name must pass
28
+ * this gate (relationship paths like `Contact__r.Id` need each dotted segment
29
+ * validated separately).
30
+ */
31
+ export declare const isSoqlFieldIdentifier: (name: string) => boolean;
32
+ /**
33
+ * Build a `field = 'value'` SOQL condition with the field validated via
34
+ * `isSoqlFieldIdentifier` and the value quoted via `soqlLiteral`. Throws on an
35
+ * invalid field name — field identifiers cannot be escaped, only rejected.
36
+ */
37
+ export declare const soqlEq: (field: string, value: string) => string;
2
38
  export declare const convertToSosl: (soqlQuery: string, searchString: string, searchInField?: string) => string | null;
3
39
  export interface AccountSortPriority {
4
40
  field: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.28.0",
3
+ "version": "1.29.0",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",
@@ -134,7 +134,6 @@ export type { InstanceUpdateRequest } from './models/InstanceUpdateRequest';
134
134
  export type { Invitation } from './models/Invitation';
135
135
  export type { InvitationRequest } from './models/InvitationRequest';
136
136
  export { InvitationStatusEnum } from './models/InvitationStatusEnum';
137
- export { LanguageEnum } from './models/LanguageEnum';
138
137
  export type { MetadataTemplate } from './models/MetadataTemplate';
139
138
  export type { MetadataTemplateField } from './models/MetadataTemplateField';
140
139
  export type { MetadataTemplateFieldRequest } from './models/MetadataTemplateFieldRequest';
@@ -1,10 +1,9 @@
1
- import { LanguageEnum } from './LanguageEnum';
2
1
  import { UserRoleEnum } from './UserRoleEnum';
3
2
  export type PatchedUserRequest = {
4
3
  first_name?: string;
5
4
  last_name?: string;
6
5
  role?: UserRoleEnum;
7
- language?: LanguageEnum;
6
+ language?: string;
8
7
  preferred_username?: string;
9
8
  timezone?: string;
10
9
  tags?: Array<string> | null;
@@ -1,5 +1,4 @@
1
1
  import { ConnectedService } from './ConnectedService';
2
- import { LanguageEnum } from './LanguageEnum';
3
2
  import { UserRoleEnum } from './UserRoleEnum';
4
3
  export type User = {
5
4
  readonly id: number;
@@ -16,7 +15,7 @@ export type User = {
16
15
  readonly deactivated_at: string | null;
17
16
  readonly activated_at: string | null;
18
17
  readonly is_active: boolean;
19
- language?: LanguageEnum;
18
+ language?: string;
20
19
  readonly connected_services: Array<ConnectedService>;
21
20
  preferred_username?: string;
22
21
  readonly picture: string | null;
@@ -1,10 +1,9 @@
1
- import { LanguageEnum } from './LanguageEnum';
2
1
  import { UserRoleEnum } from './UserRoleEnum';
3
2
  export type UserRequest = {
4
3
  first_name?: string;
5
4
  last_name?: string;
6
5
  role?: UserRoleEnum;
7
- language?: LanguageEnum;
6
+ language?: string;
8
7
  preferred_username?: string;
9
8
  timezone?: string;
10
9
  tags?: Array<string> | null;
@@ -1,8 +0,0 @@
1
- export type Language = [
2
- string,
3
- string
4
- ];
5
- /**
6
- * Fetches available languages for the logged-in user
7
- */
8
- export declare function getLanguages(): Promise<Language[]>;
@@ -1,12 +0,0 @@
1
- /**
2
- * * `en` - English
3
- * * `de` - Deutsch
4
- * * `pl` - Polski
5
- * * `tr` - Türkçe
6
- */
7
- export declare enum LanguageEnum {
8
- EN = "en",
9
- DE = "de",
10
- PL = "pl",
11
- TR = "tr"
12
- }