@harnessio/react-ssca-manager-client 0.84.35 → 0.84.37

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,28 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AffectedTargetRemediationResponse } from '../schemas/AffectedTargetRemediationResponse';
3
+ import type { RemediationPrRequestBodyRequestBody } from '../requestBodies/RemediationPrRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface RemediateAffectedTargetQueryPathParams {
7
+ executionId: string;
8
+ artifactId: string;
9
+ }
10
+ export interface RemediateAffectedTargetQueryQueryParams {
11
+ org?: string;
12
+ project?: string;
13
+ }
14
+ export interface RemediateAffectedTargetQueryHeaderParams {
15
+ 'Harness-Account': string;
16
+ }
17
+ export type RemediateAffectedTargetRequestBody = RemediationPrRequestBodyRequestBody;
18
+ export type RemediateAffectedTargetOkResponse = ResponseWithPagination<AffectedTargetRemediationResponse>;
19
+ export type RemediateAffectedTargetErrorResponse = unknown;
20
+ export interface RemediateAffectedTargetProps extends RemediateAffectedTargetQueryPathParams, Omit<FetcherOptions<RemediateAffectedTargetQueryQueryParams, RemediateAffectedTargetRequestBody, RemediateAffectedTargetQueryHeaderParams>, 'url'> {
21
+ queryParams: RemediateAffectedTargetQueryQueryParams;
22
+ body: RemediateAffectedTargetRequestBody;
23
+ }
24
+ export declare function remediateAffectedTarget(props: RemediateAffectedTargetProps): Promise<RemediateAffectedTargetOkResponse>;
25
+ /**
26
+ * Trigger creation of a remediation Pull Request for a specific affected target. Idempotent — returns existing PR status if one already exists for this target.
27
+ */
28
+ export declare function useRemediateAffectedTargetQuery(props: RemediateAffectedTargetProps, options?: Omit<UseQueryOptions<RemediateAffectedTargetOkResponse, RemediateAffectedTargetErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<RemediateAffectedTargetOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function remediateAffectedTarget(props) {
7
+ return fetcher(Object.assign({ url: `/v1/ai-workflow-executions/${props.executionId}/affected-targets/${props.artifactId}/remediate`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Trigger creation of a remediation Pull Request for a specific affected target. Idempotent — returns existing PR status if one already exists for this target.
11
+ */
12
+ export function useRemediateAffectedTargetQuery(props, options) {
13
+ return useQuery(['remediateAffectedTarget', props.executionId, props.artifactId, props.queryParams, props.body], ({ signal }) => remediateAffectedTarget(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -177,6 +177,8 @@ export type { PostComplianceResultStatsEvaluationBreakdownArtifactTypeErrorRespo
177
177
  export { postComplianceResultStatsEvaluationBreakdownArtifactType, usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation, } from './hooks/usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation';
178
178
  export type { PostComplianceResultStatsOverviewErrorResponse, PostComplianceResultStatsOverviewMutationPathParams, PostComplianceResultStatsOverviewMutationQueryParams, PostComplianceResultStatsOverviewOkResponse, PostComplianceResultStatsOverviewProps, PostComplianceResultStatsOverviewRequestBody, } from './hooks/usePostComplianceResultStatsOverviewMutation';
179
179
  export { postComplianceResultStatsOverview, usePostComplianceResultStatsOverviewMutation, } from './hooks/usePostComplianceResultStatsOverviewMutation';
180
+ export type { RemediateAffectedTargetErrorResponse, RemediateAffectedTargetOkResponse, RemediateAffectedTargetProps, RemediateAffectedTargetQueryPathParams, RemediateAffectedTargetQueryQueryParams, RemediateAffectedTargetRequestBody, } from './hooks/useRemediateAffectedTargetQuery';
181
+ export { remediateAffectedTarget, useRemediateAffectedTargetQuery, } from './hooks/useRemediateAffectedTargetQuery';
180
182
  export type { ResetLicenseFamilyConfigErrorResponse, ResetLicenseFamilyConfigMutationPathParams, ResetLicenseFamilyConfigMutationQueryParams, ResetLicenseFamilyConfigOkResponse, ResetLicenseFamilyConfigProps, } from './hooks/useResetLicenseFamilyConfigMutation';
181
183
  export { resetLicenseFamilyConfig, useResetLicenseFamilyConfigMutation, } from './hooks/useResetLicenseFamilyConfigMutation';
182
184
  export type { SaveAccountAiWorkflowConfigErrorResponse, SaveAccountAiWorkflowConfigMutationQueryParams, SaveAccountAiWorkflowConfigOkResponse, SaveAccountAiWorkflowConfigProps, SaveAccountAiWorkflowConfigRequestBody, } from './hooks/useSaveAccountAiWorkflowConfigMutation';
@@ -87,6 +87,7 @@ export { listIntegrations, useListIntegrationsQuery } from './hooks/useListInteg
87
87
  export { listRemediations, useListRemediationsQuery } from './hooks/useListRemediationsQuery';
88
88
  export { postComplianceResultStatsEvaluationBreakdownArtifactType, usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation, } from './hooks/usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation';
89
89
  export { postComplianceResultStatsOverview, usePostComplianceResultStatsOverviewMutation, } from './hooks/usePostComplianceResultStatsOverviewMutation';
90
+ export { remediateAffectedTarget, useRemediateAffectedTargetQuery, } from './hooks/useRemediateAffectedTargetQuery';
90
91
  export { resetLicenseFamilyConfig, useResetLicenseFamilyConfigMutation, } from './hooks/useResetLicenseFamilyConfigMutation';
91
92
  export { saveAccountAiWorkflowConfig, useSaveAccountAiWorkflowConfigMutation, } from './hooks/useSaveAccountAiWorkflowConfigMutation';
92
93
  export { saveAutoPrConfig, useSaveAutoPrConfigMutation } from './hooks/useSaveAutoPrConfigMutation';
@@ -56,4 +56,5 @@ export interface AffectedArtifactInfo {
56
56
  remediation_status?: 'FAILED' | 'NOT_STARTED' | 'PR_CREATED';
57
57
  repo_name?: string;
58
58
  repo_url?: string;
59
+ source_id?: string;
59
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.84.35",
3
+ "version": "0.84.37",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",