@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.
Files changed (188) hide show
  1. package/README.md +4 -2
  2. package/js-api.esm.js +472 -139
  3. package/js-api.esm.js.map +1 -1
  4. package/js-api.umd.min.js +10 -10
  5. package/js-api.umd.min.js.map +1 -1
  6. package/lib/api/canvases/canvases.queries.d.ts +5 -5
  7. package/lib/apps/browser/stores/api.d.ts +215 -84
  8. package/lib/apps/browser/stores/app.d.ts +7 -26
  9. package/lib/apps/browser/stores/upload.d.ts +34 -24
  10. package/lib/apps/browser/util/file.d.ts +2 -2
  11. package/lib/apps/canvas-builder/composables/useCanvas.d.ts +550 -460
  12. package/lib/apps/canvas-builder/composables/useCanvasExit.d.ts +3 -0
  13. package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +86 -74
  14. package/lib/apps/canvas-builder/composables/useCanvasHooks.d.ts +4 -4
  15. package/lib/apps/canvas-builder/composables/useCanvasPages.d.ts +3 -3
  16. package/lib/apps/canvas-builder/composables/useCanvasSectionOverrides.d.ts +3 -3
  17. package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +24 -17
  18. package/lib/apps/canvas-builder/composables/useCanvasVisibility.d.ts +2 -2
  19. package/lib/apps/canvas-builder/composables/useCollapsibles.d.ts +3 -3
  20. package/lib/apps/canvas-builder/composables/useComponentPermissions.d.ts +2 -2
  21. package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +6 -4
  22. package/lib/apps/canvas-builder/composables/useInstalledEmbeddables.d.ts +15 -0
  23. package/lib/apps/canvas-builder/composables/useRecommendations.d.ts +5 -5
  24. package/lib/apps/canvas-builder/composables/useSectionPopularity.d.ts +2 -2
  25. package/lib/apps/canvas-builder/types/canvas.d.ts +19 -18
  26. package/lib/apps/canvas-builder/types/recommendations.types.d.ts +3 -3
  27. package/lib/apps/canvas-builder/util/canvas.util.d.ts +5 -4
  28. package/lib/apps/canvas-selector/appTypes.d.ts +13 -0
  29. package/lib/apps/canvas-selector/constants/index.d.ts +3 -0
  30. package/lib/apps/canvas-selector/stores/app.d.ts +415 -0
  31. package/lib/apps/content-selector/appTypes.d.ts +1 -0
  32. package/lib/apps/content-selector/stores/app.d.ts +8 -1
  33. package/lib/components/CFileViewer/CFileViewer.use.d.ts +2 -4
  34. package/lib/components/CFileViewer/CFileViewerFullScreen.use.d.ts +1 -1
  35. package/lib/components/canvases/CanvasesManagementBulk.use.d.ts +5 -5
  36. package/lib/components/filters/filter.util.d.ts +1 -1
  37. package/lib/components/savedCanvases/CSavedCanvasesManagementShareCanvas.use.d.ts +5 -3
  38. package/lib/composables/instanceTagsActions.use.d.ts +14 -0
  39. package/lib/composables/recentFiles.use.d.ts +1 -1
  40. package/lib/composables/suggestedTags.use.d.ts +3 -0
  41. package/lib/composables/tableColumnsSettings.use.d.ts +25 -0
  42. package/lib/composables/useCanvasOverlay.d.ts +20 -0
  43. package/lib/composables/useCanvasTablesPagination.d.ts +13 -0
  44. package/lib/composables/useConfirmation.d.ts +1 -0
  45. package/lib/composables/useElementHeightResize.d.ts +5 -0
  46. package/lib/composables/useFiles.d.ts +11 -0
  47. package/lib/constants/pitcherSettings.const.d.ts +4 -0
  48. package/lib/main.lib.d.ts +32 -21
  49. package/lib/sdk/api/HighLevelApi.d.ts +112 -14
  50. package/lib/sdk/api/modules/admin/canvas.admin.d.ts +53 -15
  51. package/lib/sdk/api/modules/admin/env.admin.d.ts +3 -2
  52. package/lib/sdk/api/modules/admin/files.admin.d.ts +43 -4
  53. package/lib/sdk/api/modules/admin/index.d.ts +53 -5
  54. package/lib/sdk/api/modules/admin/metadataTemplates.admin.d.ts +1 -2
  55. package/lib/sdk/api/modules/admin/types.admin.d.ts +131 -3
  56. package/lib/sdk/api/modules/canvas.d.ts +12 -14
  57. package/lib/sdk/api/modules/dsr/env.dsr.d.ts +4 -3
  58. package/lib/sdk/api/modules/dsr/index.d.ts +14 -3
  59. package/lib/sdk/api/modules/dsr/loading.dsr.d.ts +7 -1
  60. package/lib/sdk/api/modules/env.d.ts +16 -0
  61. package/lib/sdk/api/modules/favorites.d.ts +9 -0
  62. package/lib/sdk/api/modules/feedback.d.ts +3 -0
  63. package/lib/sdk/api/modules/files.d.ts +7 -4
  64. package/lib/sdk/api/modules/folders.d.ts +29 -0
  65. package/lib/sdk/api/modules/open.d.ts +6 -0
  66. package/lib/sdk/api/modules/sync.d.ts +1 -2
  67. package/lib/sdk/api/modules/ui/app-errors.ui.d.ts +13 -1
  68. package/lib/sdk/api/modules/ui/canvas.ui.d.ts +102 -8
  69. package/lib/sdk/api/modules/ui/content.ui.d.ts +52 -2
  70. package/lib/sdk/api/modules/ui/index.d.ts +150 -13
  71. package/lib/sdk/api/modules/ui/loading.ui.d.ts +9 -1
  72. package/lib/sdk/api/modules/ui/location.ui.d.ts +18 -1
  73. package/lib/sdk/api/modules/ui/post-call.ui.d.ts +35 -4
  74. package/lib/sdk/api/modules/ui/types.ui.d.ts +85 -8
  75. package/lib/sdk/api/modules/users.d.ts +6 -1
  76. package/lib/sdk/interfaces.d.ts +122 -3
  77. package/lib/sdk/main.d.ts +297 -151
  78. package/lib/sdk/payload.types.d.ts +134 -2
  79. package/lib/sdk/utils/httpFetch.d.ts +1 -1
  80. package/lib/sdk/utils/object.d.ts +1 -0
  81. package/lib/sdk/utils/object.spec.d.ts +1 -0
  82. package/lib/theme/light.d.ts +12 -0
  83. package/lib/types/app.d.ts +11 -0
  84. package/lib/types/call.d.ts +4 -3
  85. package/lib/types/files.d.ts +27 -1
  86. package/lib/types/filter.d.ts +5 -0
  87. package/lib/types/instance.types.d.ts +18 -0
  88. package/lib/types/{instanceSettings.d.ts → instanceSettings.types.d.ts} +10 -2
  89. package/lib/types/launchDarkly.types.d.ts +4 -4
  90. package/lib/types/organization.types.d.ts +2 -2
  91. package/lib/types/organizationSettings.types.d.ts +4 -0
  92. package/lib/types/recentFiles.types.d.ts +4 -1
  93. package/lib/types/users.d.ts +13 -0
  94. package/lib/util/fullscreen.util.d.ts +1 -1
  95. package/lib/util/string.d.ts +1 -0
  96. package/package.json +1 -1
  97. package/types/openapi/index.d.ts +23 -17
  98. package/types/openapi/models/AccessTypeEnum.d.ts +3 -1
  99. package/types/openapi/models/App.d.ts +1 -0
  100. package/types/openapi/models/AppRelease.d.ts +1 -0
  101. package/types/openapi/models/AppsDBEntry.d.ts +4 -0
  102. package/types/openapi/models/AppsDBEntryRequest.d.ts +3 -0
  103. package/types/openapi/models/Canvas.d.ts +10 -15
  104. package/types/openapi/models/CanvasCreate.d.ts +14 -12
  105. package/types/openapi/models/CanvasCreateRequest.d.ts +6 -5
  106. package/types/openapi/models/CanvasRecommendedFile.d.ts +6 -0
  107. package/types/openapi/models/CanvasRetrieve.d.ts +15 -13
  108. package/types/openapi/models/CanvasSection.d.ts +5 -2
  109. package/types/openapi/models/CanvasUpdate.d.ts +14 -12
  110. package/types/openapi/models/CanvasUpdateRequest.d.ts +5 -4
  111. package/types/openapi/models/CollaborationRoleEnum.d.ts +0 -4
  112. package/types/openapi/models/ContentDistributionGroupCreate.d.ts +1 -0
  113. package/types/openapi/models/DeletedApp.d.ts +1 -0
  114. package/types/openapi/models/{CanvasList.d.ts → DeletedCanvas.d.ts} +13 -9
  115. package/types/openapi/models/DeletedContentDistributionGroup.d.ts +1 -0
  116. package/types/openapi/models/DeletedEnvironment.d.ts +1 -0
  117. package/types/openapi/models/DeletedFavorite.d.ts +1 -0
  118. package/types/openapi/models/DeletedFile.d.ts +6 -0
  119. package/types/openapi/models/DeletedFolder.d.ts +4 -3
  120. package/types/openapi/models/DeletedInstance.d.ts +1 -0
  121. package/types/openapi/models/DeletedInstanceAssignmentGroup.d.ts +1 -0
  122. package/types/openapi/models/DeletedMetadataTemplate.d.ts +1 -0
  123. package/types/openapi/models/DeletedRegion.d.ts +1 -0
  124. package/types/openapi/models/Environment.d.ts +1 -0
  125. package/types/openapi/models/Favorite.d.ts +1 -0
  126. package/types/openapi/models/File.d.ts +6 -0
  127. package/types/openapi/models/FileCreate.d.ts +8 -0
  128. package/types/openapi/models/FileCreateRequest.d.ts +3 -0
  129. package/types/openapi/models/FilePermission.d.ts +4 -0
  130. package/types/openapi/models/FilePermissionRequest.d.ts +4 -0
  131. package/types/openapi/models/FileRetrieve.d.ts +8 -0
  132. package/types/openapi/models/FileRevision.d.ts +8 -0
  133. package/types/openapi/models/FileRevisionRequest.d.ts +3 -0
  134. package/types/openapi/models/FileUpdate.d.ts +8 -0
  135. package/types/openapi/models/FileUpdateRequest.d.ts +3 -0
  136. package/types/openapi/models/FileVersion.d.ts +5 -0
  137. package/types/openapi/models/Folder.d.ts +4 -3
  138. package/types/openapi/models/FolderCanvas.d.ts +11 -0
  139. package/types/openapi/models/FolderCreate.d.ts +8 -7
  140. package/types/openapi/models/FolderCreateRequest.d.ts +4 -2
  141. package/types/openapi/models/FolderFile.d.ts +3 -0
  142. package/types/openapi/models/FolderFolder.d.ts +5 -1
  143. package/types/openapi/models/FolderRetrieve.d.ts +8 -8
  144. package/types/openapi/models/FolderRule.d.ts +7 -0
  145. package/types/openapi/models/FolderRuleRequest.d.ts +7 -0
  146. package/types/openapi/models/FolderUpdate.d.ts +8 -8
  147. package/types/openapi/models/FolderUpdateRequest.d.ts +3 -0
  148. package/types/openapi/models/Instance.d.ts +1 -0
  149. package/types/openapi/models/InstanceUpdate.d.ts +1 -0
  150. package/types/openapi/models/MetadataTemplate.d.ts +1 -0
  151. package/types/openapi/models/OfflineSyncFolder.d.ts +17 -0
  152. package/types/openapi/models/OperatorEnum.d.ts +64 -0
  153. package/types/openapi/models/PaginatedCanvasList.d.ts +8 -0
  154. package/types/openapi/models/PaginatedFileRevisionList.d.ts +8 -0
  155. package/types/openapi/models/PaginatedOfflineSyncFolderList.d.ts +8 -0
  156. package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +5 -4
  157. package/types/openapi/models/PatchedFileRequest.d.ts +3 -0
  158. package/types/openapi/models/PatchedFileRevisionRequest.d.ts +3 -0
  159. package/types/openapi/models/PatchedFileUpdateRequest.d.ts +3 -0
  160. package/types/openapi/models/PatchedFolderUpdateRequest.d.ts +3 -0
  161. package/types/openapi/models/Region.d.ts +1 -0
  162. package/types/openapi/models/SearchFile.d.ts +3 -0
  163. package/types/openapi/models/SharedLink.d.ts +6 -5
  164. package/types/openapi/models/SharedLinkCanvas.d.ts +11 -0
  165. package/types/openapi/models/SharedLinkCanvasRequest.d.ts +8 -0
  166. package/types/openapi/models/SharedLinkCreate.d.ts +6 -5
  167. package/types/openapi/models/{SharedLinkInstanceSerialzier.d.ts → SharedLinkInstance.d.ts} +1 -1
  168. package/types/openapi/models/SharedLinkInstanceRequest.d.ts +5 -0
  169. package/types/openapi/models/{SharedLinkOrganizationSerialzier.d.ts → SharedLinkOrganization.d.ts} +1 -1
  170. package/types/openapi/models/SharedLinkOrganizationRequest.d.ts +6 -0
  171. package/lib/apps/canvas-builder/util/tsUtils.d.ts +0 -3
  172. package/lib/composables/useDetailsView.d.ts +0 -19
  173. package/lib/types/templateActions.d.ts +0 -10
  174. package/lib/util/gesture.util.d.ts +0 -6
  175. package/types/openapi/models/AppsDBGlobalEntry.d.ts +0 -8
  176. package/types/openapi/models/AppsDBGlobalEntryRequest.d.ts +0 -3
  177. package/types/openapi/models/AppsDBUserEntry.d.ts +0 -9
  178. package/types/openapi/models/AppsDBUserEntryRequest.d.ts +0 -3
  179. package/types/openapi/models/CanvasSectionRetrieve.d.ts +0 -7
  180. package/types/openapi/models/CanvasSectionRetrieveRequest.d.ts +0 -5
  181. package/types/openapi/models/FileRequest.d.ts +0 -13
  182. package/types/openapi/models/InstanceStorageCredentials.d.ts +0 -6
  183. package/types/openapi/models/MiniAccount.d.ts +0 -4
  184. package/types/openapi/models/PSPDFKitAuthPayload.d.ts +0 -3
  185. package/types/openapi/models/PSPDFKitAuthPayloadRequest.d.ts +0 -3
  186. package/types/openapi/models/PSPDFKitToken.d.ts +0 -7
  187. package/types/openapi/models/PSPDFKitTokenRequest.d.ts +0 -3
  188. package/types/openapi/models/PaginatedCanvasListList.d.ts +0 -8
@@ -1,6 +1,7 @@
1
1
  import { Emitter } from './utils/eventEmitter';
2
- import { Favorite, File, Instance, User, Canvas } from '../../types/openapi';
2
+ import { Favorite, File, User, CanvasRetrieve } from '../../types/openapi';
3
3
  import { PitcherOrg } from '../types/organization.types';
4
+ import { PitcherInstance } from '../types/instance.types';
4
5
  import { PaginatedData } from '../types/paginatedData';
5
6
  import { LaunchDarklyEnv } from '../types/launchDarkly.types';
6
7
  import { CLIENT_TYPE } from '../constants/cdp.const';
@@ -34,7 +35,7 @@ export interface PitcherEnv {
34
35
  pitcher: {
35
36
  token_claims: Record<string, any>;
36
37
  organization: PitcherOrg;
37
- instance: Instance;
38
+ instance: PitcherInstance;
38
39
  user: User;
39
40
  access_token: string;
40
41
  id_token: string;
@@ -53,6 +54,7 @@ export interface PitcherResponse {
53
54
  request: {
54
55
  id: string;
55
56
  type: string;
57
+ body?: Record<string, any>;
56
58
  };
57
59
  response: {
58
60
  status: PitcherResponseStatus;
@@ -109,54 +111,171 @@ export declare enum PitcherExternalEventName {
109
111
  OPEN_CANVAS = "open_canvas",
110
112
  START_CALL = "start_call"
111
113
  }
114
+ /**
115
+ * Base interface for update location actions.
116
+ */
112
117
  interface UpdateLocation {
118
+ /**
119
+ * The action to be performed.
120
+ */
113
121
  action: string;
114
122
  }
123
+ /**
124
+ * Represents a route in the location.
125
+ */
115
126
  export interface LocationRoute {
127
+ /**
128
+ * The path of the route.
129
+ */
116
130
  path: string;
131
+ /**
132
+ * The query parameters of the route.
133
+ */
117
134
  query: Record<string, any>;
135
+ /**
136
+ * Indicates if the route is being restored.
137
+ */
118
138
  is_restoring: boolean;
139
+ /**
140
+ * Indicates if the route is mounted.
141
+ */
119
142
  is_mounted: boolean;
120
143
  }
144
+ /**
145
+ * A record of location routes.
146
+ */
121
147
  export type LocationRoutes = Record<string, LocationRoute>;
148
+ /**
149
+ * Interface for the 'register' update location action.
150
+ */
122
151
  export interface UpdateLocationOnRegister extends UpdateLocation {
152
+ /**
153
+ * The action type.
154
+ */
123
155
  action: 'register';
156
+ /**
157
+ * The child application identifier.
158
+ */
124
159
  child_app: string;
160
+ /**
161
+ * The parent application identifier (optional).
162
+ */
125
163
  parent_app?: string;
164
+ /**
165
+ * The path of the route (optional).
166
+ */
126
167
  path?: string;
168
+ /**
169
+ * The query parameters of the route (optional).
170
+ */
127
171
  query?: Record<string, any>;
128
172
  }
173
+ /**
174
+ * Interface for the 'unregister' update location action.
175
+ */
129
176
  export interface UpdateLocationOnUnregister extends UpdateLocation {
177
+ /**
178
+ * The action type.
179
+ */
130
180
  action: 'unregister';
181
+ /**
182
+ * The application identifier.
183
+ */
131
184
  app: string;
132
185
  }
186
+ /**
187
+ * Interface for the 'update' update location action.
188
+ */
133
189
  export interface UpdateLocationOnUpdate extends UpdateLocation {
190
+ /**
191
+ * The action type.
192
+ */
134
193
  action: 'update';
194
+ /**
195
+ * The routes to be updated.
196
+ */
135
197
  routes: Record<string, Omit<LocationRoute, 'is_restoring' | 'is_mounted'>>;
136
198
  }
199
+ /**
200
+ * Interface for the 'mounted' update location action.
201
+ */
137
202
  export interface UpdateLocationOnMounted extends UpdateLocation {
203
+ /**
204
+ * The action type.
205
+ */
138
206
  action: 'mounted';
207
+ /**
208
+ * The application identifier.
209
+ */
139
210
  app: string;
140
211
  }
212
+ /**
213
+ * Interface for the 'restore' update location action.
214
+ */
141
215
  export interface UpdateLocationOnRestore extends UpdateLocation {
216
+ /**
217
+ * The action type.
218
+ */
142
219
  action: 'restore';
220
+ /**
221
+ * The routes to be restored.
222
+ */
143
223
  routes: Record<string, Omit<LocationRoute, 'is_mounted'>>;
144
224
  }
225
+ /**
226
+ * Interface for the 'restore_completed' update location action.
227
+ */
145
228
  export interface UpdateLocationOnRestoreCompleted extends UpdateLocation {
229
+ /**
230
+ * The action type.
231
+ */
146
232
  action: 'restore_completed';
233
+ /**
234
+ * The application identifier.
235
+ */
147
236
  app: string;
237
+ /**
238
+ * The path of the route.
239
+ */
148
240
  path: string;
241
+ /**
242
+ * The query parameters of the route.
243
+ */
149
244
  query: Record<string, any>;
150
245
  }
246
+ /**
247
+ * Interface for the 'get_routes_request' update location action.
248
+ */
151
249
  export interface UpdateLocationOnGetRoutesRequest extends UpdateLocation {
250
+ /**
251
+ * The action type.
252
+ */
152
253
  action: 'get_routes_request';
254
+ /**
255
+ * The application identifier.
256
+ */
153
257
  app: string;
154
258
  }
259
+ /**
260
+ * Interface for the 'get_routes_response' update location action.
261
+ */
155
262
  export interface UpdateLocationOnGetRoutesResponse extends UpdateLocation {
263
+ /**
264
+ * The action type.
265
+ */
156
266
  action: 'get_routes_response';
267
+ /**
268
+ * The application identifier.
269
+ */
157
270
  app: string;
271
+ /**
272
+ * The routes in the response.
273
+ */
158
274
  routes: LocationRoutes;
159
275
  }
276
+ /**
277
+ * Union type for all update location pitcher events.
278
+ */
160
279
  export type UpdateLocationPitcherEvent = UpdateLocationOnUnregister | UpdateLocationOnRestore | UpdateLocationOnUpdate | UpdateLocationOnRegister | UpdateLocationOnRestoreCompleted | UpdateLocationOnMounted | UpdateLocationOnGetRoutesRequest | UpdateLocationOnGetRoutesResponse;
161
280
  export interface PitcherEventMap {
162
281
  [PitcherEventName.ENV_CHANGED]: PitcherEnv;
@@ -202,7 +321,7 @@ export interface PitcherEventMap {
202
321
  */
203
322
  [PitcherEventName.EXITED_FULLSCREEN]: void;
204
323
  [PitcherEventName.CANVAS_UPDATED]: Record<string, any>;
205
- [PitcherEventName.CANVAS_UPDATED_SUCCESS]: Partial<Canvas>;
324
+ [PitcherEventName.CANVAS_UPDATED_SUCCESS]: Partial<CanvasRetrieve>;
206
325
  [PitcherEventName.UPDATE_LOCATION]: UpdateLocationPitcherEvent;
207
326
  [PitcherEventName.FILE_CLOSED]: {
208
327
  file_id?: string;