@pitcher/js-api 1.21.0-beta.13 → 1.21.0-beta.14

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.
@@ -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;
13
+ edit_mode?: boolean;
14
+ component_id?: string;
15
+ section_id?: string;
16
+ } | undefined>;
17
+ openCanvasOverlay: ({ id, fullscreen, edit_mode, component_id, section_id }: CanvasOverlay) => void;
18
+ closeCanvasOverlay: () => void;
19
+ };
20
+ export default _default;
package/lib/main.lib.d.ts CHANGED
@@ -89,6 +89,7 @@ export { default as CUserMenu } from './components/CUserMenu/CUserMenu.vue';
89
89
  export { default as CList } from './components/CList/CList.vue';
90
90
  export { default as CKnockNotificationsAppWrapper } from './components/CKnockNotificationsAppWrapper/CKnockNotificationsAppWrapper.vue';
91
91
  export { default as CChip } from './components/CChip/CChip.vue';
92
+ export { default as CSettingsEditor } from './components/CSettingsEditor/CSettingsEditor.vue';
92
93
  export { default as CanvasBuilderApp } from '@canvas-builder/App.vue';
93
94
  export { type CanvasBuilderProps, CanvasBuilderMode } from '@canvas-builder/types/canvas';
94
95
  export { default as Browser } from '@browser/App.vue';
@@ -100,6 +101,7 @@ export { default as useNotesApp } from '@notes/composables/useNotesApp';
100
101
  export { default as useTheme } from './composables/useTheme';
101
102
  export { default as useThemeVars } from './composables/useThemeVars';
102
103
  export { default as useBindValidation } from './composables/useBindValidation';
104
+ export { default as useCanvasOverlay } from './composables/useCanvasOverlay';
103
105
  export { default as useInfiniteScroll } from './composables/useInfiniteScroll';
104
106
  export { default as useWindowEvents } from './composables/useWindowEvents';
105
107
  export { default as useDetailsView } from './composables/useDetailsView';
@@ -159,6 +161,7 @@ export * from './types/call';
159
161
  export * from './types/launchDarkly.types';
160
162
  export * from './types/toast';
161
163
  export * from './types/instanceSettings.types';
164
+ export * from './types/organizationSettings.types';
162
165
  export * from './components/CConfigEditor/CConfigEditor.types';
163
166
  export * from './constants/cdp.const';
164
167
  export * from './constants/uploads.const';
@@ -67,3 +67,23 @@ export declare function updateCanvas(payload: PatchedCanvasUpdateRequest & {
67
67
  instance_id?: Instance['id'];
68
68
  fields?: string;
69
69
  }): Promise<CanvasRetrieve>;
70
+ /**
71
+ * Opens a modal to view a canvas by ID.
72
+ *
73
+ * ```
74
+ * onMounted(() => {
75
+ * adminApi.openCanvasOverlay({
76
+ * id: '01HH4RCBH631K4JDHWAQB0RPR6',
77
+ * edit_mode: false,
78
+ * fullscreen: true,
79
+ * })
80
+ * })
81
+ * ```
82
+ */
83
+ export declare function openCanvasOverlay(payload: {
84
+ id: CanvasRetrieve['id'];
85
+ edit_mode?: boolean;
86
+ fullscreen?: boolean;
87
+ component_id?: string;
88
+ section_id?: string;
89
+ }): Promise<void>;
@@ -26,6 +26,13 @@ declare const _default: {
26
26
  instance_id?: import('../../../../main.lib').Instance["id"];
27
27
  fields?: string;
28
28
  }): Promise<import('../../../../main.lib').CanvasRetrieve>;
29
+ openCanvasOverlay(payload: {
30
+ id: import('../../../../main.lib').CanvasRetrieve["id"];
31
+ edit_mode?: boolean;
32
+ fullscreen?: boolean;
33
+ component_id?: string;
34
+ section_id?: string;
35
+ }): Promise<void>;
29
36
  getEnv(): Promise<import('./types.admin').AdminEnv>;
30
37
  on: typeof on;
31
38
  toast: typeof toast;
@@ -14,6 +14,7 @@ export declare const ADMIN_API_METHOD_TYPES: {
14
14
  readonly GET_APP_CONFIG: "admin_get_app_config";
15
15
  readonly GET_CANVAS: "admin_get_canvas";
16
16
  readonly GET_CANVASES: "admin_get_canvases";
17
+ readonly OPEN_CANVAS_OVERLAY: "admin_open_canvas_overlay";
17
18
  readonly GET_ENV: "admin_get_env";
18
19
  readonly GET_FILE: "admin_get_file";
19
20
  readonly GET_FILES: "admin_get_files";
@@ -7,3 +7,23 @@ export declare function app_resize(payload: UiAppResizeRequest): Promise<void>;
7
7
  export declare function canvas_navigate_next_page(): Promise<void>;
8
8
  export declare function canvas_navigate_previous_page(): Promise<void>;
9
9
  export declare function canvas_navigate_page(payload: UiCanvasNavigatePageReuqest): Promise<void>;
10
+ /**
11
+ * Opens a modal to view a canvas by ID.
12
+ *
13
+ * ```
14
+ * onMounted(() => {
15
+ * uiApi.openCanvasOverlay({
16
+ * id: '01HH4RCBH631K4JDHWAQB0RPR6',
17
+ * edit_mode: false,
18
+ * fullscreen: true,
19
+ * })
20
+ * })
21
+ * ```
22
+ */
23
+ export declare function openCanvasOverlay(payload: {
24
+ id: CanvasRetrieve['id'];
25
+ edit_mode?: boolean;
26
+ fullscreen?: boolean;
27
+ component_id?: string;
28
+ section_id?: string;
29
+ }): Promise<void>;
@@ -18,6 +18,13 @@ declare const _default: {
18
18
  canvas_navigate_next_page(): Promise<void>;
19
19
  canvas_navigate_previous_page(): Promise<void>;
20
20
  canvas_navigate_page(payload: import('../../../../main.lib').UiCanvasNavigatePageReuqest): Promise<void>;
21
+ openCanvasOverlay(payload: {
22
+ id: import('../../../../main.lib').CanvasRetrieve["id"];
23
+ edit_mode?: boolean;
24
+ fullscreen?: boolean;
25
+ component_id?: string;
26
+ section_id?: string;
27
+ }): Promise<void>;
21
28
  capture_app_error(payload: import('../../../../main.lib').UiCaptureAppErrorRequest): Promise<void>;
22
29
  update_location(payload: import('../../../../main.lib').UpdateLocationPitcherEvent): Promise<any>;
23
30
  embeddable_ready(): Promise<void>;
@@ -14,6 +14,7 @@ export declare const UI_API_METHOD_TYPES: {
14
14
  readonly UI_TOAST: "ui_toast";
15
15
  readonly UI_CAPTURE_APP_ERROR: "ui_capture_app_error";
16
16
  readonly UI_UPDATE_CANVAS: "ui_update_canvas";
17
+ readonly UI_OPEN_CANVAS_OVERLAY: "ui_open_canvas_overlay";
17
18
  readonly UI_UPDATE_LOCATION: "ui_update_location";
18
19
  readonly UI_PRESELECT_SFDC_MEETING_ID: "ui_preselect_sfdc_meeting_id";
19
20
  readonly UI_SET_POSTCALL_STYLE: "ui_set_postcall_style";
package/lib/sdk/main.d.ts CHANGED
@@ -19,6 +19,13 @@ export declare function useUi(): {
19
19
  canvas_navigate_next_page(): Promise<void>;
20
20
  canvas_navigate_previous_page(): Promise<void>;
21
21
  canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
22
+ openCanvasOverlay(payload: {
23
+ id: import('../main.lib').CanvasRetrieve["id"];
24
+ edit_mode?: boolean;
25
+ fullscreen?: boolean;
26
+ component_id?: string;
27
+ section_id?: string;
28
+ }): Promise<void>;
22
29
  capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
23
30
  update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
24
31
  embeddable_ready(): Promise<void>;
@@ -59,6 +66,13 @@ export declare function useAdmin(): {
59
66
  instance_id?: import('../main.lib').Instance["id"];
60
67
  fields?: string;
61
68
  }): Promise<import('../main.lib').CanvasRetrieve>;
69
+ openCanvasOverlay(payload: {
70
+ id: import('../main.lib').CanvasRetrieve["id"];
71
+ edit_mode?: boolean;
72
+ fullscreen?: boolean;
73
+ component_id?: string;
74
+ section_id?: string;
75
+ }): Promise<void>;
62
76
  getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
63
77
  on: (type: typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES[keyof typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES], handler: (data: import('./api/modules/admin/types.admin').AdminMessagePayloads[typeof type]) => Promise<void>) => Promise<() => void>;
64
78
  toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
@@ -220,6 +234,13 @@ export declare function useApi(options?: ApiOptions): {
220
234
  instance_id?: import('../main.lib').Instance["id"];
221
235
  fields?: string;
222
236
  }): Promise<import('../main.lib').CanvasRetrieve>;
237
+ openCanvasOverlay(payload: {
238
+ id: import('../main.lib').CanvasRetrieve["id"];
239
+ edit_mode?: boolean;
240
+ fullscreen?: boolean;
241
+ component_id?: string;
242
+ section_id?: string;
243
+ }): Promise<void>;
223
244
  getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
224
245
  on: (type: typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES[keyof typeof import('./api/modules/admin/types.admin').ADMIN_MESSAGE_TYPES], handler: (data: import('./api/modules/admin/types.admin').AdminMessagePayloads[typeof type]) => Promise<void>) => Promise<() => void>;
225
246
  toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
@@ -239,6 +260,13 @@ export declare function useApi(options?: ApiOptions): {
239
260
  canvas_navigate_next_page(): Promise<void>;
240
261
  canvas_navigate_previous_page(): Promise<void>;
241
262
  canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
263
+ openCanvasOverlay(payload: {
264
+ id: import('../main.lib').CanvasRetrieve["id"];
265
+ edit_mode?: boolean;
266
+ fullscreen?: boolean;
267
+ component_id?: string;
268
+ section_id?: string;
269
+ }): Promise<void>;
242
270
  capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
243
271
  update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
244
272
  embeddable_ready(): Promise<void>;
@@ -392,6 +420,13 @@ export declare function useApi(options?: ApiOptions): {
392
420
  canvas_navigate_next_page(): Promise<void>;
393
421
  canvas_navigate_previous_page(): Promise<void>;
394
422
  canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
423
+ openCanvasOverlay(payload: {
424
+ id: import('../main.lib').CanvasRetrieve["id"];
425
+ edit_mode?: boolean;
426
+ fullscreen?: boolean;
427
+ component_id?: string;
428
+ section_id?: string;
429
+ }): Promise<void>;
395
430
  capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
396
431
  update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
397
432
  embeddable_ready(): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/js-api",
3
- "version": "1.21.0-beta.13",
3
+ "version": "1.21.0-beta.14",
4
4
  "type": "module",
5
5
  "main": "js-api.umd.min.js",
6
6
  "module": "js-api.esm.js",
@@ -1,3 +0,0 @@
1
- export type WithRequiredProperty<Type, Key extends keyof Type> = Type & {
2
- [Property in Key]-?: Type[Property];
3
- };
@@ -1,10 +0,0 @@
1
- export declare enum TemplateActions {
2
- Copy = "duplicate",
3
- Share = "share",
4
- CreateTemplate = "createTemplate",
5
- Delete = "delete",
6
- Revisions = "revisions",
7
- Insights = "insights",
8
- Edit = "edit",
9
- Preview = "preview"
10
- }
@@ -1,6 +0,0 @@
1
- export declare function setupPinchGesture({ target, onPinchIn, onPinchOut, touches, }: {
2
- target: HTMLElement | Window;
3
- onPinchIn: () => void;
4
- onPinchOut: () => void;
5
- touches?: number;
6
- }): () => void;