@harnessio/react-har-service-v2-client 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/har-service-v2/src/services/hooks/useAddOciArtifactTagsMutation.d.ts +28 -0
  2. package/dist/har-service-v2/src/services/hooks/useAddOciArtifactTagsMutation.js +14 -0
  3. package/dist/har-service-v2/src/services/hooks/useListArtifactsQuery.d.ts +1 -0
  4. package/dist/har-service-v2/src/services/hooks/useListPackagesQuery.d.ts +1 -0
  5. package/dist/har-service-v2/src/services/hooks/useListRegistriesQuery.d.ts +1 -0
  6. package/dist/har-service-v2/src/services/hooks/useRestoreArtifactMutation.d.ts +33 -0
  7. package/dist/har-service-v2/src/services/hooks/useRestoreArtifactMutation.js +14 -0
  8. package/dist/har-service-v2/src/services/hooks/useRestorePackageMutation.d.ts +29 -0
  9. package/dist/har-service-v2/src/services/hooks/useRestorePackageMutation.js +14 -0
  10. package/dist/har-service-v2/src/services/hooks/useRestoreRegistryMutation.d.ts +25 -0
  11. package/dist/har-service-v2/src/services/hooks/useRestoreRegistryMutation.js +14 -0
  12. package/dist/har-service-v2/src/services/hooks/useSoftDeleteArtifactMutation.d.ts +33 -0
  13. package/dist/har-service-v2/src/services/hooks/useSoftDeleteArtifactMutation.js +14 -0
  14. package/dist/har-service-v2/src/services/hooks/useSoftDeletePackageMutation.d.ts +29 -0
  15. package/dist/har-service-v2/src/services/hooks/useSoftDeletePackageMutation.js +14 -0
  16. package/dist/har-service-v2/src/services/hooks/useSoftDeleteRegistryMutation.d.ts +25 -0
  17. package/dist/har-service-v2/src/services/hooks/useSoftDeleteRegistryMutation.js +14 -0
  18. package/dist/har-service-v2/src/services/index.d.ts +18 -0
  19. package/dist/har-service-v2/src/services/index.js +7 -0
  20. package/dist/har-service-v2/src/services/requestBodies/AddTagsRequestRequestBody.d.ts +2 -0
  21. package/dist/har-service-v2/src/services/requestBodies/AddTagsRequestRequestBody.js +1 -0
  22. package/dist/har-service-v2/src/services/responses/AddTagsResponseResponse.d.ts +4 -0
  23. package/dist/har-service-v2/src/services/responses/AddTagsResponseResponse.js +1 -0
  24. package/dist/har-service-v2/src/services/responses/SuccessResponse.d.ts +4 -0
  25. package/dist/har-service-v2/src/services/responses/SuccessResponse.js +1 -0
  26. package/dist/har-service-v2/src/services/schemas/AddTags.d.ts +5 -0
  27. package/dist/har-service-v2/src/services/schemas/AddTags.js +4 -0
  28. package/dist/har-service-v2/src/services/schemas/ArtifactMetadata.d.ts +1 -0
  29. package/dist/har-service-v2/src/services/schemas/ListArtifact.d.ts +12 -0
  30. package/dist/har-service-v2/src/services/schemas/ListPackage.d.ts +12 -0
  31. package/dist/har-service-v2/src/services/schemas/ListRegistry.d.ts +12 -0
  32. package/dist/har-service-v2/src/services/schemas/PackageMetadata.d.ts +1 -0
  33. package/dist/har-service-v2/src/services/schemas/RegistryMetadata.d.ts +1 -0
  34. package/package.json +1 -1
@@ -0,0 +1,28 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { AddTagsResponseResponse } from '../responses/AddTagsResponseResponse';
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 { AddTagsRequestRequestBody } from '../requestBodies/AddTagsRequestRequestBody';
9
+ import type { ResponseWithPagination } from '../helpers';
10
+ import { FetcherOptions } from '../../../../fetcher/index.js';
11
+ export interface AddOciArtifactTagsMutationQueryParams {
12
+ account_identifier: string;
13
+ org_identifier?: string;
14
+ project_identifier?: string;
15
+ registry_identifier: string;
16
+ }
17
+ export type AddOciArtifactTagsRequestBody = AddTagsRequestRequestBody;
18
+ export type AddOciArtifactTagsOkResponse = ResponseWithPagination<AddTagsResponseResponse>;
19
+ export type AddOciArtifactTagsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
20
+ export interface AddOciArtifactTagsProps extends Omit<FetcherOptions<AddOciArtifactTagsMutationQueryParams, AddOciArtifactTagsRequestBody>, 'url'> {
21
+ queryParams: AddOciArtifactTagsMutationQueryParams;
22
+ body: AddOciArtifactTagsRequestBody;
23
+ }
24
+ export declare function addOciArtifactTags(props: AddOciArtifactTagsProps): Promise<AddOciArtifactTagsOkResponse>;
25
+ /**
26
+ * Add OCI Artifact Tags.
27
+ */
28
+ export declare function useAddOciArtifactTagsMutation(options?: Omit<UseMutationOptions<AddOciArtifactTagsOkResponse, AddOciArtifactTagsErrorResponse, AddOciArtifactTagsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<AddOciArtifactTagsOkResponse, import("..").Error, AddOciArtifactTagsProps, 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 addOciArtifactTags(props) {
7
+ return fetcher(Object.assign({ url: `/oci/tags`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Add OCI Artifact Tags.
11
+ */
12
+ export function useAddOciArtifactTagsMutation(options) {
13
+ return useMutation((mutateProps) => addOciArtifactTags(mutateProps), options);
14
+ }
@@ -31,6 +31,7 @@ export interface ListArtifactsQueryQueryParams {
31
31
  sort_field?: string;
32
32
  search_term?: string;
33
33
  package_type?: string[];
34
+ soft_delete_filter?: 'all' | 'exclude_deleted' | 'only_deleted';
34
35
  }
35
36
  export type ListArtifactsOkResponse = ResponseWithPagination<ListArtifactResponseResponse>;
36
37
  export type ListArtifactsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
@@ -31,6 +31,7 @@ export interface ListPackagesQueryQueryParams {
31
31
  search_term?: string;
32
32
  artifact_type?: 'dataset' | 'model';
33
33
  package_type?: string[];
34
+ soft_delete_filter?: 'all' | 'exclude_deleted' | 'only_deleted';
34
35
  }
35
36
  export type ListPackagesOkResponse = ResponseWithPagination<ListPackageResponseResponse>;
36
37
  export type ListPackagesErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
@@ -31,6 +31,7 @@ export interface ListRegistriesQueryQueryParams {
31
31
  sort_field?: string;
32
32
  search_term?: string;
33
33
  scope?: 'ancestors' | 'descendants' | 'none';
34
+ soft_delete_filter?: 'all' | 'exclude_deleted' | 'only_deleted';
34
35
  }
35
36
  export type ListRegistriesOkResponse = ResponseWithPagination<ListRegistryResponseResponse>;
36
37
  export type ListRegistriesErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
@@ -0,0 +1,33 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
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 { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export type RestoreArtifactRequestBody = {
11
+ /**
12
+ * Package/image identifier (can contain forward slashes)
13
+ */
14
+ package_identifier: string;
15
+ /**
16
+ * Registry identifier (can contain forward slashes)
17
+ */
18
+ registry_identifier: string;
19
+ /**
20
+ * Artifact version/tag
21
+ */
22
+ version: string;
23
+ };
24
+ export type RestoreArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
25
+ export type RestoreArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
26
+ export interface RestoreArtifactProps extends Omit<FetcherOptions<unknown, RestoreArtifactRequestBody>, 'url'> {
27
+ body: RestoreArtifactRequestBody;
28
+ }
29
+ export declare function restoreArtifact(props: RestoreArtifactProps): Promise<RestoreArtifactOkResponse>;
30
+ /**
31
+ * Restore a previously soft-deleted artifact version. Enterprise only.
32
+ */
33
+ export declare function useRestoreArtifactMutation(options?: Omit<UseMutationOptions<RestoreArtifactOkResponse, RestoreArtifactErrorResponse, RestoreArtifactProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<RestoreArtifactOkResponse, import("..").Error, RestoreArtifactProps, 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 restoreArtifact(props) {
7
+ return fetcher(Object.assign({ url: `/artifact/restore`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Restore a previously soft-deleted artifact version. Enterprise only.
11
+ */
12
+ export function useRestoreArtifactMutation(options) {
13
+ return useMutation((mutateProps) => restoreArtifact(mutateProps), options);
14
+ }
@@ -0,0 +1,29 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
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 { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export type RestorePackageRequestBody = {
11
+ /**
12
+ * Package/image identifier (can contain forward slashes)
13
+ */
14
+ package_identifier: string;
15
+ /**
16
+ * Registry identifier (can contain forward slashes)
17
+ */
18
+ registry_identifier: string;
19
+ };
20
+ export type RestorePackageOkResponse = ResponseWithPagination<SuccessResponse>;
21
+ export type RestorePackageErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
22
+ export interface RestorePackageProps extends Omit<FetcherOptions<unknown, RestorePackageRequestBody>, 'url'> {
23
+ body: RestorePackageRequestBody;
24
+ }
25
+ export declare function restorePackage(props: RestorePackageProps): Promise<RestorePackageOkResponse>;
26
+ /**
27
+ * Restore a previously soft-deleted package/image. Enterprise only.
28
+ */
29
+ export declare function useRestorePackageMutation(options?: Omit<UseMutationOptions<RestorePackageOkResponse, RestorePackageErrorResponse, RestorePackageProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<RestorePackageOkResponse, import("..").Error, RestorePackageProps, 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 restorePackage(props) {
7
+ return fetcher(Object.assign({ url: `/package/restore`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Restore a previously soft-deleted package/image. Enterprise only.
11
+ */
12
+ export function useRestorePackageMutation(options) {
13
+ return useMutation((mutateProps) => restorePackage(mutateProps), options);
14
+ }
@@ -0,0 +1,25 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
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 { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export type RestoreRegistryRequestBody = {
11
+ /**
12
+ * Registry identifier (can contain forward slashes)
13
+ */
14
+ registry_identifier: string;
15
+ };
16
+ export type RestoreRegistryOkResponse = ResponseWithPagination<SuccessResponse>;
17
+ export type RestoreRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
18
+ export interface RestoreRegistryProps extends Omit<FetcherOptions<unknown, RestoreRegistryRequestBody>, 'url'> {
19
+ body: RestoreRegistryRequestBody;
20
+ }
21
+ export declare function restoreRegistry(props: RestoreRegistryProps): Promise<RestoreRegistryOkResponse>;
22
+ /**
23
+ * Restore a previously soft-deleted registry. Enterprise only.
24
+ */
25
+ export declare function useRestoreRegistryMutation(options?: Omit<UseMutationOptions<RestoreRegistryOkResponse, RestoreRegistryErrorResponse, RestoreRegistryProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<RestoreRegistryOkResponse, import("..").Error, RestoreRegistryProps, 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 restoreRegistry(props) {
7
+ return fetcher(Object.assign({ url: `/registry/restore`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Restore a previously soft-deleted registry. Enterprise only.
11
+ */
12
+ export function useRestoreRegistryMutation(options) {
13
+ return useMutation((mutateProps) => restoreRegistry(mutateProps), options);
14
+ }
@@ -0,0 +1,33 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
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 { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export type SoftDeleteArtifactRequestBody = {
11
+ /**
12
+ * Package/image identifier (can contain forward slashes)
13
+ */
14
+ package_identifier: string;
15
+ /**
16
+ * Registry identifier (can contain forward slashes)
17
+ */
18
+ registry_identifier: string;
19
+ /**
20
+ * Artifact version/tag
21
+ */
22
+ version: string;
23
+ };
24
+ export type SoftDeleteArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
25
+ export type SoftDeleteArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
26
+ export interface SoftDeleteArtifactProps extends Omit<FetcherOptions<unknown, SoftDeleteArtifactRequestBody>, 'url'> {
27
+ body: SoftDeleteArtifactRequestBody;
28
+ }
29
+ export declare function softDeleteArtifact(props: SoftDeleteArtifactProps): Promise<SoftDeleteArtifactOkResponse>;
30
+ /**
31
+ * Soft delete a specific artifact version (marks as deleted without removing data). Enterprise only.
32
+ */
33
+ export declare function useSoftDeleteArtifactMutation(options?: Omit<UseMutationOptions<SoftDeleteArtifactOkResponse, SoftDeleteArtifactErrorResponse, SoftDeleteArtifactProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SoftDeleteArtifactOkResponse, import("..").Error, SoftDeleteArtifactProps, 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 softDeleteArtifact(props) {
7
+ return fetcher(Object.assign({ url: `/artifact/soft-delete`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Soft delete a specific artifact version (marks as deleted without removing data). Enterprise only.
11
+ */
12
+ export function useSoftDeleteArtifactMutation(options) {
13
+ return useMutation((mutateProps) => softDeleteArtifact(mutateProps), options);
14
+ }
@@ -0,0 +1,29 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
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 { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export type SoftDeletePackageRequestBody = {
11
+ /**
12
+ * Package/image identifier (can contain forward slashes)
13
+ */
14
+ package_identifier: string;
15
+ /**
16
+ * Registry identifier (can contain forward slashes)
17
+ */
18
+ registry_identifier: string;
19
+ };
20
+ export type SoftDeletePackageOkResponse = ResponseWithPagination<SuccessResponse>;
21
+ export type SoftDeletePackageErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
22
+ export interface SoftDeletePackageProps extends Omit<FetcherOptions<unknown, SoftDeletePackageRequestBody>, 'url'> {
23
+ body: SoftDeletePackageRequestBody;
24
+ }
25
+ export declare function softDeletePackage(props: SoftDeletePackageProps): Promise<SoftDeletePackageOkResponse>;
26
+ /**
27
+ * Soft delete a package/image (marks as deleted without removing data). Enterprise only.
28
+ */
29
+ export declare function useSoftDeletePackageMutation(options?: Omit<UseMutationOptions<SoftDeletePackageOkResponse, SoftDeletePackageErrorResponse, SoftDeletePackageProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SoftDeletePackageOkResponse, import("..").Error, SoftDeletePackageProps, 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 softDeletePackage(props) {
7
+ return fetcher(Object.assign({ url: `/package/soft-delete`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Soft delete a package/image (marks as deleted without removing data). Enterprise only.
11
+ */
12
+ export function useSoftDeletePackageMutation(options) {
13
+ return useMutation((mutateProps) => softDeletePackage(mutateProps), options);
14
+ }
@@ -0,0 +1,25 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SuccessResponse } from '../responses/SuccessResponse';
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 { ResponseWithPagination } from '../helpers';
9
+ import { FetcherOptions } from '../../../../fetcher/index.js';
10
+ export type SoftDeleteRegistryRequestBody = {
11
+ /**
12
+ * Registry identifier (can contain forward slashes)
13
+ */
14
+ registry_identifier: string;
15
+ };
16
+ export type SoftDeleteRegistryOkResponse = ResponseWithPagination<SuccessResponse>;
17
+ export type SoftDeleteRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
18
+ export interface SoftDeleteRegistryProps extends Omit<FetcherOptions<unknown, SoftDeleteRegistryRequestBody>, 'url'> {
19
+ body: SoftDeleteRegistryRequestBody;
20
+ }
21
+ export declare function softDeleteRegistry(props: SoftDeleteRegistryProps): Promise<SoftDeleteRegistryOkResponse>;
22
+ /**
23
+ * Soft delete a registry (marks as deleted without removing data). Enterprise only.
24
+ */
25
+ export declare function useSoftDeleteRegistryMutation(options?: Omit<UseMutationOptions<SoftDeleteRegistryOkResponse, SoftDeleteRegistryErrorResponse, SoftDeleteRegistryProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SoftDeleteRegistryOkResponse, import("..").Error, SoftDeleteRegistryProps, 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 softDeleteRegistry(props) {
7
+ return fetcher(Object.assign({ url: `/registry/soft-delete`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Soft delete a registry (marks as deleted without removing data). Enterprise only.
11
+ */
12
+ export function useSoftDeleteRegistryMutation(options) {
13
+ return useMutation((mutateProps) => softDeleteRegistry(mutateProps), options);
14
+ }
@@ -1,4 +1,6 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
+ export type { AddOciArtifactTagsErrorResponse, AddOciArtifactTagsMutationQueryParams, AddOciArtifactTagsOkResponse, AddOciArtifactTagsProps, AddOciArtifactTagsRequestBody, } from './hooks/useAddOciArtifactTagsMutation';
3
+ export { addOciArtifactTags, useAddOciArtifactTagsMutation, } from './hooks/useAddOciArtifactTagsMutation';
2
4
  export type { CopyErrorResponse, CopyMutationQueryParams, CopyOkResponse, CopyProps, } from './hooks/useCopyMutation';
3
5
  export { copy, useCopyMutation } from './hooks/useCopyMutation';
4
6
  export type { GetFileErrorResponse, GetFileOkResponse, GetFileProps, GetFileQueryPathParams, GetFileQueryQueryParams, } from './hooks/useGetFileQuery';
@@ -15,9 +17,23 @@ export type { ListPackagesErrorResponse, ListPackagesOkResponse, ListPackagesPro
15
17
  export { listPackages, useListPackagesQuery } from './hooks/useListPackagesQuery';
16
18
  export type { ListRegistriesErrorResponse, ListRegistriesOkResponse, ListRegistriesProps, ListRegistriesQueryQueryParams, } from './hooks/useListRegistriesQuery';
17
19
  export { listRegistries, useListRegistriesQuery } from './hooks/useListRegistriesQuery';
20
+ export type { RestoreArtifactErrorResponse, RestoreArtifactOkResponse, RestoreArtifactProps, RestoreArtifactRequestBody, } from './hooks/useRestoreArtifactMutation';
21
+ export { restoreArtifact, useRestoreArtifactMutation } from './hooks/useRestoreArtifactMutation';
22
+ export type { RestorePackageErrorResponse, RestorePackageOkResponse, RestorePackageProps, RestorePackageRequestBody, } from './hooks/useRestorePackageMutation';
23
+ export { restorePackage, useRestorePackageMutation } from './hooks/useRestorePackageMutation';
24
+ export type { RestoreRegistryErrorResponse, RestoreRegistryOkResponse, RestoreRegistryProps, RestoreRegistryRequestBody, } from './hooks/useRestoreRegistryMutation';
25
+ export { restoreRegistry, useRestoreRegistryMutation } from './hooks/useRestoreRegistryMutation';
26
+ export type { SoftDeleteArtifactErrorResponse, SoftDeleteArtifactOkResponse, SoftDeleteArtifactProps, SoftDeleteArtifactRequestBody, } from './hooks/useSoftDeleteArtifactMutation';
27
+ export { softDeleteArtifact, useSoftDeleteArtifactMutation, } from './hooks/useSoftDeleteArtifactMutation';
28
+ export type { SoftDeletePackageErrorResponse, SoftDeletePackageOkResponse, SoftDeletePackageProps, SoftDeletePackageRequestBody, } from './hooks/useSoftDeletePackageMutation';
29
+ export { softDeletePackage, useSoftDeletePackageMutation, } from './hooks/useSoftDeletePackageMutation';
30
+ export type { SoftDeleteRegistryErrorResponse, SoftDeleteRegistryOkResponse, SoftDeleteRegistryProps, SoftDeleteRegistryRequestBody, } from './hooks/useSoftDeleteRegistryMutation';
31
+ export { softDeleteRegistry, useSoftDeleteRegistryMutation, } from './hooks/useSoftDeleteRegistryMutation';
18
32
  export type { UpdateMetadataErrorResponse, UpdateMetadataMutationQueryParams, UpdateMetadataOkResponse, UpdateMetadataProps, UpdateMetadataRequestBody, } from './hooks/useUpdateMetadataMutation';
19
33
  export { updateMetadata, useUpdateMetadataMutation } from './hooks/useUpdateMetadataMutation';
34
+ export type { AddTagsRequestRequestBody } from './requestBodies/AddTagsRequestRequestBody';
20
35
  export type { MetadataRequestRequestBody } from './requestBodies/MetadataRequestRequestBody';
36
+ export type { AddTagsResponseResponse } from './responses/AddTagsResponseResponse';
21
37
  export type { BadRequestResponse } from './responses/BadRequestResponse';
22
38
  export type { CopyResponseResponse } from './responses/CopyResponseResponse';
23
39
  export type { DownloadFileResponseResponse } from './responses/DownloadFileResponseResponse';
@@ -30,8 +46,10 @@ export type { MetadataResponseResponse } from './responses/MetadataResponseRespo
30
46
  export type { MetadataValuesResponseResponse } from './responses/MetadataValuesResponseResponse';
31
47
  export type { NotFoundResponse } from './responses/NotFoundResponse';
32
48
  export type { RedirectResponse } from './responses/RedirectResponse';
49
+ export type { SuccessResponse } from './responses/SuccessResponse';
33
50
  export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
34
51
  export type { UnauthorizedResponse } from './responses/UnauthorizedResponse';
52
+ export type { AddTags } from './schemas/AddTags';
35
53
  export type { ArtifactEntityMetadata } from './schemas/ArtifactEntityMetadata';
36
54
  export type { ArtifactMetadata } from './schemas/ArtifactMetadata';
37
55
  export type { ArtifactType } from './schemas/ArtifactType';
@@ -1,3 +1,4 @@
1
+ export { addOciArtifactTags, useAddOciArtifactTagsMutation, } from './hooks/useAddOciArtifactTagsMutation';
1
2
  export { copy, useCopyMutation } from './hooks/useCopyMutation';
2
3
  export { getFile, useGetFileQuery } from './hooks/useGetFileQuery';
3
4
  export { getMetadataKeys, useGetMetadataKeysQuery } from './hooks/useGetMetadataKeysQuery';
@@ -6,4 +7,10 @@ export { getMetadataValues, useGetMetadataValuesQuery } from './hooks/useGetMeta
6
7
  export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
7
8
  export { listPackages, useListPackagesQuery } from './hooks/useListPackagesQuery';
8
9
  export { listRegistries, useListRegistriesQuery } from './hooks/useListRegistriesQuery';
10
+ export { restoreArtifact, useRestoreArtifactMutation } from './hooks/useRestoreArtifactMutation';
11
+ export { restorePackage, useRestorePackageMutation } from './hooks/useRestorePackageMutation';
12
+ export { restoreRegistry, useRestoreRegistryMutation } from './hooks/useRestoreRegistryMutation';
13
+ export { softDeleteArtifact, useSoftDeleteArtifactMutation, } from './hooks/useSoftDeleteArtifactMutation';
14
+ export { softDeletePackage, useSoftDeletePackageMutation, } from './hooks/useSoftDeletePackageMutation';
15
+ export { softDeleteRegistry, useSoftDeleteRegistryMutation, } from './hooks/useSoftDeleteRegistryMutation';
9
16
  export { updateMetadata, useUpdateMetadataMutation } from './hooks/useUpdateMetadataMutation';
@@ -0,0 +1,2 @@
1
+ import type { AddTags } from '../schemas/AddTags';
2
+ export type AddTagsRequestRequestBody = AddTags;
@@ -0,0 +1,4 @@
1
+ import type { Status } from '../schemas/Status';
2
+ export interface AddTagsResponseResponse {
3
+ status: Status;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { Status } from '../schemas/Status';
2
+ export interface SuccessResponse {
3
+ status: Status;
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface AddTags {
2
+ package: string;
3
+ tags: string[];
4
+ version: string;
5
+ }
@@ -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 {};
@@ -14,6 +14,7 @@ export interface ArtifactMetadata {
14
14
  */
15
15
  downloadsCount?: number;
16
16
  fileCount?: number;
17
+ isDeleted?: boolean;
17
18
  isQuarantined?: boolean;
18
19
  lastModified: string;
19
20
  metadata?: ArtifactEntityMetadata;
@@ -7,6 +7,18 @@ export interface ListArtifact {
7
7
  * A list of Artifact
8
8
  */
9
9
  artifacts: ArtifactMetadata[];
10
+ /**
11
+ * Total count of available (non-deleted) artifacts
12
+ * @format int64
13
+ * @example 95
14
+ */
15
+ availableTotalCount?: number;
16
+ /**
17
+ * Total count of soft-deleted artifacts
18
+ * @format int64
19
+ * @example 5
20
+ */
21
+ deletedTotalCount?: number;
10
22
  /**
11
23
  * The total number of items
12
24
  * @format int64
@@ -3,6 +3,18 @@ import type { PackageMetadata } from '../schemas/PackageMetadata';
3
3
  * A list of Package
4
4
  */
5
5
  export interface ListPackage {
6
+ /**
7
+ * Total count of available (non-deleted) images
8
+ * @format int64
9
+ * @example 95
10
+ */
11
+ availableTotalCount?: number;
12
+ /**
13
+ * Total count of soft-deleted images
14
+ * @format int64
15
+ * @example 5
16
+ */
17
+ deletedTotalCount?: number;
6
18
  /**
7
19
  * The total number of items
8
20
  * @format int64
@@ -3,6 +3,18 @@ import type { RegistryMetadata } from '../schemas/RegistryMetadata';
3
3
  * A list of Harness Artifact Registries
4
4
  */
5
5
  export interface ListRegistry {
6
+ /**
7
+ * Total count of available (non-deleted) registries
8
+ * @format int64
9
+ * @example 95
10
+ */
11
+ availableTotalCount?: number;
12
+ /**
13
+ * Total count of soft-deleted registries
14
+ * @format int64
15
+ * @example 5
16
+ */
17
+ deletedTotalCount?: number;
6
18
  /**
7
19
  * The total number of items
8
20
  * @format int64
@@ -9,6 +9,7 @@ export interface PackageMetadata {
9
9
  * @format int64
10
10
  */
11
11
  downloadsCount?: number;
12
+ isDeleted?: boolean;
12
13
  isPublic: boolean;
13
14
  isQuarantined?: boolean;
14
15
  lastModified?: string;
@@ -14,6 +14,7 @@ export interface RegistryMetadata {
14
14
  */
15
15
  downloadsCount?: number;
16
16
  identifier: string;
17
+ isDeleted?: boolean;
17
18
  isPublic: boolean;
18
19
  lastModified?: string;
19
20
  packageType: PackageType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-v2-client",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Harness HAR Service V2 APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",