@harnessio/react-ssca-manager-client 0.84.6 → 0.84.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.
@@ -0,0 +1,25 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ComponentDependenciesResponseBodyResponse } from '../responses/ComponentDependenciesResponseBodyResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetArtifactComponentDependenciesByPurlQueryPathParams {
6
+ org: string;
7
+ project: string;
8
+ artifact: string;
9
+ }
10
+ export interface GetArtifactComponentDependenciesByPurlQueryQueryParams {
11
+ purl: string;
12
+ }
13
+ export interface GetArtifactComponentDependenciesByPurlQueryHeaderParams {
14
+ 'Harness-Account': string;
15
+ }
16
+ export type GetArtifactComponentDependenciesByPurlOkResponse = ResponseWithPagination<ComponentDependenciesResponseBodyResponse>;
17
+ export type GetArtifactComponentDependenciesByPurlErrorResponse = unknown;
18
+ export interface GetArtifactComponentDependenciesByPurlProps extends GetArtifactComponentDependenciesByPurlQueryPathParams, Omit<FetcherOptions<GetArtifactComponentDependenciesByPurlQueryQueryParams, unknown, GetArtifactComponentDependenciesByPurlQueryHeaderParams>, 'url'> {
19
+ queryParams: GetArtifactComponentDependenciesByPurlQueryQueryParams;
20
+ }
21
+ export declare function getArtifactComponentDependenciesByPurl(props: GetArtifactComponentDependenciesByPurlProps): Promise<GetArtifactComponentDependenciesByPurlOkResponse>;
22
+ /**
23
+ * Get the list of parent components and dependencies of a component identified by its PURL
24
+ */
25
+ export declare function useGetArtifactComponentDependenciesByPurlQuery(props: GetArtifactComponentDependenciesByPurlProps, options?: Omit<UseQueryOptions<GetArtifactComponentDependenciesByPurlOkResponse, GetArtifactComponentDependenciesByPurlErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetArtifactComponentDependenciesByPurlOkResponse, unknown>;
@@ -0,0 +1,20 @@
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 getArtifactComponentDependenciesByPurl(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/artifacts/${props.artifact}/component/dependencies`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get the list of parent components and dependencies of a component identified by its PURL
11
+ */
12
+ export function useGetArtifactComponentDependenciesByPurlQuery(props, options) {
13
+ return useQuery([
14
+ 'getArtifactComponentDependenciesByPurl',
15
+ props.org,
16
+ props.project,
17
+ props.artifact,
18
+ props.queryParams,
19
+ ], ({ signal }) => getArtifactComponentDependenciesByPurl(Object.assign(Object.assign({}, props), { signal })), options);
20
+ }
@@ -45,6 +45,8 @@ export type { GetAllRepositoriesSummaryErrorResponse, GetAllRepositoriesSummaryO
45
45
  export { getAllRepositoriesSummary, useGetAllRepositoriesSummaryQuery, } from './hooks/useGetAllRepositoriesSummaryQuery';
46
46
  export type { GetArtifactChainOfCustodyV2ErrorResponse, GetArtifactChainOfCustodyV2OkResponse, GetArtifactChainOfCustodyV2Props, GetArtifactChainOfCustodyV2QueryPathParams, } from './hooks/useGetArtifactChainOfCustodyV2Query';
47
47
  export { getArtifactChainOfCustodyV2, useGetArtifactChainOfCustodyV2Query, } from './hooks/useGetArtifactChainOfCustodyV2Query';
48
+ export type { GetArtifactComponentDependenciesByPurlErrorResponse, GetArtifactComponentDependenciesByPurlOkResponse, GetArtifactComponentDependenciesByPurlProps, GetArtifactComponentDependenciesByPurlQueryPathParams, GetArtifactComponentDependenciesByPurlQueryQueryParams, } from './hooks/useGetArtifactComponentDependenciesByPurlQuery';
49
+ export { getArtifactComponentDependenciesByPurl, useGetArtifactComponentDependenciesByPurlQuery, } from './hooks/useGetArtifactComponentDependenciesByPurlQuery';
48
50
  export type { GetArtifactComponentOverviewByPurlErrorResponse, GetArtifactComponentOverviewByPurlOkResponse, GetArtifactComponentOverviewByPurlProps, GetArtifactComponentOverviewByPurlQueryPathParams, GetArtifactComponentOverviewByPurlQueryQueryParams, } from './hooks/useGetArtifactComponentOverviewByPurlQuery';
49
51
  export { getArtifactComponentOverviewByPurl, useGetArtifactComponentOverviewByPurlQuery, } from './hooks/useGetArtifactComponentOverviewByPurlQuery';
50
52
  export type { GetArtifactComponentRemediationByPurlErrorResponse, GetArtifactComponentRemediationByPurlOkResponse, GetArtifactComponentRemediationByPurlProps, GetArtifactComponentRemediationByPurlQueryPathParams, GetArtifactComponentRemediationByPurlQueryQueryParams, } from './hooks/useGetArtifactComponentRemediationByPurlQuery';
@@ -228,6 +230,7 @@ export type { ComplianceResultsEvaluationBreakdownResponseResponse } from './res
228
230
  export type { ComplianceResultsGroupByComplianceIdResponseBodyResponse } from './responses/ComplianceResultsGroupByComplianceIdResponseBodyResponse';
229
231
  export type { ComplianceStandardByIdResponseBodyResponse } from './responses/ComplianceStandardByIdResponseBodyResponse';
230
232
  export type { ComplianceStandardsResponseBodyResponse } from './responses/ComplianceStandardsResponseBodyResponse';
233
+ export type { ComponentDependenciesResponseBodyResponse } from './responses/ComponentDependenciesResponseBodyResponse';
231
234
  export type { ComponentDriftResponseBodyResponse } from './responses/ComponentDriftResponseBodyResponse';
232
235
  export type { ComponentListResponseBodyResponse } from './responses/ComponentListResponseBodyResponse';
233
236
  export type { ComponentVulnerabilityListResponseBodyResponse } from './responses/ComponentVulnerabilityListResponseBodyResponse';
@@ -368,10 +371,13 @@ export type { ComplianceScanType } from './schemas/ComplianceScanType';
368
371
  export type { ComplianceSourcePlatform } from './schemas/ComplianceSourcePlatform';
369
372
  export type { ComplianceStandardType } from './schemas/ComplianceStandardType';
370
373
  export type { ComplianceStandardsFilterEntity } from './schemas/ComplianceStandardsFilterEntity';
374
+ export type { ComponentDependenciesResponse } from './schemas/ComponentDependenciesResponse';
375
+ export type { ComponentDependencyItem } from './schemas/ComponentDependencyItem';
371
376
  export type { ComponentDrift } from './schemas/ComponentDrift';
372
377
  export type { ComponentDriftSummary } from './schemas/ComponentDriftSummary';
373
378
  export type { ComponentDto } from './schemas/ComponentDto';
374
379
  export type { ComponentFilter } from './schemas/ComponentFilter';
380
+ export type { ComponentParent } from './schemas/ComponentParent';
375
381
  export type { ComponentRemediationResponse } from './schemas/ComponentRemediationResponse';
376
382
  export type { ComponentSummary } from './schemas/ComponentSummary';
377
383
  export type { ComponentVulnerabilityResponse } from './schemas/ComponentVulnerabilityResponse';
@@ -21,6 +21,7 @@ export { getAiWorkflowExecutionSteps, useGetAiWorkflowExecutionStepsQuery, } fro
21
21
  export { getAiWorkflowExecutions, useGetAiWorkflowExecutionsQuery, } from './hooks/useGetAiWorkflowExecutionsQuery';
22
22
  export { getAllRepositoriesSummary, useGetAllRepositoriesSummaryQuery, } from './hooks/useGetAllRepositoriesSummaryQuery';
23
23
  export { getArtifactChainOfCustodyV2, useGetArtifactChainOfCustodyV2Query, } from './hooks/useGetArtifactChainOfCustodyV2Query';
24
+ export { getArtifactComponentDependenciesByPurl, useGetArtifactComponentDependenciesByPurlQuery, } from './hooks/useGetArtifactComponentDependenciesByPurlQuery';
24
25
  export { getArtifactComponentOverviewByPurl, useGetArtifactComponentOverviewByPurlQuery, } from './hooks/useGetArtifactComponentOverviewByPurlQuery';
25
26
  export { getArtifactComponentRemediationByPurl, useGetArtifactComponentRemediationByPurlQuery, } from './hooks/useGetArtifactComponentRemediationByPurlQuery';
26
27
  export { getArtifactInRemediationDetails, useGetArtifactInRemediationDetailsQuery, } from './hooks/useGetArtifactInRemediationDetailsQuery';
@@ -0,0 +1,2 @@
1
+ import type { ComponentDependenciesResponse } from '../schemas/ComponentDependenciesResponse';
2
+ export type ComponentDependenciesResponseBodyResponse = ComponentDependenciesResponse;
@@ -1,6 +1,7 @@
1
1
  import type { DependencyType } from '../schemas/DependencyType';
2
2
  import type { LayerType } from '../schemas/LayerType';
3
3
  import type { StoIssueCount } from '../schemas/StoIssueCount';
4
+ import type { ComponentParent } from '../schemas/ComponentParent';
4
5
  import type { VulnerabilitySource } from '../schemas/VulnerabilitySource';
5
6
  export interface ArtifactComponentViewResponse {
6
7
  dependency_types?: DependencyType[];
@@ -40,6 +41,10 @@ export interface ArtifactComponentViewResponse {
40
41
  package_name?: string;
41
42
  package_supplier?: string;
42
43
  package_version?: string;
44
+ /**
45
+ * List of parent components for the current component
46
+ */
47
+ parents?: ComponentParent[];
43
48
  purl?: string;
44
49
  vulnerability_source?: VulnerabilitySource;
45
50
  }
@@ -0,0 +1,10 @@
1
+ import type { ComponentDependencyItem } from '../schemas/ComponentDependencyItem';
2
+ /**
3
+ * Response containing the parents and dependencies of a component
4
+ */
5
+ export interface ComponentDependenciesResponse {
6
+ /**
7
+ * List of dependencies of this component
8
+ */
9
+ dependencies?: ComponentDependencyItem[];
10
+ }
@@ -0,0 +1,27 @@
1
+ import type { StoIssueCount } from '../schemas/StoIssueCount';
2
+ /**
3
+ * A dependency of a component with its relationship and vulnerability info
4
+ */
5
+ export interface ComponentDependencyItem {
6
+ /**
7
+ * Name of the dependency
8
+ */
9
+ name?: string;
10
+ /**
11
+ * Package URL of the dependency
12
+ */
13
+ purl?: string;
14
+ /**
15
+ * Whether the dependency is direct or indirect
16
+ */
17
+ relationship?: 'DIRECT' | 'INDIRECT';
18
+ /**
19
+ * The path through which an indirect dependency is introduced (e.g. "via body-parser")
20
+ */
21
+ relationship_path?: string;
22
+ /**
23
+ * Version of the dependency
24
+ */
25
+ version?: string;
26
+ vulnerabilities_count?: StoIssueCount;
27
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * A parent component that depends on this component
3
+ */
4
+ export interface ComponentParent {
5
+ /**
6
+ * Name of the parent component
7
+ */
8
+ name?: string;
9
+ /**
10
+ * Package URL of the parent component
11
+ */
12
+ purl?: string;
13
+ /**
14
+ * Version of the parent component
15
+ */
16
+ version?: string;
17
+ }
@@ -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 {};
@@ -22,9 +22,9 @@ export interface PluginResponseBody {
22
22
  */
23
23
  response_url?: string;
24
24
  /**
25
- * Session status (populated for chunk mode)
25
+ * Session status (populated for chunk mode). RECEIVING indicates chunks are being accepted, COMPLETED indicates all chunks were processed, FAILED indicates the session encountered an error.
26
26
  */
27
- session_status?: 'COMPLETED' | 'RECEIVING';
27
+ session_status?: 'COMPLETED' | 'FAILED' | 'RECEIVING';
28
28
  /**
29
29
  * Source identifier (populated for single/complete mode)
30
30
  */
@@ -8,9 +8,8 @@ import type { SbomMetadataV2 } from '../schemas/SbomMetadataV2';
8
8
  /**
9
9
  * Request body for SBOM orchestration. Fields required depend on chunking_mode:
10
10
  * - single: artifact, sbom_metadata, attestation, components required
11
- * - chunk (index 0): artifact, sbom_metadata, attestation, execution_context, components, chunk_metadata required
12
- * - chunk (index > 0): components, chunk_metadata required
13
- * - complete: only expected_component_count (optional)
11
+ * - chunk: components, chunk_metadata (with chunk_id) required
12
+ * - complete: expected_component_count, execution_context, sbom_metadata, attestation required
14
13
  *
15
14
  */
16
15
  export interface SaveOrchestrationRequestV2 {
@@ -24,7 +23,7 @@ export interface SaveOrchestrationRequestV2 {
24
23
  components?: SbomComponentRequestDto[];
25
24
  execution_context?: ExecutionDetail;
26
25
  /**
27
- * Optional validation count for "complete" mode
26
+ * Required for "complete" mode. Must match the total component count received across all chunks.
28
27
  */
29
28
  expected_component_count?: number;
30
29
  sbom_metadata?: SbomMetadataV2;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.84.6",
3
+ "version": "0.84.8",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",