@pitcher/js-api 1.21.0-beta.13 → 1.21.0-beta.15
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 +111 -6
- 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/apps/browser/stores/api.d.ts +164 -104
- package/lib/apps/browser/stores/app.d.ts +6 -1
- package/lib/apps/browser/stores/upload.d.ts +30 -30
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +508 -421
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +86 -74
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +18 -20
- package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +5 -5
- package/lib/apps/canvas-builder/composables/useInstalledEmbeddables.d.ts +4 -1
- package/lib/apps/canvas-builder/types/canvas.d.ts +1 -0
- package/lib/apps/canvas-builder/util/canvas.util.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/filters/filter.util.d.ts +1 -1
- 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 +26 -20
- package/lib/sdk/api/HighLevelApi.d.ts +95 -2
- package/lib/sdk/api/modules/admin/canvas.admin.d.ts +24 -8
- package/lib/sdk/api/modules/admin/env.admin.d.ts +3 -2
- package/lib/sdk/api/modules/admin/files.admin.d.ts +10 -10
- package/lib/sdk/api/modules/admin/index.d.ts +20 -0
- package/lib/sdk/api/modules/admin/metadataTemplates.admin.d.ts +1 -2
- package/lib/sdk/api/modules/admin/types.admin.d.ts +94 -0
- package/lib/sdk/api/modules/canvas.d.ts +2 -4
- package/lib/sdk/api/modules/dsr/env.dsr.d.ts +4 -3
- package/lib/sdk/api/modules/dsr/index.d.ts +7 -0
- 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 +1 -2
- 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 +73 -0
- package/lib/sdk/api/modules/ui/content.ui.d.ts +36 -3
- package/lib/sdk/api/modules/ui/index.d.ts +114 -0
- 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 +60 -0
- package/lib/sdk/api/modules/users.d.ts +4 -0
- package/lib/sdk/interfaces.d.ts +117 -0
- package/lib/sdk/main.d.ts +102 -6
- package/lib/sdk/payload.types.d.ts +132 -0
- package/lib/types/app.d.ts +11 -0
- 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 +4 -5
- package/types/openapi/models/AccessTypeEnum.d.ts +3 -1
- package/types/openapi/models/Canvas.d.ts +1 -0
- package/types/openapi/models/CanvasCreate.d.ts +1 -0
- package/types/openapi/models/CanvasCreateRequest.d.ts +1 -0
- package/types/openapi/models/CanvasRetrieve.d.ts +1 -0
- package/types/openapi/models/CanvasUpdate.d.ts +1 -0
- package/types/openapi/models/CanvasUpdateRequest.d.ts +1 -0
- package/types/openapi/models/DeletedCanvas.d.ts +1 -0
- package/types/openapi/models/DeletedFolder.d.ts +3 -3
- package/types/openapi/models/Folder.d.ts +3 -3
- package/types/openapi/models/FolderCanvas.d.ts +11 -0
- package/types/openapi/models/FolderCreate.d.ts +7 -7
- package/types/openapi/models/FolderCreateRequest.d.ts +3 -2
- package/types/openapi/models/FolderFile.d.ts +2 -0
- package/types/openapi/models/FolderFolder.d.ts +4 -2
- package/types/openapi/models/FolderRetrieve.d.ts +7 -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 +7 -8
- package/types/openapi/models/FolderUpdateRequest.d.ts +2 -0
- package/types/openapi/models/OperatorEnum.d.ts +64 -0
- package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +1 -0
- package/types/openapi/models/PatchedFolderUpdateRequest.d.ts +2 -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/FileRequest.d.ts +0 -16
- 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/js-api.esm.js
CHANGED
|
@@ -2974,13 +2974,10 @@ function createHttpClient(origin, token) {
|
|
|
2974
2974
|
}
|
|
2975
2975
|
|
|
2976
2976
|
function normalizeNetworkFilterParams(params) {
|
|
2977
|
+
if (!params) return {};
|
|
2977
2978
|
return Object.entries(params).reduce(
|
|
2978
2979
|
(acc, [key, value]) => {
|
|
2979
|
-
|
|
2980
|
-
acc[key] = value.join(",");
|
|
2981
|
-
} else {
|
|
2982
|
-
acc[key] = value;
|
|
2983
|
-
}
|
|
2980
|
+
acc[key] = key.endsWith("__range") && Array.isArray(value) ? value.join(",") : value;
|
|
2984
2981
|
return acc;
|
|
2985
2982
|
},
|
|
2986
2983
|
{}
|
|
@@ -3177,15 +3174,105 @@ function createHighLevelApi(options) {
|
|
|
3177
3174
|
return {
|
|
3178
3175
|
API,
|
|
3179
3176
|
...modules,
|
|
3177
|
+
/**
|
|
3178
|
+
* Subscribe to a given event type by its key.
|
|
3179
|
+
*
|
|
3180
|
+
* @param {string} type - The event type to subscribe to.
|
|
3181
|
+
* @param {(payload: PitcherEvent) => void} callback - The callback function to handle the event.
|
|
3182
|
+
* @returns A Promise resolving to a cleanup function to unsubscribe from the event. * @example
|
|
3183
|
+
*
|
|
3184
|
+
* @example
|
|
3185
|
+
* const unsubscribeFromSectionListUpdate = usePitcherApi().on('entered_fullscreen', (event: object) => {
|
|
3186
|
+
* // handle event
|
|
3187
|
+
* })
|
|
3188
|
+
* // later
|
|
3189
|
+
* unsubscribeFromSectionListUpdate()
|
|
3190
|
+
*/
|
|
3180
3191
|
on: (type, callback) => eventEmitter.on(type, callback),
|
|
3192
|
+
/**
|
|
3193
|
+
* Unsubscribe from a given event type by its key and the attached callback reference.
|
|
3194
|
+
* @param {string} type - The event type to unsubscribe from.
|
|
3195
|
+
* @param {(payload: PitcherEvent) => void} callback - The callback function reference to remove.
|
|
3196
|
+
*
|
|
3197
|
+
* @example
|
|
3198
|
+
* const callback = (event: object) => {
|
|
3199
|
+
* // handle event
|
|
3200
|
+
* }
|
|
3201
|
+
* usePitcherApi().on('entered_fullscreen', callback)
|
|
3202
|
+
* // later
|
|
3203
|
+
* usePitcherApi().off('entered_fullscreen', callback)
|
|
3204
|
+
*/
|
|
3181
3205
|
off: (type, callback) => eventEmitter.off(type, callback),
|
|
3206
|
+
/**
|
|
3207
|
+
* Make the entire CatalogIQ fullscreen.
|
|
3208
|
+
*
|
|
3209
|
+
* @example
|
|
3210
|
+
* usePitcherApi().enterFullscreen()
|
|
3211
|
+
*/
|
|
3182
3212
|
enterFullscreen: () => API.request("enter_fullscreen"),
|
|
3213
|
+
/**
|
|
3214
|
+
* Exit fullscreen mode.
|
|
3215
|
+
*
|
|
3216
|
+
* @example
|
|
3217
|
+
* usePitcherApi().exitFullscreen()
|
|
3218
|
+
*/
|
|
3183
3219
|
exitFullscreen: () => API.request("exit_fullscreen"),
|
|
3220
|
+
/**
|
|
3221
|
+
* Return is CatalogIQ in fullscreen.
|
|
3222
|
+
*
|
|
3223
|
+
* @example
|
|
3224
|
+
* usePitcherApi().isFullscreen()
|
|
3225
|
+
*/
|
|
3226
|
+
isFullscreen: () => API.request("is_fullscreen"),
|
|
3227
|
+
/**
|
|
3228
|
+
* Log out the current user.
|
|
3229
|
+
*
|
|
3230
|
+
* @example
|
|
3231
|
+
* usePitcherApi().logout()
|
|
3232
|
+
*/
|
|
3184
3233
|
logout: () => API.request("logout"),
|
|
3234
|
+
/**
|
|
3235
|
+
* Quit the current instance and go to the instance selection screen.
|
|
3236
|
+
*
|
|
3237
|
+
* @example
|
|
3238
|
+
* usePitcherApi().quitInstance()
|
|
3239
|
+
*/
|
|
3185
3240
|
quitInstance: () => API.request("quit_instance"),
|
|
3241
|
+
/**
|
|
3242
|
+
* Get the request types.
|
|
3243
|
+
*
|
|
3244
|
+
* @returns {Promise<any>}
|
|
3245
|
+
*/
|
|
3186
3246
|
getRequestTypes: () => API.request("get_request_types"),
|
|
3247
|
+
/**
|
|
3248
|
+
* Broadcast an event to CatalogIQ.
|
|
3249
|
+
* @param {PitcherEvent} event - The event to broadcast.
|
|
3250
|
+
*
|
|
3251
|
+
* @example
|
|
3252
|
+
* usePitcherApi()
|
|
3253
|
+
* .broadcast({
|
|
3254
|
+
* type: "canvas_updated",
|
|
3255
|
+
* body: { context: { myContextProperty: 'test' } },
|
|
3256
|
+
* })
|
|
3257
|
+
* .then(function (result) {
|
|
3258
|
+
* useUi().toast({
|
|
3259
|
+
* message: "Canvas Populated.",
|
|
3260
|
+
* type: "info",
|
|
3261
|
+
* })
|
|
3262
|
+
* })
|
|
3263
|
+
*/
|
|
3187
3264
|
broadcast: (event) => API.request("broadcast", event),
|
|
3265
|
+
/**
|
|
3266
|
+
* Subscribe to updates.
|
|
3267
|
+
*
|
|
3268
|
+
* @returns {Promise<void>}
|
|
3269
|
+
*/
|
|
3188
3270
|
subscribe: () => API.request("subscribe"),
|
|
3271
|
+
/**
|
|
3272
|
+
* Unsubscribe from updates.
|
|
3273
|
+
*
|
|
3274
|
+
* @returns {Promise<void>}
|
|
3275
|
+
*/
|
|
3189
3276
|
unsubscribe: () => API.request("unsubscribe")
|
|
3190
3277
|
};
|
|
3191
3278
|
}
|
|
@@ -3204,12 +3291,14 @@ const UI_API_METHOD_TYPES = {
|
|
|
3204
3291
|
UI_TOAST: "ui_toast",
|
|
3205
3292
|
UI_CAPTURE_APP_ERROR: "ui_capture_app_error",
|
|
3206
3293
|
UI_UPDATE_CANVAS: "ui_update_canvas",
|
|
3294
|
+
UI_OPEN_CANVAS_OVERLAY: "ui_open_canvas_overlay",
|
|
3207
3295
|
UI_UPDATE_LOCATION: "ui_update_location",
|
|
3208
3296
|
UI_PRESELECT_SFDC_MEETING_ID: "ui_preselect_sfdc_meeting_id",
|
|
3209
3297
|
UI_SET_POSTCALL_STYLE: "ui_set_postcall_style",
|
|
3210
3298
|
UI_ENABLE_POSTCALL_SUBMIT: "ui_enable_postcall_submit",
|
|
3211
3299
|
UI_DISABLE_POSTCALL_SUBMIT: "ui_disable_postcall_submit",
|
|
3212
3300
|
UI_COMPLETE_POSTCALL: "ui_complete_postcall",
|
|
3301
|
+
UI_STOP_MEETING: "ui_stop_meeting",
|
|
3213
3302
|
UI_CANVAS_NAVIGATE_NEXT_PAGE: "ui_canvas_navigate_next_page",
|
|
3214
3303
|
UI_CANVAS_NAVIGATE_PREVIOUS_PAGE: "ui_canvas_navigate_previous_page",
|
|
3215
3304
|
UI_CANVAS_NAVIGATE_PAGE: "ui_canvas_navigate_page",
|
|
@@ -3317,6 +3406,10 @@ async function canvas_navigate_page(payload) {
|
|
|
3317
3406
|
const pr = await usePostRobot();
|
|
3318
3407
|
pr.send(window.parent, UI_API_METHOD_TYPES.UI_CANVAS_NAVIGATE_PAGE, payload);
|
|
3319
3408
|
}
|
|
3409
|
+
async function openCanvasOverlay$1(payload) {
|
|
3410
|
+
const pr = await usePostRobot();
|
|
3411
|
+
await pr.send(window.parent, UI_API_METHOD_TYPES.UI_OPEN_CANVAS_OVERLAY, payload);
|
|
3412
|
+
}
|
|
3320
3413
|
|
|
3321
3414
|
const canvasUi = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
3322
3415
|
__proto__: null,
|
|
@@ -3325,6 +3418,7 @@ const canvasUi = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
3325
3418
|
canvas_navigate_next_page,
|
|
3326
3419
|
canvas_navigate_page,
|
|
3327
3420
|
canvas_navigate_previous_page,
|
|
3421
|
+
openCanvasOverlay: openCanvasOverlay$1,
|
|
3328
3422
|
update_canvas
|
|
3329
3423
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
3330
3424
|
|
|
@@ -3332,6 +3426,10 @@ async function complete_postcall(payload) {
|
|
|
3332
3426
|
const pr = await usePostRobot();
|
|
3333
3427
|
pr.send(window.parent, UI_API_METHOD_TYPES.UI_COMPLETE_POSTCALL, payload);
|
|
3334
3428
|
}
|
|
3429
|
+
async function stop_meeting() {
|
|
3430
|
+
const pr = await usePostRobot();
|
|
3431
|
+
pr.send(window.parent, UI_API_METHOD_TYPES.UI_STOP_MEETING);
|
|
3432
|
+
}
|
|
3335
3433
|
async function enable_postcall_submit() {
|
|
3336
3434
|
const pr = await usePostRobot();
|
|
3337
3435
|
pr.send(window.parent, UI_API_METHOD_TYPES.UI_ENABLE_POSTCALL_SUBMIT);
|
|
@@ -3350,7 +3448,8 @@ const postCallUi = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty
|
|
|
3350
3448
|
complete_postcall,
|
|
3351
3449
|
disable_postcall_submit,
|
|
3352
3450
|
enable_postcall_submit,
|
|
3353
|
-
set_postcall_style
|
|
3451
|
+
set_postcall_style,
|
|
3452
|
+
stop_meeting
|
|
3354
3453
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
3355
3454
|
|
|
3356
3455
|
async function on_native(type, handler) {
|
|
@@ -3421,6 +3520,7 @@ const ADMIN_API_METHOD_TYPES = {
|
|
|
3421
3520
|
GET_APP_CONFIG: "admin_get_app_config",
|
|
3422
3521
|
GET_CANVAS: "admin_get_canvas",
|
|
3423
3522
|
GET_CANVASES: "admin_get_canvases",
|
|
3523
|
+
OPEN_CANVAS_OVERLAY: "admin_open_canvas_overlay",
|
|
3424
3524
|
GET_ENV: "admin_get_env",
|
|
3425
3525
|
GET_FILE: "admin_get_file",
|
|
3426
3526
|
GET_FILES: "admin_get_files",
|
|
@@ -3461,12 +3561,17 @@ async function updateCanvas(payload) {
|
|
|
3461
3561
|
const r = await pr.send(window.parent, ADMIN_API_METHOD_TYPES.UPDATE_CANVAS, payload);
|
|
3462
3562
|
return r.data;
|
|
3463
3563
|
}
|
|
3564
|
+
async function openCanvasOverlay(payload) {
|
|
3565
|
+
const pr = await usePostRobot();
|
|
3566
|
+
await pr.send(window.parent, ADMIN_API_METHOD_TYPES.OPEN_CANVAS_OVERLAY, payload);
|
|
3567
|
+
}
|
|
3464
3568
|
|
|
3465
3569
|
const canvasAdmin = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
3466
3570
|
__proto__: null,
|
|
3467
3571
|
createCanvas,
|
|
3468
3572
|
getCanvas,
|
|
3469
3573
|
getCanvases,
|
|
3574
|
+
openCanvasOverlay,
|
|
3470
3575
|
updateCanvas
|
|
3471
3576
|
}, Symbol.toStringTag, { value: 'Module' }));
|
|
3472
3577
|
|