@pitcher/js-api 1.21.0-beta.9 → 1.21.0
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 +271 -92
- package/js-api.esm.js.map +1 -1
- package/js-api.umd.min.js +9 -9
- 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/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 +4 -1
- package/lib/apps/canvas-builder/composables/useRecommendations.d.ts +4 -4
- 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/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 +2 -2
- 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/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 +27 -20
- package/lib/sdk/api/HighLevelApi.d.ts +106 -12
- package/lib/sdk/api/modules/admin/canvas.admin.d.ts +31 -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 +52 -5
- package/lib/sdk/api/modules/admin/metadataTemplates.admin.d.ts +1 -2
- package/lib/sdk/api/modules/admin/types.admin.d.ts +117 -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 +6 -0
- 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 +3 -3
- 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 +12 -0
- package/lib/sdk/api/modules/ui/canvas.ui.d.ts +75 -2
- package/lib/sdk/api/modules/ui/content.ui.d.ts +50 -0
- package/lib/sdk/api/modules/ui/index.d.ts +149 -13
- package/lib/sdk/api/modules/ui/loading.ui.d.ts +15 -0
- package/lib/sdk/api/modules/ui/location.ui.d.ts +17 -0
- package/lib/sdk/api/modules/ui/post-call.ui.d.ts +25 -0
- package/lib/sdk/api/modules/ui/types.ui.d.ts +69 -6
- package/lib/sdk/api/modules/users.d.ts +4 -0
- package/lib/sdk/interfaces.d.ts +119 -2
- package/lib/sdk/main.d.ts +275 -141
- package/lib/sdk/payload.types.d.ts +134 -2
- package/lib/theme/light.d.ts +12 -0
- package/lib/types/app.d.ts +11 -0
- package/lib/types/call.d.ts +2 -2
- package/lib/types/files.d.ts +27 -1
- package/lib/types/filter.d.ts +5 -0
- package/lib/types/instanceSettings.types.d.ts +8 -2
- package/lib/types/launchDarkly.types.d.ts +4 -4
- 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,23 +1,116 @@
|
|
|
1
1
|
import { LowLevelApi } from './LowLevelApi';
|
|
2
2
|
import { PitcherEvent, ApiOptions } from '../interfaces';
|
|
3
3
|
import * as modules from '@sdk/api/modules';
|
|
4
|
+
/**
|
|
5
|
+
* Creates a high-level API instance and caches it. Reterns a new instance only if new options are provided.
|
|
6
|
+
*/
|
|
4
7
|
export declare function createHighLevelApi(options?: ApiOptions): {
|
|
8
|
+
/**
|
|
9
|
+
* Subscribe to a given event type by its key.
|
|
10
|
+
*
|
|
11
|
+
* @param {string} type - The event type to subscribe to.
|
|
12
|
+
* @param {(payload: PitcherEvent) => void} callback - The callback function to handle the event.
|
|
13
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event. * @example
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* const unsubscribeFromSectionListUpdate = usePitcherApi().on('entered_fullscreen', (event: object) => {
|
|
17
|
+
* // handle event
|
|
18
|
+
* })
|
|
19
|
+
* // later
|
|
20
|
+
* unsubscribeFromSectionListUpdate()
|
|
21
|
+
*/
|
|
5
22
|
on: (type: string, callback: (payload: PitcherEvent) => void) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Unsubscribe from a given event type by its key and the attached callback reference.
|
|
25
|
+
* @param {string} type - The event type to unsubscribe from.
|
|
26
|
+
* @param {(payload: PitcherEvent) => void} callback - The callback function reference to remove.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* const callback = (event: object) => {
|
|
30
|
+
* // handle event
|
|
31
|
+
* }
|
|
32
|
+
* usePitcherApi().on('entered_fullscreen', callback)
|
|
33
|
+
* // later
|
|
34
|
+
* usePitcherApi().off('entered_fullscreen', callback)
|
|
35
|
+
*/
|
|
6
36
|
off: (type: string, callback: (payload: PitcherEvent) => void) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Make the entire CatalogIQ fullscreen.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* usePitcherApi().enterFullscreen()
|
|
42
|
+
*/
|
|
7
43
|
enterFullscreen: () => Promise<any>;
|
|
44
|
+
/**
|
|
45
|
+
* Exit fullscreen mode.
|
|
46
|
+
*
|
|
47
|
+
* @example
|
|
48
|
+
* usePitcherApi().exitFullscreen()
|
|
49
|
+
*/
|
|
8
50
|
exitFullscreen: () => Promise<any>;
|
|
51
|
+
/**
|
|
52
|
+
* Return is CatalogIQ in fullscreen.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* usePitcherApi().isFullscreen()
|
|
56
|
+
*/
|
|
57
|
+
isFullscreen: () => Promise<any>;
|
|
58
|
+
/**
|
|
59
|
+
* Log out the current user.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* usePitcherApi().logout()
|
|
63
|
+
*/
|
|
9
64
|
logout: () => Promise<any>;
|
|
65
|
+
/**
|
|
66
|
+
* Quit the current instance and go to the instance selection screen.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* usePitcherApi().quitInstance()
|
|
70
|
+
*/
|
|
10
71
|
quitInstance: () => Promise<any>;
|
|
72
|
+
/**
|
|
73
|
+
* Get the request types.
|
|
74
|
+
*
|
|
75
|
+
* @returns {Promise<any>}
|
|
76
|
+
*/
|
|
11
77
|
getRequestTypes: () => Promise<any>;
|
|
78
|
+
/**
|
|
79
|
+
* Broadcast an event to CatalogIQ.
|
|
80
|
+
* @param {PitcherEvent} event - The event to broadcast.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* usePitcherApi()
|
|
84
|
+
* .broadcast({
|
|
85
|
+
* type: "canvas_updated",
|
|
86
|
+
* body: { context: { myContextProperty: 'test' } },
|
|
87
|
+
* })
|
|
88
|
+
* .then(function (result) {
|
|
89
|
+
* useUi().toast({
|
|
90
|
+
* message: "Canvas Populated.",
|
|
91
|
+
* type: "info",
|
|
92
|
+
* })
|
|
93
|
+
* })
|
|
94
|
+
*/
|
|
12
95
|
broadcast: (event: PitcherEvent) => Promise<any>;
|
|
96
|
+
/**
|
|
97
|
+
* Subscribe to updates.
|
|
98
|
+
*
|
|
99
|
+
* @returns {Promise<void>}
|
|
100
|
+
*/
|
|
13
101
|
subscribe: () => Promise<any>;
|
|
102
|
+
/**
|
|
103
|
+
* Unsubscribe from updates.
|
|
104
|
+
*
|
|
105
|
+
* @returns {Promise<void>}
|
|
106
|
+
*/
|
|
14
107
|
unsubscribe: () => Promise<any>;
|
|
15
108
|
open(payload?: import('../payload.types').OpenRequestPayload): Promise<string>;
|
|
16
109
|
openExternalUrl(payload: import('../payload.types').OpenExternalUrlRequestPayload): Promise<void>;
|
|
17
110
|
getEnv(): Promise<import('../interfaces').PitcherEnv>;
|
|
18
111
|
updateMyUser(payload: {
|
|
19
|
-
language?: import('../../main.lib').LanguageEnum;
|
|
20
|
-
dark_mode?: boolean;
|
|
112
|
+
language?: import('../../main.lib').LanguageEnum | undefined;
|
|
113
|
+
dark_mode?: boolean | undefined;
|
|
21
114
|
}): Promise<import('../../main.lib').User>;
|
|
22
115
|
getLanguages(): Promise<modules.Language[]>;
|
|
23
116
|
getEvents(payload: Partial<import('../../main.lib').EventRequest>): Promise<import('../../main.lib').PaginatedData<import('../../main.lib').Event>>;
|
|
@@ -27,22 +120,22 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
27
120
|
getCanvases(payload: import('../../main.lib').GetCanvasesParams & {
|
|
28
121
|
filters?: Record<string, any>;
|
|
29
122
|
fields?: string;
|
|
30
|
-
}): Promise<import('../../main.lib').PaginatedData<import('../../main.lib').
|
|
31
|
-
createCanvas(payload: Omit<import('../../main.lib').CanvasCreateRequest, "instance_id">): Promise<import('../../main.lib').
|
|
123
|
+
}): Promise<import('../../main.lib').PaginatedData<import('../../main.lib').CanvasRetrieve>>;
|
|
124
|
+
createCanvas(payload: Omit<import('../../main.lib').CanvasCreateRequest, "instance_id">): Promise<import('../../main.lib').CanvasRetrieve>;
|
|
32
125
|
deleteCanvas(payload: {
|
|
33
|
-
id: import('../../main.lib').
|
|
34
|
-
}): Promise<import('../../main.lib').
|
|
126
|
+
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
127
|
+
}): Promise<import('../../main.lib').CanvasRetrieve>;
|
|
35
128
|
updateCanvas(payload: import('../../main.lib').PatchedCanvasUpdateRequest & {
|
|
36
|
-
id: import('../../main.lib').
|
|
129
|
+
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
37
130
|
instance_id?: import('../../main.lib').Instance["id"];
|
|
38
131
|
fields?: string;
|
|
39
|
-
}): Promise<import('../../main.lib').
|
|
132
|
+
}): Promise<import('../../main.lib').CanvasRetrieve>;
|
|
40
133
|
getCanvas(payload: {
|
|
41
|
-
id: import('../../main.lib').
|
|
134
|
+
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
42
135
|
fields?: string;
|
|
43
|
-
}): Promise<import('../../main.lib').
|
|
136
|
+
}): Promise<import('../../main.lib').CanvasRetrieve>;
|
|
44
137
|
shareCanvas(payload: {
|
|
45
|
-
id: import('../../main.lib').
|
|
138
|
+
id: import('../../main.lib').CanvasRetrieve["id"];
|
|
46
139
|
}): Promise<import('../../main.lib').SharedLink>;
|
|
47
140
|
getFiles(payload: import('../payload.types').ListFilesPayload & {
|
|
48
141
|
filters?: Record<string, any>;
|
|
@@ -56,7 +149,8 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
56
149
|
app_name: string;
|
|
57
150
|
}): Promise<Record<string, any>>;
|
|
58
151
|
getFile(payload: {
|
|
59
|
-
|
|
152
|
+
id?: import('../../main.lib').FileRetrieve["id"];
|
|
153
|
+
file_id?: import('../../main.lib').FileRetrieve["id"];
|
|
60
154
|
}): Promise<import('../../main.lib').FileRetrieve>;
|
|
61
155
|
updateFile(payload: import('../../main.lib').FileUpdateRequest & {
|
|
62
156
|
id: import('../../main.lib').File["id"];
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CanvasRetrieve, PatchedCanvasUpdateRequest, Instance, CanvasCreateRequest } from '../../../../../types/openapi';
|
|
2
2
|
import { GetCanvasesParams } from '../../../../types/canvases';
|
|
3
3
|
import { PaginatedData } from '../../../../types/paginatedData';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Creates a new canvas.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* @example
|
|
9
9
|
* adminApi.createCanvas({
|
|
10
10
|
* name: 'my new canvas';
|
|
11
11
|
* })
|
|
12
|
-
* ```
|
|
13
12
|
*/
|
|
14
|
-
export declare function createCanvas(payload: CanvasCreateRequest): Promise<
|
|
13
|
+
export declare function createCanvas(payload: CanvasCreateRequest): Promise<CanvasRetrieve>;
|
|
15
14
|
/**
|
|
16
15
|
* Fetches a list of canvases to use in your app.
|
|
17
16
|
*
|
|
18
|
-
*
|
|
17
|
+
* @example
|
|
19
18
|
* // The `filters` object is a reserved payload key to transfer the metadata dict over the wire.
|
|
20
19
|
* adminApi.getCanvases({
|
|
21
20
|
* search: 'my search query',
|
|
@@ -26,30 +25,28 @@ export declare function createCanvas(payload: CanvasCreateRequest): Promise<Canv
|
|
|
26
25
|
* },
|
|
27
26
|
* fields: 'id,name,metadata',
|
|
28
27
|
* })
|
|
29
|
-
* ```
|
|
30
28
|
*/
|
|
31
29
|
export declare function getCanvases(payload: GetCanvasesParams & {
|
|
32
30
|
filters?: Record<string, any>;
|
|
33
31
|
fields?: string;
|
|
34
|
-
}): Promise<PaginatedData<
|
|
32
|
+
}): Promise<PaginatedData<CanvasRetrieve>>;
|
|
35
33
|
/**
|
|
36
34
|
* Fetches a canvas by id with the defined fields or all of them.
|
|
37
35
|
*
|
|
38
|
-
*
|
|
36
|
+
* @example
|
|
39
37
|
* // The `filters` object is a reserved payload key to transfer the metadata dict over the wire.
|
|
40
38
|
* adminApi.getCanvas({
|
|
41
39
|
* fields: 'id,name,metadata',
|
|
42
40
|
* })
|
|
43
|
-
* ```
|
|
44
41
|
*/
|
|
45
42
|
export declare function getCanvas(payload: {
|
|
46
|
-
id:
|
|
43
|
+
id: CanvasRetrieve['id'];
|
|
47
44
|
fields?: string;
|
|
48
|
-
}): Promise<
|
|
45
|
+
}): Promise<CanvasRetrieve>;
|
|
49
46
|
/**
|
|
50
47
|
* Updates a canvas by ID and returns the defined fields or all of them.
|
|
51
48
|
*
|
|
52
|
-
*
|
|
49
|
+
* @example
|
|
53
50
|
* // The fields param is appended to the URL as a query param.
|
|
54
51
|
* onMounted(() => {
|
|
55
52
|
* adminApi.updateCanvas({
|
|
@@ -60,10 +57,29 @@ export declare function getCanvas(payload: {
|
|
|
60
57
|
* console.log(res) // logs: { id: '01HH4RCBH631K4JDHWAQB0RPR6', name: 'To 3!' }
|
|
61
58
|
* })
|
|
62
59
|
* })
|
|
63
|
-
* ```
|
|
64
60
|
*/
|
|
65
61
|
export declare function updateCanvas(payload: PatchedCanvasUpdateRequest & {
|
|
66
|
-
id:
|
|
62
|
+
id: CanvasRetrieve['id'];
|
|
67
63
|
instance_id?: Instance['id'];
|
|
68
64
|
fields?: string;
|
|
69
|
-
}): Promise<
|
|
65
|
+
}): Promise<CanvasRetrieve>;
|
|
66
|
+
/**
|
|
67
|
+
* Opens a modal to view a canvas by ID.
|
|
68
|
+
*
|
|
69
|
+
* ```
|
|
70
|
+
* onMounted(() => {
|
|
71
|
+
* adminApi.openCanvasOverlay({
|
|
72
|
+
* id: '01HH4RCBH631K4JDHWAQB0RPR6',
|
|
73
|
+
* edit_mode: false,
|
|
74
|
+
* fullscreen: true,
|
|
75
|
+
* })
|
|
76
|
+
* })
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare function openCanvasOverlay(payload: {
|
|
80
|
+
id: CanvasRetrieve['id'];
|
|
81
|
+
edit_mode?: boolean;
|
|
82
|
+
fullscreen?: boolean;
|
|
83
|
+
component_id?: string;
|
|
84
|
+
section_id?: string;
|
|
85
|
+
}): Promise<void>;
|
|
@@ -3,8 +3,9 @@ import { AdminEnv } from './types.admin';
|
|
|
3
3
|
/**
|
|
4
4
|
* Fetches the necessary info for the app to know where it is embedded.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Check out [usePitcherApi().getEnv()](../internal/functions/createHighLevelApi.md#getenv) for more information.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
7
9
|
* adminApi.getEnv()
|
|
8
|
-
* ```
|
|
9
10
|
*/
|
|
10
11
|
export declare function getEnv(): Promise<AdminEnv>;
|
|
@@ -1,10 +1,49 @@
|
|
|
1
|
+
import { AdminSelectContentRequest, AdminSelectContentResponse } from './types.admin';
|
|
2
|
+
import { File, PaginatedFileList } from '../../../../../types/openapi';
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
|
-
*
|
|
5
|
+
* Get the metadata object of an app with a given name.
|
|
3
6
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
+
* @param {object} payload - The payload object.
|
|
8
|
+
* @param {string} payload.app_name - `name` value from `app.json` of the app you want to get the metadata of.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* useAdmin().getAppConfig({ app_name: 'my-app' })
|
|
7
12
|
*/
|
|
8
13
|
export declare function getAppConfig(payload: {
|
|
9
14
|
app_name: string;
|
|
10
15
|
}): Promise<Record<string, any>>;
|
|
16
|
+
/**
|
|
17
|
+
* Fetches a file by ID.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* adminApi.getFile({ id: 'my-file-id' })
|
|
21
|
+
*/
|
|
22
|
+
export declare function getFile(payload: {
|
|
23
|
+
id: File['id'];
|
|
24
|
+
}): Promise<File>;
|
|
25
|
+
/**
|
|
26
|
+
* Lists available files.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* adminApi.getFiles()
|
|
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
|
+
* @example
|
|
36
|
+
* const api = useApi() // or useAdmin() if you know that you 're in Admin app context
|
|
37
|
+
* api
|
|
38
|
+
* .select_content({
|
|
39
|
+
* selections: [
|
|
40
|
+
* { fileId: "01HCZ623YYRFJQ0F7B69VWE510", type: "file" },
|
|
41
|
+
* {
|
|
42
|
+
* fileId: "01HD3XGZ5FN90QJGK7CH8TBZDF",
|
|
43
|
+
* type: "page",
|
|
44
|
+
* pageIndex: 2,
|
|
45
|
+
* },
|
|
46
|
+
* ],
|
|
47
|
+
* })
|
|
48
|
+
*/
|
|
49
|
+
export declare function selectContent(payload: AdminSelectContentRequest): Promise<AdminSelectContentResponse>;
|
|
@@ -1,6 +1,53 @@
|
|
|
1
|
-
import { ADMIN_MESSAGE_TYPES, AdminMessagePayloads } from './types.admin';
|
|
1
|
+
import { AdminToastRequest, ADMIN_MESSAGE_TYPES, AdminMessagePayloads } from './types.admin';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Subscribe to a given event type by its key.
|
|
5
|
+
*
|
|
6
|
+
* @param type The event type/key to subscribe to.
|
|
7
|
+
* @param handler The handler function to call when the event is emitted.
|
|
8
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
9
|
+
*/
|
|
10
|
+
declare function on(type: (typeof ADMIN_MESSAGE_TYPES)[keyof typeof ADMIN_MESSAGE_TYPES], handler: (data: AdminMessagePayloads[typeof type]) => Promise<void>): Promise<() => void>;
|
|
11
|
+
/**
|
|
12
|
+
* Show a toast message to the user. Compatible with the UI API version of this method.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* useAdmin().toast({ type: 'info', message: 'Hello, world!' })
|
|
16
|
+
*/
|
|
17
|
+
declare function toast(payload: AdminToastRequest): Promise<void>;
|
|
18
|
+
declare const _default: {
|
|
19
|
+
getAppConfig(payload: {
|
|
20
|
+
app_name: string;
|
|
21
|
+
}): Promise<Record<string, any>>;
|
|
22
|
+
getFile(payload: {
|
|
23
|
+
id: import('../../../../main.lib').File["id"];
|
|
24
|
+
}): Promise<import('../../../../main.lib').File>;
|
|
25
|
+
getFiles(payload: Record<string, any>): Promise<import('../../../../main.lib').PaginatedFileList>;
|
|
26
|
+
selectContent(payload: import('./types.admin').AdminSelectContentRequest): Promise<import('./types.admin').AdminSelectContentResponse>;
|
|
27
|
+
getInstanceMetadataTemplates(payload?: import('../../../payload.types').GetInstanceMetadataTemplatesPayload): Promise<import('../../../../main.lib').PaginatedMetadataTemplateList>;
|
|
28
|
+
createCanvas(payload: import('../../../../main.lib').CanvasCreateRequest): Promise<import('../../../../main.lib').CanvasRetrieve>;
|
|
29
|
+
getCanvases(payload: import('../../../../main.lib').GetCanvasesParams & {
|
|
30
|
+
filters?: Record<string, any>;
|
|
31
|
+
fields?: string;
|
|
32
|
+
}): Promise<import('../../../../main.lib').PaginatedData<import('../../../../main.lib').CanvasRetrieve>>;
|
|
33
|
+
getCanvas(payload: {
|
|
34
|
+
id: import('../../../../main.lib').CanvasRetrieve["id"];
|
|
35
|
+
fields?: string;
|
|
36
|
+
}): Promise<import('../../../../main.lib').CanvasRetrieve>;
|
|
37
|
+
updateCanvas(payload: import('../../../../main.lib').PatchedCanvasUpdateRequest & {
|
|
38
|
+
id: import('../../../../main.lib').CanvasRetrieve["id"];
|
|
39
|
+
instance_id?: import('../../../../main.lib').Instance["id"];
|
|
40
|
+
fields?: string;
|
|
41
|
+
}): Promise<import('../../../../main.lib').CanvasRetrieve>;
|
|
42
|
+
openCanvasOverlay(payload: {
|
|
43
|
+
id: import('../../../../main.lib').CanvasRetrieve["id"];
|
|
44
|
+
edit_mode?: boolean;
|
|
45
|
+
fullscreen?: boolean;
|
|
46
|
+
component_id?: string;
|
|
47
|
+
section_id?: string;
|
|
48
|
+
}): Promise<void>;
|
|
49
|
+
getEnv(): Promise<import('./types.admin').AdminEnv>;
|
|
50
|
+
on: typeof on;
|
|
51
|
+
toast: typeof toast;
|
|
52
|
+
};
|
|
53
|
+
export default _default;
|
|
@@ -4,8 +4,7 @@ import { GetInstanceMetadataTemplatesPayload } from '../../../payload.types';
|
|
|
4
4
|
/**
|
|
5
5
|
* Fetches a list of metadata templates to use in your app. Instance is auto-injected by admin app if in instance scope.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* @example
|
|
8
8
|
* adminApi.getInstanceMetadataTemplates()
|
|
9
|
-
* ```
|
|
10
9
|
**/
|
|
11
10
|
export declare function getInstanceMetadataTemplates(payload?: GetInstanceMetadataTemplatesPayload): Promise<PaginatedMetadataTemplateList>;
|
|
@@ -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: {
|
|
@@ -10,37 +11,150 @@ export declare const ADMIN_API_TYPES: {
|
|
|
10
11
|
};
|
|
11
12
|
export declare const ADMIN_API_METHOD_TYPES: {
|
|
12
13
|
readonly CREATE_CANVAS: "admin_create_canvas";
|
|
13
|
-
readonly
|
|
14
|
+
readonly GET_APP_CONFIG: "admin_get_app_config";
|
|
14
15
|
readonly GET_CANVAS: "admin_get_canvas";
|
|
15
16
|
readonly GET_CANVASES: "admin_get_canvases";
|
|
16
|
-
readonly
|
|
17
|
+
readonly OPEN_CANVAS_OVERLAY: "admin_open_canvas_overlay";
|
|
18
|
+
readonly GET_ENV: "admin_get_env";
|
|
19
|
+
readonly GET_FILE: "admin_get_file";
|
|
20
|
+
readonly GET_FILES: "admin_get_files";
|
|
17
21
|
readonly GET_INSTANCE_METADATA_TEMPLATES: "admin_get_instance_metadata_templates";
|
|
18
|
-
readonly
|
|
22
|
+
readonly TOAST: "admin_toast";
|
|
23
|
+
readonly UPDATE_CANVAS: "admin_update_canvas";
|
|
24
|
+
readonly SELECT_CONTENT: "admin_select_content";
|
|
19
25
|
};
|
|
20
26
|
export type AdminMessagePayloads = {
|
|
21
27
|
[ADMIN_MESSAGE_TYPES.ENV_CHANGED]: AdminEnv;
|
|
22
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* Represents an admin request with a specific payload.
|
|
31
|
+
* @template Payload - The type of the payload data.
|
|
32
|
+
*/
|
|
23
33
|
export type AdminRequest<Payload = any> = {
|
|
34
|
+
/**
|
|
35
|
+
* Unique identifier for the request.
|
|
36
|
+
*/
|
|
24
37
|
id: string;
|
|
38
|
+
/**
|
|
39
|
+
* Type of the admin API request.
|
|
40
|
+
*/
|
|
25
41
|
type: (typeof ADMIN_API_TYPES)['ADMIN_REQUEST'];
|
|
42
|
+
/**
|
|
43
|
+
* Body of the request containing the method type and payload data.
|
|
44
|
+
*/
|
|
26
45
|
body: {
|
|
46
|
+
/**
|
|
47
|
+
* Type of the admin API method.
|
|
48
|
+
*/
|
|
27
49
|
type: (typeof ADMIN_API_METHOD_TYPES)[keyof typeof ADMIN_API_METHOD_TYPES];
|
|
50
|
+
/**
|
|
51
|
+
* Payload data for the request.
|
|
52
|
+
*/
|
|
28
53
|
data: Payload;
|
|
29
54
|
};
|
|
30
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* Represents a request to show a toast notification.
|
|
58
|
+
*/
|
|
59
|
+
export interface AdminToastRequest {
|
|
60
|
+
/**
|
|
61
|
+
* Type of the toast notification.
|
|
62
|
+
*/
|
|
63
|
+
type: 'info' | 'error' | 'warning' | 'success' | 'loading';
|
|
64
|
+
/**
|
|
65
|
+
* Message to be displayed in the toast.
|
|
66
|
+
*/
|
|
67
|
+
message: string;
|
|
68
|
+
/**
|
|
69
|
+
* Duration for which the toast should be displayed (optional).
|
|
70
|
+
*/
|
|
71
|
+
duration?: number;
|
|
72
|
+
/**
|
|
73
|
+
* Indicates if the toast can be closed manually (optional).
|
|
74
|
+
*/
|
|
75
|
+
closable?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Indicates if the toast should remain visible when hovered over (optional).
|
|
78
|
+
*/
|
|
79
|
+
keepAliveOnHover?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Indicates if an icon should be shown in the toast (optional).
|
|
82
|
+
*/
|
|
83
|
+
showIcon?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Represents a request to select content.
|
|
87
|
+
*/
|
|
88
|
+
export type AdminSelectContentRequest = {
|
|
89
|
+
/**
|
|
90
|
+
* List of selections to be made (optional).
|
|
91
|
+
*/
|
|
92
|
+
selections?: Selection[];
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Represents a response to a content selection request.
|
|
96
|
+
*/
|
|
97
|
+
export type AdminSelectContentResponse = {
|
|
98
|
+
/**
|
|
99
|
+
* Action taken by the user.
|
|
100
|
+
*/
|
|
101
|
+
user_action: 'cancelled' | 'selected';
|
|
102
|
+
/**
|
|
103
|
+
* Selected content, if any.
|
|
104
|
+
*/
|
|
105
|
+
content?: (ContentSelectorSelectedFile | ContentSelectorSelectedPage)[];
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Represents an admin response with a specific payload.
|
|
109
|
+
* @template Response - The type of the response data.
|
|
110
|
+
*/
|
|
31
111
|
export type AdminResponse<Response = any> = {
|
|
112
|
+
/**
|
|
113
|
+
* Unique identifier for the response.
|
|
114
|
+
*/
|
|
32
115
|
id: string;
|
|
116
|
+
/**
|
|
117
|
+
* Type of the admin API response.
|
|
118
|
+
*/
|
|
33
119
|
type: (typeof ADMIN_API_TYPES)['ADMIN_RESPONSE'];
|
|
120
|
+
/**
|
|
121
|
+
* Body of the response containing the response data.
|
|
122
|
+
*/
|
|
34
123
|
body: Response;
|
|
35
124
|
};
|
|
125
|
+
/**
|
|
126
|
+
* Represents an admin message with a specific payload.
|
|
127
|
+
* @template Payload - The type of the message data.
|
|
128
|
+
*/
|
|
36
129
|
export type AdminMessage<Payload = any> = {
|
|
130
|
+
/**
|
|
131
|
+
* Unique identifier for the message.
|
|
132
|
+
*/
|
|
37
133
|
id: string;
|
|
134
|
+
/**
|
|
135
|
+
* Type of the admin message.
|
|
136
|
+
*/
|
|
38
137
|
type: typeof ADMIN_MESSAGE;
|
|
138
|
+
/**
|
|
139
|
+
* Body of the message containing the message type and payload data.
|
|
140
|
+
*/
|
|
39
141
|
body: {
|
|
142
|
+
/**
|
|
143
|
+
* Type of the admin message.
|
|
144
|
+
*/
|
|
40
145
|
type: (typeof ADMIN_MESSAGE_TYPES)[keyof typeof ADMIN_MESSAGE_TYPES];
|
|
146
|
+
/**
|
|
147
|
+
* Payload data for the message.
|
|
148
|
+
*/
|
|
41
149
|
data: Payload;
|
|
42
150
|
};
|
|
43
151
|
};
|
|
152
|
+
/**
|
|
153
|
+
* Represents the admin environment.
|
|
154
|
+
*/
|
|
44
155
|
export type AdminEnv = {
|
|
156
|
+
/**
|
|
157
|
+
* Pitcher environment settings.
|
|
158
|
+
*/
|
|
45
159
|
pitcher: PitcherEnv['pitcher'];
|
|
46
160
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CanvasRetrieve, CanvasCreateRequest, PatchedCanvasUpdateRequest, SharedLink, Instance } from '../../../../types/openapi';
|
|
2
2
|
import { GetCanvasesParams } from '../../../types/canvases';
|
|
3
3
|
import { PaginatedData } from '../../../types/paginatedData';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Fetches a list of canvases to use in your app.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* @example
|
|
9
9
|
* // The `filters` object is a reserved payload key to transfer the metadata dict over the wire.
|
|
10
10
|
* api.getCanvases({
|
|
11
11
|
* search: 'my search query',
|
|
@@ -16,20 +16,19 @@ import { PaginatedData } from '../../../types/paginatedData';
|
|
|
16
16
|
* },
|
|
17
17
|
* fields: 'id,name,metadata',
|
|
18
18
|
* })
|
|
19
|
-
* ```
|
|
20
19
|
*/
|
|
21
20
|
export declare function getCanvases(payload: GetCanvasesParams & {
|
|
22
21
|
filters?: Record<string, any>;
|
|
23
22
|
fields?: string;
|
|
24
|
-
}): Promise<PaginatedData<
|
|
25
|
-
export declare function createCanvas(payload: Omit<CanvasCreateRequest, 'instance_id'>): Promise<
|
|
23
|
+
}): Promise<PaginatedData<CanvasRetrieve>>;
|
|
24
|
+
export declare function createCanvas(payload: Omit<CanvasCreateRequest, 'instance_id'>): Promise<CanvasRetrieve>;
|
|
26
25
|
export declare function deleteCanvas(payload: {
|
|
27
|
-
id:
|
|
28
|
-
}): Promise<
|
|
26
|
+
id: CanvasRetrieve['id'];
|
|
27
|
+
}): Promise<CanvasRetrieve>;
|
|
29
28
|
/**
|
|
30
29
|
* Updates a canvas by ID
|
|
31
30
|
*
|
|
32
|
-
*
|
|
31
|
+
* @example
|
|
33
32
|
* // The fields param is appended to the URL as a query param.
|
|
34
33
|
* onMounted(() => {
|
|
35
34
|
* PitcherAPI.updateCanvas({
|
|
@@ -40,17 +39,16 @@ export declare function deleteCanvas(payload: {
|
|
|
40
39
|
* console.log(res) // logs: { id: '01HH4RCBH631K4JDHWAQB0RPR6', name: 'To 3!' }
|
|
41
40
|
* })
|
|
42
41
|
* })
|
|
43
|
-
* ```
|
|
44
42
|
*/
|
|
45
43
|
export declare function updateCanvas(payload: PatchedCanvasUpdateRequest & {
|
|
46
|
-
id:
|
|
44
|
+
id: CanvasRetrieve['id'];
|
|
47
45
|
instance_id?: Instance['id'];
|
|
48
46
|
fields?: string;
|
|
49
|
-
}): Promise<
|
|
47
|
+
}): Promise<CanvasRetrieve>;
|
|
50
48
|
export declare function getCanvas(payload: {
|
|
51
|
-
id:
|
|
49
|
+
id: CanvasRetrieve['id'];
|
|
52
50
|
fields?: string;
|
|
53
|
-
}): Promise<
|
|
51
|
+
}): Promise<CanvasRetrieve>;
|
|
54
52
|
export declare function shareCanvas(payload: {
|
|
55
|
-
id:
|
|
53
|
+
id: CanvasRetrieve['id'];
|
|
56
54
|
}): Promise<SharedLink>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { DsrEnv } from './types.dsr';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* Fetches the necessary info for the app to know where it is embedded.
|
|
4
|
+
* Fetches the necessary info for the app to know where it is embedded.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
6
|
+
* Check out [usePitcherApi().getEnv()](../internal/functions/createHighLevelApi.md#getenv) for more information.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
7
9
|
* useDsr().getEnv()
|
|
8
|
-
* ```
|
|
9
10
|
*/
|
|
10
11
|
export declare function getEnv(): Promise<DsrEnv>;
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { DSR_MESSAGE_TYPES, DsrMessagePayloads } from './types.dsr';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Subscribe to a given event type by its key.
|
|
5
|
+
*
|
|
6
|
+
* @param type The event type/key to subscribe to.
|
|
7
|
+
* @param handler The handler function to call when the event is emitted.
|
|
8
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event.
|
|
9
|
+
*/
|
|
10
|
+
declare function on(type: (typeof DSR_MESSAGE_TYPES)[keyof typeof DSR_MESSAGE_TYPES], handler: (data: DsrMessagePayloads[typeof type]) => Promise<void>): Promise<() => void>;
|
|
11
|
+
declare const _default: {
|
|
12
|
+
embeddable_ready(): Promise<void>;
|
|
13
|
+
getEnv(): Promise<import('./types.dsr').DsrEnv>;
|
|
14
|
+
on: typeof on;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|