@harnessio/react-har-service-client 0.0.22 → 0.0.24

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.
@@ -0,0 +1,22 @@
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 DeleteArtifactMutationPathParams {
11
+ registry_ref: string;
12
+ artifact: string;
13
+ }
14
+ export type DeleteArtifactOkResponse = ResponseWithPagination<SuccessResponse>;
15
+ export type DeleteArtifactErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
16
+ export interface DeleteArtifactProps extends DeleteArtifactMutationPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
17
+ }
18
+ export declare function deleteArtifact(props: DeleteArtifactProps): Promise<DeleteArtifactOkResponse>;
19
+ /**
20
+ * Delete Artifact.
21
+ */
22
+ export declare function useDeleteArtifactMutation(options?: Omit<UseMutationOptions<DeleteArtifactOkResponse, DeleteArtifactErrorResponse, DeleteArtifactProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteArtifactOkResponse, import("..").Error, DeleteArtifactProps, 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 deleteArtifact(props) {
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/artifact/${props.artifact}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete Artifact.
11
+ */
12
+ export function useDeleteArtifactMutation(options) {
13
+ return useMutation((mutateProps) => deleteArtifact(mutateProps), options);
14
+ }
@@ -0,0 +1,23 @@
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 DeleteArtifactVersionMutationPathParams {
11
+ registry_ref: string;
12
+ artifact: string;
13
+ version: string;
14
+ }
15
+ export type DeleteArtifactVersionOkResponse = ResponseWithPagination<SuccessResponse>;
16
+ export type DeleteArtifactVersionErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
17
+ export interface DeleteArtifactVersionProps extends DeleteArtifactVersionMutationPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
18
+ }
19
+ export declare function deleteArtifactVersion(props: DeleteArtifactVersionProps): Promise<DeleteArtifactVersionOkResponse>;
20
+ /**
21
+ * Delete Artifact Version.
22
+ */
23
+ export declare function useDeleteArtifactVersionMutation(options?: Omit<UseMutationOptions<DeleteArtifactVersionOkResponse, DeleteArtifactVersionErrorResponse, DeleteArtifactVersionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteArtifactVersionOkResponse, import("..").Error, DeleteArtifactVersionProps, 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 deleteArtifactVersion(props) {
7
+ return fetcher(Object.assign({ url: `/registry/${props.registry_ref}/artifact/${props.artifact}/version/${props.version}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete Artifact Version.
11
+ */
12
+ export function useDeleteArtifactVersionMutation(options) {
13
+ return useMutation((mutateProps) => deleteArtifactVersion(mutateProps), options);
14
+ }
@@ -13,7 +13,7 @@ export interface GetArtifactVersionSummaryQueryPathParams {
13
13
  version: string;
14
14
  }
15
15
  export interface GetArtifactVersionSummaryQueryQueryParams {
16
- digest: string;
16
+ digest?: string;
17
17
  }
18
18
  export type GetArtifactVersionSummaryOkResponse = ResponseWithPagination<ArtifactVersionSummaryResponseResponse>;
19
19
  export type GetArtifactVersionSummaryErrorResponse = BadRequestResponse | UnauthenticatedResponse | UnauthorizedResponse | NotFoundResponse | InternalServerErrorResponse;
@@ -1,6 +1,10 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
2
  export type { CreateRegistryErrorResponse, CreateRegistryMutationQueryParams, CreateRegistryOkResponse, CreateRegistryProps, CreateRegistryRequestBody, } from './hooks/useCreateRegistryMutation';
3
3
  export { createRegistry, useCreateRegistryMutation } from './hooks/useCreateRegistryMutation';
4
+ export type { DeleteArtifactErrorResponse, DeleteArtifactMutationPathParams, DeleteArtifactOkResponse, DeleteArtifactProps, } from './hooks/useDeleteArtifactMutation';
5
+ export { deleteArtifact, useDeleteArtifactMutation } from './hooks/useDeleteArtifactMutation';
6
+ export type { DeleteArtifactVersionErrorResponse, DeleteArtifactVersionMutationPathParams, DeleteArtifactVersionOkResponse, DeleteArtifactVersionProps, } from './hooks/useDeleteArtifactVersionMutation';
7
+ export { deleteArtifactVersion, useDeleteArtifactVersionMutation, } from './hooks/useDeleteArtifactVersionMutation';
4
8
  export type { DeleteRegistryErrorResponse, DeleteRegistryMutationPathParams, DeleteRegistryOkResponse, DeleteRegistryProps, } from './hooks/useDeleteRegistryMutation';
5
9
  export { deleteRegistry, useDeleteRegistryMutation } from './hooks/useDeleteRegistryMutation';
6
10
  export type { GetAllArtifactVersionsErrorResponse, GetAllArtifactVersionsOkResponse, GetAllArtifactVersionsProps, GetAllArtifactVersionsQueryPathParams, GetAllArtifactVersionsQueryQueryParams, } from './hooks/useGetAllArtifactVersionsQuery';
@@ -118,6 +122,8 @@ export type { RegistryMetadata } from './schemas/RegistryMetadata';
118
122
  export type { RegistryRequest } from './schemas/RegistryRequest';
119
123
  export type { RegistryType } from './schemas/RegistryType';
120
124
  export type { SbomDetails } from './schemas/SbomDetails';
125
+ export type { Scanner } from './schemas/Scanner';
126
+ export type { SlsaDetails } from './schemas/SlsaDetails';
121
127
  export type { Status } from './schemas/Status';
122
128
  export type { StoDetails } from './schemas/StoDetails';
123
129
  export type { StoDigestMetadata } from './schemas/StoDigestMetadata';
@@ -1,4 +1,6 @@
1
1
  export { createRegistry, useCreateRegistryMutation } from './hooks/useCreateRegistryMutation';
2
+ export { deleteArtifact, useDeleteArtifactMutation } from './hooks/useDeleteArtifactMutation';
3
+ export { deleteArtifactVersion, useDeleteArtifactVersionMutation, } from './hooks/useDeleteArtifactVersionMutation';
2
4
  export { deleteRegistry, useDeleteRegistryMutation } from './hooks/useDeleteRegistryMutation';
3
5
  export { getAllArtifactVersions, useGetAllArtifactVersionsQuery, } from './hooks/useGetAllArtifactVersionsQuery';
4
6
  export { getAllArtifactsByRegistry, useGetAllArtifactsByRegistryQuery, } from './hooks/useGetAllArtifactsByRegistryQuery';
@@ -15,15 +15,7 @@ export interface ArtifactMetadata {
15
15
  lastModified?: string;
16
16
  latestVersion: string;
17
17
  name: string;
18
- /**
19
- * @format int64
20
- */
21
- nonProdEnvCount?: number;
22
18
  packageType?: PackageType;
23
- /**
24
- * @format int64
25
- */
26
- prodEnvCount?: number;
27
19
  pullCommand?: string;
28
20
  registryIdentifier: string;
29
21
  registryPath: string;
@@ -37,5 +29,5 @@ export interface ArtifactMetadata {
37
29
  * @format int64
38
30
  */
39
31
  totalDigestCount?: number;
40
- version?: string;
32
+ version: string;
41
33
  }
@@ -1,5 +1,5 @@
1
1
  export interface DeploymentDetails {
2
- nonProdDeployment?: number;
3
- prodDeployment?: number;
4
- totalDeployment?: number;
2
+ nonProdDeployment: number;
3
+ prodDeployment: number;
4
+ totalDeployment: number;
5
5
  }
@@ -1,10 +1,4 @@
1
1
  export interface DeploymentMetadata {
2
- /**
3
- * @format int64
4
- */
5
- nonProdEnvCount?: number;
6
- /**
7
- * @format int64
8
- */
9
- prodEnvCount?: number;
2
+ nonProdEnvCount: number;
3
+ prodEnvCount: number;
10
4
  }
@@ -1,6 +1,7 @@
1
1
  import type { BuildDetails } from '../schemas/BuildDetails';
2
2
  import type { DeploymentDetails } from '../schemas/DeploymentDetails';
3
3
  import type { SbomDetails } from '../schemas/SbomDetails';
4
+ import type { SlsaDetails } from '../schemas/SlsaDetails';
4
5
  import type { StoDetails } from '../schemas/StoDetails';
5
6
  /**
6
7
  * Docker Artifact Detail
@@ -9,5 +10,6 @@ export interface DockerArtifactIntegrationDetail {
9
10
  buildDetails?: BuildDetails;
10
11
  deploymentsDetails?: DeploymentDetails;
11
12
  sbomDetails?: SbomDetails;
13
+ slsaDetails?: SlsaDetails;
12
14
  stoDetails?: StoDetails;
13
15
  }
@@ -1,7 +1,7 @@
1
1
  export interface Error {
2
2
  /**
3
3
  * The http error code
4
- * @example 404
4
+ * @example "404"
5
5
  */
6
6
  code: string;
7
7
  /**
@@ -1,6 +1,7 @@
1
1
  import type { CleanupPolicy } from '../schemas/CleanupPolicy';
2
2
  import type { RegistryConfig } from '../schemas/RegistryConfig';
3
3
  import type { PackageType } from '../schemas/PackageType';
4
+ import type { Scanner } from '../schemas/Scanner';
4
5
  export interface RegistryRequest<T0 extends RegistryConfig = RegistryConfig> {
5
6
  allowedPattern?: string[];
6
7
  blockedPattern?: string[];
@@ -11,4 +12,5 @@ export interface RegistryRequest<T0 extends RegistryConfig = RegistryConfig> {
11
12
  labels?: string[];
12
13
  packageType: PackageType;
13
14
  parentRef?: string;
15
+ scanners?: Scanner[];
14
16
  }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Scanner for Harness Artifact Registries
3
+ */
4
+ export interface Scanner {
5
+ name?: 'AQUA_TRIVY' | 'GRYPE';
6
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface SlsaDetails {
2
+ provenanceId?: string;
3
+ status?: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",