@harnessio/react-har-service-client 0.40.0 → 0.42.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.
@@ -1,18 +1,18 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
2
  import type { ArtifactScanEvaluateRequestAcceptedResponse } from '../responses/ArtifactScanEvaluateRequestAcceptedResponse';
3
3
  import type { V3Error } from '../schemas/V3Error';
4
+ import type { ArtifactScanEvaluateRequestRequestBody } from '../requestBodies/ArtifactScanEvaluateRequestRequestBody';
4
5
  import type { ResponseWithPagination } from '../helpers';
5
6
  import { FetcherOptions } from '../../../../fetcher/index.js';
6
- export interface EvaluateArtifactScanMutationPathParams {
7
- scan_id: string;
8
- }
9
7
  export interface EvaluateArtifactScanMutationQueryParams {
10
8
  account_identifier: string;
11
9
  }
10
+ export type EvaluateArtifactScanRequestBody = ArtifactScanEvaluateRequestRequestBody;
12
11
  export type EvaluateArtifactScanOkResponse = ResponseWithPagination<ArtifactScanEvaluateRequestAcceptedResponse>;
13
12
  export type EvaluateArtifactScanErrorResponse = V3Error;
14
- export interface EvaluateArtifactScanProps extends EvaluateArtifactScanMutationPathParams, Omit<FetcherOptions<EvaluateArtifactScanMutationQueryParams, unknown>, 'url'> {
13
+ export interface EvaluateArtifactScanProps extends Omit<FetcherOptions<EvaluateArtifactScanMutationQueryParams, EvaluateArtifactScanRequestBody>, 'url'> {
15
14
  queryParams: EvaluateArtifactScanMutationQueryParams;
15
+ body: EvaluateArtifactScanRequestBody;
16
16
  }
17
17
  export declare function evaluateArtifactScan(props: EvaluateArtifactScanProps): Promise<EvaluateArtifactScanOkResponse>;
18
18
  /**
@@ -4,7 +4,7 @@
4
4
  import { useMutation } from '@tanstack/react-query';
5
5
  import { fetcher } from '../../../../fetcher/index.js';
6
6
  export function evaluateArtifactScan(props) {
7
- return fetcher(Object.assign({ url: `/v3/scans/${props.scan_id}/evaluate`, method: 'POST' }, props));
7
+ return fetcher(Object.assign({ url: `/v3/scans/evaluate`, method: 'POST' }, props));
8
8
  }
9
9
  /**
10
10
  * Re-evaluate artifact scan
@@ -41,7 +41,7 @@ export type { DeleteVersionErrorResponse, DeleteVersionMutationPathParams, Delet
41
41
  export { deleteVersion, useDeleteVersionMutation } from './hooks/useDeleteVersionMutation';
42
42
  export type { DeleteWebhookErrorResponse, DeleteWebhookMutationPathParams, DeleteWebhookOkResponse, DeleteWebhookProps, } from './hooks/useDeleteWebhookMutation';
43
43
  export { deleteWebhook, useDeleteWebhookMutation } from './hooks/useDeleteWebhookMutation';
44
- export type { EvaluateArtifactScanErrorResponse, EvaluateArtifactScanMutationPathParams, EvaluateArtifactScanMutationQueryParams, EvaluateArtifactScanOkResponse, EvaluateArtifactScanProps, } from './hooks/useEvaluateArtifactScanMutation';
44
+ export type { EvaluateArtifactScanErrorResponse, EvaluateArtifactScanMutationQueryParams, EvaluateArtifactScanOkResponse, EvaluateArtifactScanProps, EvaluateArtifactScanRequestBody, } from './hooks/useEvaluateArtifactScanMutation';
45
45
  export { evaluateArtifactScan, useEvaluateArtifactScanMutation, } from './hooks/useEvaluateArtifactScanMutation';
46
46
  export type { FindSpaceLabelErrorResponse, FindSpaceLabelOkResponse, FindSpaceLabelProps, FindSpaceLabelQueryPathParams, FindSpaceLabelQueryQueryParams, } from './hooks/useFindSpaceLabelQuery';
47
47
  export { findSpaceLabel, useFindSpaceLabelQuery } from './hooks/useFindSpaceLabelQuery';
@@ -173,6 +173,7 @@ export type { UpdateWebhookErrorResponse, UpdateWebhookMutationPathParams, Updat
173
173
  export { updateWebhook, useUpdateWebhookMutation } from './hooks/useUpdateWebhookMutation';
174
174
  export type { AddTagsRequestRequestBody } from './requestBodies/AddTagsRequestRequestBody';
175
175
  export type { ArtifactLabelRequestRequestBody } from './requestBodies/ArtifactLabelRequestRequestBody';
176
+ export type { ArtifactScanEvaluateRequestRequestBody } from './requestBodies/ArtifactScanEvaluateRequestRequestBody';
176
177
  export type { BulkDownloadFilesRequestRequestBody } from './requestBodies/BulkDownloadFilesRequestRequestBody';
177
178
  export type { MetadataRequestRequestBody } from './requestBodies/MetadataRequestRequestBody';
178
179
  export type { QuarantineRequestRequestBody } from './requestBodies/QuarantineRequestRequestBody';
@@ -246,6 +247,7 @@ export type { ArtifactLabelRequest } from './schemas/ArtifactLabelRequest';
246
247
  export type { ArtifactMetadata } from './schemas/ArtifactMetadata';
247
248
  export type { ArtifactScan } from './schemas/ArtifactScan';
248
249
  export type { ArtifactScanDetails } from './schemas/ArtifactScanDetails';
250
+ export type { ArtifactScanEvaluateRequest } from './schemas/ArtifactScanEvaluateRequest';
249
251
  export type { ArtifactScanEvaluateRequestStatus } from './schemas/ArtifactScanEvaluateRequestStatus';
250
252
  export type { ArtifactStats } from './schemas/ArtifactStats';
251
253
  export type { ArtifactSummary } from './schemas/ArtifactSummary';
@@ -0,0 +1,2 @@
1
+ import type { ArtifactScanEvaluateRequest } from '../schemas/ArtifactScanEvaluateRequest';
2
+ export type ArtifactScanEvaluateRequestRequestBody = ArtifactScanEvaluateRequest;
@@ -2,6 +2,7 @@ import type { ArtifactType } from '../schemas/ArtifactType';
2
2
  import type { DeploymentMetadata } from '../schemas/DeploymentMetadata';
3
3
  import type { ArtifactEntityMetadata } from '../schemas/ArtifactEntityMetadata';
4
4
  import type { PackageType } from '../schemas/PackageType';
5
+ import type { RegistryType } from '../schemas/RegistryType';
5
6
  /**
6
7
  * Artifact Metadata
7
8
  */
@@ -33,9 +34,10 @@ export interface ArtifactMetadata {
33
34
  quarantineReason?: string;
34
35
  registryIdentifier: string;
35
36
  registryPath: string;
37
+ registryType?: RegistryType;
36
38
  registryUUID: string;
37
39
  scanId?: string;
38
- scanStatus?: 'BLOCKED' | 'WARN';
40
+ scanStatus?: 'ALLOWED' | 'BLOCKED' | 'WARN';
39
41
  uuid: string;
40
42
  version: string;
41
43
  }
@@ -4,6 +4,7 @@ import type { PackageType } from '../schemas/PackageType';
4
4
  * Artifact scans details
5
5
  */
6
6
  export interface ArtifactScanDetails {
7
+ createdAt?: string;
7
8
  fixVersionDetails?: FixVersionDetails;
8
9
  /**
9
10
  * Unique identifier for this artifact scan details
@@ -11,7 +12,6 @@ export interface ArtifactScanDetails {
11
12
  */
12
13
  id: string;
13
14
  lastEvaluatedAt?: string;
14
- lastEvaluatedBy?: string;
15
15
  /**
16
16
  * Package name
17
17
  */
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Input for re-evaluate artifact scan.
3
+ * Exactly one of scanId or versionId must be provided.
4
+ *
5
+ */
6
+ export interface ArtifactScanEvaluateRequest {
7
+ /**
8
+ * Scan identifier
9
+ */
10
+ scanId?: string;
11
+ /**
12
+ * Artifact version identifier
13
+ */
14
+ versionId?: string;
15
+ }
@@ -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 {};
@@ -2,6 +2,7 @@ import type { ArtifactType } from '../schemas/ArtifactType';
2
2
  import type { DeploymentMetadata } from '../schemas/DeploymentMetadata';
3
3
  import type { ArtifactEntityMetadata } from '../schemas/ArtifactEntityMetadata';
4
4
  import type { PackageType } from '../schemas/PackageType';
5
+ import type { RegistryType } from '../schemas/RegistryType';
5
6
  /**
6
7
  * Artifact Version Metadata
7
8
  */
@@ -37,9 +38,10 @@ export interface ArtifactVersionMetadata {
37
38
  quarantineReason?: string;
38
39
  registryIdentifier: string;
39
40
  registryPath: string;
41
+ registryType?: RegistryType;
40
42
  registryUUID: string;
41
43
  scanId?: string;
42
- scanStatus?: 'BLOCKED' | 'WARN';
44
+ scanStatus?: 'ALLOWED' | 'BLOCKED' | 'WARN';
43
45
  size?: string;
44
46
  uuid: string;
45
47
  }
@@ -1,5 +1,6 @@
1
1
  import type { ArtifactType } from '../schemas/ArtifactType';
2
2
  import type { PackageType } from '../schemas/PackageType';
3
+ import type { RegistryType } from '../schemas/RegistryType';
3
4
  /**
4
5
  * Docker Artifact Version Summary
5
6
  */
@@ -17,9 +18,10 @@ export interface ArtifactVersionSummary {
17
18
  isQuarantined?: boolean;
18
19
  packageType: PackageType;
19
20
  quarantineReason?: string;
21
+ registryType?: RegistryType;
20
22
  registryUUID: string;
21
23
  scanId?: string;
22
- scanStatus?: 'BLOCKED' | 'WARN';
24
+ scanStatus?: 'ALLOWED' | 'BLOCKED' | 'WARN';
23
25
  sscaArtifactId?: string;
24
26
  sscaArtifactSourceId?: string;
25
27
  stoExecutionId?: string;
@@ -2,6 +2,7 @@ import type { ArtifactType } from '../schemas/ArtifactType';
2
2
  import type { DeploymentMetadata } from '../schemas/DeploymentMetadata';
3
3
  import type { ArtifactEntityMetadata } from '../schemas/ArtifactEntityMetadata';
4
4
  import type { PackageType } from '../schemas/PackageType';
5
+ import type { RegistryType } from '../schemas/RegistryType';
5
6
  /**
6
7
  * Version Metadata
7
8
  */
@@ -33,9 +34,10 @@ export interface VersionMetadata {
33
34
  pullCommand?: string;
34
35
  quarantineReason?: string;
35
36
  registryIdentifier: string;
37
+ registryType?: RegistryType;
36
38
  registryUUID: string;
37
39
  scanId?: string;
38
- scanStatus?: 'BLOCKED' | 'WARN';
40
+ scanStatus?: 'ALLOWED' | 'BLOCKED' | 'WARN';
39
41
  size?: string;
40
42
  uuid: string;
41
43
  version: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-har-service-client",
3
- "version": "0.40.0",
3
+ "version": "0.42.0",
4
4
  "description": "Harness HAR Service APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",