@harnessio/react-har-service-v2-client 0.2.0 → 0.4.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 (35) hide show
  1. package/dist/fetcher/index.js +1 -1
  2. package/dist/har-service-v2/src/services/hooks/useAddOciArtifactTagsMutation.d.ts +28 -0
  3. package/dist/har-service-v2/src/services/hooks/useAddOciArtifactTagsMutation.js +14 -0
  4. package/dist/har-service-v2/src/services/hooks/useListArtifactsQuery.d.ts +1 -0
  5. package/dist/har-service-v2/src/services/hooks/useListPackagesQuery.d.ts +1 -0
  6. package/dist/har-service-v2/src/services/hooks/useListRegistriesQuery.d.ts +1 -0
  7. package/dist/har-service-v2/src/services/hooks/useRestoreArtifactMutation.d.ts +39 -0
  8. package/dist/har-service-v2/src/services/hooks/useRestoreArtifactMutation.js +14 -0
  9. package/dist/har-service-v2/src/services/hooks/useRestorePackageMutation.d.ts +35 -0
  10. package/dist/har-service-v2/src/services/hooks/useRestorePackageMutation.js +14 -0
  11. package/dist/har-service-v2/src/services/hooks/useRestoreRegistryMutation.d.ts +31 -0
  12. package/dist/har-service-v2/src/services/hooks/useRestoreRegistryMutation.js +14 -0
  13. package/dist/har-service-v2/src/services/hooks/useSoftDeleteArtifactMutation.d.ts +39 -0
  14. package/dist/har-service-v2/src/services/hooks/useSoftDeleteArtifactMutation.js +14 -0
  15. package/dist/har-service-v2/src/services/hooks/useSoftDeletePackageMutation.d.ts +35 -0
  16. package/dist/har-service-v2/src/services/hooks/useSoftDeletePackageMutation.js +14 -0
  17. package/dist/har-service-v2/src/services/hooks/useSoftDeleteRegistryMutation.d.ts +31 -0
  18. package/dist/har-service-v2/src/services/hooks/useSoftDeleteRegistryMutation.js +14 -0
  19. package/dist/har-service-v2/src/services/index.d.ts +18 -0
  20. package/dist/har-service-v2/src/services/index.js +7 -0
  21. package/dist/har-service-v2/src/services/requestBodies/AddTagsRequestRequestBody.d.ts +2 -0
  22. package/dist/har-service-v2/src/services/requestBodies/AddTagsRequestRequestBody.js +1 -0
  23. package/dist/har-service-v2/src/services/responses/AddTagsResponseResponse.d.ts +4 -0
  24. package/dist/har-service-v2/src/services/responses/AddTagsResponseResponse.js +1 -0
  25. package/dist/har-service-v2/src/services/responses/SuccessResponse.d.ts +4 -0
  26. package/dist/har-service-v2/src/services/responses/SuccessResponse.js +1 -0
  27. package/dist/har-service-v2/src/services/schemas/AddTags.d.ts +5 -0
  28. package/dist/har-service-v2/src/services/schemas/AddTags.js +4 -0
  29. package/dist/har-service-v2/src/services/schemas/ArtifactMetadata.d.ts +9 -0
  30. package/dist/har-service-v2/src/services/schemas/ListArtifact.d.ts +12 -0
  31. package/dist/har-service-v2/src/services/schemas/ListPackage.d.ts +12 -0
  32. package/dist/har-service-v2/src/services/schemas/ListRegistry.d.ts +12 -0
  33. package/dist/har-service-v2/src/services/schemas/PackageMetadata.d.ts +9 -0
  34. package/dist/har-service-v2/src/services/schemas/RegistryMetadata.d.ts +9 -0
  35. package/package.json +1 -1
@@ -30,7 +30,7 @@ export function fetcher(options) {
30
30
  if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) {
31
31
  finalUrl = (_a = fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) === null || _a === void 0 ? void 0 : _a.call(fetcherCallbacks, finalUrl);
32
32
  }
33
- let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign({ Authorization: `Bearer ${token}` }, headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
33
+ let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign(Object.assign({}, (token ? { Authorization: `Bearer ${token}` } : {})), headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
34
34
  if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.requestInterceptor) {
35
35
  request = fetcherCallbacks.requestInterceptor(request.clone());
36
36
  }
@@ -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,39 @@
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 interface RestoreArtifactMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
15
+ export type RestoreArtifactRequestBody = {
16
+ /**
17
+ * Package/image identifier (can contain forward slashes)
18
+ */
19
+ package_identifier: string;
20
+ /**
21
+ * Registry identifier (can contain forward slashes)
22
+ */
23
+ registry_identifier: string;
24
+ /**
25
+ * Artifact version/tag
26
+ */
27
+ version: string;
28
+ };
29
+ export type RestoreArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
30
+ export type RestoreArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
31
+ export interface RestoreArtifactProps extends Omit<FetcherOptions<RestoreArtifactMutationQueryParams, RestoreArtifactRequestBody>, 'url'> {
32
+ queryParams: RestoreArtifactMutationQueryParams;
33
+ body: RestoreArtifactRequestBody;
34
+ }
35
+ export declare function restoreArtifact(props: RestoreArtifactProps): Promise<RestoreArtifactOkResponse>;
36
+ /**
37
+ * Restore a previously soft-deleted artifact version. Enterprise only.
38
+ */
39
+ 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,35 @@
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 interface RestorePackageMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
15
+ export type RestorePackageRequestBody = {
16
+ /**
17
+ * Package/image identifier (can contain forward slashes)
18
+ */
19
+ package_identifier: string;
20
+ /**
21
+ * Registry identifier (can contain forward slashes)
22
+ */
23
+ registry_identifier: string;
24
+ };
25
+ export type RestorePackageOkResponse = ResponseWithPagination<SuccessResponse>;
26
+ export type RestorePackageErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
27
+ export interface RestorePackageProps extends Omit<FetcherOptions<RestorePackageMutationQueryParams, RestorePackageRequestBody>, 'url'> {
28
+ queryParams: RestorePackageMutationQueryParams;
29
+ body: RestorePackageRequestBody;
30
+ }
31
+ export declare function restorePackage(props: RestorePackageProps): Promise<RestorePackageOkResponse>;
32
+ /**
33
+ * Restore a previously soft-deleted package/image. Enterprise only.
34
+ */
35
+ 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,31 @@
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 interface RestoreRegistryMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
15
+ export type RestoreRegistryRequestBody = {
16
+ /**
17
+ * Registry identifier (can contain forward slashes)
18
+ */
19
+ registry_identifier: string;
20
+ };
21
+ export type RestoreRegistryOkResponse = ResponseWithPagination<SuccessResponse>;
22
+ export type RestoreRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
23
+ export interface RestoreRegistryProps extends Omit<FetcherOptions<RestoreRegistryMutationQueryParams, RestoreRegistryRequestBody>, 'url'> {
24
+ queryParams: RestoreRegistryMutationQueryParams;
25
+ body: RestoreRegistryRequestBody;
26
+ }
27
+ export declare function restoreRegistry(props: RestoreRegistryProps): Promise<RestoreRegistryOkResponse>;
28
+ /**
29
+ * Restore a previously soft-deleted registry. Enterprise only.
30
+ */
31
+ 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,39 @@
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 interface SoftDeleteArtifactMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
15
+ export type SoftDeleteArtifactRequestBody = {
16
+ /**
17
+ * Package/image identifier (can contain forward slashes)
18
+ */
19
+ package_identifier: string;
20
+ /**
21
+ * Registry identifier (can contain forward slashes)
22
+ */
23
+ registry_identifier: string;
24
+ /**
25
+ * Artifact version/tag
26
+ */
27
+ version: string;
28
+ };
29
+ export type SoftDeleteArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
30
+ export type SoftDeleteArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
31
+ export interface SoftDeleteArtifactProps extends Omit<FetcherOptions<SoftDeleteArtifactMutationQueryParams, SoftDeleteArtifactRequestBody>, 'url'> {
32
+ queryParams: SoftDeleteArtifactMutationQueryParams;
33
+ body: SoftDeleteArtifactRequestBody;
34
+ }
35
+ export declare function softDeleteArtifact(props: SoftDeleteArtifactProps): Promise<SoftDeleteArtifactOkResponse>;
36
+ /**
37
+ * Soft delete a specific artifact version (marks as deleted without removing data). Enterprise only.
38
+ */
39
+ 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,35 @@
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 interface SoftDeletePackageMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
15
+ export type SoftDeletePackageRequestBody = {
16
+ /**
17
+ * Package/image identifier (can contain forward slashes)
18
+ */
19
+ package_identifier: string;
20
+ /**
21
+ * Registry identifier (can contain forward slashes)
22
+ */
23
+ registry_identifier: string;
24
+ };
25
+ export type SoftDeletePackageOkResponse = ResponseWithPagination<SuccessResponse>;
26
+ export type SoftDeletePackageErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
27
+ export interface SoftDeletePackageProps extends Omit<FetcherOptions<SoftDeletePackageMutationQueryParams, SoftDeletePackageRequestBody>, 'url'> {
28
+ queryParams: SoftDeletePackageMutationQueryParams;
29
+ body: SoftDeletePackageRequestBody;
30
+ }
31
+ export declare function softDeletePackage(props: SoftDeletePackageProps): Promise<SoftDeletePackageOkResponse>;
32
+ /**
33
+ * Soft delete a package/image (marks as deleted without removing data). Enterprise only.
34
+ */
35
+ 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,31 @@
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 interface SoftDeleteRegistryMutationQueryParams {
11
+ account_identifier: string;
12
+ org_identifier?: string;
13
+ project_identifier?: string;
14
+ }
15
+ export type SoftDeleteRegistryRequestBody = {
16
+ /**
17
+ * Registry identifier (can contain forward slashes)
18
+ */
19
+ registry_identifier: string;
20
+ };
21
+ export type SoftDeleteRegistryOkResponse = ResponseWithPagination<SuccessResponse>;
22
+ export type SoftDeleteRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
23
+ export interface SoftDeleteRegistryProps extends Omit<FetcherOptions<SoftDeleteRegistryMutationQueryParams, SoftDeleteRegistryRequestBody>, 'url'> {
24
+ queryParams: SoftDeleteRegistryMutationQueryParams;
25
+ body: SoftDeleteRegistryRequestBody;
26
+ }
27
+ export declare function softDeleteRegistry(props: SoftDeleteRegistryProps): Promise<SoftDeleteRegistryOkResponse>;
28
+ /**
29
+ * Soft delete a registry (marks as deleted without removing data). Enterprise only.
30
+ */
31
+ 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, RestoreArtifactMutationQueryParams, RestoreArtifactOkResponse, RestoreArtifactProps, RestoreArtifactRequestBody, } from './hooks/useRestoreArtifactMutation';
21
+ export { restoreArtifact, useRestoreArtifactMutation } from './hooks/useRestoreArtifactMutation';
22
+ export type { RestorePackageErrorResponse, RestorePackageMutationQueryParams, RestorePackageOkResponse, RestorePackageProps, RestorePackageRequestBody, } from './hooks/useRestorePackageMutation';
23
+ export { restorePackage, useRestorePackageMutation } from './hooks/useRestorePackageMutation';
24
+ export type { RestoreRegistryErrorResponse, RestoreRegistryMutationQueryParams, RestoreRegistryOkResponse, RestoreRegistryProps, RestoreRegistryRequestBody, } from './hooks/useRestoreRegistryMutation';
25
+ export { restoreRegistry, useRestoreRegistryMutation } from './hooks/useRestoreRegistryMutation';
26
+ export type { SoftDeleteArtifactErrorResponse, SoftDeleteArtifactMutationQueryParams, SoftDeleteArtifactOkResponse, SoftDeleteArtifactProps, SoftDeleteArtifactRequestBody, } from './hooks/useSoftDeleteArtifactMutation';
27
+ export { softDeleteArtifact, useSoftDeleteArtifactMutation, } from './hooks/useSoftDeleteArtifactMutation';
28
+ export type { SoftDeletePackageErrorResponse, SoftDeletePackageMutationQueryParams, SoftDeletePackageOkResponse, SoftDeletePackageProps, SoftDeletePackageRequestBody, } from './hooks/useSoftDeletePackageMutation';
29
+ export { softDeletePackage, useSoftDeletePackageMutation, } from './hooks/useSoftDeletePackageMutation';
30
+ export type { SoftDeleteRegistryErrorResponse, SoftDeleteRegistryMutationQueryParams, 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 {};
@@ -7,6 +7,11 @@ import type { PackageType } from '../schemas/PackageType';
7
7
  */
8
8
  export interface ArtifactMetadata {
9
9
  artifactType?: ArtifactType;
10
+ /**
11
+ * Timestamp when the artifact was soft-deleted
12
+ * @format date-time
13
+ */
14
+ deletedAt?: string;
10
15
  deploymentMetadata?: DeploymentMetadata;
11
16
  digestCount?: number;
12
17
  /**
@@ -14,6 +19,10 @@ export interface ArtifactMetadata {
14
19
  */
15
20
  downloadsCount?: number;
16
21
  fileCount?: number;
22
+ /**
23
+ * True if the artifact, its parent package (image), or registry is soft-deleted (cascade)
24
+ */
25
+ isDeleted: boolean;
17
26
  isQuarantined?: boolean;
18
27
  lastModified: string;
19
28
  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
@@ -5,10 +5,19 @@ import type { PackageType } from '../schemas/PackageType';
5
5
  */
6
6
  export interface PackageMetadata {
7
7
  artifactType?: ArtifactType;
8
+ /**
9
+ * Timestamp when the package (image) was soft-deleted
10
+ * @format date-time
11
+ */
12
+ deletedAt?: string;
8
13
  /**
9
14
  * @format int64
10
15
  */
11
16
  downloadsCount?: number;
17
+ /**
18
+ * True if the package or its parent registry is soft-deleted (cascade)
19
+ */
20
+ isDeleted: boolean;
12
21
  isPublic: boolean;
13
22
  isQuarantined?: boolean;
14
23
  lastModified?: string;
@@ -8,12 +8,21 @@ export interface RegistryMetadata {
8
8
  * @format int64
9
9
  */
10
10
  artifactsCount?: number;
11
+ /**
12
+ * Timestamp when the registry was soft-deleted
13
+ * @format date-time
14
+ */
15
+ deletedAt?: string;
11
16
  description?: string;
12
17
  /**
13
18
  * @format int64
14
19
  */
15
20
  downloadsCount?: number;
16
21
  identifier: string;
22
+ /**
23
+ * True if the registry is soft-deleted
24
+ */
25
+ isDeleted: boolean;
17
26
  isPublic: boolean;
18
27
  lastModified?: string;
19
28
  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.4.0",
4
4
  "description": "Harness HAR Service V2 APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",