@harnessio/react-ssca-manager-client 0.86.0 → 0.86.1

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,6 +5,8 @@ import type { ResponseWithPagination } from '../helpers';
5
5
  import { FetcherOptions } from '../../../../fetcher/index.js';
6
6
  export interface GetAccountAiWorkflowConfigQueryQueryParams {
7
7
  ai_workflow_type?: AiWorkflowTypeEnum;
8
+ org?: string;
9
+ project?: string;
8
10
  }
9
11
  export interface GetAccountAiWorkflowConfigQueryHeaderParams {
10
12
  'Harness-Account': string;
@@ -17,5 +19,8 @@ export interface GetAccountAiWorkflowConfigProps extends Omit<FetcherOptions<Get
17
19
  export declare function getAccountAiWorkflowConfig(props: GetAccountAiWorkflowConfigProps): Promise<GetAccountAiWorkflowConfigOkResponse>;
18
20
  /**
19
21
  * Get account-level AI workflow configuration.
22
+ * For SAST remediation, validation pipelines (scan/build) are project-scoped only —
23
+ * configure them via the project AI workflow config API.
24
+ *
20
25
  */
21
26
  export declare function useGetAccountAiWorkflowConfigQuery(props: GetAccountAiWorkflowConfigProps, options?: Omit<UseQueryOptions<GetAccountAiWorkflowConfigOkResponse, GetAccountAiWorkflowConfigErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAccountAiWorkflowConfigOkResponse, unknown>;
@@ -8,6 +8,9 @@ export function getAccountAiWorkflowConfig(props) {
8
8
  }
9
9
  /**
10
10
  * Get account-level AI workflow configuration.
11
+ * For SAST remediation, validation pipelines (scan/build) are project-scoped only —
12
+ * configure them via the project AI workflow config API.
13
+ *
11
14
  */
12
15
  export function useGetAccountAiWorkflowConfigQuery(props, options) {
13
16
  return useQuery(['getAccountAIWorkflowConfig', props.queryParams], ({ signal }) => getAccountAiWorkflowConfig(Object.assign(Object.assign({}, props), { signal })), options);
@@ -0,0 +1,28 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AiWorkflowConfigYamlResponse } from '../schemas/AiWorkflowConfigYamlResponse';
3
+ import type { AiWorkflowTypeEnum } from '../schemas/AiWorkflowTypeEnum';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetProjectAiWorkflowConfigQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ }
10
+ export interface GetProjectAiWorkflowConfigQueryQueryParams {
11
+ ai_workflow_type?: AiWorkflowTypeEnum;
12
+ }
13
+ export interface GetProjectAiWorkflowConfigQueryHeaderParams {
14
+ 'Harness-Account': string;
15
+ }
16
+ export type GetProjectAiWorkflowConfigOkResponse = ResponseWithPagination<AiWorkflowConfigYamlResponse>;
17
+ export type GetProjectAiWorkflowConfigErrorResponse = unknown;
18
+ export interface GetProjectAiWorkflowConfigProps extends GetProjectAiWorkflowConfigQueryPathParams, Omit<FetcherOptions<GetProjectAiWorkflowConfigQueryQueryParams, unknown, GetProjectAiWorkflowConfigQueryHeaderParams>, 'url'> {
19
+ queryParams: GetProjectAiWorkflowConfigQueryQueryParams;
20
+ }
21
+ export declare function getProjectAiWorkflowConfig(props: GetProjectAiWorkflowConfigProps): Promise<GetProjectAiWorkflowConfigOkResponse>;
22
+ /**
23
+ * Get the effective AI workflow configuration for a project.
24
+ * Returns account defaults overlaid with any project-scoped overrides.
25
+ * For SAST remediation, validation pipelines (scan/build) are set on this project config.
26
+ *
27
+ */
28
+ export declare function useGetProjectAiWorkflowConfigQuery(props: GetProjectAiWorkflowConfigProps, options?: Omit<UseQueryOptions<GetProjectAiWorkflowConfigOkResponse, GetProjectAiWorkflowConfigErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetProjectAiWorkflowConfigOkResponse, unknown>;
@@ -0,0 +1,17 @@
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 getProjectAiWorkflowConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/ai-workflow-config`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get the effective AI workflow configuration for a project.
11
+ * Returns account defaults overlaid with any project-scoped overrides.
12
+ * For SAST remediation, validation pipelines (scan/build) are set on this project config.
13
+ *
14
+ */
15
+ export function useGetProjectAiWorkflowConfigQuery(props, options) {
16
+ return useQuery(['getProjectAIWorkflowConfig', props.org, props.project, props.queryParams], ({ signal }) => getProjectAiWorkflowConfig(Object.assign(Object.assign({}, props), { signal })), options);
17
+ }
@@ -6,6 +6,8 @@ import type { ResponseWithPagination } from '../helpers';
6
6
  import { FetcherOptions } from '../../../../fetcher/index.js';
7
7
  export interface SaveAccountAiWorkflowConfigMutationQueryParams {
8
8
  ai_workflow_type?: AiWorkflowTypeEnum;
9
+ org?: string;
10
+ project?: string;
9
11
  }
10
12
  export interface SaveAccountAiWorkflowConfigMutationHeaderParams {
11
13
  'Harness-Account': string;
@@ -20,5 +22,8 @@ export interface SaveAccountAiWorkflowConfigProps extends Omit<FetcherOptions<Sa
20
22
  export declare function saveAccountAiWorkflowConfig(props: SaveAccountAiWorkflowConfigProps): Promise<SaveAccountAiWorkflowConfigOkResponse>;
21
23
  /**
22
24
  * Create or update account-level AI workflow configuration.
25
+ * For SAST remediation, validation pipeline fields must not be set here —
26
+ * save them on the project-scoped config instead.
27
+ *
23
28
  */
24
29
  export declare function useSaveAccountAiWorkflowConfigMutation(options?: Omit<UseMutationOptions<SaveAccountAiWorkflowConfigOkResponse, SaveAccountAiWorkflowConfigErrorResponse, SaveAccountAiWorkflowConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveAccountAiWorkflowConfigOkResponse, unknown, SaveAccountAiWorkflowConfigProps, unknown>;
@@ -8,6 +8,9 @@ export function saveAccountAiWorkflowConfig(props) {
8
8
  }
9
9
  /**
10
10
  * Create or update account-level AI workflow configuration.
11
+ * For SAST remediation, validation pipeline fields must not be set here —
12
+ * save them on the project-scoped config instead.
13
+ *
11
14
  */
12
15
  export function useSaveAccountAiWorkflowConfigMutation(options) {
13
16
  return useMutation((mutateProps) => saveAccountAiWorkflowConfig(mutateProps), options);
@@ -0,0 +1,31 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { AiWorkflowConfigYamlResponse } from '../schemas/AiWorkflowConfigYamlResponse';
3
+ import type { AiWorkflowConfigYamlRequest } from '../schemas/AiWorkflowConfigYamlRequest';
4
+ import type { AiWorkflowTypeEnum } from '../schemas/AiWorkflowTypeEnum';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface SaveProjectAiWorkflowConfigMutationPathParams {
8
+ org: string;
9
+ project: string;
10
+ }
11
+ export interface SaveProjectAiWorkflowConfigMutationQueryParams {
12
+ ai_workflow_type?: AiWorkflowTypeEnum;
13
+ }
14
+ export interface SaveProjectAiWorkflowConfigMutationHeaderParams {
15
+ 'Harness-Account': string;
16
+ }
17
+ export type SaveProjectAiWorkflowConfigRequestBody = AiWorkflowConfigYamlRequest;
18
+ export type SaveProjectAiWorkflowConfigOkResponse = ResponseWithPagination<AiWorkflowConfigYamlResponse>;
19
+ export type SaveProjectAiWorkflowConfigErrorResponse = unknown;
20
+ export interface SaveProjectAiWorkflowConfigProps extends SaveProjectAiWorkflowConfigMutationPathParams, Omit<FetcherOptions<SaveProjectAiWorkflowConfigMutationQueryParams, SaveProjectAiWorkflowConfigRequestBody, SaveProjectAiWorkflowConfigMutationHeaderParams>, 'url'> {
21
+ queryParams: SaveProjectAiWorkflowConfigMutationQueryParams;
22
+ body: SaveProjectAiWorkflowConfigRequestBody;
23
+ }
24
+ export declare function saveProjectAiWorkflowConfig(props: SaveProjectAiWorkflowConfigProps): Promise<SaveProjectAiWorkflowConfigOkResponse>;
25
+ /**
26
+ * Create or update project-scoped AI workflow configuration overrides.
27
+ * Unset fields inherit from the account config at trigger/read time.
28
+ * For SAST remediation, validation pipelines (scan/build) belong here.
29
+ *
30
+ */
31
+ export declare function useSaveProjectAiWorkflowConfigMutation(options?: Omit<UseMutationOptions<SaveProjectAiWorkflowConfigOkResponse, SaveProjectAiWorkflowConfigErrorResponse, SaveProjectAiWorkflowConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveProjectAiWorkflowConfigOkResponse, unknown, SaveProjectAiWorkflowConfigProps, unknown>;
@@ -0,0 +1,17 @@
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 saveProjectAiWorkflowConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/ai-workflow-config`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Create or update project-scoped AI workflow configuration overrides.
11
+ * Unset fields inherit from the account config at trigger/read time.
12
+ * For SAST remediation, validation pipelines (scan/build) belong here.
13
+ *
14
+ */
15
+ export function useSaveProjectAiWorkflowConfigMutation(options) {
16
+ return useMutation((mutateProps) => saveProjectAiWorkflowConfig(mutateProps), options);
17
+ }
@@ -161,6 +161,8 @@ export type { GetPipelineArtifactListErrorResponse, GetPipelineArtifactListOkRes
161
161
  export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
162
162
  export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
163
163
  export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
164
+ export type { GetProjectAiWorkflowConfigErrorResponse, GetProjectAiWorkflowConfigOkResponse, GetProjectAiWorkflowConfigProps, GetProjectAiWorkflowConfigQueryPathParams, GetProjectAiWorkflowConfigQueryQueryParams, } from './hooks/useGetProjectAiWorkflowConfigQuery';
165
+ export { getProjectAiWorkflowConfig, useGetProjectAiWorkflowConfigQuery, } from './hooks/useGetProjectAiWorkflowConfigQuery';
164
166
  export type { GetProvenanceErrorResponse, GetProvenanceOkResponse, GetProvenanceProps, GetProvenanceQueryPathParams, } from './hooks/useGetProvenanceQuery';
165
167
  export { getProvenance, useGetProvenanceQuery } from './hooks/useGetProvenanceQuery';
166
168
  export type { GetRemediationDetailsErrorResponse, GetRemediationDetailsOkResponse, GetRemediationDetailsProps, GetRemediationDetailsQueryPathParams, } from './hooks/useGetRemediationDetailsQuery';
@@ -205,6 +207,8 @@ export type { SaveConnectorConfigErrorResponse, SaveConnectorConfigOkResponse, S
205
207
  export { saveConnectorConfig, useSaveConnectorConfigMutation, } from './hooks/useSaveConnectorConfigMutation';
206
208
  export type { SaveOssScoringCapConfigErrorResponse, SaveOssScoringCapConfigOkResponse, SaveOssScoringCapConfigProps, SaveOssScoringCapConfigRequestBody, } from './hooks/useSaveOssScoringCapConfigQuery';
207
209
  export { saveOssScoringCapConfig, useSaveOssScoringCapConfigQuery, } from './hooks/useSaveOssScoringCapConfigQuery';
210
+ export type { SaveProjectAiWorkflowConfigErrorResponse, SaveProjectAiWorkflowConfigMutationPathParams, SaveProjectAiWorkflowConfigMutationQueryParams, SaveProjectAiWorkflowConfigOkResponse, SaveProjectAiWorkflowConfigProps, SaveProjectAiWorkflowConfigRequestBody, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
211
+ export { saveProjectAiWorkflowConfig, useSaveProjectAiWorkflowConfigMutation, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
208
212
  export type { SetBaselineForArtifactV2ErrorResponse, SetBaselineForArtifactV2MutationPathParams, SetBaselineForArtifactV2OkResponse, SetBaselineForArtifactV2Props, SetBaselineForArtifactV2RequestBody, } from './hooks/useSetBaselineForArtifactV2Mutation';
209
213
  export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from './hooks/useSetBaselineForArtifactV2Mutation';
210
214
  export type { SscaLicenseUsageErrorResponse, SscaLicenseUsageOkResponse, SscaLicenseUsageProps, SscaLicenseUsageQueryQueryParams, } from './hooks/useSscaLicenseUsageQuery';
@@ -79,6 +79,7 @@ export { getOssScoringCapConfig, useGetOssScoringCapConfigQuery, } from './hooks
79
79
  export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
80
80
  export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
81
81
  export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
82
+ export { getProjectAiWorkflowConfig, useGetProjectAiWorkflowConfigQuery, } from './hooks/useGetProjectAiWorkflowConfigQuery';
82
83
  export { getProvenance, useGetProvenanceQuery } from './hooks/useGetProvenanceQuery';
83
84
  export { getRemediationDetails, useGetRemediationDetailsQuery, } from './hooks/useGetRemediationDetailsQuery';
84
85
  export { getRepoRulesEvaluationTrend, useGetRepoRulesEvaluationTrendQuery, } from './hooks/useGetRepoRulesEvaluationTrendQuery';
@@ -101,6 +102,7 @@ export { saveAccountAiWorkflowConfig, useSaveAccountAiWorkflowConfigMutation, }
101
102
  export { saveAutoPrConfig, useSaveAutoPrConfigMutation } from './hooks/useSaveAutoPrConfigMutation';
102
103
  export { saveConnectorConfig, useSaveConnectorConfigMutation, } from './hooks/useSaveConnectorConfigMutation';
103
104
  export { saveOssScoringCapConfig, useSaveOssScoringCapConfigQuery, } from './hooks/useSaveOssScoringCapConfigQuery';
105
+ export { saveProjectAiWorkflowConfig, useSaveProjectAiWorkflowConfigMutation, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
104
106
  export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from './hooks/useSetBaselineForArtifactV2Mutation';
105
107
  export { sscaLicenseUsage, useSscaLicenseUsageQuery } from './hooks/useSscaLicenseUsageQuery';
106
108
  export { toggleAgentStatus, useToggleAgentStatusMutation, } from './hooks/useToggleAgentStatusMutation';
@@ -3,7 +3,7 @@ import type { AiWorkflowExecutionStatusEnum } from '../schemas/AiWorkflowExecuti
3
3
  import type { TriageFindingSummary } from '../schemas/TriageFindingSummary';
4
4
  import type { VulnerabilityFindingSummary } from '../schemas/VulnerabilityFindingSummary';
5
5
  /**
6
- * Execution summary with type-discriminated nested payload. Branch on ai_workflow_type: VULNERABILITY/ZERO_DAY -> vulnerability_finding; FP_TRIAGE -> triage_finding.
6
+ * Execution summary with type-discriminated nested payload. Branch on ai_workflow_type: VULNERABILITY/ZERO_DAY -> vulnerability_finding; FP_TRIAGE/SAST_REMEDIATION -> triage_finding.
7
7
  */
8
8
  export interface AiWorkflowExecutionSummary {
9
9
  ai_workflow_type?: AiWorkflowTypeEnum;
@@ -2,4 +2,4 @@
2
2
  * Type of AI workflow
3
3
  * @example "vulnerability"
4
4
  */
5
- export type AiWorkflowTypeEnum = 'fp_triage' | 'vulnerability' | 'zero_day';
5
+ export type AiWorkflowTypeEnum = 'fp_triage' | 'sast_remediation' | 'vulnerability' | 'zero_day';
@@ -1,6 +1,10 @@
1
1
  import type { InfraConfigDto } from '../schemas/InfraConfigDto';
2
2
  import type { IntegrationType } from '../schemas/IntegrationType';
3
3
  export interface CreateIntegrationRequest {
4
+ /**
5
+ * When true, STO scans fail on critical findings.
6
+ */
7
+ block_on_critical_findings?: boolean;
4
8
  connector_id?: string;
5
9
  /**
6
10
  * Cron expression for scan frequency. Defaults to daily if not provided.
@@ -1,5 +1,9 @@
1
1
  import type { InfraConfigDto } from '../schemas/InfraConfigDto';
2
2
  export interface Integration {
3
+ /**
4
+ * When true, STO scans fail on critical findings.
5
+ */
6
+ block_on_critical_findings?: boolean;
3
7
  connector_id?: string;
4
8
  /**
5
9
  * Cron expression for scan frequency
@@ -3,6 +3,10 @@ import type { InfraConfigDto } from '../schemas/InfraConfigDto';
3
3
  * Partial update of RSPM scan configuration on an existing integration. Only supplied fields are updated; `type` and `connector_id` are immutable after create.
4
4
  */
5
5
  export interface UpdateIntegrationRspmRequest {
6
+ /**
7
+ * When true, STO scans fail on critical findings. Omit to leave unchanged.
8
+ */
9
+ block_on_critical_findings?: boolean | null;
6
10
  /**
7
11
  * Cron expression for scan frequency.
8
12
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.86.0",
3
+ "version": "0.86.1",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",