@harnessio/react-ssca-manager-client 1.0.6 → 1.0.8

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.
@@ -5,12 +5,12 @@ import { FetcherOptions } from '../../../../fetcher/index.js';
5
5
  export interface GetZeroDayConfigQueryHeaderParams {
6
6
  'Harness-Account': string;
7
7
  }
8
- export type GetZeroDayConfigOkResponse = ResponseWithPagination<ZeroDayConfig>;
8
+ export type GetZeroDayConfigOkResponse = ResponseWithPagination<ZeroDayConfig | unknown>;
9
9
  export type GetZeroDayConfigErrorResponse = unknown;
10
10
  export interface GetZeroDayConfigProps extends Omit<FetcherOptions<unknown, unknown, GetZeroDayConfigQueryHeaderParams>, 'url'> {
11
11
  }
12
12
  export declare function getZeroDayConfig(props: GetZeroDayConfigProps): Promise<GetZeroDayConfigOkResponse>;
13
13
  /**
14
- * Returns the account-level zero-day configuration. Stored in the dedicated zeroDayConfigs collection; independent of the AI workflow config. Every zero-day endpoint fails closed: it returns 403 whenever the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off for the account, including when the flag state cannot be read.
14
+ * Returns the account-level zero-day configuration. Stored in the dedicated zeroDayConfigs collection; independent of the AI workflow config. Every zero-day endpoint fails closed: it returns 403 whenever the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off for the account, including when the flag state cannot be read. A fresh account that has never saved a config gets 204 with no body; a disabled account gets 200 with `enabled: false`.
15
15
  */
16
16
  export declare function useGetZeroDayConfigQuery(props: GetZeroDayConfigProps, options?: Omit<UseQueryOptions<GetZeroDayConfigOkResponse, GetZeroDayConfigErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetZeroDayConfigOkResponse, unknown>;
@@ -7,7 +7,7 @@ export function getZeroDayConfig(props) {
7
7
  return fetcher(Object.assign({ url: `/v1/zero-day/config`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
- * Returns the account-level zero-day configuration. Stored in the dedicated zeroDayConfigs collection; independent of the AI workflow config. Every zero-day endpoint fails closed: it returns 403 whenever the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off for the account, including when the flag state cannot be read.
10
+ * Returns the account-level zero-day configuration. Stored in the dedicated zeroDayConfigs collection; independent of the AI workflow config. Every zero-day endpoint fails closed: it returns 403 whenever the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off for the account, including when the flag state cannot be read. A fresh account that has never saved a config gets 204 with no body; a disabled account gets 200 with `enabled: false`.
11
11
  */
12
12
  export function useGetZeroDayConfigQuery(props, options) {
13
13
  return useQuery(['getZeroDayConfig'], ({ signal }) => getZeroDayConfig(Object.assign(Object.assign({}, props), { signal })), options);
@@ -1,5 +1,5 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { AffectedArtifactInfo } from '../schemas/AffectedArtifactInfo';
2
+ import type { ZeroDayAffectedTarget } from '../schemas/ZeroDayAffectedTarget';
3
3
  import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
5
5
  export interface GetZeroDayExecutionAffectedTargetsQueryPathParams {
@@ -18,11 +18,12 @@ export interface GetZeroDayExecutionAffectedTargetsQueryQueryParams {
18
18
  limit?: number;
19
19
  org?: string;
20
20
  project?: string;
21
+ env_type?: 'N/A' | 'PreProduction' | 'Production';
21
22
  }
22
23
  export interface GetZeroDayExecutionAffectedTargetsQueryHeaderParams {
23
24
  'Harness-Account': string;
24
25
  }
25
- export type GetZeroDayExecutionAffectedTargetsOkResponse = ResponseWithPagination<AffectedArtifactInfo[]>;
26
+ export type GetZeroDayExecutionAffectedTargetsOkResponse = ResponseWithPagination<ZeroDayAffectedTarget[]>;
26
27
  export type GetZeroDayExecutionAffectedTargetsErrorResponse = unknown;
27
28
  export interface GetZeroDayExecutionAffectedTargetsProps extends GetZeroDayExecutionAffectedTargetsQueryPathParams, Omit<FetcherOptions<GetZeroDayExecutionAffectedTargetsQueryQueryParams, unknown, GetZeroDayExecutionAffectedTargetsQueryHeaderParams>, 'url'> {
28
29
  queryParams: GetZeroDayExecutionAffectedTargetsQueryQueryParams;
@@ -946,6 +946,7 @@ export type { VulnerabilitySource } from './schemas/VulnerabilitySource';
946
946
  export type { VulnerabilitySourceConfigRequestBody } from './schemas/VulnerabilitySourceConfigRequestBody';
947
947
  export type { VulnerabilitySourceConfigResponse } from './schemas/VulnerabilitySourceConfigResponse';
948
948
  export type { WorkflowSource } from './schemas/WorkflowSource';
949
+ export type { ZeroDayAffectedTarget } from './schemas/ZeroDayAffectedTarget';
949
950
  export type { ZeroDayAlertConfig } from './schemas/ZeroDayAlertConfig';
950
951
  export type { ZeroDayBackfillRequest } from './schemas/ZeroDayBackfillRequest';
951
952
  export type { ZeroDayBackfillResponse } from './schemas/ZeroDayBackfillResponse';
@@ -2,6 +2,10 @@
2
2
  * A component match with its parent artifact context.
3
3
  */
4
4
  export interface ComponentSearchResult {
5
+ /**
6
+ * First non-empty digest of the artifact (e.g. sha256:...). Absent when the artifact has no digest.
7
+ */
8
+ artifactDigest?: string;
5
9
  /**
6
10
  * ID of the artifact containing this component.
7
11
  */
@@ -45,6 +45,7 @@ export interface SbomComponentRequestDto {
45
45
  file_path?: string;
46
46
  filter_tags?: LayerType[];
47
47
  language?: string;
48
+ license_expression?: string[];
48
49
  major_version?: number;
49
50
  minor_version?: number;
50
51
  originator_type?: string;
@@ -0,0 +1,75 @@
1
+ export interface ZeroDayAffectedTarget {
2
+ artifact_id?: string;
3
+ artifact_name?: string;
4
+ /**
5
+ * Whether this target is a source code repository, container image, or non-container artifact
6
+ */
7
+ artifact_type?: 'CONTAINER' | 'NON_CONTAINER' | 'REPOSITORY';
8
+ artifact_version?: string;
9
+ base_branch?: string;
10
+ /**
11
+ * Whether this artifact is deployed to any production environment
12
+ */
13
+ deployed_to_prod?: boolean;
14
+ /**
15
+ * Whether deployment-related fields are applicable (false for REPOSITORY artifacts)
16
+ */
17
+ deployment_applicable?: boolean;
18
+ /**
19
+ * Dominant environment type: Production when deployed to any production environment, PreProduction when deployed only to non-production environments, N/A when there is no deployment (always N/A for repositories)
20
+ */
21
+ env_type?: 'N/A' | 'PreProduction' | 'Production';
22
+ fix_version?: string;
23
+ /**
24
+ * Names of non-production environments
25
+ */
26
+ non_prod_env_names?: string[];
27
+ /**
28
+ * Organization identifier of the affected artifact
29
+ */
30
+ org_identifier?: string;
31
+ package_name?: string;
32
+ package_version?: string;
33
+ /**
34
+ * Names of production environments
35
+ */
36
+ prod_env_names?: string[];
37
+ /**
38
+ * Project identifier of the affected artifact
39
+ */
40
+ project_identifier?: string;
41
+ /**
42
+ * Package URL of the affected component (used in create-PR flow)
43
+ */
44
+ purl?: string;
45
+ /**
46
+ * Whether this target can be remediated (null = not yet checked)
47
+ */
48
+ remediation_eligible?: boolean;
49
+ /**
50
+ * Error message when remediation failed
51
+ */
52
+ remediation_error_message?: string;
53
+ /**
54
+ * Reason why remediation is not possible (only set when eligible=false)
55
+ */
56
+ remediation_ineligible_reason?: 'already_latest' | 'eol' | 'malicious' | 'transitive_dependency' | 'typosquatted' | 'unknown_dependency_type' | 'unknown_error' | 'unsupported_artifact_type';
57
+ /**
58
+ * URL of the created remediation pull request (present when status is PR_CREATED or REMEDIATED)
59
+ */
60
+ remediation_pr_url?: string;
61
+ /**
62
+ * Status of PR remediation for this target
63
+ */
64
+ remediation_status?: 'FAILED' | 'NOT_STARTED' | 'PR_CREATED' | 'REMEDIATED';
65
+ repo_name?: string;
66
+ repo_url?: string;
67
+ /**
68
+ * Identifier of the artifact source (distinct from artifact_id)
69
+ */
70
+ source_id?: string;
71
+ /**
72
+ * Vulnerable package version(s) present in this target (one entry per row for now)
73
+ */
74
+ target_versions?: string[];
75
+ }
@@ -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-ssca-manager-client",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",