@pitcher/js-api 1.21.0-beta.8 → 1.21.0

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 (177) hide show
  1. package/js-api.esm.js +274 -92
  2. package/js-api.esm.js.map +1 -1
  3. package/js-api.umd.min.js +9 -9
  4. package/js-api.umd.min.js.map +1 -1
  5. package/lib/api/canvases/canvases.queries.d.ts +5 -5
  6. package/lib/apps/browser/stores/api.d.ts +215 -84
  7. package/lib/apps/browser/stores/app.d.ts +7 -26
  8. package/lib/apps/browser/stores/upload.d.ts +34 -24
  9. package/lib/apps/browser/util/file.d.ts +2 -2
  10. package/lib/apps/canvas-builder/composables/useCanvas.d.ts +550 -460
  11. package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +86 -74
  12. package/lib/apps/canvas-builder/composables/useCanvasHooks.d.ts +4 -4
  13. package/lib/apps/canvas-builder/composables/useCanvasPages.d.ts +3 -3
  14. package/lib/apps/canvas-builder/composables/useCanvasSectionOverrides.d.ts +3 -3
  15. package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +24 -17
  16. package/lib/apps/canvas-builder/composables/useCanvasVisibility.d.ts +2 -2
  17. package/lib/apps/canvas-builder/composables/useCollapsibles.d.ts +3 -3
  18. package/lib/apps/canvas-builder/composables/useComponentPermissions.d.ts +2 -2
  19. package/lib/apps/canvas-builder/composables/useContentSelector.d.ts +6 -4
  20. package/lib/apps/canvas-builder/composables/useInstalledEmbeddables.d.ts +4 -1
  21. package/lib/apps/canvas-builder/composables/useRecommendations.d.ts +4 -4
  22. package/lib/apps/canvas-builder/composables/useSectionPopularity.d.ts +2 -2
  23. package/lib/apps/canvas-builder/types/canvas.d.ts +19 -18
  24. package/lib/apps/canvas-builder/types/recommendations.types.d.ts +3 -3
  25. package/lib/apps/canvas-builder/util/canvas.util.d.ts +5 -4
  26. package/lib/apps/content-selector/appTypes.d.ts +1 -0
  27. package/lib/apps/content-selector/stores/app.d.ts +8 -1
  28. package/lib/components/CFileViewer/CFileViewer.use.d.ts +2 -4
  29. package/lib/components/CFileViewer/CFileViewerFullScreen.use.d.ts +1 -1
  30. package/lib/components/canvases/CanvasesManagementBulk.use.d.ts +5 -5
  31. package/lib/components/filters/filter.util.d.ts +1 -1
  32. package/lib/components/savedCanvases/CSavedCanvasesManagementShareCanvas.use.d.ts +2 -2
  33. package/lib/composables/instanceTagsActions.use.d.ts +14 -0
  34. package/lib/composables/recentFiles.use.d.ts +1 -1
  35. package/lib/composables/suggestedTags.use.d.ts +3 -0
  36. package/lib/composables/tableColumnsSettings.use.d.ts +25 -0
  37. package/lib/composables/useCanvasOverlay.d.ts +20 -0
  38. package/lib/composables/useConfirmation.d.ts +1 -0
  39. package/lib/composables/useElementHeightResize.d.ts +5 -0
  40. package/lib/composables/useFiles.d.ts +11 -0
  41. package/lib/constants/pitcherSettings.const.d.ts +4 -0
  42. package/lib/main.lib.d.ts +27 -20
  43. package/lib/sdk/api/HighLevelApi.d.ts +106 -12
  44. package/lib/sdk/api/modules/admin/canvas.admin.d.ts +31 -15
  45. package/lib/sdk/api/modules/admin/env.admin.d.ts +3 -2
  46. package/lib/sdk/api/modules/admin/files.admin.d.ts +43 -4
  47. package/lib/sdk/api/modules/admin/index.d.ts +52 -5
  48. package/lib/sdk/api/modules/admin/metadataTemplates.admin.d.ts +1 -2
  49. package/lib/sdk/api/modules/admin/types.admin.d.ts +117 -3
  50. package/lib/sdk/api/modules/canvas.d.ts +12 -14
  51. package/lib/sdk/api/modules/dsr/env.dsr.d.ts +4 -3
  52. package/lib/sdk/api/modules/dsr/index.d.ts +14 -3
  53. package/lib/sdk/api/modules/dsr/loading.dsr.d.ts +6 -0
  54. package/lib/sdk/api/modules/env.d.ts +16 -0
  55. package/lib/sdk/api/modules/favorites.d.ts +9 -0
  56. package/lib/sdk/api/modules/feedback.d.ts +3 -0
  57. package/lib/sdk/api/modules/files.d.ts +3 -3
  58. package/lib/sdk/api/modules/folders.d.ts +29 -0
  59. package/lib/sdk/api/modules/open.d.ts +6 -0
  60. package/lib/sdk/api/modules/sync.d.ts +1 -2
  61. package/lib/sdk/api/modules/ui/app-errors.ui.d.ts +12 -0
  62. package/lib/sdk/api/modules/ui/canvas.ui.d.ts +75 -2
  63. package/lib/sdk/api/modules/ui/content.ui.d.ts +50 -0
  64. package/lib/sdk/api/modules/ui/index.d.ts +149 -13
  65. package/lib/sdk/api/modules/ui/loading.ui.d.ts +15 -0
  66. package/lib/sdk/api/modules/ui/location.ui.d.ts +17 -0
  67. package/lib/sdk/api/modules/ui/post-call.ui.d.ts +25 -0
  68. package/lib/sdk/api/modules/ui/types.ui.d.ts +69 -6
  69. package/lib/sdk/api/modules/users.d.ts +4 -0
  70. package/lib/sdk/interfaces.d.ts +119 -2
  71. package/lib/sdk/main.d.ts +275 -141
  72. package/lib/sdk/payload.types.d.ts +134 -2
  73. package/lib/theme/light.d.ts +12 -0
  74. package/lib/types/app.d.ts +11 -0
  75. package/lib/types/call.d.ts +2 -2
  76. package/lib/types/files.d.ts +27 -1
  77. package/lib/types/filter.d.ts +5 -0
  78. package/lib/types/instanceSettings.types.d.ts +8 -2
  79. package/lib/types/launchDarkly.types.d.ts +4 -4
  80. package/lib/types/organizationSettings.types.d.ts +4 -0
  81. package/lib/types/recentFiles.types.d.ts +4 -1
  82. package/lib/types/users.d.ts +13 -0
  83. package/lib/util/fullscreen.util.d.ts +1 -1
  84. package/lib/util/string.d.ts +1 -0
  85. package/package.json +1 -1
  86. package/types/openapi/index.d.ts +23 -17
  87. package/types/openapi/models/AccessTypeEnum.d.ts +3 -1
  88. package/types/openapi/models/App.d.ts +1 -0
  89. package/types/openapi/models/AppRelease.d.ts +1 -0
  90. package/types/openapi/models/AppsDBEntry.d.ts +4 -0
  91. package/types/openapi/models/AppsDBEntryRequest.d.ts +3 -0
  92. package/types/openapi/models/Canvas.d.ts +10 -15
  93. package/types/openapi/models/CanvasCreate.d.ts +14 -12
  94. package/types/openapi/models/CanvasCreateRequest.d.ts +6 -5
  95. package/types/openapi/models/CanvasRecommendedFile.d.ts +6 -0
  96. package/types/openapi/models/CanvasRetrieve.d.ts +15 -13
  97. package/types/openapi/models/CanvasSection.d.ts +5 -2
  98. package/types/openapi/models/CanvasUpdate.d.ts +14 -12
  99. package/types/openapi/models/CanvasUpdateRequest.d.ts +5 -4
  100. package/types/openapi/models/CollaborationRoleEnum.d.ts +0 -4
  101. package/types/openapi/models/ContentDistributionGroupCreate.d.ts +1 -0
  102. package/types/openapi/models/DeletedApp.d.ts +1 -0
  103. package/types/openapi/models/{CanvasList.d.ts → DeletedCanvas.d.ts} +13 -9
  104. package/types/openapi/models/DeletedContentDistributionGroup.d.ts +1 -0
  105. package/types/openapi/models/DeletedEnvironment.d.ts +1 -0
  106. package/types/openapi/models/DeletedFavorite.d.ts +1 -0
  107. package/types/openapi/models/DeletedFile.d.ts +6 -0
  108. package/types/openapi/models/DeletedFolder.d.ts +4 -3
  109. package/types/openapi/models/DeletedInstance.d.ts +1 -0
  110. package/types/openapi/models/DeletedInstanceAssignmentGroup.d.ts +1 -0
  111. package/types/openapi/models/DeletedMetadataTemplate.d.ts +1 -0
  112. package/types/openapi/models/DeletedRegion.d.ts +1 -0
  113. package/types/openapi/models/Environment.d.ts +1 -0
  114. package/types/openapi/models/Favorite.d.ts +1 -0
  115. package/types/openapi/models/File.d.ts +6 -0
  116. package/types/openapi/models/FileCreate.d.ts +8 -0
  117. package/types/openapi/models/FileCreateRequest.d.ts +3 -0
  118. package/types/openapi/models/FilePermission.d.ts +4 -0
  119. package/types/openapi/models/FilePermissionRequest.d.ts +4 -0
  120. package/types/openapi/models/FileRetrieve.d.ts +8 -0
  121. package/types/openapi/models/FileRevision.d.ts +8 -0
  122. package/types/openapi/models/FileRevisionRequest.d.ts +3 -0
  123. package/types/openapi/models/FileUpdate.d.ts +8 -0
  124. package/types/openapi/models/FileUpdateRequest.d.ts +3 -0
  125. package/types/openapi/models/FileVersion.d.ts +5 -0
  126. package/types/openapi/models/Folder.d.ts +4 -3
  127. package/types/openapi/models/FolderCanvas.d.ts +11 -0
  128. package/types/openapi/models/FolderCreate.d.ts +8 -7
  129. package/types/openapi/models/FolderCreateRequest.d.ts +4 -2
  130. package/types/openapi/models/FolderFile.d.ts +3 -0
  131. package/types/openapi/models/FolderFolder.d.ts +5 -1
  132. package/types/openapi/models/FolderRetrieve.d.ts +8 -8
  133. package/types/openapi/models/FolderRule.d.ts +7 -0
  134. package/types/openapi/models/FolderRuleRequest.d.ts +7 -0
  135. package/types/openapi/models/FolderUpdate.d.ts +8 -8
  136. package/types/openapi/models/FolderUpdateRequest.d.ts +3 -0
  137. package/types/openapi/models/Instance.d.ts +1 -0
  138. package/types/openapi/models/InstanceUpdate.d.ts +1 -0
  139. package/types/openapi/models/MetadataTemplate.d.ts +1 -0
  140. package/types/openapi/models/OfflineSyncFolder.d.ts +17 -0
  141. package/types/openapi/models/OperatorEnum.d.ts +64 -0
  142. package/types/openapi/models/PaginatedCanvasList.d.ts +8 -0
  143. package/types/openapi/models/PaginatedFileRevisionList.d.ts +8 -0
  144. package/types/openapi/models/PaginatedOfflineSyncFolderList.d.ts +8 -0
  145. package/types/openapi/models/PatchedCanvasUpdateRequest.d.ts +5 -4
  146. package/types/openapi/models/PatchedFileRequest.d.ts +3 -0
  147. package/types/openapi/models/PatchedFileRevisionRequest.d.ts +3 -0
  148. package/types/openapi/models/PatchedFileUpdateRequest.d.ts +3 -0
  149. package/types/openapi/models/PatchedFolderUpdateRequest.d.ts +3 -0
  150. package/types/openapi/models/Region.d.ts +1 -0
  151. package/types/openapi/models/SearchFile.d.ts +3 -0
  152. package/types/openapi/models/SharedLink.d.ts +6 -5
  153. package/types/openapi/models/SharedLinkCanvas.d.ts +11 -0
  154. package/types/openapi/models/SharedLinkCanvasRequest.d.ts +8 -0
  155. package/types/openapi/models/SharedLinkCreate.d.ts +6 -5
  156. package/types/openapi/models/{SharedLinkInstanceSerialzier.d.ts → SharedLinkInstance.d.ts} +1 -1
  157. package/types/openapi/models/SharedLinkInstanceRequest.d.ts +5 -0
  158. package/types/openapi/models/{SharedLinkOrganizationSerialzier.d.ts → SharedLinkOrganization.d.ts} +1 -1
  159. package/types/openapi/models/SharedLinkOrganizationRequest.d.ts +6 -0
  160. package/lib/apps/canvas-builder/util/tsUtils.d.ts +0 -3
  161. package/lib/composables/useDetailsView.d.ts +0 -19
  162. package/lib/types/templateActions.d.ts +0 -10
  163. package/lib/util/gesture.util.d.ts +0 -6
  164. package/types/openapi/models/AppsDBGlobalEntry.d.ts +0 -8
  165. package/types/openapi/models/AppsDBGlobalEntryRequest.d.ts +0 -3
  166. package/types/openapi/models/AppsDBUserEntry.d.ts +0 -9
  167. package/types/openapi/models/AppsDBUserEntryRequest.d.ts +0 -3
  168. package/types/openapi/models/CanvasSectionRetrieve.d.ts +0 -7
  169. package/types/openapi/models/CanvasSectionRetrieveRequest.d.ts +0 -5
  170. package/types/openapi/models/FileRequest.d.ts +0 -13
  171. package/types/openapi/models/InstanceStorageCredentials.d.ts +0 -6
  172. package/types/openapi/models/MiniAccount.d.ts +0 -4
  173. package/types/openapi/models/PSPDFKitAuthPayload.d.ts +0 -3
  174. package/types/openapi/models/PSPDFKitAuthPayloadRequest.d.ts +0 -3
  175. package/types/openapi/models/PSPDFKitToken.d.ts +0 -7
  176. package/types/openapi/models/PSPDFKitTokenRequest.d.ts +0 -3
  177. package/types/openapi/models/PaginatedCanvasListList.d.ts +0 -8
@@ -1,15 +1,15 @@
1
- import { Canvas } from '../../../types/openapi';
1
+ import { CanvasRetrieve } from '../../../types/openapi';
2
2
  import { GetCanvasesParams } from '../../types/canvases';
3
3
  import { PaginatedData } from '../../types/paginatedData';
4
4
  import { MaybeRef } from '@vueuse/core';
5
5
 
6
6
  export declare const CANVASES = "canvases";
7
7
  type Options = {
8
- apiFn?: (params: GetCanvasesParams) => Promise<PaginatedData<Canvas>>;
8
+ apiFn?: (params: GetCanvasesParams) => Promise<PaginatedData<CanvasRetrieve>>;
9
9
  };
10
- export declare const useCanvasesAsInfinity: (params: MaybeRef<GetCanvasesParams>, options?: Options) => import('@tanstack/vue-query').UseInfiniteQueryReturnType<PaginatedData<Canvas>, unknown>;
10
+ export declare const useCanvasesAsInfinity: (params: MaybeRef<GetCanvasesParams>, options?: Options) => import('@tanstack/vue-query').UseInfiniteQueryReturnType<PaginatedData<CanvasRetrieve>, unknown>;
11
11
  export declare const useFetchCanvases: (params: MaybeRef<GetCanvasesParams>, options?: {
12
12
  enabled?: boolean;
13
- }) => import('@tanstack/vue-query').UseQueryReturnType<PaginatedData<Canvas>, unknown>;
14
- export declare const useCanvasById: (id: MaybeRef<Canvas["id"]>) => import('@tanstack/vue-query').UseQueryReturnType<Canvas, unknown>;
13
+ }) => import('@tanstack/vue-query').UseQueryReturnType<PaginatedData<CanvasRetrieve>, unknown>;
14
+ export declare const useCanvasById: (id: MaybeRef<CanvasRetrieve["id"]>) => import('@tanstack/vue-query').UseQueryReturnType<CanvasRetrieve, unknown>;
15
15
  export {};
@@ -1,9 +1,11 @@
1
- import { Folder, FileRetrieve, FolderRetrieve, MiniFile, MiniPage, FolderFolder as CompactFolder, File, FavoriteCreateRequest, Favorite, FolderCreateRequest, FolderUpdateRequest, FileUpdateRequest, MetadataTemplate, BulkDeleteRequest, BulkDeleteResponse, FileStatusEnum } from '../../../../types/openapi';
1
+ import { Folder, FileRetrieve, FolderRetrieve, MiniFile, MiniPage, FolderFolder, File, FavoriteCreateRequest, Favorite, FolderCreateRequest, FolderUpdateRequest, FileUpdateRequest, MetadataTemplate, BulkDeleteRequest, BulkDeleteResponse, FileStatusEnum } from '../../../../types/openapi';
2
2
  import { GetFavoritesParams } from '../../../types/favorites';
3
3
  import { PaginatedData } from '../../../types/paginatedData';
4
4
  import { AllFileCreateRequest, DeviceFile } from '../../../types/files';
5
5
  import { RecentFile } from '../../../types/recentFiles.types';
6
+ import { Mutable } from '../../../types/ts';
6
7
 
8
+ type CompactFolder = Mutable<FolderFolder>;
7
9
  type FolderItemsFetcher = (folderId: Folder['id'] | undefined, options?: {
8
10
  justFetch: boolean;
9
11
  setSelectedFolder: boolean;
@@ -87,8 +89,8 @@ declare const _default: () => {
87
89
  readonly favoritesDeleter: FavoritesDeleter | null;
88
90
  readonly favoritesSetter: FavoritesSetter | null;
89
91
  readonly recentFilesFetcher: RecentFilesFetcher | null;
90
- readonly selectDeviceFile?: SelectDeviceFile | null;
91
- readonly metadataTemplateFetcher?: MetadataTemplateFetcher | null;
92
+ readonly selectDeviceFile?: (SelectDeviceFile | null) | undefined;
93
+ readonly metadataTemplateFetcher?: (MetadataTemplateFetcher | null) | undefined;
92
94
  readonly itemsMover: ItemsMover | null;
93
95
  readonly convertingFileIdsTimeout: {
94
96
  readonly ref: () => NodeJS.Timeout;
@@ -111,12 +113,16 @@ declare const _default: () => {
111
113
  readonly folders: readonly {
112
114
  readonly id: string;
113
115
  readonly name: string;
114
- readonly files_count: number;
116
+ readonly thumbnail_url: string | null;
115
117
  readonly folders_count: number;
118
+ readonly files_count: number;
119
+ readonly file_thumbnail_urls: readonly string[];
120
+ readonly canvases_count: number;
121
+ readonly canvas_thumbnail_urls: readonly string[];
116
122
  }[];
117
123
  readonly files: readonly {
118
124
  readonly status: FileStatusEnum;
119
- readonly name?: string;
125
+ readonly name?: string | undefined;
120
126
  readonly id: string;
121
127
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
122
128
  readonly thumbnail_url: string | null;
@@ -124,24 +130,30 @@ declare const _default: () => {
124
130
  readonly created_by: {
125
131
  readonly id: number;
126
132
  readonly name: string;
127
- readonly email?: string;
133
+ readonly email?: string | undefined;
128
134
  };
129
135
  readonly modified_at: string;
130
136
  }[];
131
137
  readonly recent: readonly {
132
- readonly name?: string;
138
+ readonly name?: string | undefined;
133
139
  readonly id: string;
134
140
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
135
- readonly thumbnail_url: string | null;
136
141
  readonly instance_id: string;
142
+ readonly tags?: Readonly<File["tags"]>;
143
+ readonly thumbnail_url?: (string | null) | undefined;
137
144
  }[];
138
145
  readonly selectedFile: {
139
146
  readonly id: string;
140
147
  readonly global_id: string;
141
- readonly name?: string;
148
+ readonly name?: string | undefined;
142
149
  readonly type: import('../../../../types/openapi').FileTypeEnum;
143
150
  readonly size: number | null;
144
151
  readonly status: FileStatusEnum;
152
+ readonly version: {
153
+ readonly id: string;
154
+ readonly comment: string;
155
+ readonly created_at: string;
156
+ };
145
157
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
146
158
  readonly content_extension: string | null;
147
159
  readonly content_length: number | null;
@@ -149,11 +161,15 @@ declare const _default: () => {
149
161
  readonly content_thumbnails: readonly string[];
150
162
  readonly original_extension: string | null;
151
163
  readonly thumbnail_url: string | null;
152
- readonly download_type?: import('../../../../types/openapi').DownloadTypeEnum;
164
+ readonly download_type?: import('../../../../types/openapi').DownloadTypeEnum | undefined;
153
165
  readonly zip_size: number | null;
154
166
  readonly zip_url: string | null;
155
- readonly access_type?: import('../../../../types/openapi').AccessTypeEnum;
167
+ readonly access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
156
168
  readonly role: import('../../../../types/openapi').CollaborationRoleEnum;
169
+ readonly permissions?: {
170
+ readonly can_download?: boolean | undefined;
171
+ readonly can_share?: boolean | undefined;
172
+ } | undefined;
157
173
  readonly pspdfkit_server_url: string | null;
158
174
  readonly pspdfkit_auth_payload: {
159
175
  readonly [x: string]: any;
@@ -166,33 +182,67 @@ declare const _default: () => {
166
182
  } | undefined;
167
183
  readonly tags?: readonly string[] | undefined;
168
184
  readonly published_at: string | null;
169
- readonly expires_at?: string | null;
185
+ readonly expires_at?: (string | null) | undefined;
170
186
  readonly instance_id: string;
171
- readonly folder_id?: string;
187
+ readonly folder_id?: string | undefined;
172
188
  readonly shared_link: {
173
189
  readonly url: string;
174
- readonly short_url?: string | null;
190
+ readonly short_url?: (string | null) | undefined;
191
+ };
192
+ readonly owned_by: {
193
+ readonly id: number;
194
+ readonly name: string;
195
+ readonly email?: string | undefined;
175
196
  };
176
197
  readonly created_at: string;
177
198
  readonly created_by: {
178
199
  readonly id: number;
179
200
  readonly name: string;
180
- readonly email?: string;
201
+ readonly email?: string | undefined;
181
202
  };
182
203
  readonly modified_at: string;
183
204
  readonly modified_by: {
184
205
  readonly id: number;
185
206
  readonly name: string;
186
- readonly email?: string;
207
+ readonly email?: string | undefined;
187
208
  };
188
209
  } | null;
189
210
  readonly selectedFolder: {
190
211
  readonly id: string;
191
212
  readonly name: string;
192
- readonly instance_id: string;
193
- readonly access_type?: import('../../../../types/openapi').AccessTypeEnum;
194
- readonly materialized_path: string;
195
- readonly depth: number;
213
+ readonly content_type: string;
214
+ readonly access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
215
+ readonly rules?: readonly {
216
+ readonly field: string;
217
+ readonly operator: import('../../../../types/openapi').OperatorEnum;
218
+ readonly value: string;
219
+ }[] | undefined;
220
+ readonly owned_by: {
221
+ readonly id: number;
222
+ readonly name: string;
223
+ readonly email?: string | undefined;
224
+ };
225
+ readonly path: readonly {
226
+ readonly id: string;
227
+ readonly name: string;
228
+ readonly thumbnail_url: string | null;
229
+ readonly folders_count: number;
230
+ readonly files_count: number;
231
+ readonly file_thumbnail_urls: readonly string[];
232
+ readonly canvases_count: number;
233
+ readonly canvas_thumbnail_urls: readonly string[];
234
+ }[];
235
+ readonly thumbnail_url: string | null;
236
+ readonly folders: readonly {
237
+ readonly id: string;
238
+ readonly name: string;
239
+ readonly thumbnail_url: string | null;
240
+ readonly folders_count: number;
241
+ readonly files_count: number;
242
+ readonly file_thumbnail_urls: readonly string[];
243
+ readonly canvases_count: number;
244
+ readonly canvas_thumbnail_urls: readonly string[];
245
+ }[];
196
246
  readonly files: readonly {
197
247
  readonly id: string;
198
248
  readonly name: string;
@@ -200,40 +250,50 @@ declare const _default: () => {
200
250
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
201
251
  readonly thumbnail_url: string;
202
252
  readonly tags: readonly string[];
253
+ readonly permissions?: {
254
+ readonly can_download?: boolean | undefined;
255
+ readonly can_share?: boolean | undefined;
256
+ } | undefined;
203
257
  readonly created_by: {
204
258
  readonly id: number;
205
259
  readonly name: string;
206
- readonly email?: string;
260
+ readonly email?: string | undefined;
261
+ };
262
+ readonly owned_by: {
263
+ readonly id: number;
264
+ readonly name: string;
265
+ readonly email?: string | undefined;
207
266
  };
208
267
  readonly modified_at: string;
209
268
  }[];
210
- readonly files_count: number;
211
- readonly file_thumbnail_urls: readonly string[];
212
- readonly thumbnail_url: string | null;
213
- readonly folders: readonly {
214
- readonly id: string;
215
- readonly name: string;
216
- readonly files_count: number;
217
- readonly folders_count: number;
218
- }[];
219
- readonly folders_count: number;
220
- readonly path: readonly {
269
+ readonly canvases: readonly {
221
270
  readonly id: string;
222
271
  readonly name: string;
223
- readonly files_count: number;
224
- readonly folders_count: number;
272
+ readonly thumbnail_url?: (string | null) | undefined;
273
+ readonly tags: readonly string[];
274
+ readonly created_by: {
275
+ readonly id: number;
276
+ readonly name: string;
277
+ readonly email?: string | undefined;
278
+ };
279
+ readonly owned_by: {
280
+ readonly id: number;
281
+ readonly name: string;
282
+ readonly email?: string | undefined;
283
+ };
284
+ readonly modified_at: string;
225
285
  }[];
226
286
  readonly created_at: string;
227
287
  readonly created_by: {
228
288
  readonly id: number;
229
289
  readonly name: string;
230
- readonly email?: string;
290
+ readonly email?: string | undefined;
231
291
  };
232
292
  readonly modified_at: string;
233
293
  readonly modified_by: {
234
294
  readonly id: number;
235
295
  readonly name: string;
236
- readonly email?: string;
296
+ readonly email?: string | undefined;
237
297
  };
238
298
  } | null;
239
299
  readonly favorites: {
@@ -249,7 +309,7 @@ declare const _default: () => {
249
309
  } | null;
250
310
  readonly page: {
251
311
  readonly id: string;
252
- readonly page_index?: number;
312
+ readonly page_index?: number | undefined;
253
313
  } | null;
254
314
  readonly folder: {
255
315
  readonly id: string;
@@ -259,21 +319,30 @@ declare const _default: () => {
259
319
  readonly created_by: {
260
320
  readonly id: number;
261
321
  readonly name: string;
262
- readonly email?: string;
322
+ readonly email?: string | undefined;
263
323
  };
264
324
  readonly modified_at: string;
265
325
  readonly modified_by: {
266
326
  readonly id: number;
267
327
  readonly name: string;
268
- readonly email?: string;
328
+ readonly email?: string | undefined;
329
+ };
330
+ readonly owned_by: {
331
+ readonly id: number;
332
+ readonly name: string;
333
+ readonly email?: string | undefined;
269
334
  };
270
335
  };
271
336
  };
272
337
  readonly currentFolderPath: readonly {
273
338
  readonly id: string;
274
339
  readonly name: string;
275
- readonly files_count: number;
340
+ readonly thumbnail_url: string | null;
276
341
  readonly folders_count: number;
342
+ readonly files_count: number;
343
+ readonly file_thumbnail_urls: readonly string[];
344
+ readonly canvases_count: number;
345
+ readonly canvas_thumbnail_urls: readonly string[];
277
346
  }[];
278
347
  readonly currentFolderName: Awaited<ReturnType<FolderItemsFetcher>>["name"];
279
348
  readonly currentFolderId: Awaited<ReturnType<FolderItemsFetcher>>["id"];
@@ -285,7 +354,7 @@ declare const _default: () => {
285
354
  getters: {
286
355
  readonly sortedFiles: readonly {
287
356
  readonly status: FileStatusEnum;
288
- readonly name?: string;
357
+ readonly name?: string | undefined;
289
358
  readonly id: string;
290
359
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
291
360
  readonly thumbnail_url: string | null;
@@ -293,7 +362,7 @@ declare const _default: () => {
293
362
  readonly created_by: {
294
363
  readonly id: number;
295
364
  readonly name: string;
296
- readonly email?: string;
365
+ readonly email?: string | undefined;
297
366
  };
298
367
  readonly modified_at: string;
299
368
  }[];
@@ -372,8 +441,8 @@ declare const _default: () => {
372
441
  favoritesDeleter: FavoritesDeleter | null;
373
442
  favoritesSetter: FavoritesSetter | null;
374
443
  recentFilesFetcher: RecentFilesFetcher | null;
375
- selectDeviceFile?: SelectDeviceFile | null;
376
- metadataTemplateFetcher?: MetadataTemplateFetcher | null;
444
+ selectDeviceFile?: (SelectDeviceFile | null) | undefined;
445
+ metadataTemplateFetcher?: (MetadataTemplateFetcher | null) | undefined;
377
446
  itemsMover: ItemsMover | null;
378
447
  convertingFileIdsTimeout: {
379
448
  ref: () => NodeJS.Timeout;
@@ -394,39 +463,49 @@ declare const _default: () => {
394
463
  isDeletingFavorite: boolean;
395
464
  isMetadataTemplateLoaded: boolean;
396
465
  folders: {
397
- readonly id: string;
466
+ id: string;
398
467
  name: string;
399
- readonly files_count: number;
400
- readonly folders_count: number;
468
+ thumbnail_url: string | null;
469
+ folders_count: number;
470
+ files_count: number;
471
+ file_thumbnail_urls: Array<string>;
472
+ canvases_count: number;
473
+ canvas_thumbnail_urls: Array<string>;
401
474
  }[];
402
475
  files: {
403
476
  readonly status: FileStatusEnum;
404
- name?: string;
477
+ name?: string | undefined;
405
478
  readonly id: string;
406
479
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
407
480
  readonly thumbnail_url: string | null;
408
- tags?: Array<string>;
481
+ tags?: Array<string> | undefined;
409
482
  readonly created_by: {
410
483
  readonly id: number;
411
484
  readonly name: string;
412
- email?: string;
485
+ email?: string | undefined;
413
486
  };
414
487
  readonly modified_at: string;
415
488
  }[];
416
489
  recent: {
417
- name?: string;
490
+ name?: string | undefined;
418
491
  readonly id: string;
419
492
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
420
- readonly thumbnail_url: string | null;
421
493
  readonly instance_id: string;
494
+ tags?: Readonly<File["tags"]>;
495
+ thumbnail_url?: (string | null) | undefined;
422
496
  }[];
423
497
  selectedFile: {
424
498
  readonly id: string;
425
499
  readonly global_id: string;
426
- name?: string;
500
+ name?: string | undefined;
427
501
  readonly type: import('../../../../types/openapi').FileTypeEnum;
428
502
  readonly size: number | null;
429
503
  readonly status: FileStatusEnum;
504
+ readonly version: {
505
+ readonly id: string;
506
+ readonly comment: string;
507
+ readonly created_at: string;
508
+ };
430
509
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
431
510
  readonly content_extension: string | null;
432
511
  readonly content_length: number | null;
@@ -434,44 +513,82 @@ declare const _default: () => {
434
513
  readonly content_thumbnails: Array<string>;
435
514
  readonly original_extension: string | null;
436
515
  readonly thumbnail_url: string | null;
437
- download_type?: import('../../../../types/openapi').DownloadTypeEnum;
516
+ download_type?: import('../../../../types/openapi').DownloadTypeEnum | undefined;
438
517
  readonly zip_size: number | null;
439
518
  readonly zip_url: string | null;
440
- access_type?: import('../../../../types/openapi').AccessTypeEnum;
519
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
441
520
  readonly role: import('../../../../types/openapi').CollaborationRoleEnum;
521
+ permissions?: {
522
+ can_download?: boolean | undefined;
523
+ can_share?: boolean | undefined;
524
+ } | undefined;
442
525
  readonly pspdfkit_server_url: string | null;
443
526
  readonly pspdfkit_auth_payload: Record<string, any> | null;
444
- metadata?: Record<string, any>;
445
- app_metadata?: Record<string, any>;
446
- tags?: Array<string>;
527
+ metadata?: Record<string, any> | undefined;
528
+ app_metadata?: Record<string, any> | undefined;
529
+ tags?: Array<string> | undefined;
447
530
  readonly published_at: string | null;
448
- expires_at?: string | null;
531
+ expires_at?: (string | null) | undefined;
449
532
  readonly instance_id: string;
450
- folder_id?: string;
533
+ folder_id?: string | undefined;
451
534
  readonly shared_link: {
452
535
  readonly url: string;
453
- short_url?: string | null;
536
+ short_url?: (string | null) | undefined;
537
+ };
538
+ readonly owned_by: {
539
+ readonly id: number;
540
+ readonly name: string;
541
+ email?: string | undefined;
454
542
  };
455
543
  readonly created_at: string;
456
544
  readonly created_by: {
457
545
  readonly id: number;
458
546
  readonly name: string;
459
- email?: string;
547
+ email?: string | undefined;
460
548
  };
461
549
  readonly modified_at: string;
462
550
  readonly modified_by: {
463
551
  readonly id: number;
464
552
  readonly name: string;
465
- email?: string;
553
+ email?: string | undefined;
466
554
  };
467
555
  } | null;
468
556
  selectedFolder: {
469
557
  readonly id: string;
470
558
  name: string;
471
- readonly instance_id: string;
472
- access_type?: import('../../../../types/openapi').AccessTypeEnum;
473
- readonly materialized_path: string;
474
- readonly depth: number;
559
+ readonly content_type: string;
560
+ access_type?: import('../../../../types/openapi').AccessTypeEnum | undefined;
561
+ rules?: {
562
+ field: string;
563
+ operator: import('../../../../types/openapi').OperatorEnum;
564
+ value: string;
565
+ }[] | undefined;
566
+ readonly owned_by: {
567
+ readonly id: number;
568
+ readonly name: string;
569
+ email?: string | undefined;
570
+ };
571
+ readonly path: {
572
+ readonly id: string;
573
+ name: string;
574
+ readonly thumbnail_url: string | null;
575
+ readonly folders_count: number;
576
+ readonly files_count: number;
577
+ readonly file_thumbnail_urls: Array<string>;
578
+ readonly canvases_count: number;
579
+ readonly canvas_thumbnail_urls: Array<string>;
580
+ }[];
581
+ readonly thumbnail_url: string | null;
582
+ readonly folders: {
583
+ readonly id: string;
584
+ name: string;
585
+ readonly thumbnail_url: string | null;
586
+ readonly folders_count: number;
587
+ readonly files_count: number;
588
+ readonly file_thumbnail_urls: Array<string>;
589
+ readonly canvases_count: number;
590
+ readonly canvas_thumbnail_urls: Array<string>;
591
+ }[];
475
592
  readonly files: {
476
593
  readonly id: string;
477
594
  readonly name: string;
@@ -479,48 +596,62 @@ declare const _default: () => {
479
596
  readonly content_type: import('../../../../types/openapi').FileContentTypeEnum;
480
597
  readonly thumbnail_url: string;
481
598
  readonly tags: Array<string>;
599
+ permissions?: {
600
+ can_download?: boolean | undefined;
601
+ can_share?: boolean | undefined;
602
+ } | undefined;
482
603
  readonly created_by: {
483
604
  readonly id: number;
484
605
  readonly name: string;
485
- email?: string;
606
+ email?: string | undefined;
607
+ };
608
+ readonly owned_by: {
609
+ readonly id: number;
610
+ readonly name: string;
611
+ email?: string | undefined;
486
612
  };
487
613
  readonly modified_at: string;
488
614
  }[];
489
- readonly files_count: number;
490
- readonly file_thumbnail_urls: Array<string>;
491
- readonly thumbnail_url: string | null;
492
- readonly folders: {
615
+ readonly canvases: {
493
616
  readonly id: string;
494
617
  name: string;
495
- readonly files_count: number;
496
- readonly folders_count: number;
497
- }[];
498
- readonly folders_count: number;
499
- readonly path: {
500
- readonly id: string;
501
- name: string;
502
- readonly files_count: number;
503
- readonly folders_count: number;
618
+ thumbnail_url?: (string | null) | undefined;
619
+ readonly tags: Array<string>;
620
+ readonly created_by: {
621
+ readonly id: number;
622
+ readonly name: string;
623
+ email?: string | undefined;
624
+ };
625
+ readonly owned_by: {
626
+ readonly id: number;
627
+ readonly name: string;
628
+ email?: string | undefined;
629
+ };
630
+ readonly modified_at: string;
504
631
  }[];
505
632
  readonly created_at: string;
506
633
  readonly created_by: {
507
634
  readonly id: number;
508
635
  readonly name: string;
509
- email?: string;
636
+ email?: string | undefined;
510
637
  };
511
638
  readonly modified_at: string;
512
639
  readonly modified_by: {
513
640
  readonly id: number;
514
641
  readonly name: string;
515
- email?: string;
642
+ email?: string | undefined;
516
643
  };
517
644
  } | null;
518
645
  favorites: Record<MiniPage["id"] | File["id"] | Folder["id"], Favorite>;
519
646
  currentFolderPath: {
520
647
  readonly id: string;
521
648
  name: string;
522
- readonly files_count: number;
649
+ readonly thumbnail_url: string | null;
523
650
  readonly folders_count: number;
651
+ readonly files_count: number;
652
+ readonly file_thumbnail_urls: Array<string>;
653
+ readonly canvases_count: number;
654
+ readonly canvas_thumbnail_urls: Array<string>;
524
655
  }[];
525
656
  currentFolderName: Awaited<ReturnType<FolderItemsFetcher>>["name"];
526
657
  currentFolderId: Awaited<ReturnType<FolderItemsFetcher>>["id"];
@@ -1,35 +1,16 @@
1
1
  import { Ref, ComputedRef } from 'vue';
2
2
  import { File, Folder, Favorite, MiniFolder, FileContentTypeEnum, FileStatusEnum } from '../../../../types/openapi';
3
- import { CompactFile, CompactFolder } from '@browser/stores/api';
4
3
  import { RecentFile } from '../../../types/recentFiles.types';
4
+ import { ViewCompactFile, ViewCompactFileFolder, ViewCompactFolder } from '../../../types/files';
5
5
 
6
6
  export type AppName = 'admin' | 'impact';
7
- export declare enum ViewCompactItemType {
8
- File = "file",
9
- Folder = "folder"
10
- }
11
- export type ViewCompactFolder = Omit<CompactFolder, 'created_by'> & {
12
- type: ViewCompactItemType.Folder;
13
- favoriteId?: Favorite['id'];
14
- content_type?: null;
15
- thubmnail_url?: null;
16
- file_thumbnail_urls?: string[];
17
- folders_count?: number;
18
- files_count?: number;
19
- };
20
- export type ViewCompactFile = Omit<CompactFile, 'created_by'> & {
21
- type: ViewCompactItemType.File;
22
- favoriteId?: Favorite['id'];
23
- createdBy: string;
24
- content_type?: string;
25
- };
26
- export type ViewCompactFileFolder = ViewCompactFolder | ViewCompactFile;
27
- export type RenderableFile = (Favorite & {
28
- thumbnail_url?: string;
29
- file_thumbnail_urls?: string[];
30
- }) | RecentFile | ViewCompactFileFolder;
31
7
  export type AppCurrentState = 'browse' | 'create-folder' | 'upload-files' | 'update-folder' | 'update-file' | 'batch-move';
32
8
  export type BrowserSectionType = 'all' | 'favorites' | 'recent' | 'trash';
9
+ export type StateSelectedItem = Partial<File | Folder | Favorite> & {
10
+ type: string | null | undefined;
11
+ thumbnail_url: string | null | undefined;
12
+ content_type: string | null | undefined;
13
+ };
33
14
  type SelectedItemId = Folder['id'] | File['id'] | RecentFile['id'] | (Favorite['page'] extends {
34
15
  id: any;
35
16
  } ? Favorite['page']['id'] : never);
@@ -43,7 +24,7 @@ export default function (): {
43
24
  removeSelectedItems(removeIds: SelectedItemId[]): void;
44
25
  selectAll(): void;
45
26
  toggleSelectAll(value: boolean): void;
46
- toggleItemSelection(item: Partial<File | Folder | Favorite>, { isSelected, disableMultiple }?: {
27
+ toggleItemSelection(item: StateSelectedItem, { isSelected, disableMultiple }?: {
47
28
  isSelected?: boolean;
48
29
  disableMultiple?: boolean;
49
30
  }): void;