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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,33 @@
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
+ getAppConfig(payload: {
7
+ app_name: string;
8
+ }): Promise<Record<string, any>>;
9
+ getFile(payload: {
10
+ id: import('../../../../main.lib').File["id"];
11
+ }): Promise<import('../../../../main.lib').File>;
12
+ getFiles(payload: Record<string, any>): Promise<import('../../../../main.lib').PaginatedFileList>;
13
+ selectContent(payload: import('./types.admin').AdminSelectContentRequest): Promise<import('./types.admin').AdminSelectContentResponse>;
14
+ getInstanceMetadataTemplates(payload?: import('../../../payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../../../../main.lib').PaginatedMetadataTemplateList>;
15
+ createCanvas(payload: import('../../../../main.lib').CanvasCreateRequest): Promise<import('../../../../main.lib').CanvasRetrieve>;
16
+ getCanvases(payload: import('../../../../main.lib').GetCanvasesParams & {
17
+ filters?: Record<string, any>;
18
+ fields?: string;
19
+ }): Promise<import('../../../../main.lib').PaginatedData<import('../../../../main.lib').CanvasRetrieve>>;
20
+ getCanvas(payload: {
21
+ id: import('../../../../main.lib').CanvasRetrieve["id"];
22
+ fields?: string;
23
+ }): Promise<import('../../../../main.lib').CanvasRetrieve>;
24
+ updateCanvas(payload: import('../../../../main.lib').PatchedCanvasUpdateRequest & {
25
+ id: import('../../../../main.lib').CanvasRetrieve["id"];
26
+ instance_id?: import('../../../../main.lib').Instance["id"];
27
+ fields?: string;
28
+ }): Promise<import('../../../../main.lib').CanvasRetrieve>;
29
+ getEnv(): Promise<import('./types.admin').AdminEnv>;
30
+ on: typeof on;
31
+ toast: typeof toast;
32
+ };
33
+ 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,65 @@ 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
+ getAppConfig(payload: {
40
+ app_name: string;
41
+ }): Promise<Record<string, any>>;
42
+ getFile(payload: {
43
+ id: import('../main.lib').File["id"];
44
+ }): Promise<import('../main.lib').File>;
45
+ getFiles(payload: Record<string, any>): Promise<import('../main.lib').PaginatedFileList>;
46
+ selectContent(payload: import('./api/modules/admin/types.admin').AdminSelectContentRequest): Promise<import('./api/modules/admin/types.admin').AdminSelectContentResponse>;
47
+ getInstanceMetadataTemplates(payload?: import('./payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../main.lib').PaginatedMetadataTemplateList>;
48
+ createCanvas(payload: import('../main.lib').CanvasCreateRequest): Promise<import('../main.lib').CanvasRetrieve>;
49
+ getCanvases(payload: import('../main.lib').GetCanvasesParams & {
50
+ filters?: Record<string, any>;
51
+ fields?: string;
52
+ }): Promise<import('../main.lib').PaginatedData<import('../main.lib').CanvasRetrieve>>;
53
+ getCanvas(payload: {
54
+ id: import('../main.lib').CanvasRetrieve["id"];
55
+ fields?: string;
56
+ }): Promise<import('../main.lib').CanvasRetrieve>;
57
+ updateCanvas(payload: import('../main.lib').PatchedCanvasUpdateRequest & {
58
+ id: import('../main.lib').CanvasRetrieve["id"];
59
+ instance_id?: import('../main.lib').Instance["id"];
60
+ fields?: string;
61
+ }): Promise<import('../main.lib').CanvasRetrieve>;
62
+ getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
63
+ 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>;
64
+ toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
65
+ };
51
66
  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>;
67
+ embeddable_ready(): Promise<void>;
68
+ getEnv(): Promise<import('./api/modules/dsr/types.dsr').DsrEnv>;
69
+ 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>;
70
+ };
56
71
  export type JsApiLocation = 'ui' | 'admin' | 'dsr' | 'impact';
57
72
  export declare function getAvailableApis(): JsApiLocation[];
58
73
  export declare function useApi(options?: ApiOptions): {
@@ -180,47 +195,65 @@ export declare function useApi(options?: ApiOptions): {
180
195
  close(): Promise<any>;
181
196
  openWebViewAlwaysOnTop(payload: import('./payload.types').OpenWebViewAlwaysOnTop): Promise<void>;
182
197
  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>) | {
198
+ } | {
199
+ getAppConfig(payload: {
200
+ app_name: string;
201
+ }): Promise<Record<string, any>>;
202
+ getFile(payload: {
203
+ id: import('../main.lib').File["id"];
204
+ }): Promise<import('../main.lib').File>;
205
+ getFiles(payload: Record<string, any>): Promise<import('../main.lib').PaginatedFileList>;
206
+ selectContent(payload: import('./api/modules/admin/types.admin').AdminSelectContentRequest): Promise<import('./api/modules/admin/types.admin').AdminSelectContentResponse>;
207
+ getInstanceMetadataTemplates(payload?: import('./payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../main.lib').PaginatedMetadataTemplateList>;
208
+ createCanvas(payload: import('../main.lib').CanvasCreateRequest): Promise<import('../main.lib').CanvasRetrieve>;
209
+ getCanvases(payload: import('../main.lib').GetCanvasesParams & {
210
+ filters?: Record<string, any>;
211
+ fields?: string;
212
+ }): Promise<import('../main.lib').PaginatedData<import('../main.lib').CanvasRetrieve>>;
213
+ getCanvas(payload: {
214
+ id: import('../main.lib').CanvasRetrieve["id"];
215
+ fields?: string;
216
+ }): Promise<import('../main.lib').CanvasRetrieve>;
217
+ updateCanvas(payload: import('../main.lib').PatchedCanvasUpdateRequest & {
218
+ id: import('../main.lib').CanvasRetrieve["id"];
219
+ instance_id?: import('../main.lib').Instance["id"];
220
+ fields?: string;
221
+ }): Promise<import('../main.lib').CanvasRetrieve>;
222
+ getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
223
+ 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>;
224
+ toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
225
+ } | {
226
+ embeddable_ready(): Promise<void>;
227
+ getEnv(): Promise<import('./api/modules/dsr/types.dsr').DsrEnv>;
228
+ 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>;
229
+ } | {
197
230
  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>;
231
+ complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
232
+ enable_postcall_submit(): Promise<void>;
233
+ disable_postcall_submit(): Promise<void>;
234
+ set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
235
+ update_canvas(payload: import('./api/modules/ui/types.ui').UiUpdateCanvasRequest): Promise<import('../main.lib').CanvasRetrieve>;
236
+ app_loaded(): Promise<void>;
237
+ app_resize(payload: import('./api/modules/ui/types.ui').UiAppResizeRequest): Promise<void>;
238
+ canvas_navigate_next_page(): Promise<void>;
239
+ canvas_navigate_previous_page(): Promise<void>;
240
+ canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
241
+ capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
242
+ update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
243
+ embeddable_ready(): Promise<void>;
244
+ ui_select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
245
+ select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
246
+ open(payload: import('./api/modules/ui/types.ui').UiOpenRequest): Promise<void>;
247
+ toast(payload: import('./api/modules/ui/types.ui').UiToastRequest): Promise<void>;
248
+ preselect_sfdc_meeting_id(payload: import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdRequest): Promise<import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdResponse>;
249
+ 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>;
250
+ on_meeting_canceled: (handler: (data: import('./api/modules/ui/types.ui').UiMeetingCanceledPayload) => Promise<void>) => Promise<() => void>;
251
+ on_canvas_updated: (handler: (data: import('./api/modules/ui/types.ui').UiCanvasUpdatedPayload) => Promise<void>) => Promise<() => void>;
252
+ on_section_list_updated: (handler: (data: import('./api/modules/ui/types.ui').UiSectionListUpdatedPayload) => Promise<void>) => Promise<() => void>;
253
+ on_app_set_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppSetDataPayload) => Promise<void>) => Promise<() => void>;
254
+ on_app_update_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppUpdateDataPayload) => Promise<void>) => Promise<() => void>;
255
+ ui_broadcast: (payload: import('./api/modules/ui/types.ui').UiBroadcastRequest) => Promise<void>;
256
+ };
224
257
  impact: {
225
258
  on: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
226
259
  off: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
@@ -347,31 +380,31 @@ export declare function useApi(options?: ApiOptions): {
347
380
  openWebViewAlwaysOnTop(payload: import('./payload.types').OpenWebViewAlwaysOnTop): Promise<void>;
348
381
  API: import('./api/LowLevelApi').LowLevelApi;
349
382
  };
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;
383
+ complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
384
+ enable_postcall_submit(): Promise<void>;
385
+ disable_postcall_submit(): Promise<void>;
386
+ set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
387
+ update_canvas(payload: import('./api/modules/ui/types.ui').UiUpdateCanvasRequest): Promise<import('../main.lib').CanvasRetrieve>;
388
+ app_loaded(): Promise<void>;
389
+ app_resize(payload: import('./api/modules/ui/types.ui').UiAppResizeRequest): Promise<void>;
390
+ canvas_navigate_next_page(): Promise<void>;
391
+ canvas_navigate_previous_page(): Promise<void>;
392
+ canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
393
+ capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
394
+ update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
395
+ embeddable_ready(): Promise<void>;
396
+ ui_select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
397
+ select_content(payload?: import('./api/modules/ui/types.ui').UiSelectContentRequest): Promise<import('./api/modules/ui/types.ui').UiSelectContentResponse>;
398
+ open(payload: import('./api/modules/ui/types.ui').UiOpenRequest): Promise<void>;
399
+ toast(payload: import('./api/modules/ui/types.ui').UiToastRequest): Promise<void>;
400
+ preselect_sfdc_meeting_id(payload: import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdRequest): Promise<import('./api/modules/ui/types.ui').UiPreselectSfdcMeetingIdResponse>;
401
+ 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>;
402
+ on_meeting_canceled: (handler: (data: import('./api/modules/ui/types.ui').UiMeetingCanceledPayload) => Promise<void>) => Promise<() => void>;
403
+ on_canvas_updated: (handler: (data: import('./api/modules/ui/types.ui').UiCanvasUpdatedPayload) => Promise<void>) => Promise<() => void>;
404
+ on_section_list_updated: (handler: (data: import('./api/modules/ui/types.ui').UiSectionListUpdatedPayload) => Promise<void>) => Promise<() => void>;
405
+ on_app_set_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppSetDataPayload) => Promise<void>) => Promise<() => void>;
406
+ on_app_update_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppUpdateDataPayload) => Promise<void>) => Promise<() => void>;
407
+ ui_broadcast: (payload: import('./api/modules/ui/types.ui').UiBroadcastRequest) => Promise<void>;
375
408
  off: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
376
409
  enterFullscreen: () => Promise<any>;
377
410
  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.12",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",