@pitcher/js-api 1.22.0-alpha.4 → 1.22.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-api.esm.js +361 -102
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +10 -10
- package/js-api.umd.min.js.map +1 -1
- package/lib/api/canvases/canvases.queries.d.ts +1 -1
- package/lib/apps/browser/stores/api.d.ts +53 -53
- package/lib/apps/browser/stores/app.d.ts +18 -15
- package/lib/apps/browser/stores/upload.d.ts +29 -29
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +607 -621
- package/lib/apps/canvas-builder/composables/useCanvasDnd.d.ts +12 -0
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +93 -95
- package/lib/apps/canvas-builder/composables/useCanvasPages.d.ts +1 -0
- package/lib/apps/canvas-builder/composables/useCanvasSectionOverrides.d.ts +8 -7
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +11 -11
- package/lib/apps/canvas-builder/composables/useCanvasVisibility.d.ts +5 -4
- package/lib/apps/canvas-builder/composables/useCollapsibles.d.ts +2 -2
- package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +9 -9
- package/lib/apps/canvas-builder/composables/useRecommendations.d.ts +13 -10
- package/lib/apps/canvas-builder/types/canvas.d.ts +4 -3
- package/lib/apps/canvas-builder/util/tree.d.ts +1 -0
- package/lib/apps/content-selector/stores/app.d.ts +16 -15
- package/lib/components/CFileViewer/CFileViewer.use.d.ts +1 -1
- package/lib/composables/bulkActions.use.d.ts +4 -4
- package/lib/composables/recentFiles.use.d.ts +1 -1
- package/lib/composables/useDetailsView.d.ts +1 -1
- package/lib/composables/useLocation.d.ts +1 -1
- package/lib/composables/useLocationAPI.d.ts +2 -2
- package/lib/composables/useLocationManipulation.d.ts +1 -1
- package/lib/composables/useWindowEvents.d.ts +1 -1
- package/lib/custom-naive-locales/el.d.ts +1 -1
- package/lib/sdk/api/HighLevelApi.d.ts +31 -31
- package/lib/sdk/api/modules/ui/canvas.ui.d.ts +6 -1
- package/lib/sdk/api/modules/ui/index.d.ts +7 -2
- package/lib/sdk/api/modules/ui/post-call.ui.d.ts +4 -1
- package/lib/sdk/api/modules/ui/types.ui.d.ts +56 -2
- package/lib/sdk/api/onlineRestApiHandlers.d.ts +4 -0
- package/lib/sdk/interfaces.d.ts +2 -0
- package/lib/sdk/main.d.ts +134 -95
- package/lib/sdk/utils/httpFetch.d.ts +15 -0
- package/lib/theme/light.d.ts +5 -315
- package/lib/types/instanceSettings.d.ts +1 -0
- package/lib/types/launchDarkly.types.d.ts +1 -1
- package/lib/util/network.d.ts +1 -1
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ declare const _default: ({ videoPlayerEl, pdfViewerEl, bottomBarRef, i18n, appLo
|
|
|
25
25
|
clientType: (typeof CLIENT_TYPE)[keyof typeof CLIENT_TYPE];
|
|
26
26
|
context?: Record<string, any>;
|
|
27
27
|
}) => {
|
|
28
|
-
viewPdf: (file: FileModel | CanvasFile | null, pageIndex: MiniPage[
|
|
28
|
+
viewPdf: (file: FileModel | CanvasFile | null, pageIndex: MiniPage["page_index"]) => Promise<void | Instance>;
|
|
29
29
|
viewVideo: (file: FileModel | CanvasFile | null) => Promise<void>;
|
|
30
30
|
onPdfFullScreen: () => void;
|
|
31
31
|
updateFileViewerSettings: (partialSettings: Partial<import('../../types/fileViewerSettings.types').FileViewerSettings>) => void;
|
|
@@ -5,8 +5,8 @@ export default function useBulkActions(): {
|
|
|
5
5
|
deleteFiles: (payload: BulkDeleteRequest) => Promise<BulkDeleteResponse>;
|
|
6
6
|
deleteFolders: (payload: BulkDeleteRequest) => Promise<BulkDeleteResponse>;
|
|
7
7
|
deleteFavorites: (payload: BulkDeleteRequest) => Promise<BulkDeleteResponse>;
|
|
8
|
-
addTags: (payload: Omit<BulkUpdateTagsRequest,
|
|
9
|
-
removeTags: (payload: Omit<BulkUpdateTagsRequest,
|
|
10
|
-
mergeMetadata: (payload: Omit<BulkUpdateMetadataRequest,
|
|
11
|
-
replaceMetadata: (payload: Omit<BulkUpdateMetadataRequest,
|
|
8
|
+
addTags: (payload: Omit<BulkUpdateTagsRequest, "instance_id" | "operation">) => Promise<BulkUpdateTags>;
|
|
9
|
+
removeTags: (payload: Omit<BulkUpdateTagsRequest, "instance_id" | "operation">) => Promise<BulkUpdateTags>;
|
|
10
|
+
mergeMetadata: (payload: Omit<BulkUpdateMetadataRequest, "instance_id" | "operation">) => Promise<BulkUpdateMetadata>;
|
|
11
|
+
replaceMetadata: (payload: Omit<BulkUpdateMetadataRequest, "instance_id" | "operation">) => Promise<BulkUpdateMetadata>;
|
|
12
12
|
};
|
|
@@ -8,5 +8,5 @@ export default function useRecentFiles({ instanceId, app, }: {
|
|
|
8
8
|
}): {
|
|
9
9
|
addRecentFile: (file: RecentFile) => void;
|
|
10
10
|
instanceRecentFiles: ComputedRef<RecentFile[]>;
|
|
11
|
-
updateRecentFiles: (files: Pick<RecentFile,
|
|
11
|
+
updateRecentFiles: (files: Pick<RecentFile, "id" | "thumbnail_url" | "name">[]) => void;
|
|
12
12
|
};
|
|
@@ -10,7 +10,7 @@ export default function <T extends string>(sectionIdList: T[]): {
|
|
|
10
10
|
onClose: (sectionId: T) => void;
|
|
11
11
|
onClickMenu: (sectionId: T) => void;
|
|
12
12
|
selectedSectionId: Ref<string>;
|
|
13
|
-
sectionsEditStates: import('vue').
|
|
13
|
+
sectionsEditStates: import('vue').Reactive<Record<T, boolean>>;
|
|
14
14
|
routerGuard: (guard: ComputedRef<boolean>, goBack: () => Promise<void | NavigationFailure | undefined>) => void;
|
|
15
15
|
waypointOptions: {
|
|
16
16
|
threshold: number;
|
|
@@ -18,7 +18,7 @@ export default function useLocation({ app, router, isReady, isRoot, selfRegister
|
|
|
18
18
|
routes: LocationRoutes;
|
|
19
19
|
relations: Record<string, string>;
|
|
20
20
|
unmount: () => Promise<void>;
|
|
21
|
-
update: (newRoutes: UpdateLocationOnUpdate[
|
|
21
|
+
update: (newRoutes: UpdateLocationOnUpdate["routes"]) => Promise<void>;
|
|
22
22
|
isPathRestored: import('vue').Ref<boolean>;
|
|
23
23
|
isAppMounted: import('vue').ComputedRef<boolean>;
|
|
24
24
|
isAppRestored: import('vue').ComputedRef<boolean>;
|
|
@@ -13,10 +13,10 @@ export default function useLocationAPI(params: UseLocationAPI): {
|
|
|
13
13
|
broadcast: {
|
|
14
14
|
unregister: (appName: string) => Promise<any>;
|
|
15
15
|
register: ({ child_app, parent_app, path }: RegisterLocation) => Promise<any>;
|
|
16
|
-
update: (routes: UpdateLocationOnUpdate[
|
|
16
|
+
update: (routes: UpdateLocationOnUpdate["routes"]) => Promise<any>;
|
|
17
17
|
mount: () => Promise<any>;
|
|
18
18
|
mounted: () => Promise<any>;
|
|
19
|
-
restore: (routes: UpdateLocationOnRestore[
|
|
19
|
+
restore: (routes: UpdateLocationOnRestore["routes"]) => Promise<any>;
|
|
20
20
|
restoreCompleted: (path: string, query: Record<string, any>) => Promise<any>;
|
|
21
21
|
getRoutesRequest: () => Promise<any>;
|
|
22
22
|
getRoutesResponse: (app: string, routes: LocationRoutes) => Promise<any>;
|
|
@@ -27,7 +27,7 @@ export default function useLocationManipulation({ routes, relations, app, action
|
|
|
27
27
|
isAppRestored: import('vue').ComputedRef<boolean>;
|
|
28
28
|
recoverRouteFromLocations: (rootApp: string) => Route;
|
|
29
29
|
isSameRoute: (route1?: Route, route2?: Route) => boolean;
|
|
30
|
-
isSameRouteAsStored: (internalRouter: ReturnType<typeof useLocationAPI>[
|
|
30
|
+
isSameRouteAsStored: (internalRouter: ReturnType<typeof useLocationAPI>["internalRouter"]) => boolean;
|
|
31
31
|
deleteRelation: (appName: string) => string[];
|
|
32
32
|
addActionToQueue: (body: UpdateLocationPitcherEvent) => void;
|
|
33
33
|
registerLocation: ({ child_app, parent_app, path, query }: RegisterLocation) => void;
|
|
@@ -10,7 +10,7 @@ export type InactiveEventPayload = {
|
|
|
10
10
|
export default function (track: (eventName: string, payload: any) => void, pitcherApi?: ReturnType<typeof usePitcherApi>): {
|
|
11
11
|
registerInactiveEvent: ({ id, payload, enterEvent, exitEvent, type, }: {
|
|
12
12
|
id: string;
|
|
13
|
-
payload: InactiveEventPayload;
|
|
13
|
+
payload: InactiveEventPayload | (() => InactiveEventPayload);
|
|
14
14
|
enterEvent: (typeof CDP_EVENT_TYPE)[keyof typeof CDP_EVENT_TYPE];
|
|
15
15
|
exitEvent: (typeof CDP_EVENT_TYPE)[keyof typeof CDP_EVENT_TYPE];
|
|
16
16
|
type?: EventType;
|
|
@@ -16,8 +16,8 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
16
16
|
openExternalUrl(payload: import('../payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
17
17
|
getEnv(): Promise<import('../interfaces').PitcherEnv>;
|
|
18
18
|
updateMyUser(payload: {
|
|
19
|
-
language?: import('../../main.lib').LanguageEnum
|
|
20
|
-
dark_mode?: boolean
|
|
19
|
+
language?: import('../../main.lib').LanguageEnum;
|
|
20
|
+
dark_mode?: boolean;
|
|
21
21
|
}): Promise<import('../../main.lib').User>;
|
|
22
22
|
getLanguages(): Promise<modules.Language[]>;
|
|
23
23
|
getEvents(payload: Partial<import('../../main.lib').EventRequest>): Promise<import('../../main.lib').PaginatedData<import('../../main.lib').Event>>;
|
|
@@ -25,58 +25,58 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
25
25
|
updateEvent(payload: import('../../main.lib').PatchedEventRequest): Promise<import('../../main.lib').Event>;
|
|
26
26
|
deleteEvent(payload: Partial<import('../../main.lib').Event>): Promise<void>;
|
|
27
27
|
getCanvases(payload: import('../../main.lib').GetCanvasesParams & {
|
|
28
|
-
filters?: Record<string, any
|
|
29
|
-
fields?: string
|
|
28
|
+
filters?: Record<string, any>;
|
|
29
|
+
fields?: string;
|
|
30
30
|
}): Promise<import('../../main.lib').PaginatedData<import('../../main.lib').Canvas>>;
|
|
31
31
|
createCanvas(payload: Omit<import('../../main.lib').CanvasCreateRequest, "instance_id">): Promise<import('../../main.lib').Canvas>;
|
|
32
32
|
deleteCanvas(payload: {
|
|
33
|
-
id:
|
|
33
|
+
id: import('../../main.lib').Canvas["id"];
|
|
34
34
|
}): Promise<import('../../main.lib').Canvas>;
|
|
35
35
|
updateCanvas(payload: import('../../main.lib').PatchedCanvasUpdateRequest & {
|
|
36
|
-
id:
|
|
37
|
-
instance_id?:
|
|
38
|
-
fields?: string
|
|
36
|
+
id: import('../../main.lib').Canvas["id"];
|
|
37
|
+
instance_id?: import('../../main.lib').Instance["id"];
|
|
38
|
+
fields?: string;
|
|
39
39
|
}): Promise<import('../../main.lib').Canvas>;
|
|
40
40
|
getCanvas(payload: {
|
|
41
|
-
id:
|
|
42
|
-
fields?: string
|
|
41
|
+
id: import('../../main.lib').Canvas["id"];
|
|
42
|
+
fields?: string;
|
|
43
43
|
}): Promise<import('../../main.lib').Canvas>;
|
|
44
44
|
shareCanvas(payload: {
|
|
45
|
-
id:
|
|
45
|
+
id: import('../../main.lib').Canvas["id"];
|
|
46
46
|
}): Promise<import('../../main.lib').SharedLink>;
|
|
47
47
|
getFiles(payload: import('../payload.types').ListFilesPayload): Promise<import('../../main.lib').PaginatedFileList>;
|
|
48
|
-
getRecentFiles(payload?: import('../payload.types').GetRecentFilesPayload
|
|
48
|
+
getRecentFiles(payload?: import('../payload.types').GetRecentFilesPayload): Promise<import('../../main.lib').File[]>;
|
|
49
49
|
downloadFile(payload: {
|
|
50
|
-
file_id:
|
|
50
|
+
file_id: import('../../main.lib').File["id"];
|
|
51
51
|
}): Promise<null>;
|
|
52
52
|
getAppConfig(payload: {
|
|
53
53
|
app_name: string;
|
|
54
54
|
}): Promise<Record<string, any>>;
|
|
55
55
|
getFile(payload: {
|
|
56
|
-
file_id:
|
|
56
|
+
file_id: import('../../main.lib').FileRetrieve["id"];
|
|
57
57
|
}): Promise<import('../../main.lib').FileRetrieve>;
|
|
58
58
|
updateFile(payload: import('../../main.lib').FileUpdateRequest & {
|
|
59
|
-
id:
|
|
59
|
+
id: import('../../main.lib').File["id"];
|
|
60
60
|
}): Promise<import('../../main.lib').FileRetrieve>;
|
|
61
61
|
deleteFile(payload: {
|
|
62
|
-
file_id:
|
|
63
|
-
}): Promise<
|
|
62
|
+
file_id: import('../../main.lib').File["id"];
|
|
63
|
+
}): Promise<import('../../main.lib').File["id"]>;
|
|
64
64
|
createFile(payload: Omit<import('../../main.lib').AllFileCreateRequest, "instance_id">): Promise<import('../../main.lib').FileRetrieve>;
|
|
65
65
|
selectDeviceFile(): Promise<import('../../main.lib').DeviceFile>;
|
|
66
66
|
search(payload: {
|
|
67
67
|
query: string;
|
|
68
|
-
includeExpired?: boolean
|
|
68
|
+
includeExpired?: boolean;
|
|
69
69
|
}): Promise<any>;
|
|
70
|
-
getUsers(payload?: import('../../main.lib').GetUsersParams
|
|
70
|
+
getUsers(payload?: import('../../main.lib').GetUsersParams): Promise<import('../../main.lib').PaginatedData<import('../../main.lib').User>>;
|
|
71
71
|
refreshServiceToken(payload: import('../../main.lib').RefreshServiceTokenRequest): Promise<import('../../main.lib').RefreshServiceTokenResponse>;
|
|
72
72
|
fetchDocumentInfo(payload: {
|
|
73
|
-
fileId:
|
|
73
|
+
fileId: import('../../main.lib').File["id"];
|
|
74
74
|
}): Promise<{
|
|
75
|
-
[key: string]: unknown;
|
|
76
75
|
pageCount: number;
|
|
76
|
+
[key: string]: unknown;
|
|
77
77
|
}>;
|
|
78
78
|
renderPageAsImage(payload: {
|
|
79
|
-
fileId:
|
|
79
|
+
fileId: import('../../main.lib').File["id"];
|
|
80
80
|
pageNumber: number;
|
|
81
81
|
params: {
|
|
82
82
|
width: number;
|
|
@@ -90,33 +90,33 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
90
90
|
}): Promise<void>;
|
|
91
91
|
query(payload: import('../payload.types').QueryPayload): Promise<any>;
|
|
92
92
|
getFolder(payload?: {
|
|
93
|
-
id:
|
|
93
|
+
id: import('../../main.lib').FolderRetrieve["id"];
|
|
94
94
|
}): Promise<import('../../main.lib').FolderRetrieve>;
|
|
95
95
|
createFolder(payload: Omit<import('../../main.lib').FolderCreateRequest, "instance_id">): Promise<import('../../main.lib').FolderRetrieve>;
|
|
96
96
|
updateFolder(payload: import('../../main.lib').FolderUpdateRequest & {
|
|
97
|
-
id:
|
|
97
|
+
id: import('../../main.lib').Folder["id"];
|
|
98
98
|
}): Promise<import('../../main.lib').FolderRetrieve>;
|
|
99
99
|
deleteFolder(payload: {
|
|
100
|
-
folder_id:
|
|
100
|
+
folder_id: import('../../main.lib').FolderRetrieve["id"];
|
|
101
101
|
}): Promise<void>;
|
|
102
102
|
moveFolderItems(payload: {
|
|
103
|
-
target_folder_id:
|
|
103
|
+
target_folder_id: import('../../main.lib').Folder["id"];
|
|
104
104
|
items: {
|
|
105
|
-
id:
|
|
106
|
-
type: "
|
|
105
|
+
id: import('../../main.lib').File["id"] | import('../../main.lib').Folder["id"];
|
|
106
|
+
type: "folder" | "file";
|
|
107
107
|
}[];
|
|
108
108
|
}): Promise<import('../../main.lib').FolderRetrieve>;
|
|
109
|
-
getFavorites(payload?: import('../../main.lib').GetFavoritesParams
|
|
109
|
+
getFavorites(payload?: import('../../main.lib').GetFavoritesParams): Promise<import('../../main.lib').PaginatedFavoriteList>;
|
|
110
110
|
createFavorite(payload: import('../../main.lib').FavoriteCreateRequest): Promise<import('../../main.lib').Favorite>;
|
|
111
111
|
deleteFavorite(payload: {
|
|
112
|
-
favorite_id:
|
|
112
|
+
favorite_id: import('../../main.lib').Favorite["id"];
|
|
113
113
|
}): Promise<void>;
|
|
114
114
|
notify(payload: import('../payload.types').NotificationPayload): Promise<void>;
|
|
115
115
|
track(payload: {
|
|
116
116
|
event_name: string;
|
|
117
117
|
payload: any;
|
|
118
118
|
}): Promise<any>;
|
|
119
|
-
getInstanceMetadataTemplates(payload?: import('../payload.types').GetInstanceMetadataTemplatesPayload
|
|
119
|
+
getInstanceMetadataTemplates(payload?: import('../payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../../main.lib').PaginatedMetadataTemplateList>;
|
|
120
120
|
triggerNonFilesSync(): Promise<void>;
|
|
121
121
|
submitUserFeedback(payload: import('../payload.types').SubmitUserFeedbackPayload): Promise<any>;
|
|
122
122
|
close(): Promise<any>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Canvas } from '../../../../../types/openapi';
|
|
2
|
-
import { UiUpdateCanvasRequest } from './types.ui';
|
|
2
|
+
import { UiAppResizeRequest, UiCanvasNavigatePageReuqest, UiUpdateCanvasRequest } from './types.ui';
|
|
3
3
|
|
|
4
4
|
export declare function update_canvas(payload: UiUpdateCanvasRequest): Promise<Canvas>;
|
|
5
|
+
export declare function app_loaded(): Promise<void>;
|
|
6
|
+
export declare function app_resize(payload: UiAppResizeRequest): Promise<void>;
|
|
7
|
+
export declare function canvas_navigate_next_page(): Promise<void>;
|
|
8
|
+
export declare function canvas_navigate_previous_page(): Promise<void>;
|
|
9
|
+
export declare function canvas_navigate_page(payload: UiCanvasNavigatePageReuqest): Promise<void>;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiMeetingCanceledPayload, UiCanvasUpdatedPayload, UiSectionListUpdatedPayload, UiAppSetDataPayload, UiAppUpdateDataPayload, UiBroadcastRequest, UiMessagePayloads } from './types.ui';
|
|
2
2
|
|
|
3
|
-
export declare function on
|
|
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>;
|
|
4
9
|
export declare function ui_broadcast(payload: UiBroadcastRequest): Promise<void>;
|
|
5
10
|
export * from './content.ui';
|
|
6
11
|
export * from './loading.ui';
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { UiCompletePostcallRequest } from './types.ui';
|
|
1
|
+
import { UiCompletePostcallRequest, UiSetPostcallStyleRequest } from './types.ui';
|
|
2
2
|
|
|
3
3
|
export declare function complete_postcall(payload: UiCompletePostcallRequest): Promise<void>;
|
|
4
|
+
export declare function enable_postcall_submit(): Promise<void>;
|
|
5
|
+
export declare function disable_postcall_submit(): Promise<void>;
|
|
6
|
+
export declare function set_postcall_style(payload: UiSetPostcallStyleRequest): Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectedPage as ContentSelectorSelectedPage, SelectedFile as ContentSelectorSelectedFile } from '@content-selector/stores/app';
|
|
2
|
-
import { SfEvent } from '../../../../main.lib';
|
|
2
|
+
import { CanvasSection, ComponentNode, EmbeddableProps, SfEvent } from '../../../../main.lib';
|
|
3
3
|
import { Mutable } from '../../../../types/ts';
|
|
4
|
-
import { Canvas } from '../../../../../types/openapi';
|
|
4
|
+
import { Canvas, User } from '../../../../../types/openapi';
|
|
5
5
|
import { OpenRequestPayload } from '../../../payload.types';
|
|
6
6
|
|
|
7
7
|
export declare const UI_MESSAGE: "UI_MESSAGE";
|
|
@@ -15,11 +15,24 @@ export declare const UI_API_METHOD_TYPES: {
|
|
|
15
15
|
readonly UI_UPDATE_CANVAS: "ui_update_canvas";
|
|
16
16
|
readonly UI_UPDATE_LOCATION: "ui_update_location";
|
|
17
17
|
readonly UI_PRESELECT_SFDC_MEETING_ID: "ui_preselect_sfdc_meeting_id";
|
|
18
|
+
readonly UI_SET_POSTCALL_STYLE: "ui_set_postcall_style";
|
|
19
|
+
readonly UI_ENABLE_POSTCALL_SUBMIT: "ui_enable_postcall_submit";
|
|
20
|
+
readonly UI_DISABLE_POSTCALL_SUBMIT: "ui_disable_postcall_submit";
|
|
18
21
|
readonly UI_COMPLETE_POSTCALL: "ui_complete_postcall";
|
|
22
|
+
readonly UI_CANVAS_NAVIGATE_NEXT_PAGE: "ui_canvas_navigate_next_page";
|
|
23
|
+
readonly UI_CANVAS_NAVIGATE_PREVIOUS_PAGE: "ui_canvas_navigate_previous_page";
|
|
24
|
+
readonly UI_CANVAS_NAVIGATE_PAGE: "ui_canvas_navigate_page";
|
|
25
|
+
readonly UI_APP_LOADED: "ui_app_loaded";
|
|
26
|
+
readonly UI_APP_RESIZE: "ui_app_resize";
|
|
19
27
|
};
|
|
20
28
|
export declare const UI_MESSAGE_TYPES: {
|
|
21
29
|
readonly UI_MEETING_CANCELED: "ui_meeting_canceled";
|
|
30
|
+
readonly UI_CANVAS_UPDATED: "ui_canvas_updated";
|
|
31
|
+
readonly UI_SECTION_LIST_UPDATED: "ui_section_list_updated";
|
|
32
|
+
readonly UI_APP_SET_DATA: "ui_app_set_data";
|
|
33
|
+
readonly UI_APP_UPDATE_DATA: "ui_app_update_data";
|
|
22
34
|
};
|
|
35
|
+
export declare const UI_NATIVE_MESSAGE_TYPES: readonly ["ui_app_set_data", "ui_app_update_data", "ui_canvas_updated"];
|
|
23
36
|
export type UiBroadcastRequest = Record<string, any>;
|
|
24
37
|
export type UiSelectContentRequest = Record<string, never>;
|
|
25
38
|
export type UiSelectContentResponse = {
|
|
@@ -34,6 +47,13 @@ export type UiOpenRequest = OpenRequestPayload;
|
|
|
34
47
|
export type UiCompletePostcallRequest = {
|
|
35
48
|
was_successfully_submitted?: boolean;
|
|
36
49
|
};
|
|
50
|
+
export type UiSetPostcallStyleRequest = Record<string, any>;
|
|
51
|
+
export type UiAppResizeRequest = {
|
|
52
|
+
height: number;
|
|
53
|
+
};
|
|
54
|
+
export type UiCanvasNavigatePageReuqest = {
|
|
55
|
+
page: ComponentNode['id'];
|
|
56
|
+
};
|
|
37
57
|
export interface UiToastRequest {
|
|
38
58
|
type: 'info' | 'error' | 'warning' | 'success' | 'loading';
|
|
39
59
|
message: string;
|
|
@@ -50,8 +70,42 @@ export interface UiPreselectSfdcMeetingIdResponse {
|
|
|
50
70
|
}
|
|
51
71
|
export type UiMessagePayloads = {
|
|
52
72
|
[UI_MESSAGE_TYPES.UI_MEETING_CANCELED]: UiMeetingCanceledPayload;
|
|
73
|
+
[UI_MESSAGE_TYPES.UI_APP_SET_DATA]: UiAppSetDataPayload;
|
|
74
|
+
[UI_MESSAGE_TYPES.UI_APP_UPDATE_DATA]: UiAppUpdateDataPayload;
|
|
75
|
+
[UI_MESSAGE_TYPES.UI_CANVAS_UPDATED]: UiCanvasUpdatedPayload;
|
|
76
|
+
[UI_MESSAGE_TYPES.UI_SECTION_LIST_UPDATED]: UiSectionListUpdatedPayload;
|
|
77
|
+
};
|
|
78
|
+
export type UiMessageEnvelope<T extends (typeof UI_MESSAGE_TYPES)[keyof typeof UI_MESSAGE_TYPES] = (typeof UI_MESSAGE_TYPES)[keyof typeof UI_MESSAGE_TYPES]> = {
|
|
79
|
+
type: T;
|
|
80
|
+
body: UiMessagePayloads[T];
|
|
53
81
|
};
|
|
54
82
|
export type UiMeetingCanceledPayload = {
|
|
55
83
|
accountId?: string;
|
|
56
84
|
eventId?: string;
|
|
57
85
|
};
|
|
86
|
+
export type UiAppSetDataPayload = {
|
|
87
|
+
client: string | null;
|
|
88
|
+
platform: string | undefined;
|
|
89
|
+
user: User | null;
|
|
90
|
+
is_edit_mode: boolean;
|
|
91
|
+
in_call: boolean;
|
|
92
|
+
canvas: Canvas;
|
|
93
|
+
used_in_section: CanvasSection | null;
|
|
94
|
+
component_id: string;
|
|
95
|
+
settings: EmbeddableProps['settings'] | null;
|
|
96
|
+
width: string | undefined;
|
|
97
|
+
height: string | undefined;
|
|
98
|
+
display_mode: string | undefined;
|
|
99
|
+
};
|
|
100
|
+
export type UiAppUpdateDataPayload = {
|
|
101
|
+
in_call: boolean;
|
|
102
|
+
is_edit_mode: boolean;
|
|
103
|
+
};
|
|
104
|
+
export type UiCanvasUpdatedPayload = {
|
|
105
|
+
canvas: Canvas;
|
|
106
|
+
};
|
|
107
|
+
export type UiSectionListUpdatedPayload = {
|
|
108
|
+
section_list_ids: string[];
|
|
109
|
+
section_list_component_id: string;
|
|
110
|
+
canvas: Canvas | null;
|
|
111
|
+
};
|
package/lib/sdk/interfaces.d.ts
CHANGED
|
@@ -22,10 +22,12 @@ export interface PitcherMessage {
|
|
|
22
22
|
body?: Record<string, any>;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
+
type FetchMode = 'postmessage' | 'prefer-online';
|
|
25
26
|
export interface ApiOptions {
|
|
26
27
|
errorLogger?: (p: any) => string | void;
|
|
27
28
|
logLevel?: 'off' | 'info' | 'debug';
|
|
28
29
|
casing?: 'camel' | 'snake';
|
|
30
|
+
fetchMode?: FetchMode;
|
|
29
31
|
}
|
|
30
32
|
export interface PitcherEnv {
|
|
31
33
|
mode: 'WEB' | 'IOS' | 'WINDOWS' | 'ANDROID';
|