@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,7 @@
|
|
|
1
1
|
import { Ref, ComputedRef } from 'vue';
|
|
2
2
|
import { GetInstanceMetadataTemplatesPayload } from '../../sdk/payload.types';
|
|
3
3
|
import { CanvasType } from '../../types/canvases';
|
|
4
|
-
import { PaginatedMetadataTemplateList,
|
|
4
|
+
import { PaginatedMetadataTemplateList, CanvasRetrieve } from '../../../types/openapi';
|
|
5
5
|
|
|
6
6
|
interface BaseBulkProps {
|
|
7
7
|
selectedRows: Ref<Record<string, boolean>>;
|
|
@@ -18,17 +18,17 @@ interface BulkUpdateMetadataDialogProps extends BaseBulkProps {
|
|
|
18
18
|
canvasType: Extract<CanvasType, 'canvas' | 'section'>;
|
|
19
19
|
}
|
|
20
20
|
interface BulkDeleteDialogProps extends BaseBulkProps {
|
|
21
|
-
filteredData: ComputedRef<
|
|
21
|
+
filteredData: ComputedRef<CanvasRetrieve[]>;
|
|
22
22
|
isBulkDeleting: Ref<boolean>;
|
|
23
23
|
canvasType: CanvasType;
|
|
24
|
-
isReadonly?: (canvas:
|
|
24
|
+
isReadonly?: (canvas: CanvasRetrieve) => boolean;
|
|
25
25
|
content?: string;
|
|
26
26
|
}
|
|
27
27
|
interface BulkTagsProps extends BaseBulkProps {
|
|
28
|
-
filteredData: ComputedRef<
|
|
28
|
+
filteredData: ComputedRef<CanvasRetrieve[]>;
|
|
29
29
|
isBulkUpdating: Ref<boolean>;
|
|
30
30
|
canvasType: CanvasType;
|
|
31
|
-
isReadonly?: (canvas:
|
|
31
|
+
isReadonly?: (canvas: CanvasRetrieve) => boolean;
|
|
32
32
|
content?: string;
|
|
33
33
|
}
|
|
34
34
|
export default function useCanvasesManagementBulk(): {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function normalizeFilterParams(params: Record<string, any>): Record<string, any>;
|
|
2
|
-
export declare function normalizeNetworkFilterParams(params
|
|
2
|
+
export declare function normalizeNetworkFilterParams(params?: Record<string, any> | null): Record<string, any>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CanvasRetrieve, Canvas, SharedLink } from '../../../types/openapi';
|
|
2
2
|
|
|
3
3
|
export type SharingHandler = (canvasId: string) => Promise<SharedLink>;
|
|
4
|
-
declare const _default: (sharingHandler: SharingHandler
|
|
5
|
-
|
|
4
|
+
declare const _default: (sharingHandler: SharingHandler, options?: {
|
|
5
|
+
useShortUrl?: boolean;
|
|
6
|
+
}) => {
|
|
7
|
+
copySharingUrlToClipboard: (canvas: CanvasRetrieve | Canvas) => Promise<void>;
|
|
6
8
|
};
|
|
7
9
|
export default _default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Tag, Instance } from '../../types/openapi';
|
|
2
|
+
|
|
3
|
+
export default function useInstanceTagsActions(): {
|
|
4
|
+
fetchInstanceTags: ({ search, instanceId, page, pageSize, }: {
|
|
5
|
+
search: string;
|
|
6
|
+
instanceId?: Instance["id"];
|
|
7
|
+
page?: number;
|
|
8
|
+
pageSize?: number;
|
|
9
|
+
}) => Promise<Tag[]>;
|
|
10
|
+
fetchAllInstanceTags: ({ search, instanceId }: {
|
|
11
|
+
search?: string;
|
|
12
|
+
instanceId?: Instance["id"];
|
|
13
|
+
}) => Promise<Tag[]>;
|
|
14
|
+
};
|
|
@@ -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:
|
|
11
|
+
updateRecentFiles: (files: Partial<RecentFile>[]) => void;
|
|
12
12
|
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ColumnDef } from '@tanstack/vue-table';
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
|
+
import { TableColumnSetting } from '../components/CTableColumnsSettings/CTableColumnsSettings.vue';
|
|
4
|
+
|
|
5
|
+
export type TableSettings = {
|
|
6
|
+
columns: {
|
|
7
|
+
[key: string]: {
|
|
8
|
+
visible: boolean;
|
|
9
|
+
order: number;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export declare function useTableColumnsSettings(tableSettingsKey: string, columns: ColumnDef<Record<string, any>, any>[], excludeColumnIds?: string[]): {
|
|
14
|
+
tableColumnsSettings: ComputedRef<TableColumnSetting[]>;
|
|
15
|
+
columnsFromSettings: ComputedRef<ColumnDef<Record<string, any>, any>[]>;
|
|
16
|
+
onColumnsMove: ({ targetItemId, itemId }: {
|
|
17
|
+
targetItemId: string;
|
|
18
|
+
itemId: string;
|
|
19
|
+
}) => void;
|
|
20
|
+
onColumnsSelect: ({ id, checked }: {
|
|
21
|
+
id: string;
|
|
22
|
+
checked: boolean;
|
|
23
|
+
}) => void;
|
|
24
|
+
restoreColumns: () => void;
|
|
25
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface CanvasOverlay {
|
|
2
|
+
id: string;
|
|
3
|
+
fullscreen?: boolean;
|
|
4
|
+
edit_mode?: boolean;
|
|
5
|
+
component_id?: string;
|
|
6
|
+
section_id?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: () => {
|
|
9
|
+
isCanvasOverlayOpen: import('vue').ComputedRef<boolean>;
|
|
10
|
+
initialCanvas: import('vue').ComputedRef<{
|
|
11
|
+
id: string;
|
|
12
|
+
fullscreen?: boolean | undefined;
|
|
13
|
+
edit_mode?: boolean | undefined;
|
|
14
|
+
component_id?: string | undefined;
|
|
15
|
+
section_id?: string | undefined;
|
|
16
|
+
} | undefined>;
|
|
17
|
+
openCanvasOverlay: ({ id, fullscreen, edit_mode, component_id, section_id }: CanvasOverlay) => void;
|
|
18
|
+
closeCanvasOverlay: () => void;
|
|
19
|
+
};
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
interface PaginationPayload<T> {
|
|
2
|
+
storageKey?: string;
|
|
3
|
+
initialFilters: T;
|
|
4
|
+
initialOrdering: string;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: <T>({ storageKey, initialFilters, initialOrdering }: PaginationPayload<T>) => {
|
|
7
|
+
search: import('vue').Ref<string> | import('@vueuse/shared').RemovableRef<string>;
|
|
8
|
+
pageSize: import('vue').Ref<number> | import('@vueuse/shared').RemovableRef<number>;
|
|
9
|
+
selectedFilters: import('@vueuse/shared').RemovableRef<T> | import('vue').Ref<import('vue').UnwrapRef<T>>;
|
|
10
|
+
page: import('vue').Ref<number>;
|
|
11
|
+
ordering: import('vue').Ref<string>;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -18,6 +18,7 @@ declare const _default: () => {
|
|
|
18
18
|
create: (options: ConfirmationOptions) => import('naive-ui').DialogReactive;
|
|
19
19
|
warning: (options: ConfirmationOptions) => import('naive-ui').DialogReactive;
|
|
20
20
|
error: (options: ConfirmationOptions) => import('naive-ui').DialogReactive;
|
|
21
|
+
danger: (options: ConfirmationOptions) => import('naive-ui').DialogReactive;
|
|
21
22
|
info: (options: ConfirmationOptions) => import('naive-ui').DialogReactive;
|
|
22
23
|
};
|
|
23
24
|
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ViewCompactFolder } from '../types/files';
|
|
2
|
+
import { FileContentTypeEnum } from '../../types/openapi';
|
|
3
|
+
|
|
4
|
+
export declare function renderContentType(contentType: FileContentTypeEnum): import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
}>;
|
|
7
|
+
export declare function getFolderDescription(item: Partial<ViewCompactFolder>): string;
|
|
8
|
+
export default function useFiles(): {
|
|
9
|
+
getFolderDescription: typeof getFolderDescription;
|
|
10
|
+
renderContentType: typeof renderContentType;
|
|
11
|
+
};
|
package/lib/main.lib.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export { default as CDrawer } from './components/CDrawer/CDrawer.vue';
|
|
|
18
18
|
export { default as CDrawerContent } from './components/CDrawerContent/CDrawerContent.vue';
|
|
19
19
|
export { default as CDropdown } from './components/CDropdown/CDropdown.vue';
|
|
20
20
|
export { default as CErrorFullScreen } from './components/CError/CErrorFullScreen.vue';
|
|
21
|
+
export { default as CFileThumbnail } from './components/CFileThumbnail/CFileThumbnail.vue';
|
|
21
22
|
export { default as CIcon, type Props as CIconProps } from './components/CIcon/CIcon.vue';
|
|
22
23
|
export { default as CImage } from './components/CImage/CImage.vue';
|
|
23
24
|
export { default as CInput } from './components/CInput/CInput.vue';
|
|
@@ -87,55 +88,62 @@ export { default as CTags } from './components/CTags/CTags.vue';
|
|
|
87
88
|
export { default as CMovableWidget } from './components/CMovableWidget/CMovableWidget.vue';
|
|
88
89
|
export { default as CUserMenu } from './components/CUserMenu/CUserMenu.vue';
|
|
89
90
|
export { default as CList } from './components/CList/CList.vue';
|
|
91
|
+
export { default as CKnockNotificationsAppWrapper } from './components/CKnockNotificationsAppWrapper/CKnockNotificationsAppWrapper.vue';
|
|
92
|
+
export { default as CChip } from './components/CChip/CChip.vue';
|
|
93
|
+
export { default as CSettingsEditor } from './components/CSettingsEditor/CSettingsEditor.vue';
|
|
90
94
|
export { default as CanvasBuilderApp } from '@canvas-builder/App.vue';
|
|
91
95
|
export { type CanvasBuilderProps, CanvasBuilderMode } from '@canvas-builder/types/canvas';
|
|
92
96
|
export { default as Browser } from '@browser/App.vue';
|
|
93
97
|
export { type BrowserSectionType } from '@browser/stores/app';
|
|
94
98
|
export { default as ContentSelector } from '@content-selector/App.vue';
|
|
95
99
|
export type { SelectedPage as ContentSelectorSelectedPage, SelectedFile as ContentSelectorSelectedFile, SelectedAsset as ContentSelectorSelectedAsset, SelectedExternalLink as ContentSelectorSelectedExternalLink, ContentSelectorSelectedItem, } from '@content-selector/stores/app';
|
|
100
|
+
export { default as CanvasSelector } from '@canvas-selector/App.vue';
|
|
101
|
+
export type { CanvasSelection } from '@canvas-selector/appTypes';
|
|
96
102
|
export { default as NotesApp } from '@notes/NotesApp.vue';
|
|
97
103
|
export { default as useNotesApp } from '@notes/composables/useNotesApp';
|
|
98
104
|
export { default as useTheme } from './composables/useTheme';
|
|
99
105
|
export { default as useThemeVars } from './composables/useThemeVars';
|
|
100
106
|
export { default as useBindValidation } from './composables/useBindValidation';
|
|
107
|
+
export { default as useCanvasOverlay } from './composables/useCanvasOverlay';
|
|
101
108
|
export { default as useInfiniteScroll } from './composables/useInfiniteScroll';
|
|
102
109
|
export { default as useWindowEvents } from './composables/useWindowEvents';
|
|
103
|
-
export { default as useDetailsView } from './composables/useDetailsView';
|
|
104
110
|
export { default as useConfirmation } from './composables/useConfirmation';
|
|
105
111
|
export { default as useLocation } from './composables/useLocation';
|
|
106
112
|
export { default as useRecentFiles } from './composables/recentFiles.use';
|
|
107
113
|
export { default as useToast } from './composables/useToast';
|
|
114
|
+
export { default as useSuggestedTags } from './composables/suggestedTags.use';
|
|
108
115
|
export * from './plugins/vueQuery';
|
|
116
|
+
export * from './apps/canvas-builder/util/canvas.util';
|
|
117
|
+
export * from './apps/canvas-builder/util/tree';
|
|
118
|
+
export * from './components/filters/filter.util';
|
|
119
|
+
export * from './util/anchor';
|
|
109
120
|
export * from './util/array';
|
|
110
|
-
export * from './util/object';
|
|
111
|
-
export * from './util/userAgents';
|
|
112
|
-
export * from './util/image';
|
|
113
121
|
export * from './util/casing';
|
|
114
|
-
export * from './util/query';
|
|
115
|
-
export * from './util/reactive';
|
|
116
|
-
export * from './util/date';
|
|
117
|
-
export * from './util/number';
|
|
118
|
-
export * from './util/network';
|
|
119
|
-
export * from './util/tsHelpers';
|
|
120
122
|
export * from './util/color';
|
|
121
|
-
export * from './util/
|
|
123
|
+
export * from './util/date';
|
|
124
|
+
export * from './util/dev.util';
|
|
122
125
|
export * from './util/dom';
|
|
123
|
-
export * from './util/anchor';
|
|
124
|
-
export * from './util/translations';
|
|
125
|
-
export * from './util/message-event';
|
|
126
126
|
export * from './util/font.util';
|
|
127
|
-
export * from './util/timer';
|
|
128
|
-
export * from './components/filters/filter.util';
|
|
129
|
-
export * from './apps/canvas-builder/util/tree';
|
|
130
|
-
export * from './apps/canvas-builder/util/canvas.util';
|
|
131
|
-
export * from './util/navigation.util';
|
|
132
127
|
export * from './util/fullscreen.util';
|
|
128
|
+
export * from './util/image';
|
|
133
129
|
export * from './util/location.util';
|
|
134
|
-
export * from './util/
|
|
130
|
+
export * from './util/message-event';
|
|
131
|
+
export * from './util/navigation.util';
|
|
132
|
+
export * from './util/network';
|
|
133
|
+
export * from './util/number';
|
|
134
|
+
export * from './util/object';
|
|
135
|
+
export * from './util/query';
|
|
136
|
+
export * from './util/reactive';
|
|
137
|
+
export * from './util/timer';
|
|
138
|
+
export * from './util/translations';
|
|
139
|
+
export * from './util/tsHelpers';
|
|
140
|
+
export * from './util/user';
|
|
141
|
+
export * from './util/userAgents';
|
|
135
142
|
export * from './sdk/main';
|
|
136
143
|
export * from '../types/openapi';
|
|
137
144
|
export * from './components/CGlobalSearch/CGlobalSearch.types';
|
|
138
145
|
export * from './types/dataTable';
|
|
146
|
+
export * from './types/filter';
|
|
139
147
|
export * from './types/sfdc';
|
|
140
148
|
export * from './types/ts';
|
|
141
149
|
export * from './types/paginatedData';
|
|
@@ -149,13 +157,15 @@ export * from './types/vueVirtualScroller';
|
|
|
149
157
|
export * from './components/CUsersGroupsAccessManage/CUsersGroupsAccessManage.types';
|
|
150
158
|
export * from './types/translations';
|
|
151
159
|
export * from './types/organization.types';
|
|
160
|
+
export * from './types/instance.types';
|
|
152
161
|
export * from './types/iframes';
|
|
153
162
|
export * from './apps/canvas-builder/types/canvas';
|
|
154
163
|
export type * from './composables/useWindowEvents';
|
|
155
164
|
export * from './types/call';
|
|
156
165
|
export * from './types/launchDarkly.types';
|
|
157
166
|
export * from './types/toast';
|
|
158
|
-
export * from './types/instanceSettings';
|
|
167
|
+
export * from './types/instanceSettings.types';
|
|
168
|
+
export * from './types/organizationSettings.types';
|
|
159
169
|
export * from './components/CConfigEditor/CConfigEditor.types';
|
|
160
170
|
export * from './constants/cdp.const';
|
|
161
171
|
export * from './constants/uploads.const';
|
|
@@ -164,6 +174,7 @@ export * from './constants/timers.const';
|
|
|
164
174
|
export * from './constants/url.const';
|
|
165
175
|
export * from './constants/conventions.const';
|
|
166
176
|
export * from './constants/config.const';
|
|
177
|
+
export * from './constants/pitcherSettings.const';
|
|
167
178
|
export * from './api/events/events.queries';
|
|
168
179
|
export * from './api/users/users.queries';
|
|
169
180
|
export * from './api/canvases/canvases.queries';
|
|
@@ -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,24 +120,27 @@ 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
|
-
getFiles(payload: import('../payload.types').ListFilesPayload
|
|
140
|
+
getFiles(payload: import('../payload.types').ListFilesPayload & {
|
|
141
|
+
filters?: Record<string, any>;
|
|
142
|
+
fields?: string;
|
|
143
|
+
}): Promise<import('../../main.lib').PaginatedFileList>;
|
|
48
144
|
getRecentFiles(payload?: import('../payload.types').GetRecentFilesPayload): Promise<import('../../main.lib').File[]>;
|
|
49
145
|
downloadFile(payload: {
|
|
50
146
|
file_id: import('../../main.lib').File["id"];
|
|
@@ -53,7 +149,8 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
53
149
|
app_name: string;
|
|
54
150
|
}): Promise<Record<string, any>>;
|
|
55
151
|
getFile(payload: {
|
|
56
|
-
|
|
152
|
+
id?: import('../../main.lib').FileRetrieve["id"];
|
|
153
|
+
file_id?: import('../../main.lib').FileRetrieve["id"];
|
|
57
154
|
}): Promise<import('../../main.lib').FileRetrieve>;
|
|
58
155
|
updateFile(payload: import('../../main.lib').FileUpdateRequest & {
|
|
59
156
|
id: import('../../main.lib').File["id"];
|
|
@@ -68,7 +165,8 @@ export declare function createHighLevelApi(options?: ApiOptions): {
|
|
|
68
165
|
includeExpired?: boolean;
|
|
69
166
|
}): Promise<any>;
|
|
70
167
|
getUsers(payload?: import('../../main.lib').GetUsersParams): Promise<import('../../main.lib').PaginatedData<import('../../main.lib').User>>;
|
|
71
|
-
refreshServiceToken(payload
|
|
168
|
+
refreshServiceToken(payload?: import('../../main.lib').RefreshServiceTokenRequest): Promise<import('../../main.lib').RefreshServiceTokenResponse>;
|
|
169
|
+
refreshAccessToken(): any;
|
|
72
170
|
fetchDocumentInfo(payload: {
|
|
73
171
|
fileId: import('../../main.lib').File["id"];
|
|
74
172
|
}): Promise<{
|
|
@@ -1,21 +1,21 @@
|
|
|
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
|
+
import { AdminSelectCanvasesRequest, AdminSelectCanvasesResponse } from './types.admin';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Creates a new canvas.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
+
* @example
|
|
9
10
|
* adminApi.createCanvas({
|
|
10
11
|
* name: 'my new canvas';
|
|
11
12
|
* })
|
|
12
|
-
* ```
|
|
13
13
|
*/
|
|
14
|
-
export declare function createCanvas(payload: CanvasCreateRequest): Promise<
|
|
14
|
+
export declare function createCanvas(payload: CanvasCreateRequest): Promise<CanvasRetrieve>;
|
|
15
15
|
/**
|
|
16
16
|
* Fetches a list of canvases to use in your app.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
18
|
+
* @example
|
|
19
19
|
* // The `filters` object is a reserved payload key to transfer the metadata dict over the wire.
|
|
20
20
|
* adminApi.getCanvases({
|
|
21
21
|
* search: 'my search query',
|
|
@@ -26,30 +26,28 @@ export declare function createCanvas(payload: CanvasCreateRequest): Promise<Canv
|
|
|
26
26
|
* },
|
|
27
27
|
* fields: 'id,name,metadata',
|
|
28
28
|
* })
|
|
29
|
-
* ```
|
|
30
29
|
*/
|
|
31
30
|
export declare function getCanvases(payload: GetCanvasesParams & {
|
|
32
31
|
filters?: Record<string, any>;
|
|
33
32
|
fields?: string;
|
|
34
|
-
}): Promise<PaginatedData<
|
|
33
|
+
}): Promise<PaginatedData<CanvasRetrieve>>;
|
|
35
34
|
/**
|
|
36
35
|
* Fetches a canvas by id with the defined fields or all of them.
|
|
37
36
|
*
|
|
38
|
-
*
|
|
37
|
+
* @example
|
|
39
38
|
* // The `filters` object is a reserved payload key to transfer the metadata dict over the wire.
|
|
40
39
|
* adminApi.getCanvas({
|
|
41
40
|
* fields: 'id,name,metadata',
|
|
42
41
|
* })
|
|
43
|
-
* ```
|
|
44
42
|
*/
|
|
45
43
|
export declare function getCanvas(payload: {
|
|
46
|
-
id:
|
|
44
|
+
id: CanvasRetrieve['id'];
|
|
47
45
|
fields?: string;
|
|
48
|
-
}): Promise<
|
|
46
|
+
}): Promise<CanvasRetrieve>;
|
|
49
47
|
/**
|
|
50
48
|
* Updates a canvas by ID and returns the defined fields or all of them.
|
|
51
49
|
*
|
|
52
|
-
*
|
|
50
|
+
* @example
|
|
53
51
|
* // The fields param is appended to the URL as a query param.
|
|
54
52
|
* onMounted(() => {
|
|
55
53
|
* adminApi.updateCanvas({
|
|
@@ -60,10 +58,50 @@ export declare function getCanvas(payload: {
|
|
|
60
58
|
* console.log(res) // logs: { id: '01HH4RCBH631K4JDHWAQB0RPR6', name: 'To 3!' }
|
|
61
59
|
* })
|
|
62
60
|
* })
|
|
63
|
-
* ```
|
|
64
61
|
*/
|
|
65
62
|
export declare function updateCanvas(payload: PatchedCanvasUpdateRequest & {
|
|
66
|
-
id:
|
|
63
|
+
id: CanvasRetrieve['id'];
|
|
67
64
|
instance_id?: Instance['id'];
|
|
68
65
|
fields?: string;
|
|
69
|
-
}): Promise<
|
|
66
|
+
}): Promise<CanvasRetrieve>;
|
|
67
|
+
/**
|
|
68
|
+
* Opens a modal to view a canvas by ID.
|
|
69
|
+
*
|
|
70
|
+
* ```
|
|
71
|
+
* onMounted(() => {
|
|
72
|
+
* adminApi.openCanvasOverlay({
|
|
73
|
+
* id: '01HH4RCBH631K4JDHWAQB0RPR6',
|
|
74
|
+
* edit_mode: false,
|
|
75
|
+
* fullscreen: true,
|
|
76
|
+
* })
|
|
77
|
+
* })
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
export declare function openCanvasOverlay(payload: {
|
|
81
|
+
id: CanvasRetrieve['id'];
|
|
82
|
+
edit_mode?: boolean;
|
|
83
|
+
fullscreen?: boolean;
|
|
84
|
+
component_id?: string;
|
|
85
|
+
section_id?: string;
|
|
86
|
+
}): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Allows the user to select (and preselect) canvases from the instance.
|
|
89
|
+
*
|
|
90
|
+
* This method allows you to prompt the user to select canvases from the CatalogIQ
|
|
91
|
+
* instance and use that canvas selection in your application.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* const api = useApi() // or useAdmin() if you know that you 're in Admin context
|
|
95
|
+
* api
|
|
96
|
+
* .selectCanvases({
|
|
97
|
+
* allowed_types: ['canvas','canvas-template','section','section-template'] // default ['canvas']
|
|
98
|
+
* selections: [
|
|
99
|
+
* { id: "01HCZ623YYRFJQ0F7B69VWE510" },
|
|
100
|
+
* { id: "02HCZ623YYRFJQ0F7B69VWE510" },
|
|
101
|
+
* ], // default []
|
|
102
|
+
* })
|
|
103
|
+
*
|
|
104
|
+
* @param payload optional payload to preselect specific canvases
|
|
105
|
+
* @returns Promise with the user action and selected canvases
|
|
106
|
+
*/
|
|
107
|
+
export declare function selectCanvases(payload?: AdminSelectCanvasesRequest): Promise<AdminSelectCanvasesResponse>;
|
|
@@ -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>;
|