@harnessio/react-ssca-manager-client 0.86.22 → 0.86.23
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.
- package/dist/ssca-manager/src/services/hooks/useGetCodeRepoAiWorkflowConfigQuery.d.ts +35 -0
- package/dist/ssca-manager/src/services/hooks/useGetCodeRepoAiWorkflowConfigQuery.js +23 -0
- package/dist/ssca-manager/src/services/hooks/useSaveCodeRepoAiWorkflowConfigMutation.d.ts +34 -0
- package/dist/ssca-manager/src/services/hooks/useSaveCodeRepoAiWorkflowConfigMutation.js +19 -0
- package/dist/ssca-manager/src/services/index.d.ts +4 -0
- package/dist/ssca-manager/src/services/index.js +2 -0
- package/dist/ssca-manager/src/services/schemas/AiWorkflowConfigYamlResponse.d.ts +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
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 GetCodeRepoAiWorkflowConfigQueryPathParams {
|
|
7
|
+
org: string;
|
|
8
|
+
project: string;
|
|
9
|
+
targetId: string;
|
|
10
|
+
}
|
|
11
|
+
export interface GetCodeRepoAiWorkflowConfigQueryQueryParams {
|
|
12
|
+
ai_workflow_type?: AiWorkflowTypeEnum;
|
|
13
|
+
}
|
|
14
|
+
export interface GetCodeRepoAiWorkflowConfigQueryHeaderParams {
|
|
15
|
+
'Harness-Account': string;
|
|
16
|
+
}
|
|
17
|
+
export type GetCodeRepoAiWorkflowConfigOkResponse = ResponseWithPagination<AiWorkflowConfigYamlResponse>;
|
|
18
|
+
export type GetCodeRepoAiWorkflowConfigErrorResponse = unknown;
|
|
19
|
+
export interface GetCodeRepoAiWorkflowConfigProps extends GetCodeRepoAiWorkflowConfigQueryPathParams, Omit<FetcherOptions<GetCodeRepoAiWorkflowConfigQueryQueryParams, unknown, GetCodeRepoAiWorkflowConfigQueryHeaderParams>, 'url'> {
|
|
20
|
+
queryParams: GetCodeRepoAiWorkflowConfigQueryQueryParams;
|
|
21
|
+
}
|
|
22
|
+
export declare function getCodeRepoAiWorkflowConfig(props: GetCodeRepoAiWorkflowConfigProps): Promise<GetCodeRepoAiWorkflowConfigOkResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Get the effective AI workflow configuration for a STO code-repo target.
|
|
25
|
+
* There is no per-repo enable toggle. `agent.targetIncluded` is true when the project
|
|
26
|
+
* `targetIncludeScope` covers this target (unset or ALL covers every target; SPECIFIC
|
|
27
|
+
* covers listed target ids). The UI uses that for the "enable at project level" hover.
|
|
28
|
+
* Account master toggle is `account_enabled`. Account project coverage is `include_scope_status`.
|
|
29
|
+
* fp_triage code-repo YAML does not carry branch or connector overrides.
|
|
30
|
+
* Remediation returns branch, scm, jira, and validation-pipeline overrides.
|
|
31
|
+
* Empty branches and blank branchRegex mean baseline-only triggering.
|
|
32
|
+
* Unchecking a target at project scope does not delete this code-repo document.
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export declare function useGetCodeRepoAiWorkflowConfigQuery(props: GetCodeRepoAiWorkflowConfigProps, options?: Omit<UseQueryOptions<GetCodeRepoAiWorkflowConfigOkResponse, GetCodeRepoAiWorkflowConfigErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetCodeRepoAiWorkflowConfigOkResponse, unknown>;
|
|
@@ -0,0 +1,23 @@
|
|
|
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 getCodeRepoAiWorkflowConfig(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/ai-workflow-config/code-repos/${props.targetId}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get the effective AI workflow configuration for a STO code-repo target.
|
|
11
|
+
* There is no per-repo enable toggle. `agent.targetIncluded` is true when the project
|
|
12
|
+
* `targetIncludeScope` covers this target (unset or ALL covers every target; SPECIFIC
|
|
13
|
+
* covers listed target ids). The UI uses that for the "enable at project level" hover.
|
|
14
|
+
* Account master toggle is `account_enabled`. Account project coverage is `include_scope_status`.
|
|
15
|
+
* fp_triage code-repo YAML does not carry branch or connector overrides.
|
|
16
|
+
* Remediation returns branch, scm, jira, and validation-pipeline overrides.
|
|
17
|
+
* Empty branches and blank branchRegex mean baseline-only triggering.
|
|
18
|
+
* Unchecking a target at project scope does not delete this code-repo document.
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export function useGetCodeRepoAiWorkflowConfigQuery(props, options) {
|
|
22
|
+
return useQuery(['getCodeRepoAIWorkflowConfig', props.org, props.project, props.targetId, props.queryParams], ({ signal }) => getCodeRepoAiWorkflowConfig(Object.assign(Object.assign({}, props), { signal })), options);
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 SaveCodeRepoAiWorkflowConfigMutationPathParams {
|
|
8
|
+
org: string;
|
|
9
|
+
project: string;
|
|
10
|
+
targetId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface SaveCodeRepoAiWorkflowConfigMutationQueryParams {
|
|
13
|
+
ai_workflow_type?: AiWorkflowTypeEnum;
|
|
14
|
+
}
|
|
15
|
+
export interface SaveCodeRepoAiWorkflowConfigMutationHeaderParams {
|
|
16
|
+
'Harness-Account': string;
|
|
17
|
+
}
|
|
18
|
+
export type SaveCodeRepoAiWorkflowConfigRequestBody = AiWorkflowConfigYamlRequest;
|
|
19
|
+
export type SaveCodeRepoAiWorkflowConfigOkResponse = ResponseWithPagination<AiWorkflowConfigYamlResponse>;
|
|
20
|
+
export type SaveCodeRepoAiWorkflowConfigErrorResponse = unknown;
|
|
21
|
+
export interface SaveCodeRepoAiWorkflowConfigProps extends SaveCodeRepoAiWorkflowConfigMutationPathParams, Omit<FetcherOptions<SaveCodeRepoAiWorkflowConfigMutationQueryParams, SaveCodeRepoAiWorkflowConfigRequestBody, SaveCodeRepoAiWorkflowConfigMutationHeaderParams>, 'url'> {
|
|
22
|
+
queryParams: SaveCodeRepoAiWorkflowConfigMutationQueryParams;
|
|
23
|
+
body: SaveCodeRepoAiWorkflowConfigRequestBody;
|
|
24
|
+
}
|
|
25
|
+
export declare function saveCodeRepoAiWorkflowConfig(props: SaveCodeRepoAiWorkflowConfigProps): Promise<SaveCodeRepoAiWorkflowConfigOkResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Create or update STO target (code repo) config for an AI workflow agent.
|
|
28
|
+
* There is no per-repo enable toggle. `agent.enabled` in the body is ignored.
|
|
29
|
+
* Remediation accepts branches XOR branchRegex, scm, jiraEnabled, and
|
|
30
|
+
* scan/build validation pipelines. Slack/alertConfig/includeScope/triggerConfig are ignored.
|
|
31
|
+
* Saving here does not change project targetIncludeScope.
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export declare function useSaveCodeRepoAiWorkflowConfigMutation(options?: Omit<UseMutationOptions<SaveCodeRepoAiWorkflowConfigOkResponse, SaveCodeRepoAiWorkflowConfigErrorResponse, SaveCodeRepoAiWorkflowConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveCodeRepoAiWorkflowConfigOkResponse, unknown, SaveCodeRepoAiWorkflowConfigProps, unknown>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 saveCodeRepoAiWorkflowConfig(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/ai-workflow-config/code-repos/${props.targetId}`, method: 'PUT' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Create or update STO target (code repo) config for an AI workflow agent.
|
|
11
|
+
* There is no per-repo enable toggle. `agent.enabled` in the body is ignored.
|
|
12
|
+
* Remediation accepts branches XOR branchRegex, scm, jiraEnabled, and
|
|
13
|
+
* scan/build validation pipelines. Slack/alertConfig/includeScope/triggerConfig are ignored.
|
|
14
|
+
* Saving here does not change project targetIncludeScope.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export function useSaveCodeRepoAiWorkflowConfigMutation(options) {
|
|
18
|
+
return useMutation((mutateProps) => saveCodeRepoAiWorkflowConfig(mutateProps), options);
|
|
19
|
+
}
|
|
@@ -117,6 +117,8 @@ export type { GetCicdWorkflowsListErrorResponse, GetCicdWorkflowsListOkResponse,
|
|
|
117
117
|
export { getCicdWorkflowsList, useGetCicdWorkflowsListQuery, } from './hooks/useGetCicdWorkflowsListQuery';
|
|
118
118
|
export type { GetCicdWorkflowsSummaryErrorResponse, GetCicdWorkflowsSummaryOkResponse, GetCicdWorkflowsSummaryProps, GetCicdWorkflowsSummaryQueryPathParams, } from './hooks/useGetCicdWorkflowsSummaryQuery';
|
|
119
119
|
export { getCicdWorkflowsSummary, useGetCicdWorkflowsSummaryQuery, } from './hooks/useGetCicdWorkflowsSummaryQuery';
|
|
120
|
+
export type { GetCodeRepoAiWorkflowConfigErrorResponse, GetCodeRepoAiWorkflowConfigOkResponse, GetCodeRepoAiWorkflowConfigProps, GetCodeRepoAiWorkflowConfigQueryPathParams, GetCodeRepoAiWorkflowConfigQueryQueryParams, } from './hooks/useGetCodeRepoAiWorkflowConfigQuery';
|
|
121
|
+
export { getCodeRepoAiWorkflowConfig, useGetCodeRepoAiWorkflowConfigQuery, } from './hooks/useGetCodeRepoAiWorkflowConfigQuery';
|
|
120
122
|
export type { GetCodeRepositoryOverviewErrorResponse, GetCodeRepositoryOverviewOkResponse, GetCodeRepositoryOverviewProps, GetCodeRepositoryOverviewQueryPathParams, } from './hooks/useGetCodeRepositoryOverviewQuery';
|
|
121
123
|
export { getCodeRepositoryOverview, useGetCodeRepositoryOverviewQuery, } from './hooks/useGetCodeRepositoryOverviewQuery';
|
|
122
124
|
export type { GetCompliaceStandardByIdErrorResponse, GetCompliaceStandardByIdOkResponse, GetCompliaceStandardByIdProps, GetCompliaceStandardByIdQueryPathParams, } from './hooks/useGetCompliaceStandardByIdQuery';
|
|
@@ -227,6 +229,8 @@ export type { SaveAccountAiWorkflowConfigErrorResponse, SaveAccountAiWorkflowCon
|
|
|
227
229
|
export { saveAccountAiWorkflowConfig, useSaveAccountAiWorkflowConfigMutation, } from './hooks/useSaveAccountAiWorkflowConfigMutation';
|
|
228
230
|
export type { SaveAutoPrConfigErrorResponse, SaveAutoPrConfigOkResponse, SaveAutoPrConfigProps, SaveAutoPrConfigRequestBody, } from './hooks/useSaveAutoPrConfigMutation';
|
|
229
231
|
export { saveAutoPrConfig, useSaveAutoPrConfigMutation } from './hooks/useSaveAutoPrConfigMutation';
|
|
232
|
+
export type { SaveCodeRepoAiWorkflowConfigErrorResponse, SaveCodeRepoAiWorkflowConfigMutationPathParams, SaveCodeRepoAiWorkflowConfigMutationQueryParams, SaveCodeRepoAiWorkflowConfigOkResponse, SaveCodeRepoAiWorkflowConfigProps, SaveCodeRepoAiWorkflowConfigRequestBody, } from './hooks/useSaveCodeRepoAiWorkflowConfigMutation';
|
|
233
|
+
export { saveCodeRepoAiWorkflowConfig, useSaveCodeRepoAiWorkflowConfigMutation, } from './hooks/useSaveCodeRepoAiWorkflowConfigMutation';
|
|
230
234
|
export type { SaveConnectorConfigErrorResponse, SaveConnectorConfigOkResponse, SaveConnectorConfigProps, SaveConnectorConfigRequestBody, } from './hooks/useSaveConnectorConfigMutation';
|
|
231
235
|
export { saveConnectorConfig, useSaveConnectorConfigMutation, } from './hooks/useSaveConnectorConfigMutation';
|
|
232
236
|
export type { SaveOssScoringCapConfigErrorResponse, SaveOssScoringCapConfigOkResponse, SaveOssScoringCapConfigProps, SaveOssScoringCapConfigRequestBody, } from './hooks/useSaveOssScoringCapConfigQuery';
|
|
@@ -57,6 +57,7 @@ export { getCicdOverview, useGetCicdOverviewQuery } from './hooks/useGetCicdOver
|
|
|
57
57
|
export { getCicdRulesEvaluationTrend, useGetCicdRulesEvaluationTrendQuery, } from './hooks/useGetCicdRulesEvaluationTrendQuery';
|
|
58
58
|
export { getCicdWorkflowsList, useGetCicdWorkflowsListQuery, } from './hooks/useGetCicdWorkflowsListQuery';
|
|
59
59
|
export { getCicdWorkflowsSummary, useGetCicdWorkflowsSummaryQuery, } from './hooks/useGetCicdWorkflowsSummaryQuery';
|
|
60
|
+
export { getCodeRepoAiWorkflowConfig, useGetCodeRepoAiWorkflowConfigQuery, } from './hooks/useGetCodeRepoAiWorkflowConfigQuery';
|
|
60
61
|
export { getCodeRepositoryOverview, useGetCodeRepositoryOverviewQuery, } from './hooks/useGetCodeRepositoryOverviewQuery';
|
|
61
62
|
export { getCompliaceStandardById, useGetCompliaceStandardByIdQuery, } from './hooks/useGetCompliaceStandardByIdQuery';
|
|
62
63
|
export { getComplianceEvaluationTrends, useGetComplianceEvaluationTrendsQuery, } from './hooks/useGetComplianceEvaluationTrendsQuery';
|
|
@@ -112,6 +113,7 @@ export { resetLicenseFamilyConfig, useResetLicenseFamilyConfigMutation, } from '
|
|
|
112
113
|
export { reviewExemption, useReviewExemptionMutation } from './hooks/useReviewExemptionMutation';
|
|
113
114
|
export { saveAccountAiWorkflowConfig, useSaveAccountAiWorkflowConfigMutation, } from './hooks/useSaveAccountAiWorkflowConfigMutation';
|
|
114
115
|
export { saveAutoPrConfig, useSaveAutoPrConfigMutation } from './hooks/useSaveAutoPrConfigMutation';
|
|
116
|
+
export { saveCodeRepoAiWorkflowConfig, useSaveCodeRepoAiWorkflowConfigMutation, } from './hooks/useSaveCodeRepoAiWorkflowConfigMutation';
|
|
115
117
|
export { saveConnectorConfig, useSaveConnectorConfigMutation, } from './hooks/useSaveConnectorConfigMutation';
|
|
116
118
|
export { saveOssScoringCapConfig, useSaveOssScoringCapConfigQuery, } from './hooks/useSaveOssScoringCapConfigQuery';
|
|
117
119
|
export { saveProjectAiWorkflowConfig, useSaveProjectAiWorkflowConfigMutation, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import type { AiWorkflowIncludeScopeStatus } from '../schemas/AiWorkflowIncludeScopeStatus';
|
|
2
2
|
export interface AiWorkflowConfigYamlResponse {
|
|
3
|
+
/**
|
|
4
|
+
* Account-level master toggle for this workflow type (not the per-repo switch)
|
|
5
|
+
*/
|
|
6
|
+
account_enabled?: boolean;
|
|
3
7
|
include_scope_status?: AiWorkflowIncludeScopeStatus;
|
|
8
|
+
/**
|
|
9
|
+
* Removed. Target membership is project YAML `agent.targetIncludeScope` (`type` ALL or SPECIFIC, `targetIds`). Code-repo GET reports coverage as `agent.targetIncluded`. This field is no longer set.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated
|
|
12
|
+
*/
|
|
13
|
+
target_enablement?: boolean | null;
|
|
4
14
|
/**
|
|
5
15
|
* Stringified YAML of the agent configuration
|
|
6
16
|
*/
|