Optional
options: ApiOptionsBroadcast an event to CatalogIQ.
Make the entire CatalogIQ fullscreen.
Exit fullscreen mode.
Get the request types.
Return is CatalogIQ in fullscreen.
Log out the current user.
Unsubscribe from a given event type by its key and the attached callback reference.
Subscribe to a given event type by its key.
Quit the current instance and go to the instance selection screen.
Subscribe to updates.
Unsubscribe from updates.
Creates a new folder.
The folder creation request payload, excluding the instance_id.
A promise that resolves to the created folder.
Deletes a folder.
An object containing the ID of the folder to delete.
The ID of the folder to delete.
A promise that resolves when the folder is deleted.
Fetches a list of canvases to use in your app.
// The `filters` object is a reserved payload key to transfer the metadata dict over the wire.
api.getCanvases({
search: 'my search query',
ordering: '-created_at',
filters: {
metadata__mydaterangefiltername__range: ['2023-12-10', '2023-12-22'],
metadata__mymultiselectfiltername: ['optionAValue', 'optionCValue'],
},
fields: 'id,name,metadata',
})
Fetches the necessary info for the app to know where it is embedded.
It contains information about:
Get a list of favorites
Optional
payload: GetFavoritesParamsOptional
content_type?: FileContentTypeEnum | FileContentTypeEnum[]Filter for content types.
Optional
created_at__range?: stringRange filter for creation date.
Optional
expires_at__range?: stringRange filter for expiration date.
Optional
id__in?: stringFilter for file IDs.
Optional
type?: FileTypeEnum | FileTypeEnum[]Filter for file types.
Optional
updated_at__range?: stringRange filter for update date.
Optional
fields?: stringOptional
filters?: Record<string, any>Retrieves a folder by its ID.
An object containing the folder ID.
The ID of the folder to retrieve. Defaults to 'root'.
A promise that resolves to the retrieved folder.
Retrieves a list of folders.
The payload containing the search, ordering, filters, fields, name, page, and page_size.
A promise that resolves to the list of folders.
Optional
payload: GetInstanceMetadataTemplatesPayloadOptional
payload: GetRecentFilesPayloadOptional
payload: GetUsersParamsMoves items (files or folders) to a target folder.
The payload containing the target folder ID and items to move.
An array of items to move, each with an ID and type.
The ID of the target folder.
A promise that resolves to the updated target folder.
Open a file in the CatalogIQ instance.
Open external URL in a new tab. Works on both web and mobile.
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.
Optional
payload: RefreshServiceTokenRequestPromise resolving to an object containing the token
Renders a page from a file together with annotations.
Optional
documentId?: stringThe ID of the document to render (optional). If not provided the fileId will be used.
The ID of the file to render. Used when the documentId is not available.
The index of the page to render.
The parameters to use for rendering the page.
A promise that resolves with the image as an ArrayBuffer.
Dispatches iOS native file selector and returns the selected file.
Dispatches iOS only sync method for non-files.
Updates a canvas by ID
Updates canvas indicators by canvas ID. It merges the passed object into existing canvas indicators adding new keys if they were empty and overriding pre-existing keys.
Indicators can also be updated using updateCanvas API but in this case passed object fully replaces existing indicators.
// The fields param is appended to the URL as a query param.
onMounted(() => {
PitcherAPI.updateCanvasIndicators({
id: '01J9XT0WVXRTETF4CQZP42CPZP',
indicators: {
existing: { type: 'info', label: 'new label' }, // will be overriden
new: { type: 'info', label: 'INFO' }, // will be added
removeExisting: null // will be set to null and ignored, it is the same as removal
}
}).then((res) => {
console.log(res) // entire canvas object, including indicators field
})
})
Updates an existing folder.
The folder update payload, including the folder ID and update data.
A promise that resolves to the updated folder.
Check out the returned object documentation for the list of available methods.