@pitcher/js-api 1.22.0-beta.2 → 1.22.0-beta.3

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.
@@ -3,6 +3,7 @@ import { FolderFile, FolderFolder } from '../../../../../../../types/openapi';
3
3
  import { SelectedFile, SelectedFolder } from '@content-selector/stores/app';
4
4
  declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
5
5
  filters: ComputedRef<Record<string, any>>;
6
+ highlightText?: string;
6
7
  isContextMenuOpen?: boolean;
7
8
  isSelected?: boolean;
8
9
  index?: number;
@@ -14,6 +15,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
14
15
  data: (FolderFile | FolderFolder)[];
15
16
  selectedItems: (SelectedFile | SelectedFolder)[];
16
17
  }>, {
18
+ highlightText: string;
17
19
  index: number;
18
20
  isContextMenuOpen: boolean;
19
21
  isSelected: boolean;
@@ -27,6 +29,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
27
29
  "open-folder": (item: FolderFile) => void;
28
30
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
29
31
  filters: ComputedRef<Record<string, any>>;
32
+ highlightText?: string;
30
33
  isContextMenuOpen?: boolean;
31
34
  isSelected?: boolean;
32
35
  index?: number;
@@ -38,6 +41,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
38
41
  data: (FolderFile | FolderFolder)[];
39
42
  selectedItems: (SelectedFile | SelectedFolder)[];
40
43
  }>, {
44
+ highlightText: string;
41
45
  index: number;
42
46
  isContextMenuOpen: boolean;
43
47
  isSelected: boolean;
@@ -53,6 +57,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
53
57
  isSelected: boolean;
54
58
  index: number;
55
59
  isContextMenuOpen: boolean;
60
+ highlightText: string;
56
61
  listWidth: number;
57
62
  }, {}>;
58
63
  export default _default;
@@ -5,30 +5,35 @@ declare function __VLS_template(): {
5
5
  suffix?(_: {}): any;
6
6
  };
7
7
  declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
8
+ search?: string;
8
9
  modelValue: string;
9
10
  state?: State;
10
11
  readonly?: boolean;
11
12
  placeholder?: string;
12
13
  valueClass?: string;
13
14
  }>, {
15
+ search: string;
14
16
  state: string;
15
17
  }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
16
18
  "update:modelValue": (value: string) => void;
17
19
  edit: () => void;
18
20
  cancel: () => void;
19
21
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
22
+ search?: string;
20
23
  modelValue: string;
21
24
  state?: State;
22
25
  readonly?: boolean;
23
26
  placeholder?: string;
24
27
  valueClass?: string;
25
28
  }>, {
29
+ search: string;
26
30
  state: string;
27
31
  }>>> & {
28
32
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
29
33
  onCancel?: (() => any) | undefined;
30
34
  onEdit?: (() => any) | undefined;
31
35
  }, {
36
+ search: string;
32
37
  state: State;
33
38
  }, {}>;
34
39
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
@@ -1,6 +1,7 @@
1
1
  type State = 'view' | 'edit';
2
2
  declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<{
3
3
  modelValue: string[];
4
+ search?: string;
4
5
  state?: State;
5
6
  readonly?: boolean;
6
7
  placeholder?: string;
@@ -12,6 +13,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
12
13
  displayAsText?: boolean;
13
14
  suggestedTagsFetcher?: (search: string) => Promise<string[]> | string[];
14
15
  }>, {
16
+ search: string;
15
17
  state: string;
16
18
  maxTagsToShow: number;
17
19
  popoverTo: string;
@@ -23,6 +25,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
23
25
  cancel: () => void;
24
26
  }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<{
25
27
  modelValue: string[];
28
+ search?: string;
26
29
  state?: State;
27
30
  readonly?: boolean;
28
31
  placeholder?: string;
@@ -34,6 +37,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
34
37
  displayAsText?: boolean;
35
38
  suggestedTagsFetcher?: (search: string) => Promise<string[]> | string[];
36
39
  }>, {
40
+ search: string;
37
41
  state: string;
38
42
  maxTagsToShow: number;
39
43
  popoverTo: string;
@@ -44,6 +48,7 @@ declare const _default: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_T
44
48
  onCancel?: (() => any) | undefined;
45
49
  onEdit?: (() => any) | undefined;
46
50
  }, {
51
+ search: string;
47
52
  rowIndex: number;
48
53
  state: State;
49
54
  maxTagsToShow: number;
@@ -0,0 +1,9 @@
1
+ export declare function getComponentNameByFilterType(type: string): "CSearchFilter" | "CSelectFilter" | "CDateRangeFilter";
2
+ export declare function getBooleanOptions(): {
3
+ label: string;
4
+ value: string;
5
+ }[];
6
+ export default function useMetadataFilters(): {
7
+ getBooleanOptions: typeof getBooleanOptions;
8
+ getComponentNameByFilterType: typeof getComponentNameByFilterType;
9
+ };
@@ -0,0 +1,8 @@
1
+ import { UiPromptPiaRequest, UiPromptPiaResponse } from './types.ui';
2
+ /**
3
+ * Prompts Pitcher Intelligent Assistant (PIA) with your query.
4
+ *
5
+ * @example
6
+ * useUi().promptPia({ prompt: "What's my most presented file?" })
7
+ */
8
+ export declare function promptPia(payload: UiPromptPiaRequest): Promise<UiPromptPiaResponse>;
@@ -26,6 +26,7 @@ export declare const UI_API_METHOD_TYPES: {
26
26
  readonly UI_STOP_MEETING: "ui_stop_meeting";
27
27
  readonly UI_CANCEL_MEETING: "ui_cancel_meeting";
28
28
  readonly UI_RESUME_MEETING: "ui_resume_meeting";
29
+ readonly UI_PROMPT_PIA: "ui_prompt_pia";
29
30
  readonly UI_CANVAS_NAVIGATE_NEXT_PAGE: "ui_canvas_navigate_next_page";
30
31
  readonly UI_CANVAS_NAVIGATE_PREVIOUS_PAGE: "ui_canvas_navigate_previous_page";
31
32
  readonly UI_CANVAS_NAVIGATE_PAGE: "ui_canvas_navigate_page";
@@ -38,6 +39,7 @@ export declare const UI_MESSAGE_TYPES: {
38
39
  readonly UI_SECTION_LIST_UPDATED: "ui_section_list_updated";
39
40
  readonly UI_APP_SET_DATA: "ui_app_set_data";
40
41
  readonly UI_APP_UPDATE_DATA: "ui_app_update_data";
42
+ readonly UI_PROMPT_RESPONSE_STREAMED: "ui_prompt_response_streamed";
41
43
  };
42
44
  export declare const UI_NATIVE_MESSAGE_TYPES: readonly ["ui_app_set_data", "ui_app_update_data", "ui_canvas_updated"];
43
45
  export type UiBroadcastRequest = Record<string, any>;
@@ -62,6 +64,14 @@ export type UiSelectCanvasesResponse = {
62
64
  /** Selected canvases */
63
65
  canvases?: Canvas[];
64
66
  };
67
+ export type UiPromptPiaRequest = {
68
+ /** Prompt to send to PIA */
69
+ prompt: string;
70
+ };
71
+ export type UiPromptPiaResponse = {
72
+ /** PIA response */
73
+ response: string;
74
+ };
65
75
  /**
66
76
  * Error object to send to Pitcher sentry instance
67
77
  */
@@ -130,6 +140,7 @@ export type UiMessagePayloads = {
130
140
  [UI_MESSAGE_TYPES.UI_APP_UPDATE_DATA]: UiAppUpdateDataPayload;
131
141
  [UI_MESSAGE_TYPES.UI_CANVAS_UPDATED]: UiCanvasUpdatedPayload;
132
142
  [UI_MESSAGE_TYPES.UI_SECTION_LIST_UPDATED]: UiSectionListUpdatedPayload;
143
+ [UI_MESSAGE_TYPES.UI_PROMPT_RESPONSE_STREAMED]: UiPromptResponseStreamedPayload;
133
144
  };
134
145
  export type UiMessageEnvelope<T extends (typeof UI_MESSAGE_TYPES)[keyof typeof UI_MESSAGE_TYPES] = (typeof UI_MESSAGE_TYPES)[keyof typeof UI_MESSAGE_TYPES]> = {
135
146
  /** Message type */
@@ -187,3 +198,9 @@ export type UiSectionListUpdatedPayload = {
187
198
  /** Canvas data */
188
199
  canvas: CanvasRetrieve | null;
189
200
  };
201
+ export type UiPromptResponseStreamedPayload = {
202
+ /** PIA response so far */
203
+ partial_response: string;
204
+ /** Current chunk of the response */
205
+ chunk: string;
206
+ };
@@ -1,4 +1,4 @@
1
- export type LaunchDarklyBooleanFlagKey = 'allow_ai_prompts_in_canvas_text' | 'allow_bulk_actions_canvases_files' | 'allow_canvas_duplication' | 'allow_canvas_history' | 'allow_canvas_ownership_change' | 'allow_content_grid_autofill' | 'allow_creating_canvas_with_no_template' | 'allow_embeddable_hiding' | 'allow_note_taking' | 'allow_rep_canvas_metadata_edit' | 'allow_rep_file_upload' | 'are_sections_system_controlled' | 'copy_context_to_canvas' | 'copy_template_metadata_to_canvas' | 'disable_canvas_edit_for_reps' | 'disable_file_edit_content' | 'disable_fullscreen_canvas_builder' | 'disable_impact_web_browser_fullscreen' | 'display_section_list_name' | 'enable_analytics' | 'enable_canvas_node_debugging' | 'enable_experimental_canvas_builder_dnd' | 'enable_knock_notifications' | 'hide_asset_uploader' | 'interpolate_rep_canvases_on_edit_mode' | 'is_fe_sentry_enabled' | 'is_meeting_bar_account_selection_disabled' | 'is_meeting_bar_hidden' | 'is_rep_canvas_creation_disabled' | 'is_shared_link_creation_disabled' | 'is_timeline_component_allowed' | 'launch_in_full_screen_on_present_mode' | 'launch_in_present_mode_on_creation' | 'reorder_component_in_drawer' | 'show_asset_manager_for_multimedia' | 'show_content_selector_list_view' | 'show_popularity_icons' | 'show_system_filters' | 'allow_canvases_tables_columns_settings' | 'prefer_online_handlers' | 'use_short_url_for_shared_link' | 'enable_suggested_tags' | 'enable_folder_details_edit' | 'enable_file_revisions' | 'show_clear_all_annotations_button' | 'allow_saving_annotations_in_personal_layer';
1
+ export type LaunchDarklyBooleanFlagKey = 'allow_ai_prompts_in_canvas_text' | 'allow_bulk_actions_canvases_files' | 'allow_canvas_duplication' | 'allow_canvas_history' | 'allow_canvas_ownership_change' | 'allow_content_grid_autofill' | 'allow_creating_canvas_with_no_template' | 'allow_embeddable_hiding' | 'allow_note_taking' | 'allow_rep_canvas_metadata_edit' | 'are_sections_system_controlled' | 'copy_context_to_canvas' | 'copy_template_metadata_to_canvas' | 'disable_file_edit_content' | 'disable_fullscreen_canvas_builder' | 'disable_impact_web_browser_fullscreen' | 'display_section_list_name' | 'enable_analytics' | 'enable_canvas_node_debugging' | 'enable_experimental_canvas_builder_dnd' | 'enable_knock_notifications' | 'hide_asset_uploader' | 'interpolate_rep_canvases_on_edit_mode' | 'is_fe_sentry_enabled' | 'is_meeting_bar_account_selection_disabled' | 'is_meeting_bar_hidden' | 'is_rep_canvas_creation_disabled' | 'is_shared_link_creation_disabled' | 'is_timeline_component_allowed' | 'launch_in_full_screen_on_present_mode' | 'launch_in_present_mode_on_creation' | 'reorder_component_in_drawer' | 'show_asset_manager_for_multimedia' | 'show_content_selector_list_view' | 'show_popularity_icons' | 'show_system_filters' | 'allow_canvases_tables_columns_settings' | 'prefer_online_handlers' | 'use_short_url_for_shared_link' | 'enable_suggested_tags' | 'enable_folder_details_edit' | 'enable_file_revisions' | 'show_clear_all_annotations_button' | 'allow_saving_annotations_in_personal_layer';
2
2
  export type LaunchDarklyNumberFlagKey = 'canvas_section_selector_page_size' | 'canvas_section_selector_selected_items_with_thumbnail_size';
3
3
  type LaunchDarklyObjectFlags = {
4
4
  canvas_table_pagination: CanvasTablePagination;
@@ -3,4 +3,6 @@ export type OrganizationSettings = {
3
3
  impact_show_only_saved_canvases_in_canvas_manager?: boolean;
4
4
  translation_overrides?: TranslationOverrides;
5
5
  file_annotations_mode?: 'admin' | 'personal';
6
+ allow_rep_file_upload?: boolean;
7
+ disable_canvas_edit_for_reps?: boolean;
6
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.22.0-beta.2",
3
+ "version": "1.22.0-beta.3",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",