@pitcher/js-api 1.22.0-alpha.6 → 1.22.0-beta.1
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/README.md +4 -2
- package/js-api.esm.js +472 -139
- 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 +5 -5
- package/lib/apps/browser/stores/api.d.ts +215 -84
- package/lib/apps/browser/stores/app.d.ts +7 -26
- package/lib/apps/browser/stores/upload.d.ts +34 -24
- package/lib/apps/browser/util/file.d.ts +2 -2
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +550 -460
- package/lib/apps/canvas-builder/composables/useCanvasExit.d.ts +3 -0
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +86 -74
- package/lib/apps/canvas-builder/composables/useCanvasHooks.d.ts +4 -4
- package/lib/apps/canvas-builder/composables/useCanvasPages.d.ts +3 -3
- package/lib/apps/canvas-builder/composables/useCanvasSectionOverrides.d.ts +3 -3
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +24 -17
- package/lib/apps/canvas-builder/composables/useCanvasVisibility.d.ts +2 -2
- package/lib/apps/canvas-builder/composables/useCollapsibles.d.ts +3 -3
- package/lib/apps/canvas-builder/composables/useComponentPermissions.d.ts +2 -2
- package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +6 -4
- package/lib/apps/canvas-builder/composables/useInstalledEmbeddables.d.ts +15 -0
- package/lib/apps/canvas-builder/composables/useRecommendations.d.ts +5 -5
- package/lib/apps/canvas-builder/composables/useSectionPopularity.d.ts +2 -2
- package/lib/apps/canvas-builder/types/canvas.d.ts +19 -18
- package/lib/apps/canvas-builder/types/recommendations.types.d.ts +3 -3
- package/lib/apps/canvas-builder/util/canvas.util.d.ts +5 -4
- package/lib/apps/canvas-selector/appTypes.d.ts +13 -0
- package/lib/apps/canvas-selector/constants/index.d.ts +3 -0
- package/lib/apps/canvas-selector/stores/app.d.ts +415 -0
- package/lib/apps/content-selector/appTypes.d.ts +1 -0
- package/lib/apps/content-selector/stores/app.d.ts +8 -1
- package/lib/components/CFileViewer/CFileViewer.use.d.ts +2 -4
- package/lib/components/CFileViewer/CFileViewerFullScreen.use.d.ts +1 -1
- package/lib/components/canvases/CanvasesManagementBulk.use.d.ts +5 -5
- package/lib/components/filters/filter.util.d.ts +1 -1
- package/lib/components/savedCanvases/CSavedCanvasesManagementShareCanvas.use.d.ts +5 -3
- package/lib/composables/instanceTagsActions.use.d.ts +14 -0
- package/lib/composables/recentFiles.use.d.ts +1 -1
- package/lib/composables/suggestedTags.use.d.ts +3 -0
- package/lib/composables/tableColumnsSettings.use.d.ts +25 -0
- package/lib/composables/useCanvasOverlay.d.ts +20 -0
- package/lib/composables/useCanvasTablesPagination.d.ts +13 -0
- package/lib/composables/useConfirmation.d.ts +1 -0
- package/lib/composables/useElementHeightResize.d.ts +5 -0
- package/lib/composables/useFiles.d.ts +11 -0
- package/lib/constants/pitcherSettings.const.d.ts +4 -0
- package/lib/main.lib.d.ts +32 -21
- package/lib/sdk/api/HighLevelApi.d.ts +112 -14
- package/lib/sdk/api/modules/admin/canvas.admin.d.ts +53 -15
- package/lib/sdk/api/modules/admin/env.admin.d.ts +3 -2
- package/lib/sdk/api/modules/admin/files.admin.d.ts +43 -4
- package/lib/sdk/api/modules/admin/index.d.ts +53 -5
- package/lib/sdk/api/modules/admin/metadataTemplates.admin.d.ts +1 -2
- package/lib/sdk/api/modules/admin/types.admin.d.ts +131 -3
- package/lib/sdk/api/modules/canvas.d.ts +12 -14
- package/lib/sdk/api/modules/dsr/env.dsr.d.ts +4 -3
- package/lib/sdk/api/modules/dsr/index.d.ts +14 -3
- package/lib/sdk/api/modules/dsr/loading.dsr.d.ts +7 -1
- package/lib/sdk/api/modules/env.d.ts +16 -0
- package/lib/sdk/api/modules/favorites.d.ts +9 -0
- package/lib/sdk/api/modules/feedback.d.ts +3 -0
- package/lib/sdk/api/modules/files.d.ts +7 -4
- package/lib/sdk/api/modules/folders.d.ts +29 -0
- package/lib/sdk/api/modules/open.d.ts +6 -0
- package/lib/sdk/api/modules/sync.d.ts +1 -2
- package/lib/sdk/api/modules/ui/app-errors.ui.d.ts +13 -1
- package/lib/sdk/api/modules/ui/canvas.ui.d.ts +102 -8
- package/lib/sdk/api/modules/ui/content.ui.d.ts +52 -2
- package/lib/sdk/api/modules/ui/index.d.ts +150 -13
- package/lib/sdk/api/modules/ui/loading.ui.d.ts +9 -1
- package/lib/sdk/api/modules/ui/location.ui.d.ts +18 -1
- package/lib/sdk/api/modules/ui/post-call.ui.d.ts +35 -4
- package/lib/sdk/api/modules/ui/types.ui.d.ts +85 -8
- package/lib/sdk/api/modules/users.d.ts +6 -1
- package/lib/sdk/interfaces.d.ts +122 -3
- package/lib/sdk/main.d.ts +297 -151
- package/lib/sdk/payload.types.d.ts +134 -2
- package/lib/sdk/utils/httpFetch.d.ts +1 -1
- package/lib/sdk/utils/object.d.ts +1 -0
- package/lib/sdk/utils/object.spec.d.ts +1 -0
- package/lib/theme/light.d.ts +12 -0
- package/lib/types/app.d.ts +11 -0
- package/lib/types/call.d.ts +4 -3
- package/lib/types/files.d.ts +27 -1
- package/lib/types/filter.d.ts +5 -0
- package/lib/types/instance.types.d.ts +18 -0
- package/lib/types/{instanceSettings.d.ts → instanceSettings.types.d.ts} +10 -2
- package/lib/types/launchDarkly.types.d.ts +4 -4
- package/lib/types/organization.types.d.ts +2 -2
- package/lib/types/organizationSettings.types.d.ts +4 -0
- package/lib/types/recentFiles.types.d.ts +4 -1
- package/lib/types/users.d.ts +13 -0
- package/lib/util/fullscreen.util.d.ts +1 -1
- package/lib/util/string.d.ts +1 -0
- package/package.json +1 -1
- package/types/openapi/index.d.ts +23 -17
- package/types/openapi/models/AccessTypeEnum.d.ts +3 -1
- package/types/openapi/models/App.d.ts +1 -0
- package/types/openapi/models/AppRelease.d.ts +1 -0
- package/types/openapi/models/AppsDBEntry.d.ts +4 -0
- package/types/openapi/models/AppsDBEntryRequest.d.ts +3 -0
- package/types/openapi/models/Canvas.d.ts +10 -15
- package/types/openapi/models/CanvasCreate.d.ts +14 -12
- package/types/openapi/models/CanvasCreateRequest.d.ts +6 -5
- package/types/openapi/models/CanvasRecommendedFile.d.ts +6 -0
- package/types/openapi/models/CanvasRetrieve.d.ts +15 -13
- package/types/openapi/models/CanvasSection.d.ts +5 -2
- package/types/openapi/models/CanvasUpdate.d.ts +14 -12
- package/types/openapi/models/CanvasUpdateRequest.d.ts +5 -4
- package/types/openapi/models/CollaborationRoleEnum.d.ts +0 -4
- package/types/openapi/models/ContentDistributionGroupCreate.d.ts +1 -0
- package/types/openapi/models/DeletedApp.d.ts +1 -0
- package/types/openapi/models/{CanvasList.d.ts → DeletedCanvas.d.ts} +13 -9
- package/types/openapi/models/DeletedContentDistributionGroup.d.ts +1 -0
- package/types/openapi/models/DeletedEnvironment.d.ts +1 -0
- package/types/openapi/models/DeletedFavorite.d.ts +1 -0
- package/types/openapi/models/DeletedFile.d.ts +6 -0
- package/types/openapi/models/DeletedFolder.d.ts +4 -3
- package/types/openapi/models/DeletedInstance.d.ts +1 -0
- package/types/openapi/models/DeletedInstanceAssignmentGroup.d.ts +1 -0
- package/types/openapi/models/DeletedMetadataTemplate.d.ts +1 -0
- package/types/openapi/models/DeletedRegion.d.ts +1 -0
- package/types/openapi/models/Environment.d.ts +1 -0
- package/types/openapi/models/Favorite.d.ts +1 -0
- package/types/openapi/models/File.d.ts +6 -0
- package/types/openapi/models/FileCreate.d.ts +8 -0
- package/types/openapi/models/FileCreateRequest.d.ts +3 -0
- package/types/openapi/models/FilePermission.d.ts +4 -0
- package/types/openapi/models/FilePermissionRequest.d.ts +4 -0
- package/types/openapi/models/FileRetrieve.d.ts +8 -0
- package/types/openapi/models/FileRevision.d.ts +8 -0
- package/types/openapi/models/FileRevisionRequest.d.ts +3 -0
- package/types/openapi/models/FileUpdate.d.ts +8 -0
- package/types/openapi/models/FileUpdateRequest.d.ts +3 -0
- package/types/openapi/models/FileVersion.d.ts +5 -0
- package/types/openapi/models/Folder.d.ts +4 -3
- package/types/openapi/models/FolderCanvas.d.ts +11 -0
- package/types/openapi/models/FolderCreate.d.ts +8 -7
- package/types/openapi/models/FolderCreateRequest.d.ts +4 -2
- package/types/openapi/models/FolderFile.d.ts +3 -0
- package/types/openapi/models/FolderFolder.d.ts +5 -1
- package/types/openapi/models/FolderRetrieve.d.ts +8 -8
- package/types/openapi/models/FolderRule.d.ts +7 -0
- package/types/openapi/models/FolderRuleRequest.d.ts +7 -0
- package/types/openapi/models/FolderUpdate.d.ts +8 -8
- package/types/openapi/models/FolderUpdateRequest.d.ts +3 -0
- package/types/openapi/models/Instance.d.ts +1 -0
- package/types/openapi/models/InstanceUpdate.d.ts +1 -0
- package/types/openapi/models/MetadataTemplate.d.ts +1 -0
- package/types/openapi/models/OfflineSyncFolder.d.ts +17 -0
- package/types/openapi/models/OperatorEnum.d.ts +64 -0
- package/types/openapi/models/PaginatedCanvasList.d.ts +8 -0
- package/types/openapi/models/PaginatedFileRevisionList.d.ts +8 -0
- package/types/openapi/models/PaginatedOfflineSyncFolderList.d.ts +8 -0
- package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +5 -4
- package/types/openapi/models/PatchedFileRequest.d.ts +3 -0
- package/types/openapi/models/PatchedFileRevisionRequest.d.ts +3 -0
- package/types/openapi/models/PatchedFileUpdateRequest.d.ts +3 -0
- package/types/openapi/models/PatchedFolderUpdateRequest.d.ts +3 -0
- package/types/openapi/models/Region.d.ts +1 -0
- package/types/openapi/models/SearchFile.d.ts +3 -0
- package/types/openapi/models/SharedLink.d.ts +6 -5
- package/types/openapi/models/SharedLinkCanvas.d.ts +11 -0
- package/types/openapi/models/SharedLinkCanvasRequest.d.ts +8 -0
- package/types/openapi/models/SharedLinkCreate.d.ts +6 -5
- package/types/openapi/models/{SharedLinkInstanceSerialzier.d.ts → SharedLinkInstance.d.ts} +1 -1
- package/types/openapi/models/SharedLinkInstanceRequest.d.ts +5 -0
- package/types/openapi/models/{SharedLinkOrganizationSerialzier.d.ts → SharedLinkOrganization.d.ts} +1 -1
- package/types/openapi/models/SharedLinkOrganizationRequest.d.ts +6 -0
- package/lib/apps/canvas-builder/util/tsUtils.d.ts +0 -3
- package/lib/composables/useDetailsView.d.ts +0 -19
- package/lib/types/templateActions.d.ts +0 -10
- package/lib/util/gesture.util.d.ts +0 -6
- package/types/openapi/models/AppsDBGlobalEntry.d.ts +0 -8
- package/types/openapi/models/AppsDBGlobalEntryRequest.d.ts +0 -3
- package/types/openapi/models/AppsDBUserEntry.d.ts +0 -9
- package/types/openapi/models/AppsDBUserEntryRequest.d.ts +0 -3
- package/types/openapi/models/CanvasSectionRetrieve.d.ts +0 -7
- package/types/openapi/models/CanvasSectionRetrieveRequest.d.ts +0 -5
- package/types/openapi/models/FileRequest.d.ts +0 -13
- package/types/openapi/models/InstanceStorageCredentials.d.ts +0 -6
- package/types/openapi/models/MiniAccount.d.ts +0 -4
- package/types/openapi/models/PSPDFKitAuthPayload.d.ts +0 -3
- package/types/openapi/models/PSPDFKitAuthPayloadRequest.d.ts +0 -3
- package/types/openapi/models/PSPDFKitToken.d.ts +0 -7
- package/types/openapi/models/PSPDFKitTokenRequest.d.ts +0 -3
- package/types/openapi/models/PaginatedCanvasListList.d.ts +0 -8
|
@@ -1,7 +1,57 @@
|
|
|
1
1
|
import { UiSelectContentRequest, UiSelectContentResponse, UiOpenRequest, UiToastRequest, UiPreselectSfdcMeetingIdRequest, UiPreselectSfdcMeetingIdResponse } from './types.ui';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @hidden
|
|
5
|
+
* @deprecated
|
|
6
|
+
*/
|
|
3
7
|
export declare function ui_select_content(payload?: UiSelectContentRequest): Promise<UiSelectContentResponse>;
|
|
4
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Allows the user to select (and preselect) content from the instance.
|
|
10
|
+
*
|
|
11
|
+
* Opens the content selector dialog to allow the user to select content and handle the outcome. This method allows you to
|
|
12
|
+
* prompt the user to select content from the CatalogIQ instance and use that content in your application.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* const api = useApi() // or useUi() if you know that you 're in UI context
|
|
16
|
+
* api
|
|
17
|
+
* .selectContent({
|
|
18
|
+
* selections: [
|
|
19
|
+
* { fileId: "01HCZ623YYRFJQ0F7B69VWE510", type: "file" },
|
|
20
|
+
* {
|
|
21
|
+
* fileId: "01HD3XGZ5FN90QJGK7CH8TBZDF",
|
|
22
|
+
* type: "page",
|
|
23
|
+
* pageIndex: 2,
|
|
24
|
+
* },
|
|
25
|
+
* ],
|
|
26
|
+
* })
|
|
27
|
+
*
|
|
28
|
+
* @param payload optional payload to preselect specific content
|
|
29
|
+
* @returns Promise with the user action and selected content
|
|
30
|
+
*/
|
|
31
|
+
export declare function selectContent(payload?: UiSelectContentRequest): Promise<UiSelectContentResponse>;
|
|
32
|
+
/**
|
|
33
|
+
* Open a file in the CatalogIQ instance.
|
|
34
|
+
*/
|
|
5
35
|
export declare function open(payload: UiOpenRequest): Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Show a toast message to the user.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* useUi().toast({ type: 'info', message: 'Hello, world!' })
|
|
41
|
+
*/
|
|
6
42
|
export declare function toast(payload: UiToastRequest): Promise<void>;
|
|
7
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Preselect a meeting in the top meeting bar by Salesforce Meeting ID. From there, the user can easily start the meeting
|
|
45
|
+
* with a single click.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* const objectFetchedFromSalesforce = {
|
|
49
|
+
* // fetch dynamically from Salesforce or provide in another way
|
|
50
|
+
* EventId: '00U1r00000D1J1zEAF',
|
|
51
|
+
* }
|
|
52
|
+
* ui.preselectSfdcMeetingId({ eventId: objectFetchedFromSalesforce.EventId }).then((response) => {
|
|
53
|
+
* // e.g. display advanced meeting details inside your app
|
|
54
|
+
* console.log(response.event)
|
|
55
|
+
* })
|
|
56
|
+
*/
|
|
57
|
+
export declare function preselectSfdcMeetingId(payload: UiPreselectSfdcMeetingIdRequest): Promise<UiPreselectSfdcMeetingIdResponse>;
|
|
@@ -1,15 +1,152 @@
|
|
|
1
1
|
import { UiMeetingCanceledPayload, UiCanvasUpdatedPayload, UiSectionListUpdatedPayload, UiAppSetDataPayload, UiAppUpdateDataPayload, UiBroadcastRequest, UiMessagePayloads } from './types.ui';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Subscribe to a given event type by its key.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const unsubscribeFromSectionListUpdate = useUi().on('ui_section_list_updated', (event: object) => {
|
|
8
|
+
* // handle event
|
|
9
|
+
* })
|
|
10
|
+
*
|
|
11
|
+
* // later
|
|
12
|
+
* unsubscribeFromSectionListUpdate.then(unsubscribe => unsubscribe())
|
|
13
|
+
*
|
|
14
|
+
* @param type The event type/key to subscribe to.
|
|
15
|
+
* @param handler The handler function to call when the event is emitted.
|
|
16
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
17
|
+
*/
|
|
18
|
+
declare function on<T extends keyof UiMessagePayloads>(type: T, handler: (data: UiMessagePayloads[T]) => Promise<void>): Promise<() => void>;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribe to the meeting canceled event.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* const unsubscribeFromMeetingCanceled = useUi().onMeetingCanceled((event: {
|
|
24
|
+
* accountId?: string;
|
|
25
|
+
* eventId?: string;
|
|
26
|
+
* }) => {
|
|
27
|
+
* // handle event
|
|
28
|
+
* })
|
|
29
|
+
*
|
|
30
|
+
* // later
|
|
31
|
+
* unsubscribeFromMeetingCanceled.then(cancel => cancel())
|
|
32
|
+
*
|
|
33
|
+
* @param handler
|
|
34
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
35
|
+
*/
|
|
36
|
+
declare function onMeetingCanceled(handler: (data: UiMeetingCanceledPayload) => Promise<void>): Promise<() => void>;
|
|
37
|
+
/**
|
|
38
|
+
* Subscribe to the canvas updated event. It is triggered when the current canvas of the app is updated.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* const unsubscribePromise = useUi().onCanvasUpdated((event: { canvas }) => {
|
|
42
|
+
* // handle event
|
|
43
|
+
* })
|
|
44
|
+
*
|
|
45
|
+
* // later
|
|
46
|
+
* unsubscribePromise.then(unsubscribe => unsubscribe())
|
|
47
|
+
*
|
|
48
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
49
|
+
*/
|
|
50
|
+
declare function onCanvasUpdated(handler: (data: UiCanvasUpdatedPayload) => Promise<void>): Promise<() => void>;
|
|
51
|
+
/**
|
|
52
|
+
* Subscribe to the section list updated event. It is triggered when the list of sections (products) in the current canvas
|
|
53
|
+
* is updated.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* const unsubscribePromise = useUi().onSectionListUpdated((event: { canvas }) => {
|
|
57
|
+
* // handle event
|
|
58
|
+
* })
|
|
59
|
+
*
|
|
60
|
+
* // later
|
|
61
|
+
* unsubscribePromise.then(unsubscribe => unsubscribe())
|
|
62
|
+
*
|
|
63
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
64
|
+
*/
|
|
65
|
+
declare function onSectionListUpdated(handler: (data: UiSectionListUpdatedPayload) => Promise<void>): Promise<() => void>;
|
|
66
|
+
/**
|
|
67
|
+
* Subscribe to the app set data event. It is triggered when the app data is set. This event is triggered when the app is
|
|
68
|
+
* loaded and in certain other cases after loading.
|
|
69
|
+
*
|
|
70
|
+
* This is the main event for the canvas app to receive data from the CatalogIQ instance and know about its environment.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* let user = null
|
|
74
|
+
* let isEditMode = null
|
|
75
|
+
* let activeCanvas = null
|
|
76
|
+
* let isPrintMode = false
|
|
77
|
+
* const unsubscribePromise = useUi().onAppSetData((data) => {
|
|
78
|
+
* user = data?.user
|
|
79
|
+
* isEditMode = data?.is_edit_mode
|
|
80
|
+
* activeCanvas = data?.canvas
|
|
81
|
+
* isPrintMode = data?.display_mode === 'print' || data?.client === 'dsr'
|
|
82
|
+
* // ...mode logic...
|
|
83
|
+
* })
|
|
84
|
+
*
|
|
85
|
+
* // later
|
|
86
|
+
* unsubscribePromise.then(unsubscribe => unsubscribe())
|
|
87
|
+
*
|
|
88
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
89
|
+
*/
|
|
90
|
+
declare function onAppSetData(handler: (data: UiAppSetDataPayload) => Promise<void>): Promise<() => void>;
|
|
91
|
+
/**
|
|
92
|
+
* Subscribe to the app update data event. It is triggered when the user changes from edit mode to view mode or vice versa
|
|
93
|
+
* and when the call is started or ended.
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* let inCall = false
|
|
97
|
+
* let isEditMode = false
|
|
98
|
+
* const unsubscribePromise = useUi().onAppUpdateData((data) => {
|
|
99
|
+
* isEditMode = data?.is_edit_mode
|
|
100
|
+
* inCall = data?.in_call
|
|
101
|
+
* // ...mode logic...
|
|
102
|
+
* })
|
|
103
|
+
*
|
|
104
|
+
* // later
|
|
105
|
+
* unsubscribePromise.then(unsubscribe => unsubscribe())
|
|
106
|
+
*
|
|
107
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
108
|
+
*/
|
|
109
|
+
declare function onAppUpdateData(handler: (data: UiAppUpdateDataPayload) => Promise<void>): Promise<() => void>;
|
|
110
|
+
/**
|
|
111
|
+
* Broadcast event to the UI. Hidden from the documentation.
|
|
112
|
+
*
|
|
113
|
+
* @hidden
|
|
114
|
+
*/
|
|
115
|
+
declare function uiBroadcast(payload: UiBroadcastRequest): Promise<void>;
|
|
116
|
+
declare const _default: {
|
|
117
|
+
completePostcall(payload: import('../../../../main.lib').UiCompletePostcallRequest): Promise<void>;
|
|
118
|
+
stopMeeting(): Promise<void>;
|
|
119
|
+
enablePostcallSubmit(): Promise<void>;
|
|
120
|
+
disablePostcallSubmit(): Promise<void>;
|
|
121
|
+
setPostcallStyle(payload: import('../../../../main.lib').UiSetPostcallStyleRequest): Promise<void>;
|
|
122
|
+
updateCanvas(payload: import('../../../../main.lib').UiUpdateCanvasRequest): Promise<import('../../../../main.lib').CanvasRetrieve>;
|
|
123
|
+
appLoaded(): Promise<void>;
|
|
124
|
+
appResize(payload: import('../../../../main.lib').UiAppResizeRequest): Promise<void>;
|
|
125
|
+
canvasNavigateNextPage(): Promise<void>;
|
|
126
|
+
canvasNavigatePreviousPage(): Promise<void>;
|
|
127
|
+
canvasNavigatePage(payload: import('../../../../main.lib').UiCanvasNavigatePageRequest): Promise<void>;
|
|
128
|
+
openCanvasOverlay(payload: {
|
|
129
|
+
id: import('../../../../main.lib').CanvasRetrieve["id"];
|
|
130
|
+
edit_mode?: boolean;
|
|
131
|
+
fullscreen?: boolean;
|
|
132
|
+
component_id?: string;
|
|
133
|
+
section_id?: string;
|
|
134
|
+
}): Promise<void>;
|
|
135
|
+
selectCanvases(payload?: import('../../../../main.lib').UiSelectCanvasesRequest): Promise<import('../../../../main.lib').UiSelectCanvasesResponse>;
|
|
136
|
+
captureAppError(payload: import('../../../../main.lib').UiCaptureAppErrorRequest): Promise<void>;
|
|
137
|
+
updateLocation(payload: import('../../../../main.lib').UpdateLocationPitcherEvent): Promise<any>;
|
|
138
|
+
embeddableReady(): Promise<void>;
|
|
139
|
+
ui_select_content(payload?: import('../../../../main.lib').UiSelectContentRequest): Promise<import('../../../../main.lib').UiSelectContentResponse>;
|
|
140
|
+
selectContent(payload?: import('../../../../main.lib').UiSelectContentRequest): Promise<import('../../../../main.lib').UiSelectContentResponse>;
|
|
141
|
+
open(payload: import('../../../../main.lib').UiOpenRequest): Promise<void>;
|
|
142
|
+
toast(payload: import('../../../../main.lib').UiToastRequest): Promise<void>;
|
|
143
|
+
preselectSfdcMeetingId(payload: import('../../../../main.lib').UiPreselectSfdcMeetingIdRequest): Promise<import('../../../../main.lib').UiPreselectSfdcMeetingIdResponse>;
|
|
144
|
+
on: typeof on;
|
|
145
|
+
onMeetingCanceled: typeof onMeetingCanceled;
|
|
146
|
+
onCanvasUpdated: typeof onCanvasUpdated;
|
|
147
|
+
onSectionListUpdated: typeof onSectionListUpdated;
|
|
148
|
+
onAppSetData: typeof onAppSetData;
|
|
149
|
+
onAppUpdateData: typeof onAppUpdateData;
|
|
150
|
+
uiBroadcast: typeof uiBroadcast;
|
|
151
|
+
};
|
|
152
|
+
export default _default;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This event is used for appJson.module.canvas.start_in_loading_mode: true apps.
|
|
3
|
+
* A loading curtain is displayed until you call this event.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* useUi().embeddableReady()
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export declare function embeddableReady(): Promise<void>;
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
import { UpdateLocationPitcherEvent } from '../../../interfaces';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Navigate to another page in the CatalogIQ instance.
|
|
5
|
+
*
|
|
6
|
+
* [//]: # 'TODO: This is a very powerful event, we need to expand documentation here'
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* const canvasId = '1234567890abcdef12345678' // obtain target canvasId
|
|
10
|
+
* useUi().updateLocation({
|
|
11
|
+
* action: 'restore',
|
|
12
|
+
* routes: {
|
|
13
|
+
* 'slotty-ui': {
|
|
14
|
+
* path: '/canvases/saved-canvases/' + canvasId + '/build/present',
|
|
15
|
+
* query: {},
|
|
16
|
+
* },
|
|
17
|
+
* },
|
|
18
|
+
* })
|
|
19
|
+
*/
|
|
20
|
+
export declare function updateLocation(payload: UpdateLocationPitcherEvent): Promise<any>;
|
|
@@ -1,6 +1,37 @@
|
|
|
1
1
|
import { UiCompletePostcallRequest, UiSetPostcallStyleRequest } from './types.ui';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Ends current meeting and shows postcall form.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* useUi().completePostcall({ was_successfully_submitted: true })
|
|
8
|
+
*/
|
|
9
|
+
export declare function completePostcall(payload: UiCompletePostcallRequest): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Ends current meeting and shows postcall form.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* useUi().stopMeeting()
|
|
15
|
+
*/
|
|
16
|
+
export declare function stopMeeting(): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Mark the postcall form as possible to submit by the user.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* useUi().enablePostcallSubmit()
|
|
22
|
+
*/
|
|
23
|
+
export declare function enablePostcallSubmit(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Mark the postcall form as **not** possible to submit by the user. Useful while processing the form data.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* useUi().disablePostcallSubmit()
|
|
29
|
+
*/
|
|
30
|
+
export declare function disablePostcallSubmit(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Change the height of the postcall form.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* useUi().setPostcallStyle({ height: 100 })
|
|
36
|
+
*/
|
|
37
|
+
export declare function setPostcallStyle(payload: UiSetPostcallStyleRequest): Promise<void>;
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import { SelectedPage as ContentSelectorSelectedPage, SelectedFile as ContentSelectorSelectedFile } from '@content-selector/stores/app';
|
|
2
|
-
import {
|
|
2
|
+
import { Selection } from '@content-selector/appTypes';
|
|
3
|
+
import { CanvasSelection } from '@canvas-selector/appTypes';
|
|
4
|
+
import { ComponentNode, EmbeddableProps } from '@canvas-builder/types/canvas';
|
|
5
|
+
import { SfEvent } from '../../../../types/sfdc';
|
|
3
6
|
import { Mutable } from '../../../../types/ts';
|
|
4
|
-
import {
|
|
7
|
+
import { CanvasRetrieve, User, Canvas, CanvasSection } from '../../../../../types/openapi';
|
|
5
8
|
import { OpenRequestPayload } from '../../../payload.types';
|
|
6
9
|
|
|
7
10
|
export declare const UI_MESSAGE: "UI_MESSAGE";
|
|
8
11
|
export declare const UI_API_METHOD_TYPES: {
|
|
9
12
|
readonly UI_BROADCAST: "ui_broadcast";
|
|
10
13
|
readonly UI_SELECT_CONTENT: "ui_select_content";
|
|
14
|
+
readonly UI_SELECT_CANVASES: "ui_select_canvases";
|
|
11
15
|
readonly UI_OPEN: "ui_open";
|
|
12
16
|
readonly UI_EMBEDDABLE_READY: "ui_embeddable_ready";
|
|
13
17
|
readonly UI_TOAST: "ui_toast";
|
|
14
18
|
readonly UI_CAPTURE_APP_ERROR: "ui_capture_app_error";
|
|
15
19
|
readonly UI_UPDATE_CANVAS: "ui_update_canvas";
|
|
20
|
+
readonly UI_OPEN_CANVAS_OVERLAY: "ui_open_canvas_overlay";
|
|
16
21
|
readonly UI_UPDATE_LOCATION: "ui_update_location";
|
|
17
22
|
readonly UI_PRESELECT_SFDC_MEETING_ID: "ui_preselect_sfdc_meeting_id";
|
|
18
23
|
readonly UI_SET_POSTCALL_STYLE: "ui_set_postcall_style";
|
|
19
24
|
readonly UI_ENABLE_POSTCALL_SUBMIT: "ui_enable_postcall_submit";
|
|
20
25
|
readonly UI_DISABLE_POSTCALL_SUBMIT: "ui_disable_postcall_submit";
|
|
21
26
|
readonly UI_COMPLETE_POSTCALL: "ui_complete_postcall";
|
|
27
|
+
readonly UI_STOP_MEETING: "ui_stop_meeting";
|
|
22
28
|
readonly UI_CANVAS_NAVIGATE_NEXT_PAGE: "ui_canvas_navigate_next_page";
|
|
23
29
|
readonly UI_CANVAS_NAVIGATE_PREVIOUS_PAGE: "ui_canvas_navigate_previous_page";
|
|
24
30
|
readonly UI_CANVAS_NAVIGATE_PAGE: "ui_canvas_navigate_page";
|
|
@@ -34,38 +40,87 @@ export declare const UI_MESSAGE_TYPES: {
|
|
|
34
40
|
};
|
|
35
41
|
export declare const UI_NATIVE_MESSAGE_TYPES: readonly ["ui_app_set_data", "ui_app_update_data", "ui_canvas_updated"];
|
|
36
42
|
export type UiBroadcastRequest = Record<string, any>;
|
|
37
|
-
export type UiSelectContentRequest =
|
|
43
|
+
export type UiSelectContentRequest = {
|
|
44
|
+
/** Array of selections */
|
|
45
|
+
selections?: Selection[];
|
|
46
|
+
};
|
|
38
47
|
export type UiSelectContentResponse = {
|
|
48
|
+
/** User action result */
|
|
39
49
|
user_action: 'cancelled' | 'selected';
|
|
50
|
+
/** Selected content */
|
|
40
51
|
content?: (ContentSelectorSelectedFile | ContentSelectorSelectedPage)[];
|
|
41
52
|
};
|
|
53
|
+
export type UiSelectCanvasesRequest = {
|
|
54
|
+
/** Array of selections */
|
|
55
|
+
selections?: CanvasSelection[];
|
|
56
|
+
allowed_types?: ('canvas' | 'canvas-template' | 'section' | 'section-template')[];
|
|
57
|
+
};
|
|
58
|
+
export type UiSelectCanvasesResponse = {
|
|
59
|
+
/** User action result */
|
|
60
|
+
user_action: 'cancelled' | 'selected';
|
|
61
|
+
/** Selected canvases */
|
|
62
|
+
canvases?: Canvas[];
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Error object to send to Pitcher sentry instance
|
|
66
|
+
*/
|
|
42
67
|
export type UiCaptureAppErrorRequest = Record<string, any>;
|
|
43
|
-
export type UiUpdateCanvasRequest = Mutable<
|
|
68
|
+
export type UiUpdateCanvasRequest = Mutable<CanvasRetrieve> & {
|
|
69
|
+
/** Comma-separated list of field keys to return from the server */
|
|
44
70
|
fields?: string;
|
|
45
71
|
};
|
|
46
72
|
export type UiOpenRequest = OpenRequestPayload;
|
|
47
73
|
export type UiCompletePostcallRequest = {
|
|
74
|
+
/** Indicates if the postcall was successfully submitted */
|
|
48
75
|
was_successfully_submitted?: boolean;
|
|
49
76
|
};
|
|
50
77
|
export type UiSetPostcallStyleRequest = Record<string, any>;
|
|
51
78
|
export type UiAppResizeRequest = {
|
|
79
|
+
/** Requested height as the number of pixels */
|
|
52
80
|
height: number;
|
|
53
81
|
};
|
|
54
|
-
export type
|
|
82
|
+
export type UiCanvasNavigatePageRequest = {
|
|
83
|
+
/** The id of the component we want to navigate to */
|
|
55
84
|
page: ComponentNode['id'];
|
|
56
85
|
};
|
|
57
86
|
export interface UiToastRequest {
|
|
87
|
+
/**
|
|
88
|
+
* Type of the toast, influences the default icon
|
|
89
|
+
* @defaultValue **REQUIRED**
|
|
90
|
+
*/
|
|
58
91
|
type: 'info' | 'error' | 'warning' | 'success' | 'loading';
|
|
92
|
+
/**
|
|
93
|
+
* Text to show inside the toast
|
|
94
|
+
* @defaultValue **REQUIRED**
|
|
95
|
+
*/
|
|
59
96
|
message: string;
|
|
97
|
+
/**
|
|
98
|
+
* Optional, value in milliseconds
|
|
99
|
+
* @defaultValue 3500
|
|
100
|
+
*/
|
|
60
101
|
duration?: number;
|
|
102
|
+
/**
|
|
103
|
+
* Visibility of the close button, default is true
|
|
104
|
+
* @defaultValue true
|
|
105
|
+
*/
|
|
61
106
|
closable?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* Toast won't be hidden as long as it is hovered
|
|
109
|
+
* @defaultValue true
|
|
110
|
+
*/
|
|
62
111
|
keepAliveOnHover?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* Set to `false` to hide the icon
|
|
114
|
+
* @defaultValue true
|
|
115
|
+
*/
|
|
63
116
|
showIcon?: boolean;
|
|
64
117
|
}
|
|
65
118
|
export interface UiPreselectSfdcMeetingIdRequest {
|
|
119
|
+
/** Salesforce Meeting ID */
|
|
66
120
|
eventId: string;
|
|
67
121
|
}
|
|
68
122
|
export interface UiPreselectSfdcMeetingIdResponse {
|
|
123
|
+
/** Salesforce Event */
|
|
69
124
|
event: SfEvent | null;
|
|
70
125
|
}
|
|
71
126
|
export type UiMessagePayloads = {
|
|
@@ -76,36 +131,58 @@ export type UiMessagePayloads = {
|
|
|
76
131
|
[UI_MESSAGE_TYPES.UI_SECTION_LIST_UPDATED]: UiSectionListUpdatedPayload;
|
|
77
132
|
};
|
|
78
133
|
export type UiMessageEnvelope<T extends (typeof UI_MESSAGE_TYPES)[keyof typeof UI_MESSAGE_TYPES] = (typeof UI_MESSAGE_TYPES)[keyof typeof UI_MESSAGE_TYPES]> = {
|
|
134
|
+
/** Message type */
|
|
79
135
|
type: T;
|
|
136
|
+
/** Message body */
|
|
80
137
|
body: UiMessagePayloads[T];
|
|
81
138
|
};
|
|
82
139
|
export type UiMeetingCanceledPayload = {
|
|
140
|
+
/** Account ID */
|
|
83
141
|
accountId?: string;
|
|
142
|
+
/** Event ID */
|
|
84
143
|
eventId?: string;
|
|
85
144
|
};
|
|
86
145
|
export type UiAppSetDataPayload = {
|
|
146
|
+
/** Client name */
|
|
87
147
|
client: string | null;
|
|
148
|
+
/** Platform name */
|
|
88
149
|
platform: string | undefined;
|
|
150
|
+
/** User information */
|
|
89
151
|
user: User | null;
|
|
152
|
+
/** Edit mode status */
|
|
90
153
|
is_edit_mode: boolean;
|
|
154
|
+
/** Call status */
|
|
91
155
|
in_call: boolean;
|
|
92
|
-
|
|
156
|
+
/** Canvas data */
|
|
157
|
+
canvas: CanvasRetrieve;
|
|
158
|
+
/** Section used in canvas */
|
|
93
159
|
used_in_section: CanvasSection | null;
|
|
160
|
+
/** Component ID */
|
|
94
161
|
component_id: string;
|
|
162
|
+
/** Embeddable settings */
|
|
95
163
|
settings: EmbeddableProps['settings'] | null;
|
|
164
|
+
/** Width of the canvas */
|
|
96
165
|
width: string | undefined;
|
|
166
|
+
/** Height of the canvas */
|
|
97
167
|
height: string | undefined;
|
|
168
|
+
/** Display mode */
|
|
98
169
|
display_mode: string | undefined;
|
|
99
170
|
};
|
|
100
171
|
export type UiAppUpdateDataPayload = {
|
|
172
|
+
/** Call status */
|
|
101
173
|
in_call: boolean;
|
|
174
|
+
/** Edit mode status */
|
|
102
175
|
is_edit_mode: boolean;
|
|
103
176
|
};
|
|
104
177
|
export type UiCanvasUpdatedPayload = {
|
|
105
|
-
|
|
178
|
+
/** Canvas data */
|
|
179
|
+
canvas: CanvasRetrieve;
|
|
106
180
|
};
|
|
107
181
|
export type UiSectionListUpdatedPayload = {
|
|
182
|
+
/** List of section IDs */
|
|
108
183
|
section_list_ids: string[];
|
|
184
|
+
/** Section list component ID */
|
|
109
185
|
section_list_component_id: string;
|
|
110
|
-
|
|
186
|
+
/** Canvas data */
|
|
187
|
+
canvas: CanvasRetrieve | null;
|
|
111
188
|
};
|
|
@@ -3,4 +3,9 @@ import { PaginatedData } from '../../../types/paginatedData';
|
|
|
3
3
|
import { User } from '../../../../types/openapi';
|
|
4
4
|
|
|
5
5
|
export declare function getUsers(payload?: GetUsersParams): Promise<PaginatedData<User>>;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Ask for a refreshed Salesforce token. In case the token hasn't expired yet, this method will return the same token as the current one found in the (`getEnv`)[#getenv] result.
|
|
8
|
+
* @returns Promise resolving to an object containing the token
|
|
9
|
+
*/
|
|
10
|
+
export declare function refreshServiceToken(payload?: RefreshServiceTokenRequest): Promise<RefreshServiceTokenResponse>;
|
|
11
|
+
export declare function refreshAccessToken(): any;
|