@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.
- package/README.md +3 -3
- package/dist/components/assetSize/AssetSize.d.ts +12 -0
- package/dist/components/assetSize/getAssetSize.d.ts +1 -0
- package/dist/components/assetSize/index.d.ts +2 -0
- package/dist/components/assets/Assets.d.ts +72 -0
- package/dist/components/assets/AssetsBottombar.d.ts +33 -0
- package/dist/components/assets/AssetsTopbar.d.ts +71 -0
- package/dist/components/assets/asset/Asset.d.ts +45 -0
- package/dist/components/assets/asset/AssetPreview.d.ts +45 -0
- package/dist/components/assets/asset/index.d.ts +1 -0
- package/dist/components/assets/assetEditForm/AssetEditForm.d.ts +39 -0
- package/dist/components/assets/assetEditForm/index.d.ts +1 -0
- package/dist/components/assets/assetEditForm/useFormValidation.d.ts +8 -0
- package/dist/components/assets/assetPropertiesDialog/AssetPropertiesDialog.d.ts +27 -0
- package/dist/components/assets/assetPropertiesDialog/index.d.ts +1 -0
- package/dist/components/assets/assetPropertiesDialog/useFormValidation.d.ts +8 -0
- package/dist/components/assets/assetPropertiesDrawer/AssetPropertiesDrawer.d.ts +35 -0
- package/dist/components/assets/assetPropertiesDrawer/index.d.ts +1 -0
- package/dist/components/assets/assetsActions/index.d.ts +1 -0
- package/dist/components/assets/assetsActions/useAssetsActions.d.ts +35 -0
- package/dist/components/assets/assetsContent/AssetGalleryItem.d.ts +73 -0
- package/dist/components/assets/assetsContent/AssetsContent.d.ts +51 -0
- package/dist/components/assets/assetsContent/index.d.ts +1 -0
- package/dist/components/assets/assetsDeleteDialog/AssetsDeleteDialog.d.ts +22 -0
- package/dist/components/assets/assetsDeleteDialog/index.d.ts +1 -0
- package/dist/components/assets/assetsPagination/index.d.ts +1 -0
- package/dist/components/assets/assetsPagination/useAssetsPagination.d.ts +38 -0
- package/dist/components/assets/assetsPreview/AssetsPreview.d.ts +54 -0
- package/dist/components/assets/assetsPreview/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/AssetsSearchDialog.d.ts +18 -0
- package/dist/components/assets/assetsSearchDialog/constants.d.ts +12 -0
- package/dist/components/assets/assetsSearchDialog/form/AssetsSearchDialogForm.d.ts +22 -0
- package/dist/components/assets/assetsSearchDialog/form/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/recentSearchItem/RecentSearchItem.d.ts +23 -0
- package/dist/components/assets/assetsSearchDialog/recentSearchItem/index.d.ts +1 -0
- package/dist/components/assets/assetsSearchDialog/utils.d.ts +82 -0
- package/dist/components/assets/assetsSelection/index.d.ts +1 -0
- package/dist/components/assets/assetsSelection/useAssetsSelection.d.ts +25 -0
- package/dist/components/assets/constants/constants.d.ts +13 -0
- package/dist/components/assets/constants/index.d.ts +1 -0
- package/dist/components/assets/displayOptions/DisplayOptions.d.ts +55 -0
- package/dist/components/assets/displayOptions/index.d.ts +2 -0
- package/dist/components/assets/index.d.ts +1 -0
- package/dist/components/assets/loader/GalleryLoader.d.ts +25 -0
- package/dist/components/assets/loader/index.d.ts +2 -0
- package/dist/components/assets/loader/useLoader.d.ts +14 -0
- package/dist/components/assets/srcSet/index.d.ts +1 -0
- package/dist/components/assets/srcSet/useSrcSet.d.ts +37 -0
- package/dist/components/assets/uploadIndicator/UploadIndicator.d.ts +3 -0
- package/dist/components/assets/uploadIndicator/index.d.ts +1 -0
- package/dist/components/categoryPropertiesDrawer/CategoryPropertiesDrawer.d.ts +38 -0
- package/dist/components/categoryPropertiesDrawer/index.d.ts +1 -0
- package/dist/components/date/Date.d.ts +12 -0
- package/dist/components/date/index.d.ts +1 -0
- package/dist/components/errorContainer/ErrorContainer.d.ts +9 -0
- package/dist/components/errorContainer/index.d.ts +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/notifications/Notifications.d.ts +3 -0
- package/dist/components/notifications/index.d.ts +1 -0
- package/dist/components/timeLeft/TimeLeft.d.ts +15 -0
- package/dist/components/timeLeft/index.d.ts +1 -0
- package/dist/components/uploadButton/UploadButton.d.ts +10 -0
- package/dist/components/uploadButton/index.d.ts +1 -0
- package/dist/components/uploadDialog/UploadDialog.d.ts +3 -0
- package/dist/components/uploadDialog/index.d.ts +1 -0
- package/dist/components/uploadDialog/uploadDialogFooter/UploadDialogFooter.d.ts +18 -0
- package/dist/components/uploadDialog/uploadDialogFooter/index.d.ts +1 -0
- package/dist/components/uploadDialog/uploadProgressPanel/UploadProgressPanel.d.ts +50 -0
- package/dist/components/uploadDialog/uploadProgressPanel/index.d.ts +1 -0
- package/dist/components/uploadDialog/uploadProgressPanel/utils.d.ts +29 -0
- package/dist/components/uploadDialog/uploadQueue/UploadQueue.d.ts +18 -0
- package/dist/components/uploadDialog/uploadQueue/index.d.ts +1 -0
- package/dist/components/uploadDialog/utils.d.ts +12 -0
- package/dist/constants/constants.d.ts +36 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/core/Core.d.ts +5 -0
- package/dist/core/CoreContext.d.ts +44 -0
- package/dist/core/CoreErrorBoundary.d.ts +26 -0
- package/dist/core/CoreFallbackProviders.d.ts +9 -0
- package/dist/core/CoreProviders.d.ts +3 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +1 -1
- package/dist/providers/api/ApiContext.d.ts +12 -0
- package/dist/providers/api/ApiProvider.d.ts +17 -0
- package/dist/providers/api/index.d.ts +3 -0
- package/dist/providers/api/useApi.d.ts +42 -0
- package/dist/providers/assetsConfig/AssetsConfigContext.d.ts +41 -0
- package/dist/providers/assetsConfig/AssetsConfigProvider.d.ts +16 -0
- package/dist/providers/assetsConfig/index.d.ts +3 -0
- package/dist/providers/assetsConfig/utils.d.ts +11 -0
- package/dist/providers/auth/AuthContext.d.ts +16 -0
- package/dist/providers/auth/AuthProvider.d.ts +14 -0
- package/dist/providers/auth/index.d.ts +3 -0
- package/dist/providers/auth/useAuth.d.ts +4 -0
- package/dist/providers/categoriesConfig/CategoriesConfigContext.d.ts +24 -0
- package/dist/providers/categoriesConfig/CategoriesConfigProvider.d.ts +10 -0
- package/dist/providers/categoriesConfig/index.d.ts +2 -0
- package/dist/providers/categoriesConfig/utils.d.ts +16 -0
- package/dist/providers/data/hooks/assets/index.d.ts +7 -0
- package/dist/providers/data/hooks/assets/useDeleteAssets.d.ts +71 -0
- package/dist/providers/data/hooks/assets/useGetAsset.d.ts +6 -0
- package/dist/providers/data/hooks/assets/useGetCategoryAssets.d.ts +11 -0
- package/dist/providers/data/hooks/assets/useGetRecentAssets.d.ts +10 -0
- package/dist/providers/data/hooks/assets/useLazyGetAsset.d.ts +10 -0
- package/dist/providers/data/hooks/assets/useUpdateAsset.d.ts +77 -0
- package/dist/providers/data/hooks/assets/useUpdateAssetLastUse.d.ts +71 -0
- package/dist/providers/data/hooks/categories/index.d.ts +8 -0
- package/dist/providers/data/hooks/categories/useCreateCategory.d.ts +71 -0
- package/dist/providers/data/hooks/categories/useDeleteCategory.d.ts +74 -0
- package/dist/providers/data/hooks/categories/useGetAdminCategories.d.ts +7 -0
- package/dist/providers/data/hooks/categories/useGetCategories.d.ts +6 -0
- package/dist/providers/data/hooks/categories/useGetCategory.d.ts +6 -0
- package/dist/providers/data/hooks/categories/useStageCategory.d.ts +14 -0
- package/dist/providers/data/hooks/categories/useUpdateCategoriesOrder.d.ts +71 -0
- package/dist/providers/data/hooks/categories/useUpdateCategory.d.ts +82 -0
- package/dist/providers/data/hooks/errors/index.d.ts +3 -0
- package/dist/providers/data/hooks/errors/useApiErrors.d.ts +4 -0
- package/dist/providers/data/hooks/errors/useAssetErrors.d.ts +3 -0
- package/dist/providers/data/hooks/errors/useCategoryErrors.d.ts +3 -0
- package/dist/providers/data/hooks/images/index.d.ts +2 -0
- package/dist/providers/data/hooks/images/useGetImagesConfig.d.ts +6 -0
- package/dist/providers/data/hooks/images/useUpdateImageFormatConfig.d.ts +76 -0
- package/dist/providers/data/hooks/index.d.ts +5 -0
- package/dist/providers/data/hooks/limits/index.d.ts +1 -0
- package/dist/providers/data/hooks/limits/useGetPlanLimits.d.ts +6 -0
- package/dist/providers/data/hooks/search/index.d.ts +1 -0
- package/dist/providers/data/hooks/search/useSearch.d.ts +12 -0
- package/dist/providers/data/hooks/useMutation.d.ts +67 -0
- package/dist/providers/data/hooks/useQuery.d.ts +3 -0
- package/dist/providers/data/index.d.ts +2 -0
- package/dist/providers/data/parsers/assets/index.d.ts +3 -0
- package/dist/providers/data/parsers/assets/parseAsset.d.ts +9 -0
- package/dist/providers/data/parsers/assets/parseAssets.d.ts +9 -0
- package/dist/providers/data/parsers/assets/types.d.ts +39 -0
- package/dist/providers/data/parsers/assetsMetadata/index.d.ts +2 -0
- package/dist/providers/data/parsers/assetsMetadata/parseAssetMetadata.d.ts +9 -0
- package/dist/providers/data/parsers/assetsMetadata/types.d.ts +22 -0
- package/dist/providers/data/parsers/categories/index.d.ts +4 -0
- package/dist/providers/data/parsers/categories/parseAdminCategories.d.ts +13 -0
- package/dist/providers/data/parsers/categories/parseCategories.d.ts +9 -0
- package/dist/providers/data/parsers/categories/parseCategory.d.ts +9 -0
- package/dist/providers/data/parsers/categories/types.d.ts +39 -0
- package/dist/providers/data/parsers/index.d.ts +3 -0
- package/dist/providers/index.d.ts +12 -0
- package/dist/providers/language/LanguageProvider.d.ts +4 -0
- package/dist/providers/language/index.d.ts +2 -0
- package/dist/providers/language/types.d.ts +22 -0
- package/dist/providers/language/utils.d.ts +16 -0
- package/dist/providers/limits/PlanLimitsContext.d.ts +11 -0
- package/dist/providers/limits/PlanLimitsProvider.d.ts +9 -0
- package/dist/providers/limits/index.d.ts +2 -0
- package/dist/providers/limits/utils.d.ts +7 -0
- package/dist/providers/notifications/NotificationsContext.d.ts +53 -0
- package/dist/providers/notifications/NotificationsProvider.d.ts +9 -0
- package/dist/providers/notifications/index.d.ts +2 -0
- package/dist/providers/query/QueryProvider.d.ts +12 -0
- package/dist/providers/query/index.d.ts +1 -0
- package/dist/providers/ui/UIProvider.d.ts +22 -0
- package/dist/providers/ui/UIProviderContainerMode.d.ts +4 -0
- package/dist/providers/ui/UIProviderDialogMode.d.ts +20 -0
- package/dist/providers/ui/index.d.ts +2 -0
- package/dist/providers/ui/types.d.ts +19 -0
- package/dist/providers/upload/UploadContext.d.ts +48 -0
- package/dist/providers/upload/UploadProvider.d.ts +14 -0
- package/dist/providers/upload/constants.d.ts +142 -0
- package/dist/providers/upload/index.d.ts +5 -0
- package/dist/providers/upload/types.d.ts +282 -0
- package/dist/providers/upload/uploadStateReducer.d.ts +10 -0
- package/dist/providers/upload/useStartUpload.d.ts +10 -0
- package/dist/providers/upload/useUpload.d.ts +21 -0
- package/dist/providers/upload/useUploadComponents.d.ts +21 -0
- package/dist/providers/upload/utils.d.ts +136 -0
- package/dist/providers/user/UserContext.d.ts +68 -0
- package/dist/providers/user/UserProvider.d.ts +13 -0
- package/dist/providers/user/constants.d.ts +19 -0
- package/dist/providers/user/index.d.ts +3 -0
- package/dist/providers/user/persistData.d.ts +14 -0
- package/dist/providers/user/types.d.ts +149 -0
- package/dist/providers/user/useUserData.d.ts +50 -0
- package/dist/services/api/api/api.d.ts +41 -0
- package/dist/services/api/api/index.d.ts +1 -0
- package/dist/services/api/assets/assets.d.ts +98 -0
- package/dist/services/api/assets/index.d.ts +1 -0
- package/dist/services/api/categories/categories.d.ts +50 -0
- package/dist/services/api/categories/index.d.ts +1 -0
- package/dist/services/api/client/ApiClient.d.ts +108 -0
- package/dist/services/api/client/ApiClientError.d.ts +37 -0
- package/dist/services/api/client/index.d.ts +3 -0
- package/dist/services/api/client/types.d.ts +19 -0
- package/dist/services/api/errors/ApiErrorHandler.d.ts +53 -0
- package/dist/services/api/errors/index.d.ts +2 -0
- package/dist/services/api/errors/types.d.ts +6 -0
- package/dist/services/api/images/images.d.ts +18 -0
- package/dist/services/api/images/index.d.ts +1 -0
- package/dist/services/api/index.d.ts +5 -0
- package/dist/services/api/limits/index.d.ts +1 -0
- package/dist/services/api/limits/limits.d.ts +10 -0
- package/dist/services/api/search/index.d.ts +1 -0
- package/dist/services/api/search/search.d.ts +10 -0
- package/dist/services/api/types/assets.d.ts +131 -0
- package/dist/services/api/types/assetsMetadata.d.ts +24 -0
- package/dist/services/api/types/categories.d.ts +86 -0
- package/dist/services/api/types/common.d.ts +16 -0
- package/dist/services/api/types/images.d.ts +8 -0
- package/dist/services/api/types/index.d.ts +7 -0
- package/dist/services/api/types/limits.d.ts +11 -0
- package/dist/services/api/types/search.d.ts +122 -0
- package/dist/services/auth/AuthClient.d.ts +89 -0
- package/dist/services/auth/Token.d.ts +55 -0
- package/dist/services/auth/error.d.ts +6 -0
- package/dist/services/auth/index.d.ts +3 -0
- package/dist/services/auth/types.d.ts +27 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/translations/bg.js +1 -1
- package/dist/translations/bn.js +1 -1
- package/dist/translations/ca.js +1 -1
- package/dist/translations/cs.js +1 -1
- package/dist/translations/da.js +1 -1
- package/dist/translations/de.js +1 -1
- package/dist/translations/el.js +1 -1
- package/dist/translations/en.js +1 -1
- package/dist/translations/es-la.js +1 -1
- package/dist/translations/es-mx.js +1 -1
- package/dist/translations/es.js +1 -1
- package/dist/translations/et.js +1 -1
- package/dist/translations/fi.js +1 -1
- package/dist/translations/fr-ca.js +1 -1
- package/dist/translations/fr.js +1 -1
- package/dist/translations/hi.js +1 -1
- package/dist/translations/hu.js +1 -1
- package/dist/translations/id.js +1 -1
- package/dist/translations/it.js +1 -1
- package/dist/translations/ja.js +1 -1
- package/dist/translations/ko.js +1 -1
- package/dist/translations/lt.js +1 -1
- package/dist/translations/mr.js +1 -1
- package/dist/translations/ms.js +1 -1
- package/dist/translations/nl.js +1 -1
- package/dist/translations/no.js +1 -1
- package/dist/translations/pl.js +1 -1
- package/dist/translations/pt-br.js +1 -1
- package/dist/translations/pt.js +1 -1
- package/dist/translations/ro.js +1 -1
- package/dist/translations/ru.js +1 -1
- package/dist/translations/sk.js +1 -1
- package/dist/translations/sr.js +1 -1
- package/dist/translations/sv.js +1 -1
- package/dist/translations/th.js +1 -1
- package/dist/translations/tr.js +1 -1
- package/dist/translations/uk.js +1 -1
- package/dist/translations/vi.js +1 -1
- package/dist/translations/zh-tw.js +1 -1
- package/dist/translations/zh.js +1 -1
- package/dist/views/adminPanel/AdminPanel.d.ts +3 -0
- package/dist/views/adminPanel/assetCategories/AssetCategories.d.ts +9 -0
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanel.d.ts +23 -0
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanelEdit.d.ts +26 -0
- package/dist/views/adminPanel/assetCategories/AssetCategoryPanelLoader.d.ts +9 -0
- package/dist/views/adminPanel/assetCategories/ConfirmCategoryDialog.d.ts +29 -0
- package/dist/views/adminPanel/assetCategories/index.d.ts +1 -0
- package/dist/views/adminPanel/assetCategories/useAssetCategories.d.ts +28 -0
- package/dist/views/adminPanel/assetCategories/useFormValidation.d.ts +10 -0
- package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanel.d.ts +22 -0
- package/dist/views/adminPanel/imagesSettings/ImageFormatSettingsPanelLoader.d.ts +3 -0
- package/dist/views/adminPanel/imagesSettings/ImagesSettings.d.ts +3 -0
- package/dist/views/adminPanel/imagesSettings/constants.d.ts +5 -0
- package/dist/views/adminPanel/imagesSettings/index.d.ts +1 -0
- package/dist/views/adminPanel/imagesSettings/useImageSettings.d.ts +9 -0
- package/dist/views/adminPanel/index.d.ts +1 -0
- package/dist/views/category/Category.d.ts +18 -0
- package/dist/views/category/index.d.ts +1 -0
- package/dist/views/category/utils/index.d.ts +1 -0
- package/dist/views/category/utils/utils.d.ts +12 -0
- package/dist/views/index.d.ts +1 -0
- package/dist/views/recentAssets/RecentAssets.d.ts +19 -0
- package/dist/views/recentAssets/index.d.ts +1 -0
- package/dist/views/search/Search.d.ts +15 -0
- package/dist/views/search/index.d.ts +1 -0
- package/dist/views/search/utils.d.ts +19 -0
- package/dist/views/views/Views.d.ts +3 -0
- package/dist/views/views/index.d.ts +1 -0
- package/dist/views/views/navbar/Navbar.d.ts +46 -0
- package/dist/views/views/navbar/index.d.ts +1 -0
- package/package.json +8 -7
- 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,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,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 @@
|
|
|
1
|
+
export * from './useGetPlanLimits';
|
|
@@ -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,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,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,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;
|