@pitcher/js-api 1.22.0-alpha.3 → 1.22.0-alpha.5
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 +139 -43
- 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 -17
- 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 +12 -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/useToast.d.ts +2 -2
- package/lib/custom-naive-locales/el.d.ts +1 -1
- package/lib/main.lib.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/content.ui.d.ts +5 -5
- package/lib/sdk/api/modules/ui/index.d.ts +9 -2
- package/lib/sdk/api/modules/ui/post-call.ui.d.ts +6 -0
- package/lib/sdk/api/modules/ui/types.ui.d.ts +74 -10
- package/lib/sdk/interfaces.d.ts +3 -5
- package/lib/sdk/main.d.ts +140 -95
- 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/types/organization.types.d.ts +14 -0
- package/lib/types/organizationSettings.types.d.ts +3 -0
- package/lib/util/network.d.ts +1 -1
- package/package.json +1 -1
- /package/lib/types/{organization.d.ts → organizationMetadata.types.d.ts} +0 -0
|
@@ -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;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { MessageApiInjection } from 'naive-ui/es/message/src/MessageProvider';
|
|
2
|
-
import {
|
|
2
|
+
import { UiToastRequest } from '../sdk/api/modules/ui/types.ui';
|
|
3
3
|
|
|
4
4
|
export default function useToast(): {
|
|
5
5
|
initMessageProvider: () => void;
|
|
6
6
|
getMessageProvider: () => MessageApiInjection | null;
|
|
7
|
-
toast: ((data:
|
|
7
|
+
toast: ((data: UiToastRequest) => void) & {
|
|
8
8
|
info: (message: string) => import('naive-ui').MessageReactive | undefined;
|
|
9
9
|
error: (message: string) => import('naive-ui').MessageReactive | undefined;
|
|
10
10
|
warning: (message: string) => import('naive-ui').MessageReactive | undefined;
|
package/lib/main.lib.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ export * from './types/app';
|
|
|
148
148
|
export * from './types/vueVirtualScroller';
|
|
149
149
|
export * from './components/CUsersGroupsAccessManage/CUsersGroupsAccessManage.types';
|
|
150
150
|
export * from './types/translations';
|
|
151
|
-
export * from './types/organization';
|
|
151
|
+
export * from './types/organization.types';
|
|
152
152
|
export * from './types/iframes';
|
|
153
153
|
export * from './apps/canvas-builder/types/canvas';
|
|
154
154
|
export type * from './composables/useWindowEvents';
|
|
@@ -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,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UiSelectContentRequest, UiSelectContentResponse, UiOpenRequest, UiToastRequest, UiPreselectSfdcMeetingIdRequest, UiPreselectSfdcMeetingIdResponse } from './types.ui';
|
|
2
2
|
|
|
3
|
-
export declare function ui_select_content(payload?:
|
|
4
|
-
export declare function select_content(payload?:
|
|
3
|
+
export declare function ui_select_content(payload?: UiSelectContentRequest): Promise<UiSelectContentResponse>;
|
|
4
|
+
export declare function select_content(payload?: UiSelectContentRequest): Promise<UiSelectContentResponse>;
|
|
5
5
|
export declare function open(payload: UiOpenRequest): Promise<void>;
|
|
6
|
-
export declare function toast(payload:
|
|
7
|
-
export declare function preselect_sfdc_meeting_id(payload:
|
|
6
|
+
export declare function toast(payload: UiToastRequest): Promise<void>;
|
|
7
|
+
export declare function preselect_sfdc_meeting_id(payload: UiPreselectSfdcMeetingIdRequest): Promise<UiPreselectSfdcMeetingIdResponse>;
|
|
@@ -1,8 +1,15 @@
|
|
|
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>;
|
|
9
|
+
export declare function ui_broadcast(payload: UiBroadcastRequest): Promise<void>;
|
|
4
10
|
export * from './content.ui';
|
|
5
11
|
export * from './loading.ui';
|
|
6
12
|
export * from './location.ui';
|
|
7
13
|
export * from './app-errors.ui';
|
|
8
14
|
export * from './canvas.ui';
|
|
15
|
+
export * from './post-call.ui';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { UiCompletePostcallRequest, UiSetPostcallStyleRequest } from './types.ui';
|
|
2
|
+
|
|
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,11 +1,12 @@
|
|
|
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";
|
|
8
8
|
export declare const UI_API_METHOD_TYPES: {
|
|
9
|
+
readonly UI_BROADCAST: "ui_broadcast";
|
|
9
10
|
readonly UI_SELECT_CONTENT: "ui_select_content";
|
|
10
11
|
readonly UI_OPEN: "ui_open";
|
|
11
12
|
readonly UI_EMBEDDABLE_READY: "ui_embeddable_ready";
|
|
@@ -14,12 +15,27 @@ export declare const UI_API_METHOD_TYPES: {
|
|
|
14
15
|
readonly UI_UPDATE_CANVAS: "ui_update_canvas";
|
|
15
16
|
readonly UI_UPDATE_LOCATION: "ui_update_location";
|
|
16
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";
|
|
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";
|
|
17
27
|
};
|
|
18
28
|
export declare const UI_MESSAGE_TYPES: {
|
|
19
|
-
readonly
|
|
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";
|
|
20
34
|
};
|
|
21
|
-
export
|
|
22
|
-
export type
|
|
35
|
+
export declare const UI_NATIVE_MESSAGE_TYPES: readonly ["ui_app_set_data", "ui_app_update_data", "ui_canvas_updated"];
|
|
36
|
+
export type UiBroadcastRequest = Record<string, any>;
|
|
37
|
+
export type UiSelectContentRequest = Record<string, never>;
|
|
38
|
+
export type UiSelectContentResponse = {
|
|
23
39
|
user_action: 'cancelled' | 'selected';
|
|
24
40
|
content?: (ContentSelectorSelectedFile | ContentSelectorSelectedPage)[];
|
|
25
41
|
};
|
|
@@ -28,7 +44,17 @@ export type UiUpdateCanvasRequest = Mutable<Canvas> & {
|
|
|
28
44
|
fields?: string;
|
|
29
45
|
};
|
|
30
46
|
export type UiOpenRequest = OpenRequestPayload;
|
|
31
|
-
export
|
|
47
|
+
export type UiCompletePostcallRequest = {
|
|
48
|
+
was_successfully_submitted?: boolean;
|
|
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
|
+
};
|
|
57
|
+
export interface UiToastRequest {
|
|
32
58
|
type: 'info' | 'error' | 'warning' | 'success' | 'loading';
|
|
33
59
|
message: string;
|
|
34
60
|
duration?: number;
|
|
@@ -36,12 +62,50 @@ export interface UiToastPayload {
|
|
|
36
62
|
keepAliveOnHover?: boolean;
|
|
37
63
|
showIcon?: boolean;
|
|
38
64
|
}
|
|
39
|
-
export
|
|
40
|
-
[UI_MESSAGE_TYPES.UI_CONTENT_SELECTED]: Required<SelectContentResponse['content']>;
|
|
41
|
-
};
|
|
42
|
-
export interface UiPreselectSfdcMeetingIdPayload {
|
|
65
|
+
export interface UiPreselectSfdcMeetingIdRequest {
|
|
43
66
|
eventId: string;
|
|
44
67
|
}
|
|
45
68
|
export interface UiPreselectSfdcMeetingIdResponse {
|
|
46
69
|
event: SfEvent | null;
|
|
47
70
|
}
|
|
71
|
+
export type UiMessagePayloads = {
|
|
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];
|
|
81
|
+
};
|
|
82
|
+
export type UiMeetingCanceledPayload = {
|
|
83
|
+
accountId?: string;
|
|
84
|
+
eventId?: string;
|
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Emitter } from './utils/eventEmitter';
|
|
2
|
-
import { Favorite, File, Instance, User,
|
|
3
|
-
import {
|
|
2
|
+
import { Favorite, File, Instance, User, Canvas } from '../../types/openapi';
|
|
3
|
+
import { PitcherOrg } from '../types/organization.types';
|
|
4
4
|
import { PaginatedData } from '../types/paginatedData';
|
|
5
5
|
import { LaunchDarklyEnv } from '../types/launchDarkly.types';
|
|
6
6
|
import { CLIENT_TYPE } from '../constants/cdp.const';
|
|
@@ -31,9 +31,7 @@ export interface PitcherEnv {
|
|
|
31
31
|
mode: 'WEB' | 'IOS' | 'WINDOWS' | 'ANDROID';
|
|
32
32
|
pitcher: {
|
|
33
33
|
token_claims: Record<string, any>;
|
|
34
|
-
organization:
|
|
35
|
-
metadata: OrganizationMetadata;
|
|
36
|
-
};
|
|
34
|
+
organization: PitcherOrg;
|
|
37
35
|
instance: Instance;
|
|
38
36
|
user: User;
|
|
39
37
|
access_token: string;
|