@ckbox/core 1.1.1-dev.0 → 1.2.0-dev.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 (287) hide show
  1. package/README.md +3 -3
  2. package/dist/components/assetSize/AssetSize.d.ts +12 -0
  3. package/dist/components/assetSize/getAssetSize.d.ts +1 -0
  4. package/dist/components/assetSize/index.d.ts +2 -0
  5. package/dist/components/assets/Assets.d.ts +72 -0
  6. package/dist/components/assets/AssetsBottombar.d.ts +33 -0
  7. package/dist/components/assets/AssetsTopbar.d.ts +71 -0
  8. package/dist/components/assets/asset/Asset.d.ts +45 -0
  9. package/dist/components/assets/asset/AssetPreview.d.ts +45 -0
  10. package/dist/components/assets/asset/index.d.ts +1 -0
  11. package/dist/components/assets/assetEditForm/AssetEditForm.d.ts +39 -0
  12. package/dist/components/assets/assetEditForm/index.d.ts +1 -0
  13. package/dist/components/assets/assetEditForm/useFormValidation.d.ts +8 -0
  14. package/dist/components/assets/assetPropertiesDialog/AssetPropertiesDialog.d.ts +27 -0
  15. package/dist/components/assets/assetPropertiesDialog/index.d.ts +1 -0
  16. package/dist/components/assets/assetPropertiesDialog/useFormValidation.d.ts +8 -0
  17. package/dist/components/assets/assetPropertiesDrawer/AssetPropertiesDrawer.d.ts +35 -0
  18. package/dist/components/assets/assetPropertiesDrawer/index.d.ts +1 -0
  19. package/dist/components/assets/assetsActions/index.d.ts +1 -0
  20. package/dist/components/assets/assetsActions/useAssetsActions.d.ts +35 -0
  21. package/dist/components/assets/assetsContent/AssetGalleryItem.d.ts +73 -0
  22. package/dist/components/assets/assetsContent/AssetsContent.d.ts +51 -0
  23. package/dist/components/assets/assetsContent/index.d.ts +1 -0
  24. package/dist/components/assets/assetsDeleteDialog/AssetsDeleteDialog.d.ts +22 -0
  25. package/dist/components/assets/assetsDeleteDialog/index.d.ts +1 -0
  26. package/dist/components/assets/assetsPagination/index.d.ts +1 -0
  27. package/dist/components/assets/assetsPagination/useAssetsPagination.d.ts +38 -0
  28. package/dist/components/assets/assetsPreview/AssetsPreview.d.ts +54 -0
  29. package/dist/components/assets/assetsPreview/index.d.ts +1 -0
  30. package/dist/components/assets/assetsSearchDialog/AssetsSearchDialog.d.ts +18 -0
  31. package/dist/components/assets/assetsSearchDialog/constants.d.ts +12 -0
  32. package/dist/components/assets/assetsSearchDialog/form/AssetsSearchDialogForm.d.ts +22 -0
  33. package/dist/components/assets/assetsSearchDialog/form/index.d.ts +1 -0
  34. package/dist/components/assets/assetsSearchDialog/index.d.ts +1 -0
  35. package/dist/components/assets/assetsSearchDialog/recentSearchItem/RecentSearchItem.d.ts +23 -0
  36. package/dist/components/assets/assetsSearchDialog/recentSearchItem/index.d.ts +1 -0
  37. package/dist/components/assets/assetsSearchDialog/utils.d.ts +82 -0
  38. package/dist/components/assets/assetsSelection/index.d.ts +1 -0
  39. package/dist/components/assets/assetsSelection/useAssetsSelection.d.ts +25 -0
  40. package/dist/components/assets/constants/constants.d.ts +13 -0
  41. package/dist/components/assets/constants/index.d.ts +1 -0
  42. package/dist/components/assets/displayOptions/DisplayOptions.d.ts +55 -0
  43. package/dist/components/assets/displayOptions/index.d.ts +2 -0
  44. package/dist/components/assets/index.d.ts +1 -0
  45. package/dist/components/assets/loader/GalleryLoader.d.ts +25 -0
  46. package/dist/components/assets/loader/index.d.ts +2 -0
  47. package/dist/components/assets/loader/useLoader.d.ts +14 -0
  48. package/dist/components/assets/srcSet/index.d.ts +1 -0
  49. package/dist/components/assets/srcSet/useSrcSet.d.ts +37 -0
  50. package/dist/components/assets/uploadIndicator/UploadIndicator.d.ts +3 -0
  51. package/dist/components/assets/uploadIndicator/index.d.ts +1 -0
  52. package/dist/components/categoryPropertiesDrawer/CategoryPropertiesDrawer.d.ts +38 -0
  53. package/dist/components/categoryPropertiesDrawer/index.d.ts +1 -0
  54. package/dist/components/date/Date.d.ts +12 -0
  55. package/dist/components/date/index.d.ts +1 -0
  56. package/dist/components/errorContainer/ErrorContainer.d.ts +9 -0
  57. package/dist/components/errorContainer/index.d.ts +1 -0
  58. package/dist/components/index.d.ts +9 -0
  59. package/dist/components/notifications/Notifications.d.ts +3 -0
  60. package/dist/components/notifications/index.d.ts +1 -0
  61. package/dist/components/timeLeft/TimeLeft.d.ts +15 -0
  62. package/dist/components/timeLeft/index.d.ts +1 -0
  63. package/dist/components/uploadButton/UploadButton.d.ts +10 -0
  64. package/dist/components/uploadButton/index.d.ts +1 -0
  65. package/dist/components/uploadDialog/UploadDialog.d.ts +3 -0
  66. package/dist/components/uploadDialog/index.d.ts +1 -0
  67. package/dist/components/uploadDialog/uploadDialogFooter/UploadDialogFooter.d.ts +18 -0
  68. package/dist/components/uploadDialog/uploadDialogFooter/index.d.ts +1 -0
  69. package/dist/components/uploadDialog/uploadProgressPanel/UploadProgressPanel.d.ts +50 -0
  70. package/dist/components/uploadDialog/uploadProgressPanel/index.d.ts +1 -0
  71. package/dist/components/uploadDialog/uploadProgressPanel/utils.d.ts +29 -0
  72. package/dist/components/uploadDialog/uploadQueue/UploadQueue.d.ts +18 -0
  73. package/dist/components/uploadDialog/uploadQueue/index.d.ts +1 -0
  74. package/dist/components/uploadDialog/utils.d.ts +12 -0
  75. package/dist/constants/constants.d.ts +36 -0
  76. package/dist/constants/index.d.ts +1 -0
  77. package/dist/core/Core.d.ts +5 -0
  78. package/dist/core/CoreContext.d.ts +44 -0
  79. package/dist/core/CoreErrorBoundary.d.ts +26 -0
  80. package/dist/core/CoreFallbackProviders.d.ts +9 -0
  81. package/dist/core/CoreProviders.d.ts +3 -0
  82. package/dist/core/index.d.ts +4 -0
  83. package/dist/index.d.ts +8 -0
  84. package/dist/index.js +1 -1
  85. package/dist/providers/api/ApiContext.d.ts +12 -0
  86. package/dist/providers/api/ApiProvider.d.ts +17 -0
  87. package/dist/providers/api/index.d.ts +3 -0
  88. package/dist/providers/api/useApi.d.ts +42 -0
  89. package/dist/providers/assetsConfig/AssetsConfigContext.d.ts +41 -0
  90. package/dist/providers/assetsConfig/AssetsConfigProvider.d.ts +16 -0
  91. package/dist/providers/assetsConfig/index.d.ts +3 -0
  92. package/dist/providers/assetsConfig/utils.d.ts +11 -0
  93. package/dist/providers/auth/AuthContext.d.ts +16 -0
  94. package/dist/providers/auth/AuthProvider.d.ts +14 -0
  95. package/dist/providers/auth/index.d.ts +3 -0
  96. package/dist/providers/auth/useAuth.d.ts +4 -0
  97. package/dist/providers/categoriesConfig/CategoriesConfigContext.d.ts +24 -0
  98. package/dist/providers/categoriesConfig/CategoriesConfigProvider.d.ts +10 -0
  99. package/dist/providers/categoriesConfig/index.d.ts +2 -0
  100. package/dist/providers/categoriesConfig/utils.d.ts +16 -0
  101. package/dist/providers/data/hooks/assets/index.d.ts +7 -0
  102. package/dist/providers/data/hooks/assets/useDeleteAssets.d.ts +71 -0
  103. package/dist/providers/data/hooks/assets/useGetAsset.d.ts +6 -0
  104. package/dist/providers/data/hooks/assets/useGetCategoryAssets.d.ts +11 -0
  105. package/dist/providers/data/hooks/assets/useGetRecentAssets.d.ts +10 -0
  106. package/dist/providers/data/hooks/assets/useLazyGetAsset.d.ts +10 -0
  107. package/dist/providers/data/hooks/assets/useUpdateAsset.d.ts +77 -0
  108. package/dist/providers/data/hooks/assets/useUpdateAssetLastUse.d.ts +71 -0
  109. package/dist/providers/data/hooks/categories/index.d.ts +8 -0
  110. package/dist/providers/data/hooks/categories/useCreateCategory.d.ts +71 -0
  111. package/dist/providers/data/hooks/categories/useDeleteCategory.d.ts +74 -0
  112. package/dist/providers/data/hooks/categories/useGetAdminCategories.d.ts +7 -0
  113. package/dist/providers/data/hooks/categories/useGetCategories.d.ts +6 -0
  114. package/dist/providers/data/hooks/categories/useGetCategory.d.ts +6 -0
  115. package/dist/providers/data/hooks/categories/useStageCategory.d.ts +14 -0
  116. package/dist/providers/data/hooks/categories/useUpdateCategoriesOrder.d.ts +71 -0
  117. package/dist/providers/data/hooks/categories/useUpdateCategory.d.ts +82 -0
  118. package/dist/providers/data/hooks/errors/index.d.ts +3 -0
  119. package/dist/providers/data/hooks/errors/useApiErrors.d.ts +4 -0
  120. package/dist/providers/data/hooks/errors/useAssetErrors.d.ts +3 -0
  121. package/dist/providers/data/hooks/errors/useCategoryErrors.d.ts +3 -0
  122. package/dist/providers/data/hooks/images/index.d.ts +2 -0
  123. package/dist/providers/data/hooks/images/useGetImagesConfig.d.ts +6 -0
  124. package/dist/providers/data/hooks/images/useUpdateImageFormatConfig.d.ts +76 -0
  125. package/dist/providers/data/hooks/index.d.ts +5 -0
  126. package/dist/providers/data/hooks/limits/index.d.ts +1 -0
  127. package/dist/providers/data/hooks/limits/useGetPlanLimits.d.ts +6 -0
  128. package/dist/providers/data/hooks/search/index.d.ts +1 -0
  129. package/dist/providers/data/hooks/search/useSearch.d.ts +12 -0
  130. package/dist/providers/data/hooks/useMutation.d.ts +67 -0
  131. package/dist/providers/data/hooks/useQuery.d.ts +3 -0
  132. package/dist/providers/data/index.d.ts +2 -0
  133. package/dist/providers/data/parsers/assets/index.d.ts +3 -0
  134. package/dist/providers/data/parsers/assets/parseAsset.d.ts +9 -0
  135. package/dist/providers/data/parsers/assets/parseAssets.d.ts +9 -0
  136. package/dist/providers/data/parsers/assets/types.d.ts +39 -0
  137. package/dist/providers/data/parsers/assetsMetadata/index.d.ts +2 -0
  138. package/dist/providers/data/parsers/assetsMetadata/parseAssetMetadata.d.ts +9 -0
  139. package/dist/providers/data/parsers/assetsMetadata/types.d.ts +22 -0
  140. package/dist/providers/data/parsers/categories/index.d.ts +4 -0
  141. package/dist/providers/data/parsers/categories/parseAdminCategories.d.ts +13 -0
  142. package/dist/providers/data/parsers/categories/parseCategories.d.ts +9 -0
  143. package/dist/providers/data/parsers/categories/parseCategory.d.ts +9 -0
  144. package/dist/providers/data/parsers/categories/types.d.ts +39 -0
  145. package/dist/providers/data/parsers/index.d.ts +3 -0
  146. package/dist/providers/index.d.ts +12 -0
  147. package/dist/providers/language/LanguageProvider.d.ts +4 -0
  148. package/dist/providers/language/index.d.ts +2 -0
  149. package/dist/providers/language/types.d.ts +22 -0
  150. package/dist/providers/language/utils.d.ts +16 -0
  151. package/dist/providers/limits/PlanLimitsContext.d.ts +11 -0
  152. package/dist/providers/limits/PlanLimitsProvider.d.ts +9 -0
  153. package/dist/providers/limits/index.d.ts +2 -0
  154. package/dist/providers/limits/utils.d.ts +7 -0
  155. package/dist/providers/notifications/NotificationsContext.d.ts +53 -0
  156. package/dist/providers/notifications/NotificationsProvider.d.ts +9 -0
  157. package/dist/providers/notifications/index.d.ts +2 -0
  158. package/dist/providers/query/QueryProvider.d.ts +12 -0
  159. package/dist/providers/query/index.d.ts +1 -0
  160. package/dist/providers/ui/UIProvider.d.ts +22 -0
  161. package/dist/providers/ui/UIProviderContainerMode.d.ts +4 -0
  162. package/dist/providers/ui/UIProviderDialogMode.d.ts +20 -0
  163. package/dist/providers/ui/index.d.ts +2 -0
  164. package/dist/providers/ui/types.d.ts +19 -0
  165. package/dist/providers/upload/UploadContext.d.ts +48 -0
  166. package/dist/providers/upload/UploadProvider.d.ts +14 -0
  167. package/dist/providers/upload/constants.d.ts +142 -0
  168. package/dist/providers/upload/index.d.ts +5 -0
  169. package/dist/providers/upload/types.d.ts +282 -0
  170. package/dist/providers/upload/uploadStateReducer.d.ts +10 -0
  171. package/dist/providers/upload/useStartUpload.d.ts +10 -0
  172. package/dist/providers/upload/useUpload.d.ts +21 -0
  173. package/dist/providers/upload/useUploadComponents.d.ts +21 -0
  174. package/dist/providers/upload/utils.d.ts +136 -0
  175. package/dist/providers/user/UserContext.d.ts +68 -0
  176. package/dist/providers/user/UserProvider.d.ts +13 -0
  177. package/dist/providers/user/constants.d.ts +19 -0
  178. package/dist/providers/user/index.d.ts +3 -0
  179. package/dist/providers/user/persistData.d.ts +14 -0
  180. package/dist/providers/user/types.d.ts +149 -0
  181. package/dist/providers/user/useUserData.d.ts +50 -0
  182. package/dist/services/api/api/api.d.ts +41 -0
  183. package/dist/services/api/api/index.d.ts +1 -0
  184. package/dist/services/api/assets/assets.d.ts +98 -0
  185. package/dist/services/api/assets/index.d.ts +1 -0
  186. package/dist/services/api/categories/categories.d.ts +50 -0
  187. package/dist/services/api/categories/index.d.ts +1 -0
  188. package/dist/services/api/client/ApiClient.d.ts +108 -0
  189. package/dist/services/api/client/ApiClientError.d.ts +37 -0
  190. package/dist/services/api/client/index.d.ts +3 -0
  191. package/dist/services/api/client/types.d.ts +19 -0
  192. package/dist/services/api/errors/ApiErrorHandler.d.ts +53 -0
  193. package/dist/services/api/errors/index.d.ts +2 -0
  194. package/dist/services/api/errors/types.d.ts +6 -0
  195. package/dist/services/api/images/images.d.ts +18 -0
  196. package/dist/services/api/images/index.d.ts +1 -0
  197. package/dist/services/api/index.d.ts +5 -0
  198. package/dist/services/api/limits/index.d.ts +1 -0
  199. package/dist/services/api/limits/limits.d.ts +10 -0
  200. package/dist/services/api/search/index.d.ts +1 -0
  201. package/dist/services/api/search/search.d.ts +10 -0
  202. package/dist/services/api/types/assets.d.ts +131 -0
  203. package/dist/services/api/types/assetsMetadata.d.ts +24 -0
  204. package/dist/services/api/types/categories.d.ts +86 -0
  205. package/dist/services/api/types/common.d.ts +16 -0
  206. package/dist/services/api/types/images.d.ts +8 -0
  207. package/dist/services/api/types/index.d.ts +7 -0
  208. package/dist/services/api/types/limits.d.ts +11 -0
  209. package/dist/services/api/types/search.d.ts +122 -0
  210. package/dist/services/auth/AuthClient.d.ts +89 -0
  211. package/dist/services/auth/Token.d.ts +55 -0
  212. package/dist/services/auth/error.d.ts +6 -0
  213. package/dist/services/auth/index.d.ts +3 -0
  214. package/dist/services/auth/types.d.ts +27 -0
  215. package/dist/services/index.d.ts +2 -0
  216. package/dist/translations/bg.js +1 -1
  217. package/dist/translations/bn.js +1 -1
  218. package/dist/translations/ca.js +1 -1
  219. package/dist/translations/cs.js +1 -1
  220. package/dist/translations/da.js +1 -1
  221. package/dist/translations/de.js +1 -1
  222. package/dist/translations/el.js +1 -1
  223. package/dist/translations/en.js +1 -1
  224. package/dist/translations/es-la.js +1 -1
  225. package/dist/translations/es-mx.js +1 -1
  226. package/dist/translations/es.js +1 -1
  227. package/dist/translations/et.js +1 -1
  228. package/dist/translations/fi.js +1 -1
  229. package/dist/translations/fr-ca.js +1 -1
  230. package/dist/translations/fr.js +1 -1
  231. package/dist/translations/hi.js +1 -1
  232. package/dist/translations/hu.js +1 -1
  233. package/dist/translations/id.js +1 -1
  234. package/dist/translations/it.js +1 -1
  235. package/dist/translations/ja.js +1 -1
  236. package/dist/translations/ko.js +1 -1
  237. package/dist/translations/lt.js +1 -1
  238. package/dist/translations/mr.js +1 -1
  239. package/dist/translations/ms.js +1 -1
  240. package/dist/translations/nl.js +1 -1
  241. package/dist/translations/no.js +1 -1
  242. package/dist/translations/pl.js +1 -1
  243. package/dist/translations/pt-br.js +1 -1
  244. package/dist/translations/pt.js +1 -1
  245. package/dist/translations/ro.js +1 -1
  246. package/dist/translations/ru.js +1 -1
  247. package/dist/translations/sk.js +1 -1
  248. package/dist/translations/sr.js +1 -1
  249. package/dist/translations/sv.js +1 -1
  250. package/dist/translations/th.js +1 -1
  251. package/dist/translations/tr.js +1 -1
  252. package/dist/translations/uk.js +1 -1
  253. package/dist/translations/vi.js +1 -1
  254. package/dist/translations/zh-tw.js +1 -1
  255. package/dist/translations/zh.js +1 -1
  256. package/dist/views/adminPanel/AdminPanel.d.ts +3 -0
  257. package/dist/views/adminPanel/assetCategories/AssetCategories.d.ts +9 -0
  258. package/dist/views/adminPanel/assetCategories/AssetCategoryPanel.d.ts +23 -0
  259. package/dist/views/adminPanel/assetCategories/AssetCategoryPanelEdit.d.ts +26 -0
  260. package/dist/views/adminPanel/assetCategories/AssetCategoryPanelLoader.d.ts +9 -0
  261. package/dist/views/adminPanel/assetCategories/ConfirmCategoryDialog.d.ts +29 -0
  262. package/dist/views/adminPanel/assetCategories/index.d.ts +1 -0
  263. package/dist/views/adminPanel/assetCategories/useAssetCategories.d.ts +28 -0
  264. package/dist/views/adminPanel/assetCategories/useFormValidation.d.ts +10 -0
  265. package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanel.d.ts +22 -0
  266. package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanelLoader.d.ts +3 -0
  267. package/dist/views/adminPanel/imagesSettings/ImagesSettings.d.ts +3 -0
  268. package/dist/views/adminPanel/imagesSettings/constants.d.ts +5 -0
  269. package/dist/views/adminPanel/imagesSettings/index.d.ts +1 -0
  270. package/dist/views/adminPanel/imagesSettings/useImageSettings.d.ts +9 -0
  271. package/dist/views/adminPanel/index.d.ts +1 -0
  272. package/dist/views/category/Category.d.ts +18 -0
  273. package/dist/views/category/index.d.ts +1 -0
  274. package/dist/views/category/utils/index.d.ts +1 -0
  275. package/dist/views/category/utils/utils.d.ts +12 -0
  276. package/dist/views/index.d.ts +1 -0
  277. package/dist/views/recentAssets/RecentAssets.d.ts +19 -0
  278. package/dist/views/recentAssets/index.d.ts +1 -0
  279. package/dist/views/search/Search.d.ts +15 -0
  280. package/dist/views/search/index.d.ts +1 -0
  281. package/dist/views/search/utils.d.ts +19 -0
  282. package/dist/views/views/Views.d.ts +3 -0
  283. package/dist/views/views/index.d.ts +1 -0
  284. package/dist/views/views/navbar/Navbar.d.ts +46 -0
  285. package/dist/views/views/navbar/index.d.ts +1 -0
  286. package/package.json +8 -7
  287. package/dist/translations/lv.js +0 -1
@@ -0,0 +1,74 @@
1
+ declare type DeleteCategoryData = {
2
+ categoryId: string;
3
+ };
4
+ /**
5
+ * Creates 'delete category' mutation.
6
+ *
7
+ * @returns mutation for deleting category
8
+ */
9
+ export declare const useDeleteCategory: () => {
10
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
11
+ data: undefined;
12
+ error: null;
13
+ isError: false;
14
+ isIdle: true;
15
+ isLoading: false;
16
+ isSuccess: false;
17
+ status: "idle";
18
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
19
+ reset: () => void;
20
+ context: unknown;
21
+ failureCount: number;
22
+ failureReason: Error | null;
23
+ isPaused: boolean;
24
+ variables: DeleteCategoryData | undefined;
25
+ } | {
26
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
27
+ data: undefined;
28
+ error: null;
29
+ isError: false;
30
+ isIdle: false;
31
+ isLoading: true;
32
+ isSuccess: false;
33
+ status: "loading";
34
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
35
+ reset: () => void;
36
+ context: unknown;
37
+ failureCount: number;
38
+ failureReason: Error | null;
39
+ isPaused: boolean;
40
+ variables: DeleteCategoryData | undefined;
41
+ } | {
42
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
43
+ data: undefined;
44
+ error: Error;
45
+ isError: true;
46
+ isIdle: false;
47
+ isLoading: false;
48
+ isSuccess: false;
49
+ status: "error";
50
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
51
+ reset: () => void;
52
+ context: unknown;
53
+ failureCount: number;
54
+ failureReason: Error | null;
55
+ isPaused: boolean;
56
+ variables: DeleteCategoryData | undefined;
57
+ } | {
58
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
59
+ data: unknown;
60
+ error: null;
61
+ isError: false;
62
+ isIdle: false;
63
+ isLoading: false;
64
+ isSuccess: true;
65
+ status: "success";
66
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, DeleteCategoryData, unknown>;
67
+ reset: () => void;
68
+ context: unknown;
69
+ failureCount: number;
70
+ failureReason: Error | null;
71
+ isPaused: boolean;
72
+ variables: DeleteCategoryData | undefined;
73
+ };
74
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ParsedAdminCategory } from '../../parsers';
2
+ /**
3
+ * Gets list of admin categories.
4
+ *
5
+ * @returns current list of categories
6
+ */
7
+ export declare const useGetAdminCategories: () => import("@tanstack/react-query").UseQueryResult<ParsedAdminCategory[], Error>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gets list of categories.
3
+ *
4
+ * @returns current list of categories
5
+ */
6
+ export declare const useGetCategories: () => import("@tanstack/react-query").UseQueryResult<import("../../parsers").ParsedCategory[], Error>;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Gets single category by id.
3
+ *
4
+ * @returns category data
5
+ */
6
+ export declare const useGetCategory: (categoryId: string) => import("@tanstack/react-query").UseQueryResult<import("../../parsers").ParsedCategory, Error>;
@@ -0,0 +1,14 @@
1
+ import { ParsedAdminCategory } from '../../parsers';
2
+ /**
3
+ * Manages cache for categories that are in staging phase.
4
+ *
5
+ * This is a set of synchronous methods.
6
+ *
7
+ * @returns cache mutation
8
+ */
9
+ export declare const useStageCategory: () => {
10
+ stageCategory: (category: Omit<ParsedAdminCategory, 'id'>) => void;
11
+ deleteCategory: (id: string) => void;
12
+ editCategory: (id: string) => void;
13
+ unstageCategory: (id: string) => void;
14
+ };
@@ -0,0 +1,71 @@
1
+ import { ApiUpdateCategoriesOrderPayload } from '../../../../services';
2
+ /**
3
+ * Creates 'update categories order' mutation.
4
+ *
5
+ * @returns mutation for updating categories order
6
+ */
7
+ export declare const useUpdateCategoriesOrder: () => {
8
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
9
+ data: undefined;
10
+ error: null;
11
+ isError: false;
12
+ isIdle: true;
13
+ isLoading: false;
14
+ isSuccess: false;
15
+ status: "idle";
16
+ mutate: import("@tanstack/react-query").UseMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
17
+ reset: () => void;
18
+ context: unknown;
19
+ failureCount: number;
20
+ failureReason: Error | null;
21
+ isPaused: boolean;
22
+ variables: ApiUpdateCategoriesOrderPayload | undefined;
23
+ } | {
24
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
25
+ data: undefined;
26
+ error: null;
27
+ isError: false;
28
+ isIdle: false;
29
+ isLoading: true;
30
+ isSuccess: false;
31
+ status: "loading";
32
+ mutate: import("@tanstack/react-query").UseMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
33
+ reset: () => void;
34
+ context: unknown;
35
+ failureCount: number;
36
+ failureReason: Error | null;
37
+ isPaused: boolean;
38
+ variables: ApiUpdateCategoriesOrderPayload | undefined;
39
+ } | {
40
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
41
+ data: undefined;
42
+ error: Error;
43
+ isError: true;
44
+ isIdle: false;
45
+ isLoading: false;
46
+ isSuccess: false;
47
+ status: "error";
48
+ mutate: import("@tanstack/react-query").UseMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
49
+ reset: () => void;
50
+ context: unknown;
51
+ failureCount: number;
52
+ failureReason: Error | null;
53
+ isPaused: boolean;
54
+ variables: ApiUpdateCategoriesOrderPayload | undefined;
55
+ } | {
56
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
57
+ data: undefined;
58
+ error: null;
59
+ isError: false;
60
+ isIdle: false;
61
+ isLoading: false;
62
+ isSuccess: true;
63
+ status: "success";
64
+ mutate: import("@tanstack/react-query").UseMutateFunction<undefined, Error, ApiUpdateCategoriesOrderPayload, unknown>;
65
+ reset: () => void;
66
+ context: unknown;
67
+ failureCount: number;
68
+ failureReason: Error | null;
69
+ isPaused: boolean;
70
+ variables: ApiUpdateCategoriesOrderPayload | undefined;
71
+ };
@@ -0,0 +1,82 @@
1
+ import { ApiUpdateCategoryPayload } from '../../../../services';
2
+ interface UpdateCategoryData {
3
+ /**
4
+ * Category id.
5
+ */
6
+ categoryId: string;
7
+ /**
8
+ * Payload for update.
9
+ */
10
+ payload: ApiUpdateCategoryPayload;
11
+ }
12
+ /**
13
+ * Creates 'update category' mutation.
14
+ *
15
+ * @returns mutation for updating category
16
+ */
17
+ export declare const useUpdateCategory: () => {
18
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
19
+ data: undefined;
20
+ error: null;
21
+ isError: false;
22
+ isIdle: true;
23
+ isLoading: false;
24
+ isSuccess: false;
25
+ status: "idle";
26
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
27
+ reset: () => void;
28
+ context: unknown;
29
+ failureCount: number;
30
+ failureReason: Error | null;
31
+ isPaused: boolean;
32
+ variables: UpdateCategoryData | undefined;
33
+ } | {
34
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
35
+ data: undefined;
36
+ error: null;
37
+ isError: false;
38
+ isIdle: false;
39
+ isLoading: true;
40
+ isSuccess: false;
41
+ status: "loading";
42
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
43
+ reset: () => void;
44
+ context: unknown;
45
+ failureCount: number;
46
+ failureReason: Error | null;
47
+ isPaused: boolean;
48
+ variables: UpdateCategoryData | undefined;
49
+ } | {
50
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
51
+ data: undefined;
52
+ error: Error;
53
+ isError: true;
54
+ isIdle: false;
55
+ isLoading: false;
56
+ isSuccess: false;
57
+ status: "error";
58
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
59
+ reset: () => void;
60
+ context: unknown;
61
+ failureCount: number;
62
+ failureReason: Error | null;
63
+ isPaused: boolean;
64
+ variables: UpdateCategoryData | undefined;
65
+ } | {
66
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
67
+ data: unknown;
68
+ error: null;
69
+ isError: false;
70
+ isIdle: false;
71
+ isLoading: false;
72
+ isSuccess: true;
73
+ status: "success";
74
+ mutate: import("@tanstack/react-query").UseMutateFunction<unknown, Error, UpdateCategoryData, unknown>;
75
+ reset: () => void;
76
+ context: unknown;
77
+ failureCount: number;
78
+ failureReason: Error | null;
79
+ isPaused: boolean;
80
+ variables: UpdateCategoryData | undefined;
81
+ };
82
+ export {};
@@ -0,0 +1,3 @@
1
+ export * from './useApiErrors';
2
+ export * from './useAssetErrors';
3
+ export * from './useCategoryErrors';
@@ -0,0 +1,4 @@
1
+ import { ApiErrorHandlers } from '../../../../services';
2
+ export declare const useApiErrors: () => {
3
+ handleApiError: (error: Error, errorHandlers?: ApiErrorHandlers | undefined) => void;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useAssetErrors: () => {
2
+ pushMissingAssetErrorNotification: () => void;
3
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useCategoryErrors: () => {
2
+ pushMissingCategoryErrorNotification: () => void;
3
+ };
@@ -0,0 +1,2 @@
1
+ export * from './useGetImagesConfig';
2
+ export * from './useUpdateImageFormatConfig';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Returns images configuration.
3
+ *
4
+ * @returns images configuration
5
+ */
6
+ export declare const useGetImagesConfig: () => import("@tanstack/react-query").UseQueryResult<Record<string, import("../../../../services").Maybe<import("../../../../services").ApiImageFormatConfig>>, Error>;
@@ -0,0 +1,76 @@
1
+ import { ApiImagesConfig, ApiImageFormatConfig } from '../../../../services';
2
+ declare type UpdateImageFormatConfig = {
3
+ format: string;
4
+ payload: ApiImageFormatConfig;
5
+ };
6
+ /**
7
+ * Creates update image configuration for single format mutation.
8
+ *
9
+ * @returns mutation for updating image configuration for single format
10
+ */
11
+ export declare const useUpdateImageFormatConfig: () => {
12
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
13
+ data: undefined;
14
+ error: null;
15
+ isError: false;
16
+ isIdle: true;
17
+ isLoading: false;
18
+ isSuccess: false;
19
+ status: "idle";
20
+ mutate: import("@tanstack/react-query").UseMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
21
+ reset: () => void;
22
+ context: unknown;
23
+ failureCount: number;
24
+ failureReason: Error | null;
25
+ isPaused: boolean;
26
+ variables: UpdateImageFormatConfig | undefined;
27
+ } | {
28
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
29
+ data: undefined;
30
+ error: null;
31
+ isError: false;
32
+ isIdle: false;
33
+ isLoading: true;
34
+ isSuccess: false;
35
+ status: "loading";
36
+ mutate: import("@tanstack/react-query").UseMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
37
+ reset: () => void;
38
+ context: unknown;
39
+ failureCount: number;
40
+ failureReason: Error | null;
41
+ isPaused: boolean;
42
+ variables: UpdateImageFormatConfig | undefined;
43
+ } | {
44
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
45
+ data: undefined;
46
+ error: Error;
47
+ isError: true;
48
+ isIdle: false;
49
+ isLoading: false;
50
+ isSuccess: false;
51
+ status: "error";
52
+ mutate: import("@tanstack/react-query").UseMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
53
+ reset: () => void;
54
+ context: unknown;
55
+ failureCount: number;
56
+ failureReason: Error | null;
57
+ isPaused: boolean;
58
+ variables: UpdateImageFormatConfig | undefined;
59
+ } | {
60
+ mutateAsync: import("../types").ErrorSuppressedMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
61
+ data: ApiImagesConfig;
62
+ error: null;
63
+ isError: false;
64
+ isIdle: false;
65
+ isLoading: false;
66
+ isSuccess: true;
67
+ status: "success";
68
+ mutate: import("@tanstack/react-query").UseMutateFunction<ApiImagesConfig, Error, UpdateImageFormatConfig, unknown>;
69
+ reset: () => void;
70
+ context: unknown;
71
+ failureCount: number;
72
+ failureReason: Error | null;
73
+ isPaused: boolean;
74
+ variables: UpdateImageFormatConfig | undefined;
75
+ };
76
+ export {};
@@ -0,0 +1,5 @@
1
+ export * from './assets';
2
+ export * from './categories';
3
+ export * from './images';
4
+ export * from './limits';
5
+ export * from './search';
@@ -0,0 +1 @@
1
+ export * from './useGetPlanLimits';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Manages an environment plan limits.
3
+ *
4
+ * @returns details of plan limits.
5
+ */
6
+ export declare const useGetPlanLimits: () => import("@tanstack/react-query").UseQueryResult<import("../../../../services").ApiPlanLimits | undefined, Error>;
@@ -0,0 +1 @@
1
+ export * from './useSearch';
@@ -0,0 +1,12 @@
1
+ import { ApiSearchParams } from '../../../../services';
2
+ /**
3
+ * Creates a search query.
4
+ *
5
+ * @returns search results
6
+ */
7
+ export declare const useSearch: (searchQuery: ApiSearchParams) => import("@tanstack/react-query").UseQueryResult<{
8
+ totalCount: number | undefined;
9
+ limit: number | undefined;
10
+ offset: number | undefined;
11
+ items: import("../../parsers").ParsedAsset[];
12
+ }, Error>;
@@ -0,0 +1,67 @@
1
+ import { MutationFunction } from '@tanstack/react-query';
2
+ import { UseExtendedMutationOptions, ErrorSuppressedMutateFunction } from './types';
3
+ export declare const useMutation: <TData = unknown, TError extends Error = Error, TVariables = void, TContext = unknown>(mutationFn: MutationFunction<TData, TVariables>, options?: UseExtendedMutationOptions<TData, TError, TVariables, TContext> | undefined) => {
4
+ mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
5
+ data: undefined;
6
+ error: null;
7
+ isError: false;
8
+ isIdle: true;
9
+ isLoading: false;
10
+ isSuccess: false;
11
+ status: "idle";
12
+ mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
13
+ reset: () => void;
14
+ context: TContext | undefined;
15
+ failureCount: number;
16
+ failureReason: TError | null;
17
+ isPaused: boolean;
18
+ variables: TVariables | undefined;
19
+ } | {
20
+ mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
21
+ data: undefined;
22
+ error: null;
23
+ isError: false;
24
+ isIdle: false;
25
+ isLoading: true;
26
+ isSuccess: false;
27
+ status: "loading";
28
+ mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
29
+ reset: () => void;
30
+ context: TContext | undefined;
31
+ failureCount: number;
32
+ failureReason: TError | null;
33
+ isPaused: boolean;
34
+ variables: TVariables | undefined;
35
+ } | {
36
+ mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
37
+ data: undefined;
38
+ error: TError;
39
+ isError: true;
40
+ isIdle: false;
41
+ isLoading: false;
42
+ isSuccess: false;
43
+ status: "error";
44
+ mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
45
+ reset: () => void;
46
+ context: TContext | undefined;
47
+ failureCount: number;
48
+ failureReason: TError | null;
49
+ isPaused: boolean;
50
+ variables: TVariables | undefined;
51
+ } | {
52
+ mutateAsync: ErrorSuppressedMutateFunction<TData, TError, TVariables, TContext>;
53
+ data: TData;
54
+ error: null;
55
+ isError: false;
56
+ isIdle: false;
57
+ isLoading: false;
58
+ isSuccess: true;
59
+ status: "success";
60
+ mutate: import("@tanstack/react-query").UseMutateFunction<TData, TError, TVariables, TContext>;
61
+ reset: () => void;
62
+ context: TContext | undefined;
63
+ failureCount: number;
64
+ failureReason: TError | null;
65
+ isPaused: boolean;
66
+ variables: TVariables | undefined;
67
+ };
@@ -0,0 +1,3 @@
1
+ import { QueryFunction, QueryKey } from '@tanstack/react-query';
2
+ import { UseExtendedQueryOptions } from './types';
3
+ export declare const useQuery: <TQueryFnData = unknown, TError extends Error = Error, TData = TQueryFnData, TQueryKey extends QueryKey = QueryKey>(queryKey: TQueryKey, queryFn: QueryFunction<TQueryFnData, TQueryKey>, options?: UseExtendedQueryOptions<TQueryFnData, TError, TData, TQueryKey> | undefined) => import("@tanstack/react-query").UseQueryResult<TData, TError>;
@@ -0,0 +1,2 @@
1
+ export * from './hooks';
2
+ export * from './parsers';
@@ -0,0 +1,3 @@
1
+ export * from './parseAsset';
2
+ export * from './parseAssets';
3
+ export * from './types';
@@ -0,0 +1,9 @@
1
+ import { ApiAsset } from '../../../../services';
2
+ import { ParsedAsset } from './types';
3
+ /**
4
+ * Parses asset from API. Provides fallback value if needed.
5
+ *
6
+ * @param asset asset to parse
7
+ * @returns parsed asset
8
+ */
9
+ export declare const parseAsset: (asset?: ApiAsset) => ParsedAsset;
@@ -0,0 +1,9 @@
1
+ import { ApiAsset } from '../../../../services';
2
+ import { ParsedAsset } from './types';
3
+ /**
4
+ * Parses a list of assets. Provides fallback if needed.
5
+ *
6
+ * @param assets list of assets to parse
7
+ * @returns list of parsed assets
8
+ */
9
+ export declare const parseAssets: (assets?: ApiAsset[]) => ParsedAsset[];
@@ -0,0 +1,39 @@
1
+ import { ParsedAssetMetadata } from '../assetsMetadata';
2
+ export interface ParsedAsset {
3
+ /**
4
+ * Asset id.
5
+ */
6
+ id: string;
7
+ /**
8
+ * Asset name.
9
+ */
10
+ name: string;
11
+ /**
12
+ * Asset file extension.
13
+ */
14
+ extension: string;
15
+ /**
16
+ * Converted asset size.
17
+ */
18
+ size?: number;
19
+ /**
20
+ * Asset last modification time.
21
+ */
22
+ lastModifiedAt?: string;
23
+ /**
24
+ * Asset upload date.
25
+ */
26
+ uploadedAt?: string;
27
+ /**
28
+ * Asset metadata.
29
+ */
30
+ metadata: ParsedAssetMetadata;
31
+ /**
32
+ * Asset category id.
33
+ */
34
+ categoryId: string;
35
+ /**
36
+ * Asset tags.
37
+ */
38
+ tags: string[];
39
+ }
@@ -0,0 +1,2 @@
1
+ export * from './parseAssetMetadata';
2
+ export * from './types';
@@ -0,0 +1,9 @@
1
+ import { ApiAssetMetadata } from '../../../../services';
2
+ import { ParsedAssetMetadata } from './types';
3
+ /**
4
+ * Parses asset's metadata. Provides fallback values if necessary.
5
+ *
6
+ * @param metadata asset's metadata to parse
7
+ * @returns parsed metadata
8
+ */
9
+ export declare const parseAssetMetadata: (metadata?: ApiAssetMetadata) => ParsedAssetMetadata;
@@ -0,0 +1,22 @@
1
+ export interface ParsedAssetMetadata {
2
+ /**
3
+ * Asset blurhash.
4
+ */
5
+ blurHash?: string;
6
+ /**
7
+ * Asset description.
8
+ */
9
+ description: string;
10
+ /**
11
+ * Asset width in px.
12
+ */
13
+ width?: number;
14
+ /**
15
+ * Asset height in px.
16
+ */
17
+ height?: number;
18
+ /**
19
+ * Set of custom attributes.
20
+ */
21
+ customAttributes?: Record<string, unknown>;
22
+ }
@@ -0,0 +1,4 @@
1
+ export * from './parseAdminCategories';
2
+ export * from './parseCategories';
3
+ export * from './parseCategory';
4
+ export * from './types';
@@ -0,0 +1,13 @@
1
+ import { ApiAdminCategories } from '../../../../services';
2
+ import { ParsedAdminCategory } from './types';
3
+ /**
4
+ * Parses admin categories from API. Merges them with existing ones. Provides fallbacks if needed.
5
+ *
6
+ * Categories fetched from the backend must be merged manully with existing ones.
7
+ * This is due to the fact that new categories might be in staging phase, e.g. newly added or updated categories (but not saved yet).
8
+ *
9
+ * @param categories categories from API
10
+ * @param cachedCategories cached categories
11
+ * @returns parsed categories
12
+ */
13
+ export declare const parseAdminCategories: (categories?: ApiAdminCategories, cachedCategories?: ParsedAdminCategory[]) => ParsedAdminCategory[];
@@ -0,0 +1,9 @@
1
+ import { ApiCategory, Maybe } from '../../../../services';
2
+ import { ParsedCategory } from './types';
3
+ /**
4
+ * Parses a list of categories. Provides fallback if needed.
5
+ *
6
+ * @param categories categories from API
7
+ * @returns parsed category
8
+ */
9
+ export declare const parseCategories: (categories: Maybe<ApiCategory[]>) => ParsedCategory[];
@@ -0,0 +1,9 @@
1
+ import { ApiCategory, Maybe } from '../../../../services';
2
+ import { ParsedCategory } from './types';
3
+ /**
4
+ * Parses API category.
5
+ *
6
+ * @param category category from API
7
+ * @returns parsed category
8
+ */
9
+ export declare const parseCategory: (category: Maybe<ApiCategory>) => ParsedCategory;