@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.
Files changed (101) hide show
  1. package/js-api.esm.js +111 -6
  2. package/js-api.esm.js.map +1 -1
  3. package/js-api.umd.min.js +10 -10
  4. package/js-api.umd.min.js.map +1 -1
  5. package/lib/apps/browser/stores/api.d.ts +164 -104
  6. package/lib/apps/browser/stores/app.d.ts +6 -1
  7. package/lib/apps/browser/stores/upload.d.ts +30 -30
  8. package/lib/apps/canvas-builder/composables/useCanvas.d.ts +508 -421
  9. package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +86 -74
  10. package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +18 -20
  11. package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +5 -5
  12. package/lib/apps/canvas-builder/composables/useInstalledEmbeddables.d.ts +4 -1
  13. package/lib/apps/canvas-builder/types/canvas.d.ts +1 -0
  14. package/lib/apps/canvas-builder/util/canvas.util.d.ts +1 -0
  15. package/lib/apps/content-selector/stores/app.d.ts +8 -1
  16. package/lib/components/CFileViewer/CFileViewer.use.d.ts +2 -4
  17. package/lib/components/CFileViewer/CFileViewerFullScreen.use.d.ts +1 -1
  18. package/lib/components/filters/filter.util.d.ts +1 -1
  19. package/lib/composables/instanceTagsActions.use.d.ts +14 -0
  20. package/lib/composables/recentFiles.use.d.ts +1 -1
  21. package/lib/composables/suggestedTags.use.d.ts +3 -0
  22. package/lib/composables/tableColumnsSettings.use.d.ts +25 -0
  23. package/lib/composables/useCanvasOverlay.d.ts +20 -0
  24. package/lib/composables/useConfirmation.d.ts +1 -0
  25. package/lib/composables/useElementHeightResize.d.ts +5 -0
  26. package/lib/composables/useFiles.d.ts +11 -0
  27. package/lib/constants/pitcherSettings.const.d.ts +4 -0
  28. package/lib/main.lib.d.ts +26 -20
  29. package/lib/sdk/api/HighLevelApi.d.ts +95 -2
  30. package/lib/sdk/api/modules/admin/canvas.admin.d.ts +24 -8
  31. package/lib/sdk/api/modules/admin/env.admin.d.ts +3 -2
  32. package/lib/sdk/api/modules/admin/files.admin.d.ts +10 -10
  33. package/lib/sdk/api/modules/admin/index.d.ts +20 -0
  34. package/lib/sdk/api/modules/admin/metadataTemplates.admin.d.ts +1 -2
  35. package/lib/sdk/api/modules/admin/types.admin.d.ts +94 -0
  36. package/lib/sdk/api/modules/canvas.d.ts +2 -4
  37. package/lib/sdk/api/modules/dsr/env.dsr.d.ts +4 -3
  38. package/lib/sdk/api/modules/dsr/index.d.ts +7 -0
  39. package/lib/sdk/api/modules/dsr/loading.dsr.d.ts +6 -0
  40. package/lib/sdk/api/modules/env.d.ts +16 -0
  41. package/lib/sdk/api/modules/favorites.d.ts +9 -0
  42. package/lib/sdk/api/modules/feedback.d.ts +3 -0
  43. package/lib/sdk/api/modules/files.d.ts +1 -2
  44. package/lib/sdk/api/modules/folders.d.ts +29 -0
  45. package/lib/sdk/api/modules/open.d.ts +6 -0
  46. package/lib/sdk/api/modules/sync.d.ts +1 -2
  47. package/lib/sdk/api/modules/ui/app-errors.ui.d.ts +12 -0
  48. package/lib/sdk/api/modules/ui/canvas.ui.d.ts +73 -0
  49. package/lib/sdk/api/modules/ui/content.ui.d.ts +36 -3
  50. package/lib/sdk/api/modules/ui/index.d.ts +114 -0
  51. package/lib/sdk/api/modules/ui/loading.ui.d.ts +15 -0
  52. package/lib/sdk/api/modules/ui/location.ui.d.ts +17 -0
  53. package/lib/sdk/api/modules/ui/post-call.ui.d.ts +25 -0
  54. package/lib/sdk/api/modules/ui/types.ui.d.ts +60 -0
  55. package/lib/sdk/api/modules/users.d.ts +4 -0
  56. package/lib/sdk/interfaces.d.ts +117 -0
  57. package/lib/sdk/main.d.ts +102 -6
  58. package/lib/sdk/payload.types.d.ts +132 -0
  59. package/lib/types/app.d.ts +11 -0
  60. package/lib/types/filter.d.ts +5 -0
  61. package/lib/types/instanceSettings.types.d.ts +8 -2
  62. package/lib/types/launchDarkly.types.d.ts +4 -4
  63. package/lib/types/organizationSettings.types.d.ts +4 -0
  64. package/lib/types/recentFiles.types.d.ts +4 -1
  65. package/lib/types/users.d.ts +13 -0
  66. package/lib/util/fullscreen.util.d.ts +1 -1
  67. package/lib/util/string.d.ts +1 -0
  68. package/package.json +1 -1
  69. package/types/openapi/index.d.ts +4 -5
  70. package/types/openapi/models/AccessTypeEnum.d.ts +3 -1
  71. package/types/openapi/models/Canvas.d.ts +1 -0
  72. package/types/openapi/models/CanvasCreate.d.ts +1 -0
  73. package/types/openapi/models/CanvasCreateRequest.d.ts +1 -0
  74. package/types/openapi/models/CanvasRetrieve.d.ts +1 -0
  75. package/types/openapi/models/CanvasUpdate.d.ts +1 -0
  76. package/types/openapi/models/CanvasUpdateRequest.d.ts +1 -0
  77. package/types/openapi/models/DeletedCanvas.d.ts +1 -0
  78. package/types/openapi/models/DeletedFolder.d.ts +3 -3
  79. package/types/openapi/models/Folder.d.ts +3 -3
  80. package/types/openapi/models/FolderCanvas.d.ts +11 -0
  81. package/types/openapi/models/FolderCreate.d.ts +7 -7
  82. package/types/openapi/models/FolderCreateRequest.d.ts +3 -2
  83. package/types/openapi/models/FolderFile.d.ts +2 -0
  84. package/types/openapi/models/FolderFolder.d.ts +4 -2
  85. package/types/openapi/models/FolderRetrieve.d.ts +7 -8
  86. package/types/openapi/models/FolderRule.d.ts +7 -0
  87. package/types/openapi/models/FolderRuleRequest.d.ts +7 -0
  88. package/types/openapi/models/FolderUpdate.d.ts +7 -8
  89. package/types/openapi/models/FolderUpdateRequest.d.ts +2 -0
  90. package/types/openapi/models/OperatorEnum.d.ts +64 -0
  91. package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +1 -0
  92. package/types/openapi/models/PatchedFolderUpdateRequest.d.ts +2 -0
  93. package/lib/apps/canvas-builder/util/tsUtils.d.ts +0 -3
  94. package/lib/composables/useDetailsView.d.ts +0 -19
  95. package/lib/types/templateActions.d.ts +0 -10
  96. package/lib/util/gesture.util.d.ts +0 -6
  97. package/types/openapi/models/FileRequest.d.ts +0 -16
  98. package/types/openapi/models/PSPDFKitAuthPayload.d.ts +0 -3
  99. package/types/openapi/models/PSPDFKitAuthPayloadRequest.d.ts +0 -3
  100. package/types/openapi/models/PSPDFKitToken.d.ts +0 -7
  101. package/types/openapi/models/PSPDFKitTokenRequest.d.ts +0 -3
@@ -111,54 +111,171 @@ export declare enum PitcherExternalEventName {
111
111
  OPEN_CANVAS = "open_canvas",
112
112
  START_CALL = "start_call"
113
113
  }
114
+ /**
115
+ * Base interface for update location actions.
116
+ */
114
117
  interface UpdateLocation {
118
+ /**
119
+ * The action to be performed.
120
+ */
115
121
  action: string;
116
122
  }
123
+ /**
124
+ * Represents a route in the location.
125
+ */
117
126
  export interface LocationRoute {
127
+ /**
128
+ * The path of the route.
129
+ */
118
130
  path: string;
131
+ /**
132
+ * The query parameters of the route.
133
+ */
119
134
  query: Record<string, any>;
135
+ /**
136
+ * Indicates if the route is being restored.
137
+ */
120
138
  is_restoring: boolean;
139
+ /**
140
+ * Indicates if the route is mounted.
141
+ */
121
142
  is_mounted: boolean;
122
143
  }
144
+ /**
145
+ * A record of location routes.
146
+ */
123
147
  export type LocationRoutes = Record<string, LocationRoute>;
148
+ /**
149
+ * Interface for the 'register' update location action.
150
+ */
124
151
  export interface UpdateLocationOnRegister extends UpdateLocation {
152
+ /**
153
+ * The action type.
154
+ */
125
155
  action: 'register';
156
+ /**
157
+ * The child application identifier.
158
+ */
126
159
  child_app: string;
160
+ /**
161
+ * The parent application identifier (optional).
162
+ */
127
163
  parent_app?: string;
164
+ /**
165
+ * The path of the route (optional).
166
+ */
128
167
  path?: string;
168
+ /**
169
+ * The query parameters of the route (optional).
170
+ */
129
171
  query?: Record<string, any>;
130
172
  }
173
+ /**
174
+ * Interface for the 'unregister' update location action.
175
+ */
131
176
  export interface UpdateLocationOnUnregister extends UpdateLocation {
177
+ /**
178
+ * The action type.
179
+ */
132
180
  action: 'unregister';
181
+ /**
182
+ * The application identifier.
183
+ */
133
184
  app: string;
134
185
  }
186
+ /**
187
+ * Interface for the 'update' update location action.
188
+ */
135
189
  export interface UpdateLocationOnUpdate extends UpdateLocation {
190
+ /**
191
+ * The action type.
192
+ */
136
193
  action: 'update';
194
+ /**
195
+ * The routes to be updated.
196
+ */
137
197
  routes: Record<string, Omit<LocationRoute, 'is_restoring' | 'is_mounted'>>;
138
198
  }
199
+ /**
200
+ * Interface for the 'mounted' update location action.
201
+ */
139
202
  export interface UpdateLocationOnMounted extends UpdateLocation {
203
+ /**
204
+ * The action type.
205
+ */
140
206
  action: 'mounted';
207
+ /**
208
+ * The application identifier.
209
+ */
141
210
  app: string;
142
211
  }
212
+ /**
213
+ * Interface for the 'restore' update location action.
214
+ */
143
215
  export interface UpdateLocationOnRestore extends UpdateLocation {
216
+ /**
217
+ * The action type.
218
+ */
144
219
  action: 'restore';
220
+ /**
221
+ * The routes to be restored.
222
+ */
145
223
  routes: Record<string, Omit<LocationRoute, 'is_mounted'>>;
146
224
  }
225
+ /**
226
+ * Interface for the 'restore_completed' update location action.
227
+ */
147
228
  export interface UpdateLocationOnRestoreCompleted extends UpdateLocation {
229
+ /**
230
+ * The action type.
231
+ */
148
232
  action: 'restore_completed';
233
+ /**
234
+ * The application identifier.
235
+ */
149
236
  app: string;
237
+ /**
238
+ * The path of the route.
239
+ */
150
240
  path: string;
241
+ /**
242
+ * The query parameters of the route.
243
+ */
151
244
  query: Record<string, any>;
152
245
  }
246
+ /**
247
+ * Interface for the 'get_routes_request' update location action.
248
+ */
153
249
  export interface UpdateLocationOnGetRoutesRequest extends UpdateLocation {
250
+ /**
251
+ * The action type.
252
+ */
154
253
  action: 'get_routes_request';
254
+ /**
255
+ * The application identifier.
256
+ */
155
257
  app: string;
156
258
  }
259
+ /**
260
+ * Interface for the 'get_routes_response' update location action.
261
+ */
157
262
  export interface UpdateLocationOnGetRoutesResponse extends UpdateLocation {
263
+ /**
264
+ * The action type.
265
+ */
158
266
  action: 'get_routes_response';
267
+ /**
268
+ * The application identifier.
269
+ */
159
270
  app: string;
271
+ /**
272
+ * The routes in the response.
273
+ */
160
274
  routes: LocationRoutes;
161
275
  }
276
+ /**
277
+ * Union type for all update location pitcher events.
278
+ */
162
279
  export type UpdateLocationPitcherEvent = UpdateLocationOnUnregister | UpdateLocationOnRestore | UpdateLocationOnUpdate | UpdateLocationOnRegister | UpdateLocationOnRestoreCompleted | UpdateLocationOnMounted | UpdateLocationOnGetRoutesRequest | UpdateLocationOnGetRoutesResponse;
163
280
  export interface PitcherEventMap {
164
281
  [PitcherEventName.ENV_CHANGED]: PitcherEnv;
package/lib/sdk/main.d.ts CHANGED
@@ -7,9 +7,26 @@ export * from './api/modules/ui/types.ui';
7
7
  export * from './api/modules/admin/types.admin';
8
8
  export * from './api/modules/dsr/types.dsr';
9
9
  export declare let highLevelApi: ReturnType<typeof createHighLevelApi>;
10
+ /**
11
+ * Check out the returned object documentation for the list of available methods.
12
+ */
10
13
  export declare function usePitcherApi(options?: ApiOptions): ReturnType<typeof createHighLevelApi>;
14
+ /**
15
+ * API methods available in the CatalogIQ default UI.
16
+ *
17
+ * You can store the API object in a variable and call the methods directly.
18
+ *
19
+ * Most methods have a `snake_case` and `camelCase` version of their name available.
20
+ *
21
+ * ```ts
22
+ * const uiApi = useUi()
23
+ * ```
24
+ *
25
+ * @returns UI API object with methods described below.
26
+ */
11
27
  export declare function useUi(): {
12
28
  complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
29
+ stop_meeting(): Promise<void>;
13
30
  enable_postcall_submit(): Promise<void>;
14
31
  disable_postcall_submit(): Promise<void>;
15
32
  set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
@@ -19,6 +36,13 @@ export declare function useUi(): {
19
36
  canvas_navigate_next_page(): Promise<void>;
20
37
  canvas_navigate_previous_page(): Promise<void>;
21
38
  canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
39
+ openCanvasOverlay(payload: {
40
+ id: import('../main.lib').CanvasRetrieve["id"];
41
+ edit_mode?: boolean;
42
+ fullscreen?: boolean;
43
+ component_id?: string;
44
+ section_id?: string;
45
+ }): Promise<void>;
22
46
  capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
23
47
  update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
24
48
  embeddable_ready(): Promise<void>;
@@ -35,6 +59,19 @@ export declare function useUi(): {
35
59
  on_app_update_data: (handler: (data: import('./api/modules/ui/types.ui').UiAppUpdateDataPayload) => Promise<void>) => Promise<() => void>;
36
60
  ui_broadcast: (payload: import('./api/modules/ui/types.ui').UiBroadcastRequest) => Promise<void>;
37
61
  };
62
+ /**
63
+ * API methods available in the CatalogIQ Admin.
64
+ *
65
+ * You can store the API object in a variable and call the methods directly.
66
+ *
67
+ * Most methods have a `snake_case` and `camelCase` version of their name available.
68
+ *
69
+ * ```ts
70
+ * import { useAdmin } from '@pitcher/js-api'
71
+ *
72
+ * const adminApi = useAdmin()
73
+ * ```
74
+ */
38
75
  export declare function useAdmin(): {
39
76
  getAppConfig(payload: {
40
77
  app_name: string;
@@ -59,10 +96,30 @@ export declare function useAdmin(): {
59
96
  instance_id?: import('../main.lib').Instance["id"];
60
97
  fields?: string;
61
98
  }): Promise<import('../main.lib').CanvasRetrieve>;
99
+ openCanvasOverlay(payload: {
100
+ id: import('../main.lib').CanvasRetrieve["id"];
101
+ edit_mode?: boolean;
102
+ fullscreen?: boolean;
103
+ component_id?: string;
104
+ section_id?: string;
105
+ }): Promise<void>;
62
106
  getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
63
107
  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
108
  toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
65
109
  };
110
+ /**
111
+ * API methods available in the CatalogIQ default UI.
112
+ *
113
+ * You can store the API object in a variable and call the methods directly.
114
+ *
115
+ * Most methods have a `snake_case` and `camelCase` version of their name available.
116
+ *
117
+ * ```ts
118
+ * import { useDsr } from '@pitcher/js-api'
119
+ *
120
+ * const dsrApi = useDsr()
121
+ * ```
122
+ */
66
123
  export declare function useDsr(): {
67
124
  embeddable_ready(): Promise<void>;
68
125
  getEnv(): Promise<import('./api/modules/dsr/types.dsr').DsrEnv>;
@@ -70,11 +127,25 @@ export declare function useDsr(): {
70
127
  };
71
128
  export type JsApiLocation = 'ui' | 'admin' | 'dsr' | 'impact';
72
129
  export declare function getAvailableApis(): JsApiLocation[];
130
+ /**
131
+ * This method returns an object containing the API methods that are available to you in a given environment, whether that be the Canvas, UI, Admin or DSR.
132
+ *
133
+ * - CatalogIQ UI - the method will return an object containing methods available in both `usePitcherApi` and `useUi`
134
+ * - CatalogIQ DSR - the method will return the same result as `useDsr`
135
+ * - CatalogIQ Admin - the method will return the same result as `useAdmin`
136
+ *
137
+ * ```ts
138
+ * import { useApi } from '@pitcher/js-api'
139
+ *
140
+ * const api = useApi()
141
+ * ```
142
+ */
73
143
  export declare function useApi(options?: ApiOptions): {
74
144
  on: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
75
145
  off: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
76
146
  enterFullscreen: () => Promise<any>;
77
147
  exitFullscreen: () => Promise<any>;
148
+ isFullscreen: () => Promise<any>;
78
149
  logout: () => Promise<any>;
79
150
  quitInstance: () => Promise<any>;
80
151
  getRequestTypes: () => Promise<any>;
@@ -85,8 +156,8 @@ export declare function useApi(options?: ApiOptions): {
85
156
  openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
86
157
  getEnv(): Promise<import('./interfaces').PitcherEnv>;
87
158
  updateMyUser(payload: {
88
- language?: import('../main.lib').LanguageEnum;
89
- dark_mode?: boolean;
159
+ language?: import('../main.lib').LanguageEnum | undefined;
160
+ dark_mode?: boolean | undefined;
90
161
  }): Promise<import('../main.lib').User>;
91
162
  getLanguages(): Promise<import('./api/modules').Language[]>;
92
163
  getEvents(payload: Partial<import('../main.lib').EventRequest>): Promise<import('../main.lib').PaginatedData<import('../main.lib').Event>>;
@@ -220,6 +291,13 @@ export declare function useApi(options?: ApiOptions): {
220
291
  instance_id?: import('../main.lib').Instance["id"];
221
292
  fields?: string;
222
293
  }): Promise<import('../main.lib').CanvasRetrieve>;
294
+ openCanvasOverlay(payload: {
295
+ id: import('../main.lib').CanvasRetrieve["id"];
296
+ edit_mode?: boolean;
297
+ fullscreen?: boolean;
298
+ component_id?: string;
299
+ section_id?: string;
300
+ }): Promise<void>;
223
301
  getEnv(): Promise<import('./api/modules/admin/types.admin').AdminEnv>;
224
302
  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
303
  toast: (payload: import('./api/modules/admin/types.admin').AdminToastRequest) => Promise<void>;
@@ -230,6 +308,7 @@ export declare function useApi(options?: ApiOptions): {
230
308
  } | {
231
309
  ui: {
232
310
  complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
311
+ stop_meeting(): Promise<void>;
233
312
  enable_postcall_submit(): Promise<void>;
234
313
  disable_postcall_submit(): Promise<void>;
235
314
  set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
@@ -239,6 +318,13 @@ export declare function useApi(options?: ApiOptions): {
239
318
  canvas_navigate_next_page(): Promise<void>;
240
319
  canvas_navigate_previous_page(): Promise<void>;
241
320
  canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
321
+ openCanvasOverlay(payload: {
322
+ id: import('../main.lib').CanvasRetrieve["id"];
323
+ edit_mode?: boolean;
324
+ fullscreen?: boolean;
325
+ component_id?: string;
326
+ section_id?: string;
327
+ }): Promise<void>;
242
328
  capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
243
329
  update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
244
330
  embeddable_ready(): Promise<void>;
@@ -260,6 +346,7 @@ export declare function useApi(options?: ApiOptions): {
260
346
  off: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
261
347
  enterFullscreen: () => Promise<any>;
262
348
  exitFullscreen: () => Promise<any>;
349
+ isFullscreen: () => Promise<any>;
263
350
  logout: () => Promise<any>;
264
351
  quitInstance: () => Promise<any>;
265
352
  getRequestTypes: () => Promise<any>;
@@ -270,8 +357,8 @@ export declare function useApi(options?: ApiOptions): {
270
357
  openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
271
358
  getEnv(): Promise<import('./interfaces').PitcherEnv>;
272
359
  updateMyUser(payload: {
273
- language?: import('../main.lib').LanguageEnum;
274
- dark_mode?: boolean;
360
+ language?: import('../main.lib').LanguageEnum | undefined;
361
+ dark_mode?: boolean | undefined;
275
362
  }): Promise<import('../main.lib').User>;
276
363
  getLanguages(): Promise<import('./api/modules').Language[]>;
277
364
  getEvents(payload: Partial<import('../main.lib').EventRequest>): Promise<import('../main.lib').PaginatedData<import('../main.lib').Event>>;
@@ -383,6 +470,7 @@ export declare function useApi(options?: ApiOptions): {
383
470
  API: import('./api/LowLevelApi').LowLevelApi;
384
471
  };
385
472
  complete_postcall(payload: import('./api/modules/ui/types.ui').UiCompletePostcallRequest): Promise<void>;
473
+ stop_meeting(): Promise<void>;
386
474
  enable_postcall_submit(): Promise<void>;
387
475
  disable_postcall_submit(): Promise<void>;
388
476
  set_postcall_style(payload: import('./api/modules/ui/types.ui').UiSetPostcallStyleRequest): Promise<void>;
@@ -392,6 +480,13 @@ export declare function useApi(options?: ApiOptions): {
392
480
  canvas_navigate_next_page(): Promise<void>;
393
481
  canvas_navigate_previous_page(): Promise<void>;
394
482
  canvas_navigate_page(payload: import('./api/modules/ui/types.ui').UiCanvasNavigatePageReuqest): Promise<void>;
483
+ openCanvasOverlay(payload: {
484
+ id: import('../main.lib').CanvasRetrieve["id"];
485
+ edit_mode?: boolean;
486
+ fullscreen?: boolean;
487
+ component_id?: string;
488
+ section_id?: string;
489
+ }): Promise<void>;
395
490
  capture_app_error(payload: import('./api/modules/ui/types.ui').UiCaptureAppErrorRequest): Promise<void>;
396
491
  update_location(payload: import('./interfaces').UpdateLocationPitcherEvent): Promise<any>;
397
492
  embeddable_ready(): Promise<void>;
@@ -410,6 +505,7 @@ export declare function useApi(options?: ApiOptions): {
410
505
  off: (type: string, callback: (payload: import('./interfaces').PitcherEvent) => void) => void;
411
506
  enterFullscreen: () => Promise<any>;
412
507
  exitFullscreen: () => Promise<any>;
508
+ isFullscreen: () => Promise<any>;
413
509
  logout: () => Promise<any>;
414
510
  quitInstance: () => Promise<any>;
415
511
  getRequestTypes: () => Promise<any>;
@@ -419,8 +515,8 @@ export declare function useApi(options?: ApiOptions): {
419
515
  openExternalUrl(payload: import('./payload.types').OpenExternalUrlRequestPayload): Promise<void>;
420
516
  getEnv(): Promise<import('./interfaces').PitcherEnv>;
421
517
  updateMyUser(payload: {
422
- language?: import('../main.lib').LanguageEnum;
423
- dark_mode?: boolean;
518
+ language?: import('../main.lib').LanguageEnum | undefined;
519
+ dark_mode?: boolean | undefined;
424
520
  }): Promise<import('../main.lib').User>;
425
521
  getLanguages(): Promise<import('./api/modules').Language[]>;
426
522
  getEvents(payload: Partial<import('../main.lib').EventRequest>): Promise<import('../main.lib').PaginatedData<import('../main.lib').Event>>;
@@ -1,56 +1,188 @@
1
1
  import { MiniPage, File, CanvasRetrieve } from '../../types/openapi';
2
2
 
3
+ /**
4
+ * Payload for getting instance metadata templates.
5
+ */
3
6
  export interface GetInstanceMetadataTemplatesPayload {
7
+ /**
8
+ * Ordering of the metadata templates. String containing field name to order by.
9
+ */
4
10
  ordering?: string;
11
+ /**
12
+ * Page number for pagination.
13
+ */
5
14
  page?: number;
15
+ /**
16
+ * Number of items per page.
17
+ */
6
18
  page_size?: number;
19
+ /**
20
+ * Search query for filtering metadata templates.
21
+ */
7
22
  search?: string;
8
23
  }
24
+ /**
25
+ * Payload for listing files with optional filters.
26
+ */
9
27
  export type ListFilesPayload = Partial<Omit<File, 'type'>> & {
28
+ /**
29
+ * Range filter for creation date.
30
+ */
10
31
  created_at__range?: string;
32
+ /**
33
+ * Range filter for expiration date.
34
+ */
11
35
  expires_at__range?: string;
36
+ /**
37
+ * Range filter for update date.
38
+ */
12
39
  updated_at__range?: string;
40
+ /**
41
+ * Filter for file IDs.
42
+ */
13
43
  id__in?: string;
44
+ /**
45
+ * Filter for file types.
46
+ */
14
47
  type?: File['type'] | File['type'][];
48
+ /**
49
+ * Filter for content types.
50
+ */
15
51
  content_type?: File['content_type'] | File['content_type'][];
16
52
  };
53
+ /**
54
+ * Payload for getting recent files.
55
+ */
17
56
  export type GetRecentFilesPayload = {
57
+ /**
58
+ * Number of recent files to retrieve.
59
+ */
18
60
  size?: number;
19
61
  };
62
+ /**
63
+ * Payload for sending a notification.
64
+ */
20
65
  export interface NotificationPayload {
66
+ /**
67
+ * Content of the notification.
68
+ */
21
69
  content: string;
70
+ /**
71
+ * Type of the notification.
72
+ */
22
73
  type?: 'native' | 'alert';
23
74
  }
75
+ /**
76
+ * Payload for executing a query.
77
+ */
24
78
  export interface QueryPayload {
79
+ /**
80
+ * The query string to execute.
81
+ */
25
82
  query: string;
83
+ /**
84
+ * Optional arguments for the query.
85
+ */
26
86
  args?: string[][];
27
87
  }
88
+ /**
89
+ * Payload for submitting user feedback.
90
+ */
28
91
  export interface SubmitUserFeedbackPayload {
92
+ /**
93
+ * Type of feedback being submitted.
94
+ */
29
95
  type: 'bug' | 'feedback';
96
+ /**
97
+ * Data associated with the feedback.
98
+ */
30
99
  data: Record<string, any>;
31
100
  }
101
+ /**
102
+ * Payload object for opening a file.
103
+ */
32
104
  export interface OpenRequestPayload {
105
+ /**
106
+ * Id of the file to open.
107
+ */
33
108
  fileId?: File['id'];
109
+ /**
110
+ * Id of the canvas from which the file is opened.
111
+ */
34
112
  fromCanvasId?: CanvasRetrieve['id'];
113
+ /**
114
+ * Optional, page index to open. Default is `null`.
115
+ */
35
116
  pageIndex?: MiniPage['page_index'];
117
+ /**
118
+ * URL of the file content.
119
+ */
36
120
  url?: File['content_url'];
121
+ /**
122
+ * Indicates if the canvas is in view.
123
+ */
37
124
  canvasInView?: boolean;
125
+ /**
126
+ * Indicates if the user is in a call.
127
+ */
38
128
  isInCall?: boolean;
129
+ /**
130
+ * Optional, overrides over the context of the current canvas, useful for injecting file annotation data. Default is {}.
131
+ */
39
132
  context?: Record<string, any>;
133
+ /**
134
+ * Search query string within the file.
135
+ */
40
136
  search?: string;
137
+ /**
138
+ * Indicates if the file should be opened in a new tab.
139
+ */
41
140
  newTab?: boolean;
42
141
  }
142
+ /**
143
+ * Payload object for opening an external URL.
144
+ */
43
145
  export interface OpenExternalUrlRequestPayload {
146
+ /**
147
+ * The URL to open.
148
+ */
44
149
  url: string;
150
+ /**
151
+ * The target where the URL should be opened. Defaults to '_blank'.
152
+ */
45
153
  target?: '_self' | '_blank';
154
+ /**
155
+ * Additional options for opening the URL.
156
+ */
46
157
  options?: string;
47
158
  }
159
+ /**
160
+ * Payload object for opening a web view that is always on top.
161
+ */
48
162
  export interface OpenWebViewAlwaysOnTop {
163
+ /**
164
+ * The URL to open in the web view.
165
+ */
49
166
  url: string;
167
+ /**
168
+ * Settings for the modal window.
169
+ */
50
170
  modal_settings: {
171
+ /**
172
+ * The width of the modal window.
173
+ */
51
174
  width: number;
175
+ /**
176
+ * The height of the modal window.
177
+ */
52
178
  height: number;
179
+ /**
180
+ * The y-coordinate of the modal window.
181
+ */
53
182
  y: number;
183
+ /**
184
+ * The x-coordinate of the modal window.
185
+ */
54
186
  x: number;
55
187
  };
56
188
  }
@@ -23,6 +23,16 @@ export type ModuleSettings = {
23
23
  export type EmbeddedLocationProperties = {
24
24
  start_in_loading_mode?: boolean;
25
25
  };
26
+ export type EmbeddedAppShortcut = {
27
+ id: string;
28
+ order_override?: number;
29
+ icon?: string;
30
+ };
31
+ export type EmbeddedAppShortcutsDict = {
32
+ fullscreen: EmbeddedAppShortcut[];
33
+ presentation: EmbeddedAppShortcut[];
34
+ edit: EmbeddedAppShortcut[];
35
+ };
26
36
  export type Module = {
27
37
  enabled: boolean;
28
38
  headless?: boolean;
@@ -36,6 +46,7 @@ export type Module = {
36
46
  };
37
47
  settings?: Record<string, unknown>;
38
48
  };
49
+ shortcuts: EmbeddedAppShortcutsDict;
39
50
  } & EmbeddedLocationProperties;
40
51
  export type AppJson = {
41
52
  name: string;
@@ -0,0 +1,5 @@
1
+ import { MetadataTemplateField } from '../../types/openapi';
2
+
3
+ export type MetadataTemplateFieldWithComponentName = MetadataTemplateField & {
4
+ componentName: string;
5
+ };
@@ -1,4 +1,5 @@
1
1
  import { ComponentTypes } from '../apps/canvas-builder/types/canvas';
2
+ import { OrganizationSettings } from './organizationSettings.types';
2
3
 
3
4
  export declare enum CanvasExcludedComponentTypesEnum {
4
5
  Root = "Root",
@@ -11,13 +12,18 @@ export type CanvasComponentTypes = Exclude<keyof typeof ComponentTypes, CanvasEx
11
12
  export type CanvasComponentAvailability = {
12
13
  [component in CanvasComponentTypes]: boolean;
13
14
  };
14
- export type InstanceSettings = {
15
- impact_show_only_saved_canvases_in_canvas_manager?: boolean;
15
+ export type AutohideSectionOnCreated = {
16
+ autohide_in_shared_link?: string;
17
+ start_date?: Date;
18
+ };
19
+ export type InstanceSettings = OrganizationSettings & {
16
20
  canvas?: {
21
+ autohide_section_on_created?: AutohideSectionOnCreated;
17
22
  component_availability?: CanvasComponentAvailability & {
18
23
  apps?: Record<string, boolean>;
19
24
  };
20
25
  content_grid_autofill_files_filter_iteratee?: string;
21
26
  section_content_grid_autofill_files_filter_iteratee?: string;
27
+ show_extra_exit_button_in_fullscreen_mode?: boolean;
22
28
  };
23
29
  };
@@ -1,11 +1,9 @@
1
- import { TranslationOverrides } from './translations';
2
-
3
- export type LaunchDarklyBooleanFlagKey = 'allow_ai_prompts_in_canvas_text' | 'allow_bulk_actions_canvases_files' | 'allow_canvas_duplication' | 'allow_canvas_history' | 'allow_canvas_ownership_change' | 'allow_content_grid_autofill' | 'allow_creating_canvas_with_no_template' | 'allow_embeddable_hiding' | 'allow_note_taking' | 'allow_rep_canvas_metadata_edit' | 'allow_rep_file_upload' | 'are_sections_system_controlled' | 'copy_context_to_canvas' | 'copy_template_metadata_to_canvas' | 'disable_canvas_edit_for_reps' | 'disable_file_edit_content' | 'disable_fullscreen_canvas_builder' | 'disable_impact_web_browser_fullscreen' | 'display_section_list_name' | 'enable_analytics' | 'enable_canvas_node_debugging' | 'enable_experimental_canvas_builder_dnd' | 'enable_knock_notifications' | 'hide_asset_uploader' | 'interpolate_rep_canvases_on_edit_mode' | 'is_fe_sentry_enabled' | 'is_meeting_bar_account_selection_disabled' | 'is_meeting_bar_hidden' | 'is_rep_canvas_creation_disabled' | 'is_shared_link_creation_disabled' | 'is_timeline_component_allowed' | 'launch_in_full_screen_on_present_mode' | 'launch_in_present_mode_on_creation' | 'reorder_component_in_drawer' | 'show_asset_manager_for_multimedia' | 'show_popularity_icons' | 'show_system_filters' | 'prefer_online_handlers' | 'use_short_url_for_shared_link';
1
+ export type LaunchDarklyBooleanFlagKey = 'allow_ai_prompts_in_canvas_text' | 'allow_bulk_actions_canvases_files' | 'allow_canvas_duplication' | 'allow_canvas_history' | 'allow_canvas_ownership_change' | 'allow_content_grid_autofill' | 'allow_creating_canvas_with_no_template' | 'allow_embeddable_hiding' | 'allow_note_taking' | 'allow_rep_canvas_metadata_edit' | 'allow_rep_file_upload' | 'are_sections_system_controlled' | 'copy_context_to_canvas' | 'copy_template_metadata_to_canvas' | 'disable_canvas_edit_for_reps' | 'disable_file_edit_content' | 'disable_fullscreen_canvas_builder' | 'disable_impact_web_browser_fullscreen' | 'display_section_list_name' | 'enable_analytics' | 'enable_canvas_node_debugging' | 'enable_experimental_canvas_builder_dnd' | 'enable_knock_notifications' | 'hide_asset_uploader' | 'interpolate_rep_canvases_on_edit_mode' | 'is_fe_sentry_enabled' | 'is_meeting_bar_account_selection_disabled' | 'is_meeting_bar_hidden' | 'is_rep_canvas_creation_disabled' | 'is_shared_link_creation_disabled' | 'is_timeline_component_allowed' | 'launch_in_full_screen_on_present_mode' | 'launch_in_present_mode_on_creation' | 'reorder_component_in_drawer' | 'show_asset_manager_for_multimedia' | 'show_content_selector_list_view' | 'show_popularity_icons' | 'show_system_filters' | 'allow_canvases_tables_columns_settings' | 'prefer_online_handlers' | 'use_short_url_for_shared_link' | 'enable_suggested_tags' | 'enable_folder_details_edit';
2
+ export type LaunchDarklyNumberFlagKey = 'canvas_section_selector_page_size' | 'canvas_section_selector_selected_items_with_thumbnail_size';
4
3
  type LaunchDarklyObjectFlags = {
5
4
  canvas_table_pagination: CanvasTablePagination;
6
5
  canvas_manager_table_columns: CanvasManagerTableColumns;
7
6
  context_crm_shape: Record<string, any>;
8
- translation_overrides: TranslationOverrides;
9
7
  };
10
8
  export type LaunchDarklyObjectFlagKey = keyof LaunchDarklyObjectFlags;
11
9
  export type LaunchDarklyStringFlagKey = keyof typeof LaunchDarklyStringFlags;
@@ -32,6 +30,8 @@ export type LaunchDarklyEnv = {
32
30
  [K in LaunchDarklyBooleanFlagKey]?: boolean;
33
31
  } & {
34
32
  [K in LaunchDarklyStringFlagKey]?: LaunchDarklyStringFlagValue<K>;
33
+ } & {
34
+ [K in LaunchDarklyNumberFlagKey]?: number;
35
35
  } & {
36
36
  [K in keyof LaunchDarklyObjectFlags]?: LaunchDarklyObjectFlags[K];
37
37
  } & {
@@ -1,3 +1,7 @@
1
+ import { TranslationOverrides } from './translations';
2
+
1
3
  export type OrganizationSettings = {
2
4
  impact_show_only_saved_canvases_in_canvas_manager?: boolean;
5
+ translation_overrides?: TranslationOverrides;
6
+ file_annotations?: 'admin' | 'personal';
3
7
  };
@@ -1,4 +1,7 @@
1
1
  import { Instance, File } from '../../types/openapi';
2
2
 
3
- export type RecentFile = Pick<File, 'id' | 'name' | 'content_type' | 'thumbnail_url' | 'instance_id'>;
3
+ export type RecentFile = Pick<File, 'id' | 'name' | 'content_type' | 'instance_id'> & {
4
+ tags?: Readonly<File['tags']>;
5
+ thumbnail_url?: string | null;
6
+ };
4
7
  export type InstanceRecentFilesMap = Record<Instance['id'], RecentFile[]>;