@scm-manager/ui-api 3.0.4 → 3.0.5-20240211-164725
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/build/index.d.ts +2 -1
- package/build/index.js +24 -4
- package/build/index.mjs +23 -4
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -422,6 +422,7 @@ declare const useChangesets: (repository: Repository, request?: UseChangesetsReq
|
|
|
422
422
|
declare const useChangeset: (repository: Repository, id: string) => ApiResult<Changeset>;
|
|
423
423
|
|
|
424
424
|
declare const useTags: (repository: Repository) => ApiResult<TagCollection>;
|
|
425
|
+
declare const useContainedInTags: (changeset: Changeset, repository: Repository) => ApiResult<TagCollection>;
|
|
425
426
|
declare const useTag: (repository: Repository, name: string) => ApiResult<Tag>;
|
|
426
427
|
declare const useCreateTag: (repository: Repository, changeset: Changeset) => {
|
|
427
428
|
isLoading: boolean;
|
|
@@ -815,4 +816,4 @@ declare const RepositoryRevisionContextProvider: FC<{
|
|
|
815
816
|
revision?: string;
|
|
816
817
|
}>;
|
|
817
818
|
|
|
818
|
-
export { AdditionalMessage, ApiProvider, Props as ApiProviderProps, ApiResult, ApiResultWithFetching, BackendError, BackendErrorContent, BadGatewayError, BaseContext, CONTENT_TYPE_PUBLIC_KEY, CancelablePromise, ConflictError, ConvertToInternalRequest, DeleteFunction, ForbiddenError, LegacyContext, LegacyContextProvider, LocalStorageProvider, MissingLinkError, NamespaceAndNameContext, NamespaceAndNameContextProvider, NotFoundError, RepositoryContextProvider, RepositoryRevisionContextProvider, SearchOptions, TOKEN_EXPIRED_ERROR_CODE, TokenExpiredError, UnauthorizedError, UseAvailablePluginsOptions, UseDeleteRepositoryOptions, UseGroupsRequest, UseHistoryRequest, UseInstalledPluginsOptions, UseRepositoriesRequest, UseRepositoryRolesRequest, UseSourcesOptions, UseUsersRequest, Violation, apiClient, changesetQueryKey, clearCache, createBackendError, createChangesetUrl, createDiffUrl, createQueryString, createUrl, createUrlWithIdentifiers, extractXsrfTokenFromCookie, fetchResourceFromLocationHeader, getResponseJson, isBackendError, makeCancelable, objectLink, requiredLink, urls, useAlerts, useAnnotations, useApiKeys, useArchiveRepository, useAvailableGlobalPermissions, useAvailablePermissions, useAvailablePlugins, useBranch, useBranchDetails, useBranchDetailsCollection, useBranches, useCancelPendingPlugins, useCancellablePromise, useChangeUserPassword, useChangeset, useChangesets, useClearNotifications, useConfig, useConfigLink, useContentType, useConvertToExternal, useConvertToInternal, useCreateApiKey, useCreateBranch, useCreateGroup, useCreatePermission, useCreatePublicKey, useCreateRepository, useCreateRepositoryRole, useCreateTag, useCreateUser, useDefaultBranch, useDeleteApiKey, useDeleteBranch, useDeleteGroup, useDeletePermission, useDeletePublicKey, useDeleteRepository, useDeleteRepositoryRole, useDeleteTag, useDeleteUser, useDiff, useDismissNotification, useExecutePendingPlugins, useExportInfo, useExportRepository, useFileContent, useGroup, useGroupOptions, useGroupPermissions, useGroupSuggestions, useGroups, useHistory, useImportFullRepository, useImportLog, useImportRepositoryFromBundle, useImportRepositoryFromUrl, useIncomingChangesets, useIndex, useIndexJsonResource, useIndexLink, useIndexLinks, useInstallPlugin, useInstalledPlugins, useInvalidateAllCaches, useInvalidateSearchIndices, useJsonResource, useLegacyContext, useLocalStorage, useLogin, useLoginInfo, useLogout, useMe, useNamespace, useNamespaceAndNameContext, useNamespaceOptions, useNamespaceStrategies, useNamespaceSuggestions, useNamespaces, useNotificationSubscription, useNotifications, useOmniSearch, usePaths, usePendingPlugins, usePermissions, usePluginCenterAuthInfo, usePluginCenterLogout, usePublicKeys, useReindexRepository, useRenameRepository, useRepositories, useRepository, useRepositoryContext, useRepositoryRevisionContext, useRepositoryRole, useRepositoryRoles, useRepositoryTypes, useRepositoryVerbs, useRequiredIndexLink, useRequiredMe, useRunHealthCheck, useSearch, useSearchCounts, useSearchHelpContent, useSearchSyntaxContent, useSearchTypes, useSearchableTypes, useSetGroupPermissions, useSetUserPassword, useSetUserPermissions, useSources, useSubject, useSuggestions, useTag, useTags, useUnarchiveRepository, useUninstallPlugin, useUpdateConfig, useUpdateGroup, useUpdateInfo, useUpdatePermission, useUpdatePlugins, useUpdateRepository, useUpdateRepositoryRole, useUpdateUser, useUser, useUserOptions, useUserPermissionOverview, useUserPermissions, useUserSuggestions, useUsers, useVersion, waitForRestartAfter };
|
|
819
|
+
export { AdditionalMessage, ApiProvider, Props as ApiProviderProps, ApiResult, ApiResultWithFetching, BackendError, BackendErrorContent, BadGatewayError, BaseContext, CONTENT_TYPE_PUBLIC_KEY, CancelablePromise, ConflictError, ConvertToInternalRequest, DeleteFunction, ForbiddenError, LegacyContext, LegacyContextProvider, LocalStorageProvider, MissingLinkError, NamespaceAndNameContext, NamespaceAndNameContextProvider, NotFoundError, RepositoryContextProvider, RepositoryRevisionContextProvider, SearchOptions, TOKEN_EXPIRED_ERROR_CODE, TokenExpiredError, UnauthorizedError, UseAvailablePluginsOptions, UseDeleteRepositoryOptions, UseGroupsRequest, UseHistoryRequest, UseInstalledPluginsOptions, UseRepositoriesRequest, UseRepositoryRolesRequest, UseSourcesOptions, UseUsersRequest, Violation, apiClient, changesetQueryKey, clearCache, createBackendError, createChangesetUrl, createDiffUrl, createQueryString, createUrl, createUrlWithIdentifiers, extractXsrfTokenFromCookie, fetchResourceFromLocationHeader, getResponseJson, isBackendError, makeCancelable, objectLink, requiredLink, urls, useAlerts, useAnnotations, useApiKeys, useArchiveRepository, useAvailableGlobalPermissions, useAvailablePermissions, useAvailablePlugins, useBranch, useBranchDetails, useBranchDetailsCollection, useBranches, useCancelPendingPlugins, useCancellablePromise, useChangeUserPassword, useChangeset, useChangesets, useClearNotifications, useConfig, useConfigLink, useContainedInTags, useContentType, useConvertToExternal, useConvertToInternal, useCreateApiKey, useCreateBranch, useCreateGroup, useCreatePermission, useCreatePublicKey, useCreateRepository, useCreateRepositoryRole, useCreateTag, useCreateUser, useDefaultBranch, useDeleteApiKey, useDeleteBranch, useDeleteGroup, useDeletePermission, useDeletePublicKey, useDeleteRepository, useDeleteRepositoryRole, useDeleteTag, useDeleteUser, useDiff, useDismissNotification, useExecutePendingPlugins, useExportInfo, useExportRepository, useFileContent, useGroup, useGroupOptions, useGroupPermissions, useGroupSuggestions, useGroups, useHistory, useImportFullRepository, useImportLog, useImportRepositoryFromBundle, useImportRepositoryFromUrl, useIncomingChangesets, useIndex, useIndexJsonResource, useIndexLink, useIndexLinks, useInstallPlugin, useInstalledPlugins, useInvalidateAllCaches, useInvalidateSearchIndices, useJsonResource, useLegacyContext, useLocalStorage, useLogin, useLoginInfo, useLogout, useMe, useNamespace, useNamespaceAndNameContext, useNamespaceOptions, useNamespaceStrategies, useNamespaceSuggestions, useNamespaces, useNotificationSubscription, useNotifications, useOmniSearch, usePaths, usePendingPlugins, usePermissions, usePluginCenterAuthInfo, usePluginCenterLogout, usePublicKeys, useReindexRepository, useRenameRepository, useRepositories, useRepository, useRepositoryContext, useRepositoryRevisionContext, useRepositoryRole, useRepositoryRoles, useRepositoryTypes, useRepositoryVerbs, useRequiredIndexLink, useRequiredMe, useRunHealthCheck, useSearch, useSearchCounts, useSearchHelpContent, useSearchSyntaxContent, useSearchTypes, useSearchableTypes, useSetGroupPermissions, useSetUserPassword, useSetUserPermissions, useSources, useSubject, useSuggestions, useTag, useTags, useUnarchiveRepository, useUninstallPlugin, useUpdateConfig, useUpdateGroup, useUpdateInfo, useUpdatePermission, useUpdatePlugins, useUpdateRepository, useUpdateRepositoryRole, useUpdateUser, useUser, useUserOptions, useUserPermissionOverview, useUserPermissions, useUserSuggestions, useUsers, useVersion, waitForRestartAfter };
|
package/build/index.js
CHANGED
|
@@ -78,6 +78,7 @@ __export(src_exports, {
|
|
|
78
78
|
useClearNotifications: () => useClearNotifications,
|
|
79
79
|
useConfig: () => useConfig,
|
|
80
80
|
useConfigLink: () => useConfigLink,
|
|
81
|
+
useContainedInTags: () => useContainedInTags,
|
|
81
82
|
useContentType: () => useContentType,
|
|
82
83
|
useConvertToExternal: () => useConvertToExternal,
|
|
83
84
|
useConvertToInternal: () => useConvertToInternal,
|
|
@@ -1703,6 +1704,20 @@ var useTags = (repository) => {
|
|
|
1703
1704
|
() => apiClient.get(link).then((response) => response.json())
|
|
1704
1705
|
);
|
|
1705
1706
|
};
|
|
1707
|
+
var useContainedInTags = (changeset, repository) => {
|
|
1708
|
+
const link = objectLink(changeset, "containedInTags");
|
|
1709
|
+
return (0, import_react_query11.useQuery)(repoQueryKey(repository, "tags", changeset.id), () => {
|
|
1710
|
+
if (link === null) {
|
|
1711
|
+
return {
|
|
1712
|
+
_embedded: {
|
|
1713
|
+
tags: []
|
|
1714
|
+
},
|
|
1715
|
+
_links: {}
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
return apiClient.get(link).then((response) => response.json());
|
|
1719
|
+
});
|
|
1720
|
+
};
|
|
1706
1721
|
var useTag = (repository, name) => {
|
|
1707
1722
|
const link = requiredLink(repository, "tags");
|
|
1708
1723
|
return (0, import_react_query11.useQuery)(
|
|
@@ -1719,10 +1734,14 @@ var invalidateCacheForTag = (queryClient2, repository, tag) => {
|
|
|
1719
1734
|
};
|
|
1720
1735
|
var createTag = (changeset, link) => {
|
|
1721
1736
|
return (name) => {
|
|
1722
|
-
return apiClient.post(
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1737
|
+
return apiClient.post(
|
|
1738
|
+
link,
|
|
1739
|
+
{
|
|
1740
|
+
name,
|
|
1741
|
+
revision: changeset.id
|
|
1742
|
+
},
|
|
1743
|
+
"application/vnd.scmm-tagRequest+json;v=2"
|
|
1744
|
+
).then((response) => {
|
|
1726
1745
|
const location = response.headers.get("Location");
|
|
1727
1746
|
if (!location) {
|
|
1728
1747
|
throw new Error("Server does not return required Location header");
|
|
@@ -3639,6 +3658,7 @@ var RepositoryRevisionContextProvider = ({ revision, children }) => /* @__PURE__
|
|
|
3639
3658
|
useClearNotifications,
|
|
3640
3659
|
useConfig,
|
|
3641
3660
|
useConfigLink,
|
|
3661
|
+
useContainedInTags,
|
|
3642
3662
|
useContentType,
|
|
3643
3663
|
useConvertToExternal,
|
|
3644
3664
|
useConvertToInternal,
|
package/build/index.mjs
CHANGED
|
@@ -1512,6 +1512,20 @@ var useTags = (repository) => {
|
|
|
1512
1512
|
() => apiClient.get(link).then((response) => response.json())
|
|
1513
1513
|
);
|
|
1514
1514
|
};
|
|
1515
|
+
var useContainedInTags = (changeset, repository) => {
|
|
1516
|
+
const link = objectLink(changeset, "containedInTags");
|
|
1517
|
+
return useQuery9(repoQueryKey(repository, "tags", changeset.id), () => {
|
|
1518
|
+
if (link === null) {
|
|
1519
|
+
return {
|
|
1520
|
+
_embedded: {
|
|
1521
|
+
tags: []
|
|
1522
|
+
},
|
|
1523
|
+
_links: {}
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
return apiClient.get(link).then((response) => response.json());
|
|
1527
|
+
});
|
|
1528
|
+
};
|
|
1515
1529
|
var useTag = (repository, name) => {
|
|
1516
1530
|
const link = requiredLink(repository, "tags");
|
|
1517
1531
|
return useQuery9(
|
|
@@ -1528,10 +1542,14 @@ var invalidateCacheForTag = (queryClient2, repository, tag) => {
|
|
|
1528
1542
|
};
|
|
1529
1543
|
var createTag = (changeset, link) => {
|
|
1530
1544
|
return (name) => {
|
|
1531
|
-
return apiClient.post(
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1545
|
+
return apiClient.post(
|
|
1546
|
+
link,
|
|
1547
|
+
{
|
|
1548
|
+
name,
|
|
1549
|
+
revision: changeset.id
|
|
1550
|
+
},
|
|
1551
|
+
"application/vnd.scmm-tagRequest+json;v=2"
|
|
1552
|
+
).then((response) => {
|
|
1535
1553
|
const location = response.headers.get("Location");
|
|
1536
1554
|
if (!location) {
|
|
1537
1555
|
throw new Error("Server does not return required Location header");
|
|
@@ -3447,6 +3465,7 @@ export {
|
|
|
3447
3465
|
useClearNotifications,
|
|
3448
3466
|
useConfig,
|
|
3449
3467
|
useConfigLink,
|
|
3468
|
+
useContainedInTags,
|
|
3450
3469
|
useContentType,
|
|
3451
3470
|
useConvertToExternal,
|
|
3452
3471
|
useConvertToInternal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scm-manager/ui-api",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5-20240211-164725",
|
|
4
4
|
"description": "React hook api for the SCM-Manager backend",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"module": "build/index.mjs",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"tsup": "^5.12.6"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@scm-manager/ui-types": "3.0.
|
|
32
|
+
"@scm-manager/ui-types": "3.0.5-20240211-164725",
|
|
33
33
|
"fetch-mock-jest": "^1.5.1",
|
|
34
34
|
"gitdiff-parser": "^0.2.2",
|
|
35
35
|
"query-string": "6.14.1",
|