@harnessio/react-har-service-v2-client 0.1.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 (65) 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/useCopyMutation.d.ts +30 -0
  4. package/dist/har-service-v2/src/services/hooks/useCopyMutation.js +14 -0
  5. package/dist/har-service-v2/src/services/hooks/useGetFileQuery.d.ts +28 -0
  6. package/dist/har-service-v2/src/services/hooks/useGetFileQuery.js +14 -0
  7. package/dist/har-service-v2/src/services/hooks/useGetMetadataQuery.d.ts +5 -7
  8. package/dist/har-service-v2/src/services/hooks/useGetMetadataQuery.js +3 -3
  9. package/dist/har-service-v2/src/services/hooks/{useGetAllHarnessArtifactsQuery.d.ts → useListArtifactsQuery.d.ts} +10 -8
  10. package/dist/har-service-v2/src/services/hooks/{useGetAllHarnessArtifactsQuery.js → useListArtifactsQuery.js} +4 -4
  11. package/dist/har-service-v2/src/services/hooks/useListPackagesQuery.d.ts +45 -0
  12. package/dist/har-service-v2/src/services/hooks/useListPackagesQuery.js +14 -0
  13. package/dist/har-service-v2/src/services/hooks/{useGetAllRegistriesQuery.d.ts → useListRegistriesQuery.d.ts} +8 -7
  14. package/dist/har-service-v2/src/services/hooks/{useGetAllRegistriesQuery.js → useListRegistriesQuery.js} +3 -3
  15. package/dist/har-service-v2/src/services/hooks/useRestoreArtifactMutation.d.ts +33 -0
  16. package/dist/har-service-v2/src/services/hooks/useRestoreArtifactMutation.js +14 -0
  17. package/dist/har-service-v2/src/services/hooks/useRestorePackageMutation.d.ts +29 -0
  18. package/dist/har-service-v2/src/services/hooks/useRestorePackageMutation.js +14 -0
  19. package/dist/har-service-v2/src/services/hooks/useRestoreRegistryMutation.d.ts +25 -0
  20. package/dist/har-service-v2/src/services/hooks/useRestoreRegistryMutation.js +14 -0
  21. package/dist/har-service-v2/src/services/hooks/useSoftDeleteArtifactMutation.d.ts +33 -0
  22. package/dist/har-service-v2/src/services/hooks/useSoftDeleteArtifactMutation.js +14 -0
  23. package/dist/har-service-v2/src/services/hooks/useSoftDeletePackageMutation.d.ts +29 -0
  24. package/dist/har-service-v2/src/services/hooks/useSoftDeletePackageMutation.js +14 -0
  25. package/dist/har-service-v2/src/services/hooks/useSoftDeleteRegistryMutation.d.ts +25 -0
  26. package/dist/har-service-v2/src/services/hooks/useSoftDeleteRegistryMutation.js +14 -0
  27. package/dist/har-service-v2/src/services/hooks/useUpdateMetadataMutation.d.ts +2 -8
  28. package/dist/har-service-v2/src/services/hooks/useUpdateMetadataMutation.js +2 -2
  29. package/dist/har-service-v2/src/services/index.d.ts +36 -16
  30. package/dist/har-service-v2/src/services/index.js +12 -4
  31. package/dist/har-service-v2/src/services/requestBodies/AddTagsRequestRequestBody.d.ts +2 -0
  32. package/dist/har-service-v2/src/services/responses/AddTagsResponseResponse.d.ts +4 -0
  33. package/dist/har-service-v2/src/services/responses/CopyResponseResponse.d.ts +4 -0
  34. package/dist/har-service-v2/src/services/responses/DownloadFileResponseResponse.d.ts +4 -0
  35. package/dist/har-service-v2/src/services/responses/DownloadFileResponseResponse.js +4 -0
  36. package/dist/har-service-v2/src/services/responses/ListPackageResponseResponse.d.ts +6 -0
  37. package/dist/har-service-v2/src/services/responses/RedirectResponse.d.ts +1 -0
  38. package/dist/har-service-v2/src/services/responses/SuccessResponse.d.ts +4 -0
  39. package/dist/har-service-v2/src/services/schemas/AddTags.d.ts +5 -0
  40. package/dist/har-service-v2/src/services/schemas/AddTags.js +4 -0
  41. package/dist/har-service-v2/src/services/schemas/ArtifactMetadata.d.ts +6 -2
  42. package/dist/har-service-v2/src/services/schemas/ListArtifact.d.ts +12 -0
  43. package/dist/har-service-v2/src/services/schemas/ListPackage.d.ts +45 -0
  44. package/dist/har-service-v2/src/services/schemas/ListPackage.js +1 -0
  45. package/dist/har-service-v2/src/services/schemas/ListRegistry.d.ts +12 -0
  46. package/dist/har-service-v2/src/services/schemas/MetadataInput.d.ts +36 -2
  47. package/dist/har-service-v2/src/services/schemas/{RegistryArtifactMetadata.d.ts → PackageMetadata.d.ts} +5 -3
  48. package/dist/har-service-v2/src/services/schemas/PackageMetadata.js +1 -0
  49. package/dist/har-service-v2/src/services/schemas/RegistryMetadata.d.ts +1 -0
  50. package/package.json +1 -1
  51. package/dist/har-service-v2/src/services/hooks/useGetAllArtifactVersionsQuery.d.ts +0 -43
  52. package/dist/har-service-v2/src/services/hooks/useGetAllArtifactVersionsQuery.js +0 -14
  53. package/dist/har-service-v2/src/services/hooks/useGetAllArtifactsByRegistryQuery.d.ts +0 -42
  54. package/dist/har-service-v2/src/services/hooks/useGetAllArtifactsByRegistryQuery.js +0 -14
  55. package/dist/har-service-v2/src/services/responses/ListArtifactVersionResponseResponse.d.ts +0 -6
  56. package/dist/har-service-v2/src/services/responses/ListRegistryArtifactResponseResponse.d.ts +0 -6
  57. package/dist/har-service-v2/src/services/schemas/ArtifactVersionMetadata.d.ts +0 -32
  58. package/dist/har-service-v2/src/services/schemas/ListArtifactVersion.d.ts +0 -33
  59. package/dist/har-service-v2/src/services/schemas/ListRegistryArtifact.d.ts +0 -33
  60. /package/dist/har-service-v2/src/services/{responses/ListArtifactVersionResponseResponse.js → requestBodies/AddTagsRequestRequestBody.js} +0 -0
  61. /package/dist/har-service-v2/src/services/responses/{ListRegistryArtifactResponseResponse.js → AddTagsResponseResponse.js} +0 -0
  62. /package/dist/har-service-v2/src/services/{schemas/ArtifactVersionMetadata.js → responses/CopyResponseResponse.js} +0 -0
  63. /package/dist/har-service-v2/src/services/{schemas/ListArtifactVersion.js → responses/ListPackageResponseResponse.js} +0 -0
  64. /package/dist/har-service-v2/src/services/{schemas/ListRegistryArtifact.js → responses/RedirectResponse.js} +0 -0
  65. /package/dist/har-service-v2/src/services/{schemas/RegistryArtifactMetadata.js → responses/SuccessResponse.js} +0 -0
@@ -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
+ }
@@ -8,26 +8,20 @@ import type { InternalServerErrorResponse } from '../responses/InternalServerErr
8
8
  import type { MetadataRequestRequestBody } from '../requestBodies/MetadataRequestRequestBody';
9
9
  import type { ResponseWithPagination } from '../helpers';
10
10
  import { FetcherOptions } from '../../../../fetcher/index.js';
11
- export interface UpdateMetadataMutationPathParams {
12
- path: string;
13
- }
14
11
  export interface UpdateMetadataMutationQueryParams {
15
12
  account_identifier: string;
16
- org_identifier?: string;
17
- project_identifier?: string;
18
- registry_identifier: string;
19
13
  }
20
14
  export type UpdateMetadataRequestBody = MetadataRequestRequestBody;
21
15
  export type UpdateMetadataOkResponse = ResponseWithPagination<MetadataResponseResponse>;
22
16
  export type UpdateMetadataErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
23
- export interface UpdateMetadataProps extends UpdateMetadataMutationPathParams, Omit<FetcherOptions<UpdateMetadataMutationQueryParams, UpdateMetadataRequestBody>, 'url'> {
17
+ export interface UpdateMetadataProps extends Omit<FetcherOptions<UpdateMetadataMutationQueryParams, UpdateMetadataRequestBody>, 'url'> {
24
18
  queryParams: UpdateMetadataMutationQueryParams;
25
19
  body: UpdateMetadataRequestBody;
26
20
  }
27
21
  export declare function updateMetadata(props: UpdateMetadataProps): Promise<UpdateMetadataOkResponse>;
28
22
  /**
29
23
  * Updates or creates metadata key-value pairs for a specific entity.
30
- * This endpoint allows you to add new metadata or modify existing metadata for artifacts, versions, or registry-level entities.
24
+ * This endpoint allows you to add new metadata or modify existing metadata for packages, versions, or registry-level entities.
31
25
  * The operation supports both creating new metadata entries and updating existing ones in a single request.
32
26
  *
33
27
  */
@@ -4,11 +4,11 @@
4
4
  import { useMutation } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function updateMetadata(props) {
7
- return fetcher(Object.assign({ url: `/metadata/path/${props.path}`, method: 'PUT' }, props));
7
+ return fetcher(Object.assign({ url: `/metadata`, method: 'PUT' }, props));
8
8
  }
9
9
  /**
10
10
  * Updates or creates metadata key-value pairs for a specific entity.
11
- * This endpoint allows you to add new metadata or modify existing metadata for artifacts, versions, or registry-level entities.
11
+ * This endpoint allows you to add new metadata or modify existing metadata for packages, versions, or registry-level entities.
12
12
  * The operation supports both creating new metadata entries and updating existing ones in a single request.
13
13
  *
14
14
  */
@@ -1,50 +1,70 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
- export type { GetAllArtifactVersionsErrorResponse, GetAllArtifactVersionsOkResponse, GetAllArtifactVersionsProps, GetAllArtifactVersionsQueryPathParams, GetAllArtifactVersionsQueryQueryParams, } from './hooks/useGetAllArtifactVersionsQuery';
3
- export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
4
- export type { GetAllArtifactsByRegistryErrorResponse, GetAllArtifactsByRegistryOkResponse, GetAllArtifactsByRegistryProps, GetAllArtifactsByRegistryQueryPathParams, GetAllArtifactsByRegistryQueryQueryParams, } from './hooks/useGetAllArtifactsByRegistryQuery';
5
- export { getAllArtifactsByRegistry, useGetAllArtifactsByRegistryQuery, } from './hooks/useGetAllArtifactsByRegistryQuery';
6
- export type { GetAllHarnessArtifactsErrorResponse, GetAllHarnessArtifactsOkResponse, GetAllHarnessArtifactsProps, GetAllHarnessArtifactsQueryQueryParams, } from './hooks/useGetAllHarnessArtifactsQuery';
7
- export { getAllHarnessArtifacts, useGetAllHarnessArtifactsQuery, } from './hooks/useGetAllHarnessArtifactsQuery';
8
- export type { GetAllRegistriesErrorResponse, GetAllRegistriesOkResponse, GetAllRegistriesProps, GetAllRegistriesQueryQueryParams, } from './hooks/useGetAllRegistriesQuery';
9
- export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
2
+ export type { AddOciArtifactTagsErrorResponse, AddOciArtifactTagsMutationQueryParams, AddOciArtifactTagsOkResponse, AddOciArtifactTagsProps, AddOciArtifactTagsRequestBody, } from './hooks/useAddOciArtifactTagsMutation';
3
+ export { addOciArtifactTags, useAddOciArtifactTagsMutation, } from './hooks/useAddOciArtifactTagsMutation';
4
+ export type { CopyErrorResponse, CopyMutationQueryParams, CopyOkResponse, CopyProps, } from './hooks/useCopyMutation';
5
+ export { copy, useCopyMutation } from './hooks/useCopyMutation';
6
+ export type { GetFileErrorResponse, GetFileOkResponse, GetFileProps, GetFileQueryPathParams, GetFileQueryQueryParams, } from './hooks/useGetFileQuery';
7
+ export { getFile, useGetFileQuery } from './hooks/useGetFileQuery';
10
8
  export type { GetMetadataKeysErrorResponse, GetMetadataKeysOkResponse, GetMetadataKeysProps, GetMetadataKeysQueryQueryParams, } from './hooks/useGetMetadataKeysQuery';
11
9
  export { getMetadataKeys, useGetMetadataKeysQuery } from './hooks/useGetMetadataKeysQuery';
12
- export type { GetMetadataErrorResponse, GetMetadataOkResponse, GetMetadataProps, GetMetadataQueryPathParams, GetMetadataQueryQueryParams, } from './hooks/useGetMetadataQuery';
10
+ export type { GetMetadataErrorResponse, GetMetadataOkResponse, GetMetadataProps, GetMetadataQueryQueryParams, } from './hooks/useGetMetadataQuery';
13
11
  export { getMetadata, useGetMetadataQuery } from './hooks/useGetMetadataQuery';
14
12
  export type { GetMetadataValuesErrorResponse, GetMetadataValuesOkResponse, GetMetadataValuesProps, GetMetadataValuesQueryQueryParams, } from './hooks/useGetMetadataValuesQuery';
15
13
  export { getMetadataValues, useGetMetadataValuesQuery } from './hooks/useGetMetadataValuesQuery';
16
- export type { UpdateMetadataErrorResponse, UpdateMetadataMutationPathParams, UpdateMetadataMutationQueryParams, UpdateMetadataOkResponse, UpdateMetadataProps, UpdateMetadataRequestBody, } from './hooks/useUpdateMetadataMutation';
14
+ export type { ListArtifactsErrorResponse, ListArtifactsOkResponse, ListArtifactsProps, ListArtifactsQueryQueryParams, } from './hooks/useListArtifactsQuery';
15
+ export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
16
+ export type { ListPackagesErrorResponse, ListPackagesOkResponse, ListPackagesProps, ListPackagesQueryQueryParams, } from './hooks/useListPackagesQuery';
17
+ export { listPackages, useListPackagesQuery } from './hooks/useListPackagesQuery';
18
+ export type { ListRegistriesErrorResponse, ListRegistriesOkResponse, ListRegistriesProps, ListRegistriesQueryQueryParams, } from './hooks/useListRegistriesQuery';
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';
32
+ export type { UpdateMetadataErrorResponse, UpdateMetadataMutationQueryParams, UpdateMetadataOkResponse, UpdateMetadataProps, UpdateMetadataRequestBody, } from './hooks/useUpdateMetadataMutation';
17
33
  export { updateMetadata, useUpdateMetadataMutation } from './hooks/useUpdateMetadataMutation';
34
+ export type { AddTagsRequestRequestBody } from './requestBodies/AddTagsRequestRequestBody';
18
35
  export type { MetadataRequestRequestBody } from './requestBodies/MetadataRequestRequestBody';
36
+ export type { AddTagsResponseResponse } from './responses/AddTagsResponseResponse';
19
37
  export type { BadRequestResponse } from './responses/BadRequestResponse';
38
+ export type { CopyResponseResponse } from './responses/CopyResponseResponse';
39
+ export type { DownloadFileResponseResponse } from './responses/DownloadFileResponseResponse';
20
40
  export type { InternalServerErrorResponse } from './responses/InternalServerErrorResponse';
21
41
  export type { ListArtifactResponseResponse } from './responses/ListArtifactResponseResponse';
22
- export type { ListArtifactVersionResponseResponse } from './responses/ListArtifactVersionResponseResponse';
23
- export type { ListRegistryArtifactResponseResponse } from './responses/ListRegistryArtifactResponseResponse';
42
+ export type { ListPackageResponseResponse } from './responses/ListPackageResponseResponse';
24
43
  export type { ListRegistryResponseResponse } from './responses/ListRegistryResponseResponse';
25
44
  export type { MetadataKeysResponseResponse } from './responses/MetadataKeysResponseResponse';
26
45
  export type { MetadataResponseResponse } from './responses/MetadataResponseResponse';
27
46
  export type { MetadataValuesResponseResponse } from './responses/MetadataValuesResponseResponse';
28
47
  export type { NotFoundResponse } from './responses/NotFoundResponse';
48
+ export type { RedirectResponse } from './responses/RedirectResponse';
49
+ export type { SuccessResponse } from './responses/SuccessResponse';
29
50
  export type { UnauthenticatedResponse } from './responses/UnauthenticatedResponse';
30
51
  export type { UnauthorizedResponse } from './responses/UnauthorizedResponse';
52
+ export type { AddTags } from './schemas/AddTags';
31
53
  export type { ArtifactEntityMetadata } from './schemas/ArtifactEntityMetadata';
32
54
  export type { ArtifactMetadata } from './schemas/ArtifactMetadata';
33
55
  export type { ArtifactType } from './schemas/ArtifactType';
34
- export type { ArtifactVersionMetadata } from './schemas/ArtifactVersionMetadata';
35
56
  export type { DeploymentMetadata } from './schemas/DeploymentMetadata';
36
57
  export type { Error } from './schemas/Error';
37
58
  export type { ListArtifact } from './schemas/ListArtifact';
38
- export type { ListArtifactVersion } from './schemas/ListArtifactVersion';
59
+ export type { ListPackage } from './schemas/ListPackage';
39
60
  export type { ListRegistry } from './schemas/ListRegistry';
40
- export type { ListRegistryArtifact } from './schemas/ListRegistryArtifact';
41
61
  export type { MetadataInput } from './schemas/MetadataInput';
42
62
  export type { MetadataItemInput } from './schemas/MetadataItemInput';
43
63
  export type { MetadataItemOutput } from './schemas/MetadataItemOutput';
44
64
  export type { MetadataOutput } from './schemas/MetadataOutput';
45
65
  export type { MetadataType } from './schemas/MetadataType';
66
+ export type { PackageMetadata } from './schemas/PackageMetadata';
46
67
  export type { PackageType } from './schemas/PackageType';
47
- export type { RegistryArtifactMetadata } from './schemas/RegistryArtifactMetadata';
48
68
  export type { RegistryMetadata } from './schemas/RegistryMetadata';
49
69
  export type { RegistryType } from './schemas/RegistryType';
50
70
  export type { Status } from './schemas/Status';
@@ -1,8 +1,16 @@
1
- export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
2
- export { getAllArtifactsByRegistry, useGetAllArtifactsByRegistryQuery, } from './hooks/useGetAllArtifactsByRegistryQuery';
3
- export { getAllHarnessArtifacts, useGetAllHarnessArtifactsQuery, } from './hooks/useGetAllHarnessArtifactsQuery';
4
- export { getAllRegistries, useGetAllRegistriesQuery } from './hooks/useGetAllRegistriesQuery';
1
+ export { addOciArtifactTags, useAddOciArtifactTagsMutation, } from './hooks/useAddOciArtifactTagsMutation';
2
+ export { copy, useCopyMutation } from './hooks/useCopyMutation';
3
+ export { getFile, useGetFileQuery } from './hooks/useGetFileQuery';
5
4
  export { getMetadataKeys, useGetMetadataKeysQuery } from './hooks/useGetMetadataKeysQuery';
6
5
  export { getMetadata, useGetMetadataQuery } from './hooks/useGetMetadataQuery';
7
6
  export { getMetadataValues, useGetMetadataValuesQuery } from './hooks/useGetMetadataValuesQuery';
7
+ export { listArtifacts, useListArtifactsQuery } from './hooks/useListArtifactsQuery';
8
+ export { listPackages, useListPackagesQuery } from './hooks/useListPackagesQuery';
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';
8
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 CopyResponseResponse {
3
+ status: Status;
4
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @format binary
3
+ */
4
+ export type DownloadFileResponseResponse = string;
@@ -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 {};
@@ -0,0 +1,6 @@
1
+ import type { ListPackage } from '../schemas/ListPackage';
2
+ import type { Status } from '../schemas/Status';
3
+ export interface ListPackageResponseResponse {
4
+ data: ListPackage;
5
+ status: Status;
6
+ }
@@ -0,0 +1 @@
1
+ export type RedirectResponse = unknown;
@@ -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 {};
@@ -8,17 +8,21 @@ import type { PackageType } from '../schemas/PackageType';
8
8
  export interface ArtifactMetadata {
9
9
  artifactType?: ArtifactType;
10
10
  deploymentMetadata?: DeploymentMetadata;
11
+ digestCount?: number;
11
12
  /**
12
13
  * @format int64
13
14
  */
14
15
  downloadsCount?: number;
16
+ fileCount?: number;
17
+ isDeleted?: boolean;
15
18
  isQuarantined?: boolean;
16
- lastModified?: string;
19
+ lastModified: string;
17
20
  metadata?: ArtifactEntityMetadata;
18
- name: string;
21
+ package: string;
19
22
  packageType: PackageType;
20
23
  pullCommand?: string;
21
24
  quarantineReason?: string;
22
25
  registryIdentifier: string;
26
+ size?: string;
23
27
  version: string;
24
28
  }
@@ -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
@@ -0,0 +1,45 @@
1
+ import type { PackageMetadata } from '../schemas/PackageMetadata';
2
+ /**
3
+ * A list of Package
4
+ */
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;
18
+ /**
19
+ * The total number of items
20
+ * @format int64
21
+ * @example 1
22
+ */
23
+ itemCount?: number;
24
+ /**
25
+ * A list of Package
26
+ */
27
+ packages: PackageMetadata[];
28
+ /**
29
+ * The total number of pages
30
+ * @format int64
31
+ * @example 100
32
+ */
33
+ pageCount?: number;
34
+ /**
35
+ * The current page
36
+ * @format int64
37
+ * @example 0
38
+ */
39
+ pageIndex?: number;
40
+ /**
41
+ * The number of items per page
42
+ * @example 1
43
+ */
44
+ pageSize?: number;
45
+ }
@@ -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
@@ -1,11 +1,45 @@
1
1
  import type { MetadataItemInput } from '../schemas/MetadataItemInput';
2
2
  /**
3
- * Request payload containing metadata items to add or update
4
- * @example {"metadata":[{"key":"environment","value":"production"},{"key":"team","value":"backend"}]}
3
+ * Request payload containing metadata items to add or update for a specific entity.
4
+ *
5
+ * **Priority Logic:**
6
+ * 1. If `path` is present, it takes highest priority and determines the target entity
7
+ * 2. If `path` is absent but `package` and `version` are provided, metadata is attached to the specific package version
8
+ * 3. If only `package` is provided (without `version`), metadata is attached to the package level
9
+ * 4. If neither `path`, `package`, nor `version` are provided, metadata is attached to the registry level
10
+ *
11
+ * @example {"registryIdentifier":"my-registry","path":"/path/to/entity","package":"my-package","version":"1.0.0","metadata":[{"key":"environment","value":"production"},{"key":"team","value":"backend"}]}
5
12
  */
6
13
  export interface MetadataInput {
7
14
  /**
8
15
  * Array of metadata key-value pairs
9
16
  */
10
17
  metadata: MetadataItemInput[];
18
+ /**
19
+ * Optional package name. Used when `path` is not provided.
20
+ *
21
+ * @example "my-package"
22
+ */
23
+ package?: string;
24
+ /**
25
+ * Optional hierarchical path to the specific entity within the registry.
26
+ * When provided, this takes highest priority for determining the metadata target.
27
+ * Examples: "/my-package/1.0.0" for a specific version, "/my-package" for an package
28
+ *
29
+ * @example "/path/to/entity"
30
+ */
31
+ path?: string;
32
+ /**
33
+ * The unique identifier of the registry where the metadata will be applied.
34
+ *
35
+ * @example "my-registry"
36
+ */
37
+ registryIdentifier: string;
38
+ /**
39
+ * Optional version identifier. Only used when `package` is also provided and `path` is absent.
40
+ * When both `package` and `version` are specified, metadata is attached to the specific package version.
41
+ *
42
+ * @example "1.0.0"
43
+ */
44
+ version?: string;
11
45
  }
@@ -1,19 +1,21 @@
1
1
  import type { ArtifactType } from '../schemas/ArtifactType';
2
2
  import type { PackageType } from '../schemas/PackageType';
3
3
  /**
4
- * Artifact Metadata
4
+ * Package Metadata
5
5
  */
6
- export interface RegistryArtifactMetadata {
6
+ export interface PackageMetadata {
7
7
  artifactType?: ArtifactType;
8
8
  /**
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;
15
16
  latestVersion: string;
16
- name: string;
17
+ package: string;
17
18
  packageType: PackageType;
19
+ quarantineReason?: string;
18
20
  registryIdentifier: string;
19
21
  }
@@ -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.1.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",
@@ -1,43 +0,0 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { ListArtifactVersionResponseResponse } from '../responses/ListArtifactVersionResponseResponse';
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 GetAllArtifactVersionsQueryPathParams {
11
- registry: string;
12
- artifact: string;
13
- }
14
- export interface GetAllArtifactVersionsQueryQueryParams {
15
- artifact_type?: 'dataset' | 'model';
16
- metadata?: string[];
17
- /**
18
- * @format int64
19
- * @default 0
20
- */
21
- page?: number;
22
- /**
23
- * @format int64
24
- * @default 20
25
- */
26
- size?: number;
27
- /**
28
- * @default "ASC"
29
- */
30
- sort_order?: 'ASC' | 'DESC';
31
- sort_field?: string;
32
- search_term?: string;
33
- }
34
- export type GetAllArtifactVersionsOkResponse = ResponseWithPagination<ListArtifactVersionResponseResponse>;
35
- export type GetAllArtifactVersionsErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
36
- export interface GetAllArtifactVersionsProps extends GetAllArtifactVersionsQueryPathParams, Omit<FetcherOptions<GetAllArtifactVersionsQueryQueryParams, unknown>, 'url'> {
37
- queryParams: GetAllArtifactVersionsQueryQueryParams;
38
- }
39
- export declare function getAllArtifactVersions(props: GetAllArtifactVersionsProps): Promise<GetAllArtifactVersionsOkResponse>;
40
- /**
41
- * Lists all the Artifact Versions.
42
- */
43
- export declare function useGetAllArtifactVersionsQuery(props: GetAllArtifactVersionsProps, options?: Omit<UseQueryOptions<GetAllArtifactVersionsOkResponse, GetAllArtifactVersionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAllArtifactVersionsOkResponse, import("..").Error>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
- import { fetcher } from '../../../../fetcher/index.js';
6
- export function getAllArtifactVersions(props) {
7
- return fetcher(Object.assign({ url: `/registry/${props.registry}/artifact/${props.artifact}/versions`, method: 'GET' }, props));
8
- }
9
- /**
10
- * Lists all the Artifact Versions.
11
- */
12
- export function useGetAllArtifactVersionsQuery(props, options) {
13
- return useQuery(['GetAllArtifactVersions', props.registry, props.artifact, props.queryParams], ({ signal }) => getAllArtifactVersions(Object.assign(Object.assign({}, props), { signal })), options);
14
- }
@@ -1,42 +0,0 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { ListRegistryArtifactResponseResponse } from '../responses/ListRegistryArtifactResponseResponse';
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 GetAllArtifactsByRegistryQueryPathParams {
11
- registry: string;
12
- }
13
- export interface GetAllArtifactsByRegistryQueryQueryParams {
14
- metadata?: string[];
15
- /**
16
- * @format int64
17
- * @default 0
18
- */
19
- page?: number;
20
- /**
21
- * @format int64
22
- * @default 20
23
- */
24
- size?: number;
25
- /**
26
- * @default "ASC"
27
- */
28
- sort_order?: 'ASC' | 'DESC';
29
- sort_field?: string;
30
- search_term?: string;
31
- artifact_type?: 'dataset' | 'model';
32
- }
33
- export type GetAllArtifactsByRegistryOkResponse = ResponseWithPagination<ListRegistryArtifactResponseResponse>;
34
- export type GetAllArtifactsByRegistryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
35
- export interface GetAllArtifactsByRegistryProps extends GetAllArtifactsByRegistryQueryPathParams, Omit<FetcherOptions<GetAllArtifactsByRegistryQueryQueryParams, unknown>, 'url'> {
36
- queryParams: GetAllArtifactsByRegistryQueryQueryParams;
37
- }
38
- export declare function getAllArtifactsByRegistry(props: GetAllArtifactsByRegistryProps): Promise<GetAllArtifactsByRegistryOkResponse>;
39
- /**
40
- * Lists all the Artifacts for Registry
41
- */
42
- export declare function useGetAllArtifactsByRegistryQuery(props: GetAllArtifactsByRegistryProps, options?: Omit<UseQueryOptions<GetAllArtifactsByRegistryOkResponse, GetAllArtifactsByRegistryErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAllArtifactsByRegistryOkResponse, import("..").Error>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
- import { fetcher } from '../../../../fetcher/index.js';
6
- export function getAllArtifactsByRegistry(props) {
7
- return fetcher(Object.assign({ url: `/registry/${props.registry}/artifacts`, method: 'GET' }, props));
8
- }
9
- /**
10
- * Lists all the Artifacts for Registry
11
- */
12
- export function useGetAllArtifactsByRegistryQuery(props, options) {
13
- return useQuery(['GetAllArtifactsByRegistry', props.registry, props.queryParams], ({ signal }) => getAllArtifactsByRegistry(Object.assign(Object.assign({}, props), { signal })), options);
14
- }
@@ -1,6 +0,0 @@
1
- import type { ListArtifactVersion } from '../schemas/ListArtifactVersion';
2
- import type { Status } from '../schemas/Status';
3
- export interface ListArtifactVersionResponseResponse {
4
- data: ListArtifactVersion;
5
- status: Status;
6
- }
@@ -1,6 +0,0 @@
1
- import type { ListRegistryArtifact } from '../schemas/ListRegistryArtifact';
2
- import type { Status } from '../schemas/Status';
3
- export interface ListRegistryArtifactResponseResponse {
4
- data: ListRegistryArtifact;
5
- status: Status;
6
- }
@@ -1,32 +0,0 @@
1
- import type { ArtifactType } from '../schemas/ArtifactType';
2
- import type { DeploymentMetadata } from '../schemas/DeploymentMetadata';
3
- import type { ArtifactEntityMetadata } from '../schemas/ArtifactEntityMetadata';
4
- import type { PackageType } from '../schemas/PackageType';
5
- /**
6
- * Artifact Version Metadata
7
- */
8
- export interface ArtifactVersionMetadata {
9
- artifactType?: ArtifactType;
10
- deploymentMetadata?: DeploymentMetadata;
11
- /**
12
- * @format int64
13
- */
14
- digestCount?: number;
15
- /**
16
- * @format int64
17
- */
18
- downloadsCount?: number;
19
- /**
20
- * @format int64
21
- */
22
- fileCount?: number;
23
- isQuarantined?: boolean;
24
- lastModified?: string;
25
- metadata?: ArtifactEntityMetadata;
26
- name: string;
27
- packageType: PackageType;
28
- pullCommand?: string;
29
- quarantineReason?: string;
30
- registryIdentifier: string;
31
- size?: string;
32
- }