@harnessio/react-har-service-client 0.0.7 → 0.0.9

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 (96) hide show
  1. package/README.md +2 -2
  2. package/dist/har-service/src/services/hooks/useCreateRegistryMutation.d.ts +23 -0
  3. package/dist/har-service/src/services/hooks/useCreateRegistryMutation.js +14 -0
  4. package/dist/har-service/src/services/hooks/useDeleteRegistryMutation.d.ts +20 -0
  5. package/dist/har-service/src/services/hooks/useDeleteRegistryMutation.js +14 -0
  6. package/dist/har-service/src/services/hooks/useGetAllArtifactVersionsQuery.d.ts +14 -7
  7. package/dist/har-service/src/services/hooks/useGetAllArtifactVersionsQuery.js +2 -2
  8. package/dist/har-service/src/services/hooks/useGetAllArtifactsQuery.d.ts +18 -9
  9. package/dist/har-service/src/services/hooks/useGetAllArtifactsQuery.js +2 -2
  10. package/dist/har-service/src/services/hooks/useGetAllRegistriesQuery.d.ts +43 -0
  11. package/dist/har-service/src/services/hooks/useGetAllRegistriesQuery.js +14 -0
  12. package/dist/har-service/src/services/hooks/useGetArtifactSummaryQuery.d.ts +3 -7
  13. package/dist/har-service/src/services/hooks/useGetArtifactSummaryQuery.js +2 -2
  14. package/dist/har-service/src/services/hooks/useGetArtifactVersionSummaryQuery.d.ts +3 -7
  15. package/dist/har-service/src/services/hooks/useGetArtifactVersionSummaryQuery.js +2 -2
  16. package/dist/har-service/src/services/hooks/useGetClientSetupDetailsQuery.d.ts +3 -7
  17. package/dist/har-service/src/services/hooks/useGetClientSetupDetailsQuery.js +2 -2
  18. package/dist/har-service/src/services/hooks/useGetDockerArtifactDetailsQuery.d.ts +5 -6
  19. package/dist/har-service/src/services/hooks/useGetDockerArtifactDetailsQuery.js +8 -2
  20. package/dist/har-service/src/services/hooks/useGetDockerArtifactLayersQuery.d.ts +6 -6
  21. package/dist/har-service/src/services/hooks/useGetDockerArtifactLayersQuery.js +8 -2
  22. package/dist/har-service/src/services/hooks/useGetDockerArtifactManifestQuery.d.ts +6 -6
  23. package/dist/har-service/src/services/hooks/useGetDockerArtifactManifestQuery.js +8 -2
  24. package/dist/har-service/src/services/hooks/useGetDockerArtifactManifestsQuery.d.ts +3 -7
  25. package/dist/har-service/src/services/hooks/useGetDockerArtifactManifestsQuery.js +2 -2
  26. package/dist/har-service/src/services/hooks/useGetHelmArtifactDetailsQuery.d.ts +3 -7
  27. package/dist/har-service/src/services/hooks/useGetHelmArtifactDetailsQuery.js +2 -2
  28. package/dist/har-service/src/services/hooks/useGetHelmArtifactManifestQuery.d.ts +3 -7
  29. package/dist/har-service/src/services/hooks/useGetHelmArtifactManifestQuery.js +2 -2
  30. package/dist/har-service/src/services/hooks/useGetRegistryQuery.d.ts +20 -0
  31. package/dist/har-service/src/services/hooks/useGetRegistryQuery.js +14 -0
  32. package/dist/har-service/src/services/hooks/useModifyRegistryMutation.d.ts +24 -0
  33. package/dist/har-service/src/services/hooks/useModifyRegistryMutation.js +14 -0
  34. package/dist/har-service/src/services/index.d.ts +32 -43
  35. package/dist/har-service/src/services/index.js +5 -9
  36. package/dist/har-service/src/services/requestBodies/RegistryRequestRequestBody.d.ts +2 -0
  37. package/dist/har-service/src/services/responses/ListRegistryResponseResponse.d.ts +6 -0
  38. package/dist/har-service/src/services/responses/RegistryResponseResponse.d.ts +6 -0
  39. package/dist/har-service/src/services/schemas/ArtifactMetadata.d.ts +2 -1
  40. package/dist/har-service/src/services/schemas/ArtifactVersionMetadata.d.ts +2 -0
  41. package/dist/har-service/src/services/schemas/CleanupPolicy.d.ts +4 -5
  42. package/dist/har-service/src/services/schemas/DockerArtifactDetail.d.ts +1 -1
  43. package/dist/har-service/src/services/schemas/HelmArtifactDetail.d.ts +1 -1
  44. package/dist/har-service/src/services/schemas/{ListRepository.d.ts → ListRegistry.d.ts} +5 -5
  45. package/dist/har-service/src/services/schemas/Registry.d.ts +20 -0
  46. package/dist/har-service/src/services/schemas/RegistryConfig.d.ts +6 -0
  47. package/dist/har-service/src/services/schemas/{RepositoryMetadata.d.ts → RegistryMetadata.d.ts} +7 -6
  48. package/dist/har-service/src/services/schemas/RegistryRequest.d.ts +14 -0
  49. package/dist/har-service/src/services/schemas/RegistryType.d.ts +4 -0
  50. package/dist/har-service/src/services/schemas/{UpstreamProxyConfig.d.ts → UpstreamConfig.d.ts} +3 -3
  51. package/dist/har-service/src/services/schemas/VirtualConfig.d.ts +6 -0
  52. package/dist/har-service/src/services/schemas/VirtualConfig.js +4 -0
  53. package/package.json +1 -1
  54. package/dist/har-service/src/services/hooks/useCreateRepositoryMutation.d.ts +0 -27
  55. package/dist/har-service/src/services/hooks/useCreateRepositoryMutation.js +0 -14
  56. package/dist/har-service/src/services/hooks/useCreateUpstreamProxyMutation.d.ts +0 -27
  57. package/dist/har-service/src/services/hooks/useCreateUpstreamProxyMutation.js +0 -14
  58. package/dist/har-service/src/services/hooks/useDeleteRepositoryMutation.d.ts +0 -28
  59. package/dist/har-service/src/services/hooks/useDeleteRepositoryMutation.js +0 -14
  60. package/dist/har-service/src/services/hooks/useDeleteUpstreamProxyMutation.d.ts +0 -28
  61. package/dist/har-service/src/services/hooks/useDeleteUpstreamProxyMutation.js +0 -14
  62. package/dist/har-service/src/services/hooks/useGetAllRepositoriesQuery.d.ts +0 -31
  63. package/dist/har-service/src/services/hooks/useGetAllRepositoriesQuery.js +0 -14
  64. package/dist/har-service/src/services/hooks/useGetRepositoryQuery.d.ts +0 -28
  65. package/dist/har-service/src/services/hooks/useGetRepositoryQuery.js +0 -14
  66. package/dist/har-service/src/services/hooks/useGetUpstreamProxyQuery.d.ts +0 -28
  67. package/dist/har-service/src/services/hooks/useGetUpstreamProxyQuery.js +0 -14
  68. package/dist/har-service/src/services/hooks/useModifyRepositoryMutation.d.ts +0 -32
  69. package/dist/har-service/src/services/hooks/useModifyRepositoryMutation.js +0 -14
  70. package/dist/har-service/src/services/hooks/useModifyUpstreamProxyMutation.d.ts +0 -32
  71. package/dist/har-service/src/services/hooks/useModifyUpstreamProxyMutation.js +0 -14
  72. package/dist/har-service/src/services/requestBodies/RepositoryRequestRequestBody.d.ts +0 -2
  73. package/dist/har-service/src/services/requestBodies/UpstreamProxyRequestRequestBody.d.ts +0 -2
  74. package/dist/har-service/src/services/responses/ListRepositoryResponseResponse.d.ts +0 -6
  75. package/dist/har-service/src/services/responses/RepositoryResponseResponse.d.ts +0 -6
  76. package/dist/har-service/src/services/responses/UpstreamProxyResponseResponse.d.ts +0 -6
  77. package/dist/har-service/src/services/schemas/Repository.d.ts +0 -20
  78. package/dist/har-service/src/services/schemas/RepositoryConfig.d.ts +0 -8
  79. package/dist/har-service/src/services/schemas/RepositoryRequest.d.ts +0 -14
  80. package/dist/har-service/src/services/schemas/RepositoryRequest.js +0 -1
  81. package/dist/har-service/src/services/schemas/Type.d.ts +0 -4
  82. package/dist/har-service/src/services/schemas/UpstreamProxy.d.ts +0 -15
  83. package/dist/har-service/src/services/schemas/UpstreamProxy.js +0 -1
  84. package/dist/har-service/src/services/schemas/UpstreamProxyConfig.js +0 -1
  85. package/dist/har-service/src/services/schemas/UpstreamProxyRequest.d.ts +0 -10
  86. package/dist/har-service/src/services/schemas/UpstreamProxyRequest.js +0 -1
  87. /package/dist/har-service/src/services/requestBodies/{RepositoryRequestRequestBody.js → RegistryRequestRequestBody.js} +0 -0
  88. /package/dist/har-service/src/services/{requestBodies/UpstreamProxyRequestRequestBody.js → responses/ListRegistryResponseResponse.js} +0 -0
  89. /package/dist/har-service/src/services/responses/{ListRepositoryResponseResponse.js → RegistryResponseResponse.js} +0 -0
  90. /package/dist/har-service/src/services/{responses/RepositoryResponseResponse.js → schemas/ListRegistry.js} +0 -0
  91. /package/dist/har-service/src/services/{responses/UpstreamProxyResponseResponse.js → schemas/Registry.js} +0 -0
  92. /package/dist/har-service/src/services/schemas/{ListRepository.js → RegistryConfig.js} +0 -0
  93. /package/dist/har-service/src/services/schemas/{Repository.js → RegistryMetadata.js} +0 -0
  94. /package/dist/har-service/src/services/schemas/{RepositoryConfig.js → RegistryRequest.js} +0 -0
  95. /package/dist/har-service/src/services/schemas/{Type.js → RegistryType.js} +0 -0
  96. /package/dist/har-service/src/services/schemas/{RepositoryMetadata.js → UpstreamConfig.js} +0 -0
@@ -4,11 +4,11 @@
4
4
  import { useQuery } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function getHelmArtifactManifest(props) {
7
- return fetcher(Object.assign({ url: `/artifacts/versions/helm/manifest`, method: 'GET' }, props));
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/artifact/${props.artifact}/version/${props.version}/helm/manifest`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
10
  * Get Helm Artifact Manifest
11
11
  */
12
12
  export function useGetHelmArtifactManifestQuery(props, options) {
13
- return useQuery(['GetHelmArtifactManifest', props.queryParams], ({ signal }) => getHelmArtifactManifest(Object.assign(Object.assign({}, props), { signal })), options);
13
+ return useQuery(['GetHelmArtifactManifest', props.registry_ref, props.artifact, props.version], ({ signal }) => getHelmArtifactManifest(Object.assign(Object.assign({}, props), { signal })), options);
14
14
  }
@@ -0,0 +1,20 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { RegistryResponseResponse } from '../responses/RegistryResponseResponse';
3
+ import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
4
+ import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
5
+ import type { NotFoundResponse } from '../responses/NotFoundResponse';
6
+ import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
7
+ import type { ResponseWithPagination } from '../helpers';
8
+ import { FetcherOptions } from '../../../../fetcher/index.js';
9
+ export interface GetRegistryQueryPathParams {
10
+ registry_ref: string;
11
+ }
12
+ export type GetRegistryOkResponse = ResponseWithPagination<RegistryResponseResponse>;
13
+ export type GetRegistryErrorResponse = UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
14
+ export interface GetRegistryProps extends GetRegistryQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
15
+ }
16
+ export declare function getRegistry(props: GetRegistryProps): Promise<GetRegistryOkResponse>;
17
+ /**
18
+ * Returns Registry Details in the account for the given key
19
+ */
20
+ export declare function useGetRegistryQuery(props: GetRegistryProps, options?: Omit<UseQueryOptions<GetRegistryOkResponse, GetRegistryErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetRegistryOkResponse, import("..").Error>;
@@ -0,0 +1,14 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ import { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getRegistry(props) {
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_ref}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns Registry Details in the account for the given key
11
+ */
12
+ export function useGetRegistryQuery(props, options) {
13
+ return useQuery(['GetRegistry', props.registry_ref], ({ signal }) => getRegistry(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { RegistryResponseResponse } from '../responses/RegistryResponseResponse';
3
+ import type { BadRequestResponse } from '../responses/BadRequestResponse';
4
+ import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
5
+ import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
6
+ import type { NotFoundResponse } from '../responses/NotFoundResponse';
7
+ import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
8
+ import type { RegistryRequestRequestBody } from '../requestBodies/RegistryRequestRequestBody';
9
+ import type { ResponseWithPagination } from '../helpers';
10
+ import { FetcherOptions } from '../../../../fetcher/index.js';
11
+ export interface ModifyRegistryMutationPathParams {
12
+ registry_ref: string;
13
+ }
14
+ export type ModifyRegistryRequestBody = RegistryRequestRequestBody;
15
+ export type ModifyRegistryOkResponse = ResponseWithPagination<RegistryResponseResponse>;
16
+ export type ModifyRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
17
+ export interface ModifyRegistryProps extends ModifyRegistryMutationPathParams, Omit<FetcherOptions<unknown, ModifyRegistryRequestBody>, 'url'> {
18
+ body: ModifyRegistryRequestBody;
19
+ }
20
+ export declare function modifyRegistry(props: ModifyRegistryProps): Promise<ModifyRegistryOkResponse>;
21
+ /**
22
+ * Updates a Registry in the account for the given key
23
+ */
24
+ export declare function useModifyRegistryMutation(options?: Omit<UseMutationOptions<ModifyRegistryOkResponse, ModifyRegistryErrorResponse, ModifyRegistryProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ModifyRegistryOkResponse, import("..").Error, ModifyRegistryProps, unknown>;
@@ -0,0 +1,14 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ import { useMutation } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function modifyRegistry(props) {
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_ref}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Updates a Registry in the account for the given key
11
+ */
12
+ export function useModifyRegistryMutation(options) {
13
+ return useMutation((mutateProps) => modifyRegistry(mutateProps), options);
14
+ }
@@ -1,46 +1,37 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
- export type { CreateRepositoryErrorResponse, CreateRepositoryMutationQueryParams, CreateRepositoryOkResponse, CreateRepositoryProps, CreateRepositoryRequestBody, } from './hooks/useCreateRepositoryMutation';
3
- export { createRepository, useCreateRepositoryMutation } from './hooks/useCreateRepositoryMutation';
4
- export type { CreateUpstreamProxyErrorResponse, CreateUpstreamProxyMutationQueryParams, CreateUpstreamProxyOkResponse, CreateUpstreamProxyProps, CreateUpstreamProxyRequestBody, } from './hooks/useCreateUpstreamProxyMutation';
5
- export { createUpstreamProxy, useCreateUpstreamProxyMutation, } from './hooks/useCreateUpstreamProxyMutation';
6
- export type { DeleteRepositoryErrorResponse, DeleteRepositoryMutationPathParams, DeleteRepositoryMutationQueryParams, DeleteRepositoryOkResponse, DeleteRepositoryProps, } from './hooks/useDeleteRepositoryMutation';
7
- export { deleteRepository, useDeleteRepositoryMutation } from './hooks/useDeleteRepositoryMutation';
8
- export type { DeleteUpstreamProxyErrorResponse, DeleteUpstreamProxyMutationPathParams, DeleteUpstreamProxyMutationQueryParams, DeleteUpstreamProxyOkResponse, DeleteUpstreamProxyProps, } from './hooks/useDeleteUpstreamProxyMutation';
9
- export { deleteUpstreamProxy, useDeleteUpstreamProxyMutation, } from './hooks/useDeleteUpstreamProxyMutation';
10
- export type { GetAllArtifactVersionsErrorResponse, GetAllArtifactVersionsOkResponse, GetAllArtifactVersionsProps, GetAllArtifactVersionsQueryQueryParams, } from './hooks/useGetAllArtifactVersionsQuery';
2
+ export type { CreateRegistryErrorResponse, CreateRegistryMutationQueryParams, CreateRegistryOkResponse, CreateRegistryProps, CreateRegistryRequestBody, } from './hooks/useCreateRegistryMutation';
3
+ export { createRegistry, useCreateRegistryMutation } from './hooks/useCreateRegistryMutation';
4
+ export type { DeleteRegistryErrorResponse, DeleteRegistryMutationPathParams, DeleteRegistryOkResponse, DeleteRegistryProps, } from './hooks/useDeleteRegistryMutation';
5
+ export { deleteRegistry, useDeleteRegistryMutation } from './hooks/useDeleteRegistryMutation';
6
+ export type { GetAllArtifactVersionsErrorResponse, GetAllArtifactVersionsOkResponse, GetAllArtifactVersionsProps, GetAllArtifactVersionsQueryPathParams, GetAllArtifactVersionsQueryQueryParams, } from './hooks/useGetAllArtifactVersionsQuery';
11
7
  export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
12
- export type { GetAllArtifactsErrorResponse, GetAllArtifactsOkResponse, GetAllArtifactsProps, GetAllArtifactsQueryQueryParams, } from './hooks/useGetAllArtifactsQuery';
8
+ export type { GetAllArtifactsErrorResponse, GetAllArtifactsOkResponse, GetAllArtifactsProps, GetAllArtifactsQueryPathParams, GetAllArtifactsQueryQueryParams, } from './hooks/useGetAllArtifactsQuery';
13
9
  export { getAllArtifacts, useGetAllArtifactsQuery } from './hooks/useGetAllArtifactsQuery';
14
- export type { GetAllRepositoriesErrorResponse, GetAllRepositoriesOkResponse, GetAllRepositoriesProps, GetAllRepositoriesQueryQueryParams, } from './hooks/useGetAllRepositoriesQuery';
15
- export { getAllRepositories, useGetAllRepositoriesQuery } from './hooks/useGetAllRepositoriesQuery';
16
- export type { GetArtifactSummaryErrorResponse, GetArtifactSummaryOkResponse, GetArtifactSummaryProps, GetArtifactSummaryQueryQueryParams, } from './hooks/useGetArtifactSummaryQuery';
10
+ export type { GetAllRegistriesErrorResponse, GetAllRegistriesOkResponse, GetAllRegistriesProps, GetAllRegistriesQueryPathParams, GetAllRegistriesQueryQueryParams, } from './hooks/useGetAllRegistriesQuery';
11
+ export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
12
+ export type { GetArtifactSummaryErrorResponse, GetArtifactSummaryOkResponse, GetArtifactSummaryProps, GetArtifactSummaryQueryPathParams, } from './hooks/useGetArtifactSummaryQuery';
17
13
  export { getArtifactSummary, useGetArtifactSummaryQuery } from './hooks/useGetArtifactSummaryQuery';
18
- export type { GetArtifactVersionSummaryErrorResponse, GetArtifactVersionSummaryOkResponse, GetArtifactVersionSummaryProps, GetArtifactVersionSummaryQueryQueryParams, } from './hooks/useGetArtifactVersionSummaryQuery';
14
+ export type { GetArtifactVersionSummaryErrorResponse, GetArtifactVersionSummaryOkResponse, GetArtifactVersionSummaryProps, GetArtifactVersionSummaryQueryPathParams, } from './hooks/useGetArtifactVersionSummaryQuery';
19
15
  export { getArtifactVersionSummary, useGetArtifactVersionSummaryQuery, } from './hooks/useGetArtifactVersionSummaryQuery';
20
- export type { GetClientSetupDetailsErrorResponse, GetClientSetupDetailsOkResponse, GetClientSetupDetailsProps, GetClientSetupDetailsQueryQueryParams, } from './hooks/useGetClientSetupDetailsQuery';
16
+ export type { GetClientSetupDetailsErrorResponse, GetClientSetupDetailsOkResponse, GetClientSetupDetailsProps, GetClientSetupDetailsQueryPathParams, } from './hooks/useGetClientSetupDetailsQuery';
21
17
  export { getClientSetupDetails, useGetClientSetupDetailsQuery, } from './hooks/useGetClientSetupDetailsQuery';
22
- export type { GetDockerArtifactDetailsErrorResponse, GetDockerArtifactDetailsOkResponse, GetDockerArtifactDetailsProps, GetDockerArtifactDetailsQueryQueryParams, } from './hooks/useGetDockerArtifactDetailsQuery';
18
+ export type { GetDockerArtifactDetailsErrorResponse, GetDockerArtifactDetailsOkResponse, GetDockerArtifactDetailsProps, GetDockerArtifactDetailsQueryPathParams, GetDockerArtifactDetailsQueryQueryParams, } from './hooks/useGetDockerArtifactDetailsQuery';
23
19
  export { getDockerArtifactDetails, useGetDockerArtifactDetailsQuery, } from './hooks/useGetDockerArtifactDetailsQuery';
24
- export type { GetDockerArtifactLayersErrorResponse, GetDockerArtifactLayersOkResponse, GetDockerArtifactLayersProps, GetDockerArtifactLayersQueryQueryParams, } from './hooks/useGetDockerArtifactLayersQuery';
20
+ export type { GetDockerArtifactLayersErrorResponse, GetDockerArtifactLayersOkResponse, GetDockerArtifactLayersProps, GetDockerArtifactLayersQueryPathParams, GetDockerArtifactLayersQueryQueryParams, } from './hooks/useGetDockerArtifactLayersQuery';
25
21
  export { getDockerArtifactLayers, useGetDockerArtifactLayersQuery, } from './hooks/useGetDockerArtifactLayersQuery';
26
- export type { GetDockerArtifactManifestErrorResponse, GetDockerArtifactManifestOkResponse, GetDockerArtifactManifestProps, GetDockerArtifactManifestQueryQueryParams, } from './hooks/useGetDockerArtifactManifestQuery';
22
+ export type { GetDockerArtifactManifestErrorResponse, GetDockerArtifactManifestOkResponse, GetDockerArtifactManifestProps, GetDockerArtifactManifestQueryPathParams, GetDockerArtifactManifestQueryQueryParams, } from './hooks/useGetDockerArtifactManifestQuery';
27
23
  export { getDockerArtifactManifest, useGetDockerArtifactManifestQuery, } from './hooks/useGetDockerArtifactManifestQuery';
28
- export type { GetDockerArtifactManifestsErrorResponse, GetDockerArtifactManifestsOkResponse, GetDockerArtifactManifestsProps, GetDockerArtifactManifestsQueryQueryParams, } from './hooks/useGetDockerArtifactManifestsQuery';
24
+ export type { GetDockerArtifactManifestsErrorResponse, GetDockerArtifactManifestsOkResponse, GetDockerArtifactManifestsProps, GetDockerArtifactManifestsQueryPathParams, } from './hooks/useGetDockerArtifactManifestsQuery';
29
25
  export { getDockerArtifactManifests, useGetDockerArtifactManifestsQuery, } from './hooks/useGetDockerArtifactManifestsQuery';
30
- export type { GetHelmArtifactDetailsErrorResponse, GetHelmArtifactDetailsOkResponse, GetHelmArtifactDetailsProps, GetHelmArtifactDetailsQueryQueryParams, } from './hooks/useGetHelmArtifactDetailsQuery';
26
+ export type { GetHelmArtifactDetailsErrorResponse, GetHelmArtifactDetailsOkResponse, GetHelmArtifactDetailsProps, GetHelmArtifactDetailsQueryPathParams, } from './hooks/useGetHelmArtifactDetailsQuery';
31
27
  export { getHelmArtifactDetails, useGetHelmArtifactDetailsQuery, } from './hooks/useGetHelmArtifactDetailsQuery';
32
- export type { GetHelmArtifactManifestErrorResponse, GetHelmArtifactManifestOkResponse, GetHelmArtifactManifestProps, GetHelmArtifactManifestQueryQueryParams, } from './hooks/useGetHelmArtifactManifestQuery';
28
+ export type { GetHelmArtifactManifestErrorResponse, GetHelmArtifactManifestOkResponse, GetHelmArtifactManifestProps, GetHelmArtifactManifestQueryPathParams, } from './hooks/useGetHelmArtifactManifestQuery';
33
29
  export { getHelmArtifactManifest, useGetHelmArtifactManifestQuery, } from './hooks/useGetHelmArtifactManifestQuery';
34
- export type { GetRepositoryErrorResponse, GetRepositoryOkResponse, GetRepositoryProps, GetRepositoryQueryPathParams, GetRepositoryQueryQueryParams, } from './hooks/useGetRepositoryQuery';
35
- export { getRepository, useGetRepositoryQuery } from './hooks/useGetRepositoryQuery';
36
- export type { GetUpstreamProxyErrorResponse, GetUpstreamProxyOkResponse, GetUpstreamProxyProps, GetUpstreamProxyQueryPathParams, GetUpstreamProxyQueryQueryParams, } from './hooks/useGetUpstreamProxyQuery';
37
- export { getUpstreamProxy, useGetUpstreamProxyQuery } from './hooks/useGetUpstreamProxyQuery';
38
- export type { ModifyRepositoryErrorResponse, ModifyRepositoryMutationPathParams, ModifyRepositoryMutationQueryParams, ModifyRepositoryOkResponse, ModifyRepositoryProps, ModifyRepositoryRequestBody, } from './hooks/useModifyRepositoryMutation';
39
- export { modifyRepository, useModifyRepositoryMutation } from './hooks/useModifyRepositoryMutation';
40
- export type { ModifyUpstreamProxyErrorResponse, ModifyUpstreamProxyMutationPathParams, ModifyUpstreamProxyMutationQueryParams, ModifyUpstreamProxyOkResponse, ModifyUpstreamProxyProps, ModifyUpstreamProxyRequestBody, } from './hooks/useModifyUpstreamProxyMutation';
41
- export { modifyUpstreamProxy, useModifyUpstreamProxyMutation, } from './hooks/useModifyUpstreamProxyMutation';
42
- export type { RepositoryRequestRequestBody } from './requestBodies/RepositoryRequestRequestBody';
43
- export type { UpstreamProxyRequestRequestBody } from './requestBodies/UpstreamProxyRequestRequestBody';
30
+ export type { GetRegistryErrorResponse, GetRegistryOkResponse, GetRegistryProps, GetRegistryQueryPathParams, } from './hooks/useGetRegistryQuery';
31
+ export { getRegistry, useGetRegistryQuery } from './hooks/useGetRegistryQuery';
32
+ export type { ModifyRegistryErrorResponse, ModifyRegistryMutationPathParams, ModifyRegistryOkResponse, ModifyRegistryProps, ModifyRegistryRequestBody, } from './hooks/useModifyRegistryMutation';
33
+ export { modifyRegistry, useModifyRegistryMutation } from './hooks/useModifyRegistryMutation';
34
+ export type { RegistryRequestRequestBody } from './requestBodies/RegistryRequestRequestBody';
44
35
  export type { ArtifactSummaryResponseResponse } from './responses/ArtifactSummaryResponseResponse';
45
36
  export type { ArtifactVersionSummaryResponseResponse } from './responses/ArtifactVersionSummaryResponseResponse';
46
37
  export type { BadRequestResponse } from './responses/BadRequestResponse';
@@ -54,13 +45,12 @@ export type { HelmArtifactManifestResponseResponse } from './responses/HelmArtif
54
45
  export type { InternalServerErrorResponse } from './responses/InternalServerErrorResponse';
55
46
  export type { ListArtifactResponseResponse } from './responses/ListArtifactResponseResponse';
56
47
  export type { ListArtifactVersionResponseResponse } from './responses/ListArtifactVersionResponseResponse';
57
- export type { ListRepositoryResponseResponse } from './responses/ListRepositoryResponseResponse';
48
+ export type { ListRegistryResponseResponse } from './responses/ListRegistryResponseResponse';
58
49
  export type { NotFoundResponse } from './responses/NotFoundResponse';
59
- export type { RepositoryResponseResponse } from './responses/RepositoryResponseResponse';
50
+ export type { RegistryResponseResponse } from './responses/RegistryResponseResponse';
60
51
  export type { SuccessResponse } from './responses/SuccessResponse';
61
52
  export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
62
53
  export type { UnauthorizedResponse } from './responses/UnauthorizedResponse';
63
- export type { UpstreamProxyResponseResponse } from './responses/UpstreamProxyResponseResponse';
64
54
  export type { Anonymous } from './schemas/Anonymous';
65
55
  export type { ArtifactMetadata } from './schemas/ArtifactMetadata';
66
56
  export type { ArtifactSummary } from './schemas/ArtifactSummary';
@@ -83,15 +73,14 @@ export type { HelmArtifactManifest } from './schemas/HelmArtifactManifest';
83
73
  export type { Label } from './schemas/Label';
84
74
  export type { ListArtifact } from './schemas/ListArtifact';
85
75
  export type { ListArtifactVersion } from './schemas/ListArtifactVersion';
86
- export type { ListRepository } from './schemas/ListRepository';
76
+ export type { ListRegistry } from './schemas/ListRegistry';
87
77
  export type { PackageType } from './schemas/PackageType';
88
- export type { Repository } from './schemas/Repository';
89
- export type { RepositoryConfig } from './schemas/RepositoryConfig';
90
- export type { RepositoryMetadata } from './schemas/RepositoryMetadata';
91
- export type { RepositoryRequest } from './schemas/RepositoryRequest';
78
+ export type { Registry } from './schemas/Registry';
79
+ export type { RegistryConfig } from './schemas/RegistryConfig';
80
+ export type { RegistryMetadata } from './schemas/RegistryMetadata';
81
+ export type { RegistryRequest } from './schemas/RegistryRequest';
82
+ export type { RegistryType } from './schemas/RegistryType';
92
83
  export type { Status } from './schemas/Status';
93
- export type { Type } from './schemas/Type';
94
- export type { UpstreamProxy } from './schemas/UpstreamProxy';
95
- export type { UpstreamProxyConfig } from './schemas/UpstreamProxyConfig';
96
- export type { UpstreamProxyRequest } from './schemas/UpstreamProxyRequest';
84
+ export type { UpstreamConfig } from './schemas/UpstreamConfig';
97
85
  export type { UserPassword } from './schemas/UserPassword';
86
+ export type { VirtualConfig } from './schemas/VirtualConfig';
@@ -1,10 +1,8 @@
1
- export { createRepository, useCreateRepositoryMutation } from './hooks/useCreateRepositoryMutation';
2
- export { createUpstreamProxy, useCreateUpstreamProxyMutation, } from './hooks/useCreateUpstreamProxyMutation';
3
- export { deleteRepository, useDeleteRepositoryMutation } from './hooks/useDeleteRepositoryMutation';
4
- export { deleteUpstreamProxy, useDeleteUpstreamProxyMutation, } from './hooks/useDeleteUpstreamProxyMutation';
1
+ export { createRegistry, useCreateRegistryMutation } from './hooks/useCreateRegistryMutation';
2
+ export { deleteRegistry, useDeleteRegistryMutation } from './hooks/useDeleteRegistryMutation';
5
3
  export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
6
4
  export { getAllArtifacts, useGetAllArtifactsQuery } from './hooks/useGetAllArtifactsQuery';
7
- export { getAllRepositories, useGetAllRepositoriesQuery } from './hooks/useGetAllRepositoriesQuery';
5
+ export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
8
6
  export { getArtifactSummary, useGetArtifactSummaryQuery } from './hooks/useGetArtifactSummaryQuery';
9
7
  export { getArtifactVersionSummary, useGetArtifactVersionSummaryQuery, } from './hooks/useGetArtifactVersionSummaryQuery';
10
8
  export { getClientSetupDetails, useGetClientSetupDetailsQuery, } from './hooks/useGetClientSetupDetailsQuery';
@@ -14,7 +12,5 @@ export { getDockerArtifactManifest, useGetDockerArtifactManifestQuery, } from '.
14
12
  export { getDockerArtifactManifests, useGetDockerArtifactManifestsQuery, } from './hooks/useGetDockerArtifactManifestsQuery';
15
13
  export { getHelmArtifactDetails, useGetHelmArtifactDetailsQuery, } from './hooks/useGetHelmArtifactDetailsQuery';
16
14
  export { getHelmArtifactManifest, useGetHelmArtifactManifestQuery, } from './hooks/useGetHelmArtifactManifestQuery';
17
- export { getRepository, useGetRepositoryQuery } from './hooks/useGetRepositoryQuery';
18
- export { getUpstreamProxy, useGetUpstreamProxyQuery } from './hooks/useGetUpstreamProxyQuery';
19
- export { modifyRepository, useModifyRepositoryMutation } from './hooks/useModifyRepositoryMutation';
20
- export { modifyUpstreamProxy, useModifyUpstreamProxyMutation, } from './hooks/useModifyUpstreamProxyMutation';
15
+ export { getRegistry, useGetRegistryQuery } from './hooks/useGetRegistryQuery';
16
+ export { modifyRegistry, useModifyRegistryMutation } from './hooks/useModifyRegistryMutation';
@@ -0,0 +1,2 @@
1
+ import type { RegistryRequest } from '../schemas/RegistryRequest';
2
+ export type RegistryRequestRequestBody = RegistryRequest;
@@ -0,0 +1,6 @@
1
+ import type { ListRegistry } from '../schemas/ListRegistry';
2
+ import type { Status } from '../schemas/Status';
3
+ export interface ListRegistryResponseResponse {
4
+ data: ListRegistry;
5
+ status: Status;
6
+ }
@@ -0,0 +1,6 @@
1
+ import type { Registry } from '../schemas/Registry';
2
+ import type { Status } from '../schemas/Status';
3
+ export interface RegistryResponseResponse {
4
+ data: Registry;
5
+ status: Status;
6
+ }
@@ -8,6 +8,7 @@ export interface ArtifactMetadata {
8
8
  latestVersion: string;
9
9
  name: string;
10
10
  packageType?: PackageType;
11
- repoKey: string;
11
+ registryIdentifier: string;
12
+ registryPath: string;
12
13
  tags?: string[];
13
14
  }
@@ -10,5 +10,7 @@ export interface ArtifactVersionMetadata {
10
10
  name: string;
11
11
  packageType?: PackageType;
12
12
  pullCommand?: string;
13
+ registryIdentifier: string;
14
+ registryPath: string;
13
15
  size?: string;
14
16
  }
@@ -1,10 +1,9 @@
1
1
  /**
2
- * Cleanup Policy for Harness Artifact Repositories
2
+ * Cleanup Policy for Harness Artifact Registries
3
3
  */
4
4
  export interface CleanupPolicy {
5
- expire?: number;
6
- filePatterns?: {
7
- [key: string]: string;
8
- };
5
+ expireDays?: number;
9
6
  name?: string;
7
+ packagePrefix?: string[];
8
+ versionPrefix?: string[];
10
9
  }
@@ -10,7 +10,7 @@ export interface DockerArtifactDetail {
10
10
  modifiedAt?: string;
11
11
  packageType: PackageType;
12
12
  pullCommand?: string;
13
- repoPath: string;
13
+ registryPath: string;
14
14
  size?: string;
15
15
  url: string;
16
16
  version: string;
@@ -10,7 +10,7 @@ export interface HelmArtifactDetail {
10
10
  modifiedAt?: string;
11
11
  packageType: PackageType;
12
12
  pullCommand?: string;
13
- repoPath: string;
13
+ registryPath: string;
14
14
  size?: string;
15
15
  url: string;
16
16
  version: string;
@@ -1,8 +1,8 @@
1
- import type { RepositoryMetadata } from '../schemas/RepositoryMetadata';
1
+ import type { RegistryMetadata } from '../schemas/RegistryMetadata';
2
2
  /**
3
- * A list of Harness Artifact Repositories
3
+ * A list of Harness Artifact Registries
4
4
  */
5
- export interface ListRepository {
5
+ export interface ListRegistry {
6
6
  /**
7
7
  * The total number of items
8
8
  * @example 1
@@ -24,7 +24,7 @@ export interface ListRepository {
24
24
  */
25
25
  pageSize?: number;
26
26
  /**
27
- * A list of Harness Artifact Repositories
27
+ * A list of Harness Artifact Registries
28
28
  */
29
- repositories: RepositoryMetadata[];
29
+ registries: RegistryMetadata[];
30
30
  }
@@ -0,0 +1,20 @@
1
+ import type { CleanupPolicy } from '../schemas/CleanupPolicy';
2
+ import type { RegistryConfig } from '../schemas/RegistryConfig';
3
+ import type { Label } from '../schemas/Label';
4
+ import type { PackageType } from '../schemas/PackageType';
5
+ /**
6
+ * Harness Artifact Registry
7
+ */
8
+ export interface Registry<T0 extends RegistryConfig = RegistryConfig> {
9
+ allowedPattern?: string[];
10
+ blockedPattern?: string[];
11
+ cleanupPolicy?: CleanupPolicy[];
12
+ config?: T0;
13
+ createdAt?: string;
14
+ description?: string;
15
+ identifier: string;
16
+ labels?: Label;
17
+ modifiedAt?: string;
18
+ packageType: PackageType;
19
+ url: string;
20
+ }
@@ -0,0 +1,6 @@
1
+ import type { VirtualConfig } from '../schemas/VirtualConfig';
2
+ import type { UpstreamConfig } from '../schemas/UpstreamConfig';
3
+ /**
4
+ * SubConfig specific for Virtual or Upstream Registry
5
+ */
6
+ export type RegistryConfig = VirtualConfig & UpstreamConfig;
@@ -1,18 +1,19 @@
1
1
  import type { Label } from '../schemas/Label';
2
2
  import type { PackageType } from '../schemas/PackageType';
3
- import type { Type } from '../schemas/Type';
3
+ import type { RegistryType } from '../schemas/RegistryType';
4
4
  /**
5
- * Harness Artifact Repository Metadata
5
+ * Harness Artifact Registry Metadata
6
6
  */
7
- export interface RepositoryMetadata {
7
+ export interface RegistryMetadata {
8
8
  artifactsCount?: number;
9
9
  description?: string;
10
10
  downloadsCount?: number;
11
+ identifier: string;
11
12
  labels?: Label;
12
13
  lastModified?: string;
13
14
  packageType: PackageType;
14
- repoKey: string;
15
- repoSize?: string;
16
- type: Type;
15
+ path?: string;
16
+ registrySize?: string;
17
+ type: RegistryType;
17
18
  url: string;
18
19
  }
@@ -0,0 +1,14 @@
1
+ import type { CleanupPolicy } from '../schemas/CleanupPolicy';
2
+ import type { RegistryConfig } from '../schemas/RegistryConfig';
3
+ import type { Label } from '../schemas/Label';
4
+ import type { PackageType } from '../schemas/PackageType';
5
+ export interface RegistryRequest<T0 extends RegistryConfig = RegistryConfig> {
6
+ allowedPattern?: string[];
7
+ blockedPattern?: string[];
8
+ cleanupPolicy?: CleanupPolicy[];
9
+ config?: T0;
10
+ description?: string;
11
+ identifier: string;
12
+ labels?: Label;
13
+ packageType: PackageType;
14
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * refers to type of registry i.e virtual or upstream
3
+ */
4
+ export type RegistryType = 'UPSTREAM' | 'VIRTUAL';
@@ -1,12 +1,12 @@
1
1
  import type { UserPassword } from '../schemas/UserPassword';
2
2
  import type { Anonymous } from '../schemas/Anonymous';
3
3
  import type { AuthType } from '../schemas/AuthType';
4
- import type { CleanupPolicy } from '../schemas/CleanupPolicy';
5
4
  /**
6
5
  * Configuration for Harness Artifact UpstreamProxies
7
6
  */
8
- export interface UpstreamProxyConfig {
7
+ export interface UpstreamConfig {
9
8
  auth?: UserPassword & Anonymous;
10
9
  authType: AuthType;
11
- cleanupPolicy?: CleanupPolicy[];
10
+ source?: 'Custom' | 'Dockerhub';
11
+ url?: string;
12
12
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Configuration for Harness Virtual Artifact Registries
3
+ */
4
+ export interface VirtualConfig {
5
+ upstreamProxies?: string[];
6
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,27 +0,0 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { RepositoryResponseResponse } from '../responses/RepositoryResponseResponse';
3
- import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
4
- import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
5
- import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
6
- import type { RepositoryRequestRequestBody } from '../requestBodies/RepositoryRequestRequestBody';
7
- import type { ResponseWithPagination } from '../helpers';
8
- import { FetcherOptions } from '../../../../fetcher/index.js';
9
- export interface CreateRepositoryMutationQueryParams {
10
- org?: string;
11
- project?: string;
12
- }
13
- export interface CreateRepositoryMutationHeaderParams {
14
- 'Harness-Account'?: string;
15
- }
16
- export type CreateRepositoryRequestBody = RepositoryRequestRequestBody;
17
- export type CreateRepositoryOkResponse = ResponseWithPagination<RepositoryResponseResponse>;
18
- export type CreateRepositoryErrorResponse = UnauthenticatedResponse | UnauthorizedResponse | InternalServerErrorResponse;
19
- export interface CreateRepositoryProps extends Omit<FetcherOptions<CreateRepositoryMutationQueryParams, CreateRepositoryRequestBody, CreateRepositoryMutationHeaderParams>, 'url'> {
20
- queryParams: CreateRepositoryMutationQueryParams;
21
- body: CreateRepositoryRequestBody;
22
- }
23
- export declare function createRepository(props: CreateRepositoryProps): Promise<CreateRepositoryOkResponse>;
24
- /**
25
- * Create a Repository.
26
- */
27
- export declare function useCreateRepositoryMutation(options?: Omit<UseMutationOptions<CreateRepositoryOkResponse, CreateRepositoryErrorResponse, CreateRepositoryProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateRepositoryOkResponse, import("..").Error, CreateRepositoryProps, unknown>;
@@ -1,14 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- import { useMutation } from '@tanstack/react-query';
5
- import { fetcher } from '../../../../fetcher/index.js';
6
- export function createRepository(props) {
7
- return fetcher(Object.assign({ url: `/repos`, method: 'POST' }, props));
8
- }
9
- /**
10
- * Create a Repository.
11
- */
12
- export function useCreateRepositoryMutation(options) {
13
- return useMutation((mutateProps) => createRepository(mutateProps), options);
14
- }
@@ -1,27 +0,0 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { UpstreamProxyResponseResponse } from '../responses/UpstreamProxyResponseResponse';
3
- import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
4
- import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
5
- import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
6
- import type { UpstreamProxyRequestRequestBody } from '../requestBodies/UpstreamProxyRequestRequestBody';
7
- import type { ResponseWithPagination } from '../helpers';
8
- import { FetcherOptions } from '../../../../fetcher/index.js';
9
- export interface CreateUpstreamProxyMutationQueryParams {
10
- org?: string;
11
- project?: string;
12
- }
13
- export interface CreateUpstreamProxyMutationHeaderParams {
14
- 'Harness-Account'?: string;
15
- }
16
- export type CreateUpstreamProxyRequestBody = UpstreamProxyRequestRequestBody;
17
- export type CreateUpstreamProxyOkResponse = ResponseWithPagination<UpstreamProxyResponseResponse>;
18
- export type CreateUpstreamProxyErrorResponse = UnauthenticatedResponse | UnauthorizedResponse | InternalServerErrorResponse;
19
- export interface CreateUpstreamProxyProps extends Omit<FetcherOptions<CreateUpstreamProxyMutationQueryParams, CreateUpstreamProxyRequestBody, CreateUpstreamProxyMutationHeaderParams>, 'url'> {
20
- queryParams: CreateUpstreamProxyMutationQueryParams;
21
- body: CreateUpstreamProxyRequestBody;
22
- }
23
- export declare function createUpstreamProxy(props: CreateUpstreamProxyProps): Promise<CreateUpstreamProxyOkResponse>;
24
- /**
25
- * Create a UpstreamProxy.
26
- */
27
- export declare function useCreateUpstreamProxyMutation(options?: Omit<UseMutationOptions<CreateUpstreamProxyOkResponse, CreateUpstreamProxyErrorResponse, CreateUpstreamProxyProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateUpstreamProxyOkResponse, import("..").Error, CreateUpstreamProxyProps, unknown>;
@@ -1,14 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- import { useMutation } from '@tanstack/react-query';
5
- import { fetcher } from '../../../../fetcher/index.js';
6
- export function createUpstreamProxy(props) {
7
- return fetcher(Object.assign({ url: `/upstreamproxies`, method: 'POST' }, props));
8
- }
9
- /**
10
- * Create a UpstreamProxy.
11
- */
12
- export function useCreateUpstreamProxyMutation(options) {
13
- return useMutation((mutateProps) => createUpstreamProxy(mutateProps), options);
14
- }
@@ -1,28 +0,0 @@
1
- import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { SuccessResponse } from '../responses/SuccessResponse';
3
- import type { UnauthenticatedResponse } from '../responses/UnauthenticatedResponse';
4
- import type { UnauthorizedResponse } from '../responses/UnauthorizedResponse';
5
- import type { NotFoundResponse } from '../responses/NotFoundResponse';
6
- import type { InternalServerErrorResponse } from '../responses/InternalServerErrorResponse';
7
- import type { ResponseWithPagination } from '../helpers';
8
- import { FetcherOptions } from '../../../../fetcher/index.js';
9
- export interface DeleteRepositoryMutationPathParams {
10
- repokey: string;
11
- }
12
- export interface DeleteRepositoryMutationQueryParams {
13
- org?: string;
14
- project?: string;
15
- }
16
- export interface DeleteRepositoryMutationHeaderParams {
17
- 'Harness-Account'?: string;
18
- }
19
- export type DeleteRepositoryOkResponse = ResponseWithPagination<SuccessResponse>;
20
- export type DeleteRepositoryErrorResponse = UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
21
- export interface DeleteRepositoryProps extends DeleteRepositoryMutationPathParams, Omit<FetcherOptions<DeleteRepositoryMutationQueryParams, unknown, DeleteRepositoryMutationHeaderParams>, 'url'> {
22
- queryParams: DeleteRepositoryMutationQueryParams;
23
- }
24
- export declare function deleteRepository(props: DeleteRepositoryProps): Promise<DeleteRepositoryOkResponse>;
25
- /**
26
- * Delete a Repository in the account for the given key
27
- */
28
- export declare function useDeleteRepositoryMutation(options?: Omit<UseMutationOptions<DeleteRepositoryOkResponse, DeleteRepositoryErrorResponse, DeleteRepositoryProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteRepositoryOkResponse, import("..").Error, DeleteRepositoryProps, unknown>;
@@ -1,14 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- import { useMutation } from '@tanstack/react-query';
5
- import { fetcher } from '../../../../fetcher/index.js';
6
- export function deleteRepository(props) {
7
- return fetcher(Object.assign({ url: `/repos/${props.repokey}`, method: 'DELETE' }, props));
8
- }
9
- /**
10
- * Delete a Repository in the account for the given key
11
- */
12
- export function useDeleteRepositoryMutation(options) {
13
- return useMutation((mutateProps) => deleteRepository(mutateProps), options);
14
- }