@pitcher/js-api 1.21.0-beta.10 → 1.21.0-beta.11

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.
@@ -1,3 +1,3 @@
1
1
  import { RenderableFile } from '../../../types/files';
2
2
 
3
- export declare function openFile(item: RenderableFile, e: MouseEvent): void;
3
+ export declare function openItem(item: RenderableFile, e: MouseEvent): void;
@@ -1,3 +1,4 @@
1
+ import { AdminSelectContentRequest, AdminSelectContentResponse } from './types.admin';
1
2
  import { File, PaginatedFileList } from '../../../../../types/openapi';
2
3
 
3
4
  /**
@@ -28,3 +29,21 @@ export declare function getFile(payload: {
28
29
  * ```
29
30
  */
30
31
  export declare function getFiles(payload: Record<string, any>): Promise<PaginatedFileList>;
32
+ /**
33
+ * Opens a selector that allows you to select (and preselect) from your Pitcher uploaded content.
34
+ * ```
35
+ * const api = useApi() // or useAdmin() if you know that you 're in Admin app context
36
+ * api
37
+ * .select_content({
38
+ * selections: [
39
+ * { fileId: "01HCZ623YYRFJQ0F7B69VWE510", type: "file" },
40
+ * {
41
+ * fileId: "01HD3XGZ5FN90QJGK7CH8TBZDF",
42
+ * type: "page",
43
+ * pageIndex: 2,
44
+ * },
45
+ * ],
46
+ * })
47
+ * ```
48
+ */
49
+ export declare function selectContent(payload: AdminSelectContentRequest): Promise<AdminSelectContentResponse>;
@@ -1,7 +1,25 @@
1
1
  import { AdminToastRequest, ADMIN_MESSAGE_TYPES, AdminMessagePayloads } from './types.admin';
2
2
 
3
- export declare function on(type: (typeof ADMIN_MESSAGE_TYPES)[keyof typeof ADMIN_MESSAGE_TYPES], handler: (data: AdminMessagePayloads[typeof type]) => Promise<void>): Promise<() => void>;
4
- export declare function toast(payload: AdminToastRequest): Promise<void>;
5
- export * from './env.admin';
6
- export * from './canvas.admin';
7
- export * from './metadataTemplates.admin';
3
+ declare function on(type: (typeof ADMIN_MESSAGE_TYPES)[keyof typeof ADMIN_MESSAGE_TYPES], handler: (data: AdminMessagePayloads[typeof type]) => Promise<void>): Promise<() => void>;
4
+ declare function toast(payload: AdminToastRequest): Promise<void>;
5
+ declare const _default: {
6
+ getInstanceMetadataTemplates(payload?: import('../../../payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../../../../main.lib').PaginatedMetadataTemplateList>;
7
+ createCanvas(payload: import('../../../../main.lib').CanvasCreateRequest): Promise<import('../../../../main.lib').CanvasRetrieve>;
8
+ getCanvases(payload: import('../../../../main.lib').GetCanvasesParams & {
9
+ filters?: Record<string, any>;
10
+ fields?: string;
11
+ }): Promise<import('../../../../main.lib').PaginatedData<import('../../../../main.lib').CanvasRetrieve>>;
12
+ getCanvas(payload: {
13
+ id: import('../../../../main.lib').CanvasRetrieve["id"];
14
+ fields?: string;
15
+ }): Promise<import('../../../../main.lib').CanvasRetrieve>;
16
+ updateCanvas(payload: import('../../../../main.lib').PatchedCanvasUpdateRequest & {
17
+ id: import('../../../../main.lib').CanvasRetrieve["id"];
18
+ instance_id?: import('../../../../main.lib').Instance["id"];
19
+ fields?: string;
20
+ }): Promise<import('../../../../main.lib').CanvasRetrieve>;
21
+ getEnv(): Promise<import('./types.admin').AdminEnv>;
22
+ on: typeof on;
23
+ toast: typeof toast;
24
+ };
25
+ export default _default;
@@ -1,4 +1,5 @@
1
1
  import { PitcherEnv } from '../../../interfaces';
2
+ import { SelectedPage as ContentSelectorSelectedPage, SelectedFile as ContentSelectorSelectedFile } from '@content-selector/stores/app';
2
3
 
3
4
  export declare const ADMIN_MESSAGE: "ADMIN_MESSAGE";
4
5
  export declare const ADMIN_MESSAGE_TYPES: {
@@ -16,6 +17,7 @@ export declare const ADMIN_API_METHOD_TYPES: {
16
17
  readonly GET_ENV: "admin_get_env";
17
18
  readonly GET_FILE: "admin_get_file";
18
19
  readonly GET_FILES: "admin_get_files";
20
+ readonly SELECT_CONTENT: "admin_select_content";
19
21
  readonly GET_INSTANCE_METADATA_TEMPLATES: "admin_get_instance_metadata_templates";
20
22
  readonly TOAST: "admin_toast";
21
23
  readonly UPDATE_CANVAS: "admin_update_canvas";
@@ -39,6 +41,13 @@ export interface AdminToastRequest {
39
41
  keepAliveOnHover?: boolean;
40
42
  showIcon?: boolean;
41
43
  }
44
+ export type AdminSelectContentRequest = {
45
+ selections?: Selection[];
46
+ };
47
+ export type AdminSelectContentResponse = {
48
+ user_action: 'cancelled' | 'selected';
49
+ content?: (ContentSelectorSelectedFile | ContentSelectorSelectedPage)[];
50
+ };
42
51
  export type AdminResponse<Response = any> = {
43
52
  id: string;
44
53
  type: (typeof ADMIN_API_TYPES)['ADMIN_RESPONSE'];
@@ -1,5 +1,9 @@
1
1
  import { DSR_MESSAGE_TYPES, DsrMessagePayloads } from './types.dsr';
2
2
 
3
- export declare function on(type: (typeof DSR_MESSAGE_TYPES)[keyof typeof DSR_MESSAGE_TYPES], handler: (data: DsrMessagePayloads[typeof type]) => Promise<void>): Promise<() => void>;
4
- export * from './env.dsr';
5
- export * from './loading.dsr';
3
+ declare function on(type: (typeof DSR_MESSAGE_TYPES)[keyof typeof DSR_MESSAGE_TYPES], handler: (data: DsrMessagePayloads[typeof type]) => Promise<void>): Promise<() => void>;
4
+ declare const _default: {
5
+ embeddable_ready(): Promise<void>;
6
+ getEnv(): Promise<import('./types.dsr').DsrEnv>;
7
+ on: typeof on;
8
+ };
9
+ export default _default;
@@ -2,7 +2,7 @@ import { UiSelectContentRequest, UiSelectContentResponse, UiOpenRequest, UiToast
2
2
 
3
3
  export declare function ui_select_content(payload?: UiSelectContentRequest): Promise<UiSelectContentResponse>;
4
4
  /**
5
- * Fetches a list of canvases to use in your app.
5
+ * Allows you to select (and preselect) content from your Pitcher content.
6
6
  * ```
7
7
  * const api = useApi() // or useUi() if you know that you 're in UI context
8
8
  * api
@@ -1,15 +1,37 @@
1
1
  import { UiMeetingCanceledPayload, UiCanvasUpdatedPayload, UiSectionListUpdatedPayload, UiAppSetDataPayload, UiAppUpdateDataPayload, UiBroadcastRequest, UiMessagePayloads } from './types.ui';
2
2
 
3
- export declare function on<T extends keyof UiMessagePayloads>(type: T, handler: (data: UiMessagePayloads[T]) => Promise<void>): Promise<() => void>;
4
- export declare function on_meeting_canceled(handler: (data: UiMeetingCanceledPayload) => Promise<void>): Promise<() => void>;
5
- export declare function on_canvas_updated(handler: (data: UiCanvasUpdatedPayload) => Promise<void>): Promise<() => void>;
6
- export declare function on_section_list_updated(handler: (data: UiSectionListUpdatedPayload) => Promise<void>): Promise<() => void>;
7
- export declare function on_app_set_data(handler: (data: UiAppSetDataPayload) => Promise<void>): Promise<() => void>;
8
- export declare function on_app_update_data(handler: (data: UiAppUpdateDataPayload) => Promise<void>): Promise<() => void>;
9
- export declare function ui_broadcast(payload: UiBroadcastRequest): Promise<void>;
10
- export * from './content.ui';
11
- export * from './loading.ui';
12
- export * from './location.ui';
13
- export * from './app-errors.ui';
14
- export * from './canvas.ui';
15
- export * from './post-call.ui';
3
+ declare function on<T extends keyof UiMessagePayloads>(type: T, handler: (data: UiMessagePayloads[T]) => Promise<void>): Promise<() => void>;
4
+ declare function on_meeting_canceled(handler: (data: UiMeetingCanceledPayload) => Promise<void>): Promise<() => void>;
5
+ declare function on_canvas_updated(handler: (data: UiCanvasUpdatedPayload) => Promise<void>): Promise<() => void>;
6
+ declare function on_section_list_updated(handler: (data: UiSectionListUpdatedPayload) => Promise<void>): Promise<() => void>;
7
+ declare function on_app_set_data(handler: (data: UiAppSetDataPayload) => Promise<void>): Promise<() => void>;
8
+ declare function on_app_update_data(handler: (data: UiAppUpdateDataPayload) => Promise<void>): Promise<() => void>;
9
+ declare function ui_broadcast(payload: UiBroadcastRequest): Promise<void>;
10
+ declare const _default: {
11
+ complete_postcall(payload: import('../../../../main.lib').UiCompletePostcallRequest): Promise<void>;
12
+ enable_postcall_submit(): Promise<void>;
13
+ disable_postcall_submit(): Promise<void>;
14
+ set_postcall_style(payload: import('../../../../main.lib').UiSetPostcallStyleRequest): Promise<void>;
15
+ update_canvas(payload: import('../../../../main.lib').UiUpdateCanvasRequest): Promise<import('../../../../main.lib').CanvasRetrieve>;
16
+ app_loaded(): Promise<void>;
17
+ app_resize(payload: import('../../../../main.lib').UiAppResizeRequest): Promise<void>;
18
+ canvas_navigate_next_page(): Promise<void>;
19
+ canvas_navigate_previous_page(): Promise<void>;
20
+ canvas_navigate_page(payload: import('../../../../main.lib').UiCanvasNavigatePageReuqest): Promise<void>;
21
+ capture_app_error(payload: import('../../../../main.lib').UiCaptureAppErrorRequest): Promise<void>;
22
+ update_location(payload: import('../../../../main.lib').UpdateLocationPitcherEvent): Promise<any>;
23
+ embeddable_ready(): Promise<void>;
24
+ ui_select_content(payload?: import('../../../../main.lib').UiSelectContentRequest): Promise<import('../../../../main.lib').UiSelectContentResponse>;
25
+ select_content(payload?: import('../../../../main.lib').UiSelectContentRequest): Promise<import('../../../../main.lib').UiSelectContentResponse>;
26
+ open(payload: import('../../../../main.lib').UiOpenRequest): Promise<void>;
27
+ toast(payload: import('../../../../main.lib').UiToastRequest): Promise<void>;
28
+ preselect_sfdc_meeting_id(payload: import('../../../../main.lib').UiPreselectSfdcMeetingIdRequest): Promise<import('../../../../main.lib').UiPreselectSfdcMeetingIdResponse>;
29
+ on: typeof on;
30
+ on_meeting_canceled: typeof on_meeting_canceled;
31
+ on_canvas_updated: typeof on_canvas_updated;
32
+ on_section_list_updated: typeof on_section_list_updated;
33
+ on_app_set_data: typeof on_app_set_data;
34
+ on_app_update_data: typeof on_app_update_data;
35
+ ui_broadcast: typeof ui_broadcast;
36
+ };
37
+ export default _default;
package/lib/sdk/main.d.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  import { ApiOptions } from './interfaces';
2
2
  import { createHighLevelApi } from './api/HighLevelApi';
3
3
 
4
- import * as ui from '@sdk/api/modules/ui';
5
- import * as admin from '@sdk/api/modules/admin';
6
- import * as dsr from '@sdk/api/modules/dsr';
7
4
  export * from './interfaces';
8
5
  export * from './payload.types';
9
6
  export * from './api/modules/ui/types.ui';
@@ -12,47 +9,57 @@ export * from './api/modules/dsr/types.dsr';
12
9
  export declare let highLevelApi: ReturnType<typeof createHighLevelApi>;
13
10
  export declare function usePitcherApi(options?: ApiOptions): ReturnType<typeof createHighLevelApi>;
14
11
  export declare function useUi(): {
15
- on: typeof ui.on;
16
- on_meeting_canceled: typeof ui.on_meeting_canceled;
17
- on_canvas_updated: typeof ui.on_canvas_updated;
18
- on_section_list_updated: typeof ui.on_section_list_updated;
19
- on_app_set_data: typeof ui.on_app_set_data;
20
- on_app_update_data: typeof ui.on_app_update_data;
21
- ui_broadcast: typeof ui.ui_broadcast;
22
- ui_select_content: typeof ui.ui_select_content;
23
- select_content: typeof ui.select_content;
24
- open: typeof ui.open;
25
- toast: typeof ui.toast;
26
- preselect_sfdc_meeting_id: typeof ui.preselect_sfdc_meeting_id;
27
- embeddable_ready: typeof ui.embeddable_ready;
28
- update_location: typeof ui.update_location;
29
- capture_app_error: typeof ui.capture_app_error;
30
- update_canvas: typeof ui.update_canvas;
31
- app_loaded: typeof ui.app_loaded;
32
- app_resize: typeof ui.app_resize;
33
- canvas_navigate_next_page: typeof ui.canvas_navigate_next_page;
34
- canvas_navigate_previous_page: typeof ui.canvas_navigate_previous_page;
35
- canvas_navigate_page: typeof ui.canvas_navigate_page;
36
- complete_postcall: typeof ui.complete_postcall;
37
- enable_postcall_submit: typeof ui.enable_postcall_submit;
38
- disable_postcall_submit: typeof ui.disable_postcall_submit;
39
- set_postcall_style: typeof ui.set_postcall_style;
40
- } & Record<string, typeof ui.on | typeof ui.open | typeof ui.ui_broadcast | typeof ui.ui_select_content | typeof ui.toast | typeof ui.update_location | typeof ui.update_canvas | typeof ui.on_meeting_canceled | typeof ui.on_canvas_updated | typeof ui.on_section_list_updated | typeof ui.on_app_set_data | typeof ui.on_app_update_data | typeof ui.select_content | typeof ui.preselect_sfdc_meeting_id | typeof ui.embeddable_ready | typeof ui.capture_app_error | typeof ui.app_loaded | typeof ui.app_resize | typeof ui.canvas_navigate_next_page | typeof ui.canvas_navigate_previous_page | typeof ui.canvas_navigate_page | typeof ui.complete_postcall | typeof ui.enable_postcall_submit | typeof ui.disable_postcall_submit | typeof ui.set_postcall_style>;
12
+ complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
13
+ enable_postcall_submit(): Promise<void>;
14
+ disable_postcall_submit(): Promise<void>;
15
+ set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
16
+ update_canvas(payload: import('./api/modules/ui/types.ui').UiUpdateCanvasRequest): Promise<import('../main.lib').CanvasRetrieve>;
17
+ app_loaded(): Promise<void>;
18
+ app_resize(payload: import('./api/modules/ui/types.ui').UiAppResizeRequest): Promise<void>;
19
+ canvas_navigate_next_page(): Promise<void>;
20
+ canvas_navigate_previous_page(): Promise<void>;
21
+ canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
22
+ capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
23
+ update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
24
+ embeddable_ready(): Promise<void>;
25
+ ui_select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
26
+ select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
27
+ open(payload: import('./api/modules/ui/types.ui').UiOpenRequest): Promise<void>;
28
+ toast(payload: import('./api/modules/ui/types.ui').UiToastRequest): Promise<void>;
29
+ preselect_sfdc_meeting_id(payload: import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdRequest): Promise<import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdResponse>;
30
+ on: <T extends keyof import('./api/modules/ui/types.ui').UiMessagePayloads>(type: T, handler: (data: import('./api/modules/ui/types.ui').UiMessagePayloads[T]) => Promise<void>) => Promise<() => void>;
31
+ on_meeting_canceled: (handler: (data: import('./api/modules/ui/types.ui').UiMeetingCanceledPayload) => Promise<void>) => Promise<() => void>;
32
+ on_canvas_updated: (handler: (data: import('./api/modules/ui/types.ui').UiCanvasUpdatedPayload) => Promise<void>) => Promise<() => void>;
33
+ on_section_list_updated: (handler: (data: import('./api/modules/ui/types.ui').UiSectionListUpdatedPayload) => Promise<void>) => Promise<() => void>;
34
+ on_app_set_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppSetDataPayload) => Promise<void>) => Promise<() => void>;
35
+ on_app_update_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppUpdateDataPayload) => Promise<void>) => Promise<() => void>;
36
+ ui_broadcast: (payload: import('./api/modules/ui/types.ui').UiBroadcastRequest) => Promise<void>;
37
+ };
41
38
  export declare function useAdmin(): {
42
- on: typeof admin.on;
43
- toast: typeof admin.toast;
44
- getEnv: typeof admin.getEnv;
45
- createCanvas: typeof admin.createCanvas;
46
- getCanvases: typeof admin.getCanvases;
47
- getCanvas: typeof admin.getCanvas;
48
- updateCanvas: typeof admin.updateCanvas;
49
- getInstanceMetadataTemplates: typeof admin.getInstanceMetadataTemplates;
50
- } & Record<string, typeof admin.on | typeof admin.createCanvas | typeof admin.getEnv | typeof admin.toast | typeof admin.getCanvases | typeof admin.getCanvas | typeof admin.updateCanvas | typeof admin.getInstanceMetadataTemplates>;
39
+ getInstanceMetadataTemplates(payload?: import('./payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../main.lib').PaginatedMetadataTemplateList>;
40
+ createCanvas(payload: import('../main.lib').CanvasCreateRequest): Promise<import('../main.lib').CanvasRetrieve>;
41
+ getCanvases(payload: import('../main.lib').GetCanvasesParams & {
42
+ filters?: Record<string, any>;
43
+ fields?: string;
44
+ }): Promise<import('../main.lib').PaginatedData<import('../main.lib').CanvasRetrieve>>;
45
+ getCanvas(payload: {
46
+ id: import('../main.lib').CanvasRetrieve["id"];
47
+ fields?: string;
48
+ }): Promise<import('../main.lib').CanvasRetrieve>;
49
+ updateCanvas(payload: import('../main.lib').PatchedCanvasUpdateRequest & {
50
+ id: import('../main.lib').CanvasRetrieve["id"];
51
+ instance_id?: import('../main.lib').Instance["id"];
52
+ fields?: string;
53
+ }): Promise<import('../main.lib').CanvasRetrieve>;
54
+ getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
55
+ on: (type: typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES[keyof typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES], handler: (data: import('./api/modules/admin/types.admin').AdminMessagePayloads[typeof type]) => Promise<void>) => Promise<() => void>;
56
+ toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
57
+ };
51
58
  export declare function useDsr(): {
52
- on: typeof dsr.on;
53
- getEnv: typeof dsr.getEnv;
54
- embeddable_ready: typeof dsr.embeddable_ready;
55
- } & Record<string, typeof dsr.on | typeof dsr.getEnv | typeof dsr.embeddable_ready>;
59
+ embeddable_ready(): Promise<void>;
60
+ getEnv(): Promise<import('./api/modules/dsr/types.dsr').DsrEnv>;
61
+ on: (type: typeof import('./api/modules/dsr/types.dsr').DSR_MESSAGE_TYPES[keyof typeof import('./api/modules/dsr/types.dsr').DSR_MESSAGE_TYPES], handler: (data: import('./api/modules/dsr/types.dsr').DsrMessagePayloads[typeof type]) => Promise<void>) => Promise<() => void>;
62
+ };
56
63
  export type JsApiLocation = 'ui' | 'admin' | 'dsr' | 'impact';
57
64
  export declare function getAvailableApis(): JsApiLocation[];
58
65
  export declare function useApi(options?: ApiOptions): {
@@ -180,47 +187,57 @@ export declare function useApi(options?: ApiOptions): {
180
187
  close(): Promise<any>;
181
188
  openWebViewAlwaysOnTop(payload: import('./payload.types').OpenWebViewAlwaysOnTop): Promise<void>;
182
189
  API: import('./api/LowLevelApi').LowLevelApi;
183
- } | ({
184
- on: typeof admin.on;
185
- toast: typeof admin.toast;
186
- getEnv: typeof admin.getEnv;
187
- createCanvas: typeof admin.createCanvas;
188
- getCanvases: typeof admin.getCanvases;
189
- getCanvas: typeof admin.getCanvas;
190
- updateCanvas: typeof admin.updateCanvas;
191
- getInstanceMetadataTemplates: typeof admin.getInstanceMetadataTemplates;
192
- } & Record<string, typeof admin.on | typeof admin.createCanvas | typeof admin.getEnv | typeof admin.toast | typeof admin.getCanvases | typeof admin.getCanvas | typeof admin.updateCanvas | typeof admin.getInstanceMetadataTemplates>) | ({
193
- on: typeof dsr.on;
194
- getEnv: typeof dsr.getEnv;
195
- embeddable_ready: typeof dsr.embeddable_ready;
196
- } & Record<string, typeof dsr.on | typeof dsr.getEnv | typeof dsr.embeddable_ready>) | {
190
+ } | {
191
+ getInstanceMetadataTemplates(payload?: import('./payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../main.lib').PaginatedMetadataTemplateList>;
192
+ createCanvas(payload: import('../main.lib').CanvasCreateRequest): Promise<import('../main.lib').CanvasRetrieve>;
193
+ getCanvases(payload: import('../main.lib').GetCanvasesParams & {
194
+ filters?: Record<string, any>;
195
+ fields?: string;
196
+ }): Promise<import('../main.lib').PaginatedData<import('../main.lib').CanvasRetrieve>>;
197
+ getCanvas(payload: {
198
+ id: import('../main.lib').CanvasRetrieve["id"];
199
+ fields?: string;
200
+ }): Promise<import('../main.lib').CanvasRetrieve>;
201
+ updateCanvas(payload: import('../main.lib').PatchedCanvasUpdateRequest & {
202
+ id: import('../main.lib').CanvasRetrieve["id"];
203
+ instance_id?: import('../main.lib').Instance["id"];
204
+ fields?: string;
205
+ }): Promise<import('../main.lib').CanvasRetrieve>;
206
+ getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
207
+ on: (type: typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES[keyof typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES], handler: (data: import('./api/modules/admin/types.admin').AdminMessagePayloads[typeof type]) => Promise<void>) => Promise<() => void>;
208
+ toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
209
+ } | {
210
+ embeddable_ready(): Promise<void>;
211
+ getEnv(): Promise<import('./api/modules/dsr/types.dsr').DsrEnv>;
212
+ on: (type: typeof import('./api/modules/dsr/types.dsr').DSR_MESSAGE_TYPES[keyof typeof import('./api/modules/dsr/types.dsr').DSR_MESSAGE_TYPES], handler: (data: import('./api/modules/dsr/types.dsr').DsrMessagePayloads[typeof type]) => Promise<void>) => Promise<() => void>;
213
+ } | {
197
214
  ui: {
198
- on: typeof ui.on;
199
- on_meeting_canceled: typeof ui.on_meeting_canceled;
200
- on_canvas_updated: typeof ui.on_canvas_updated;
201
- on_section_list_updated: typeof ui.on_section_list_updated;
202
- on_app_set_data: typeof ui.on_app_set_data;
203
- on_app_update_data: typeof ui.on_app_update_data;
204
- ui_broadcast: typeof ui.ui_broadcast;
205
- ui_select_content: typeof ui.ui_select_content;
206
- select_content: typeof ui.select_content;
207
- open: typeof ui.open;
208
- toast: typeof ui.toast;
209
- preselect_sfdc_meeting_id: typeof ui.preselect_sfdc_meeting_id;
210
- embeddable_ready: typeof ui.embeddable_ready;
211
- update_location: typeof ui.update_location;
212
- capture_app_error: typeof ui.capture_app_error;
213
- update_canvas: typeof ui.update_canvas;
214
- app_loaded: typeof ui.app_loaded;
215
- app_resize: typeof ui.app_resize;
216
- canvas_navigate_next_page: typeof ui.canvas_navigate_next_page;
217
- canvas_navigate_previous_page: typeof ui.canvas_navigate_previous_page;
218
- canvas_navigate_page: typeof ui.canvas_navigate_page;
219
- complete_postcall: typeof ui.complete_postcall;
220
- enable_postcall_submit: typeof ui.enable_postcall_submit;
221
- disable_postcall_submit: typeof ui.disable_postcall_submit;
222
- set_postcall_style: typeof ui.set_postcall_style;
223
- } & Record<string, typeof ui.on | typeof ui.open | typeof ui.ui_broadcast | typeof ui.ui_select_content | typeof ui.toast | typeof ui.update_location | typeof ui.update_canvas | typeof ui.on_meeting_canceled | typeof ui.on_canvas_updated | typeof ui.on_section_list_updated | typeof ui.on_app_set_data | typeof ui.on_app_update_data | typeof ui.select_content | typeof ui.preselect_sfdc_meeting_id | typeof ui.embeddable_ready | typeof ui.capture_app_error | typeof ui.app_loaded | typeof ui.app_resize | typeof ui.canvas_navigate_next_page | typeof ui.canvas_navigate_previous_page | typeof ui.canvas_navigate_page | typeof ui.complete_postcall | typeof ui.enable_postcall_submit | typeof ui.disable_postcall_submit | typeof ui.set_postcall_style>;
215
+ complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
216
+ enable_postcall_submit(): Promise<void>;
217
+ disable_postcall_submit(): Promise<void>;
218
+ set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
219
+ update_canvas(payload: import('./api/modules/ui/types.ui').UiUpdateCanvasRequest): Promise<import('../main.lib').CanvasRetrieve>;
220
+ app_loaded(): Promise<void>;
221
+ app_resize(payload: import('./api/modules/ui/types.ui').UiAppResizeRequest): Promise<void>;
222
+ canvas_navigate_next_page(): Promise<void>;
223
+ canvas_navigate_previous_page(): Promise<void>;
224
+ canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
225
+ capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
226
+ update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
227
+ embeddable_ready(): Promise<void>;
228
+ ui_select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
229
+ select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
230
+ open(payload: import('./api/modules/ui/types.ui').UiOpenRequest): Promise<void>;
231
+ toast(payload: import('./api/modules/ui/types.ui').UiToastRequest): Promise<void>;
232
+ preselect_sfdc_meeting_id(payload: import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdRequest): Promise<import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdResponse>;
233
+ on: <T extends keyof import('./api/modules/ui/types.ui').UiMessagePayloads>(type: T, handler: (data: import('./api/modules/ui/types.ui').UiMessagePayloads[T]) => Promise<void>) => Promise<() => void>;
234
+ on_meeting_canceled: (handler: (data: import('./api/modules/ui/types.ui').UiMeetingCanceledPayload) => Promise<void>) => Promise<() => void>;
235
+ on_canvas_updated: (handler: (data: import('./api/modules/ui/types.ui').UiCanvasUpdatedPayload) => Promise<void>) => Promise<() => void>;
236
+ on_section_list_updated: (handler: (data: import('./api/modules/ui/types.ui').UiSectionListUpdatedPayload) => Promise<void>) => Promise<() => void>;
237
+ on_app_set_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppSetDataPayload) => Promise<void>) => Promise<() => void>;
238
+ on_app_update_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppUpdateDataPayload) => Promise<void>) => Promise<() => void>;
239
+ ui_broadcast: (payload: import('./api/modules/ui/types.ui').UiBroadcastRequest) => Promise<void>;
240
+ };
224
241
  impact: {
225
242
  on: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
226
243
  off: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
@@ -347,31 +364,31 @@ export declare function useApi(options?: ApiOptions): {
347
364
  openWebViewAlwaysOnTop(payload: import('./payload.types').OpenWebViewAlwaysOnTop): Promise<void>;
348
365
  API: import('./api/LowLevelApi').LowLevelApi;
349
366
  };
350
- on: typeof ui.on;
351
- on_meeting_canceled: typeof ui.on_meeting_canceled;
352
- on_canvas_updated: typeof ui.on_canvas_updated;
353
- on_section_list_updated: typeof ui.on_section_list_updated;
354
- on_app_set_data: typeof ui.on_app_set_data;
355
- on_app_update_data: typeof ui.on_app_update_data;
356
- ui_broadcast: typeof ui.ui_broadcast;
357
- ui_select_content: typeof ui.ui_select_content;
358
- select_content: typeof ui.select_content;
359
- open: typeof ui.open;
360
- toast: typeof ui.toast;
361
- preselect_sfdc_meeting_id: typeof ui.preselect_sfdc_meeting_id;
362
- embeddable_ready: typeof ui.embeddable_ready;
363
- update_location: typeof ui.update_location;
364
- capture_app_error: typeof ui.capture_app_error;
365
- update_canvas: typeof ui.update_canvas;
366
- app_loaded: typeof ui.app_loaded;
367
- app_resize: typeof ui.app_resize;
368
- canvas_navigate_next_page: typeof ui.canvas_navigate_next_page;
369
- canvas_navigate_previous_page: typeof ui.canvas_navigate_previous_page;
370
- canvas_navigate_page: typeof ui.canvas_navigate_page;
371
- complete_postcall: typeof ui.complete_postcall;
372
- enable_postcall_submit: typeof ui.enable_postcall_submit;
373
- disable_postcall_submit: typeof ui.disable_postcall_submit;
374
- set_postcall_style: typeof ui.set_postcall_style;
367
+ complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
368
+ enable_postcall_submit(): Promise<void>;
369
+ disable_postcall_submit(): Promise<void>;
370
+ set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
371
+ update_canvas(payload: import('./api/modules/ui/types.ui').UiUpdateCanvasRequest): Promise<import('../main.lib').CanvasRetrieve>;
372
+ app_loaded(): Promise<void>;
373
+ app_resize(payload: import('./api/modules/ui/types.ui').UiAppResizeRequest): Promise<void>;
374
+ canvas_navigate_next_page(): Promise<void>;
375
+ canvas_navigate_previous_page(): Promise<void>;
376
+ canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
377
+ capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
378
+ update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
379
+ embeddable_ready(): Promise<void>;
380
+ ui_select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
381
+ select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
382
+ open(payload: import('./api/modules/ui/types.ui').UiOpenRequest): Promise<void>;
383
+ toast(payload: import('./api/modules/ui/types.ui').UiToastRequest): Promise<void>;
384
+ preselect_sfdc_meeting_id(payload: import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdRequest): Promise<import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdResponse>;
385
+ on: <T extends keyof import('./api/modules/ui/types.ui').UiMessagePayloads>(type: T, handler: (data: import('./api/modules/ui/types.ui').UiMessagePayloads[T]) => Promise<void>) => Promise<() => void>;
386
+ on_meeting_canceled: (handler: (data: import('./api/modules/ui/types.ui').UiMeetingCanceledPayload) => Promise<void>) => Promise<() => void>;
387
+ on_canvas_updated: (handler: (data: import('./api/modules/ui/types.ui').UiCanvasUpdatedPayload) => Promise<void>) => Promise<() => void>;
388
+ on_section_list_updated: (handler: (data: import('./api/modules/ui/types.ui').UiSectionListUpdatedPayload) => Promise<void>) => Promise<() => void>;
389
+ on_app_set_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppSetDataPayload) => Promise<void>) => Promise<() => void>;
390
+ on_app_update_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppUpdateDataPayload) => Promise<void>) => Promise<() => void>;
391
+ ui_broadcast: (payload: import('./api/modules/ui/types.ui').UiBroadcastRequest) => Promise<void>;
375
392
  off: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
376
393
  enterFullscreen: () => Promise<any>;
377
394
  exitFullscreen: () => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.21.0-beta.10",
3
+ "version": "1.21.0-beta.11",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",