@harnessio/react-ssca-manager-client 0.86.20 → 0.86.22

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.
Files changed (20) hide show
  1. package/dist/ssca-manager/src/services/hooks/useRemediateAffectedTargetQuery.d.ts +5 -2
  2. package/dist/ssca-manager/src/services/hooks/useUpdateIntegrationRspmConfigMutation.d.ts +24 -0
  3. package/dist/ssca-manager/src/services/hooks/useUpdateIntegrationRspmConfigMutation.js +14 -0
  4. package/dist/ssca-manager/src/services/hooks/useValidateIntegrationNameQuery.d.ts +24 -0
  5. package/dist/ssca-manager/src/services/hooks/useValidateIntegrationNameQuery.js +14 -0
  6. package/dist/ssca-manager/src/services/index.d.ts +7 -0
  7. package/dist/ssca-manager/src/services/index.js +2 -0
  8. package/dist/ssca-manager/src/services/responses/ValidateIntegrationNameResponseBodyResponse.d.ts +2 -0
  9. package/dist/ssca-manager/src/services/responses/ValidateIntegrationNameResponseBodyResponse.js +1 -0
  10. package/dist/ssca-manager/src/services/schemas/AiWorkflowConfigYamlResponse.d.ts +2 -0
  11. package/dist/ssca-manager/src/services/schemas/AiWorkflowConfigYamlResponse.js +0 -3
  12. package/dist/ssca-manager/src/services/schemas/AiWorkflowIncludeScopeStatus.d.ts +5 -0
  13. package/dist/ssca-manager/src/services/schemas/AiWorkflowIncludeScopeStatus.js +4 -0
  14. package/dist/ssca-manager/src/services/schemas/CreateIntegrationRequest.d.ts +8 -0
  15. package/dist/ssca-manager/src/services/schemas/GetIntegrationSummaryResponse.d.ts +4 -0
  16. package/dist/ssca-manager/src/services/schemas/Integration.d.ts +4 -0
  17. package/dist/ssca-manager/src/services/schemas/UpdateIntegrationRspmRequest.d.ts +5 -1
  18. package/dist/ssca-manager/src/services/schemas/ValidateIntegrationNameResponse.d.ts +6 -0
  19. package/dist/ssca-manager/src/services/schemas/ValidateIntegrationNameResponse.js +4 -0
  20. package/package.json +1 -1
@@ -1,5 +1,6 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { AffectedTargetRemediationResponse } from '../schemas/AffectedTargetRemediationResponse';
3
+ import type { Error } from '../schemas/Error';
3
4
  import type { RemediationPrRequest } from '../schemas/RemediationPrRequest';
4
5
  import type { ResponseWithPagination } from '../helpers';
5
6
  import { FetcherOptions } from '../../../../fetcher/index.js';
@@ -16,7 +17,9 @@ export interface RemediateAffectedTargetQueryHeaderParams {
16
17
  }
17
18
  export type RemediateAffectedTargetRequestBody = RemediationPrRequest;
18
19
  export type RemediateAffectedTargetOkResponse = ResponseWithPagination<AffectedTargetRemediationResponse>;
19
- export type RemediateAffectedTargetErrorResponse = unknown;
20
+ export type RemediateAffectedTargetErrorResponse = AffectedTargetRemediationResponse | {
21
+ message?: string;
22
+ } | Error;
20
23
  export interface RemediateAffectedTargetProps extends RemediateAffectedTargetQueryPathParams, Omit<FetcherOptions<RemediateAffectedTargetQueryQueryParams, RemediateAffectedTargetRequestBody, RemediateAffectedTargetQueryHeaderParams>, 'url'> {
21
24
  queryParams: RemediateAffectedTargetQueryQueryParams;
22
25
  body: RemediateAffectedTargetRequestBody;
@@ -25,4 +28,4 @@ export declare function remediateAffectedTarget(props: RemediateAffectedTargetPr
25
28
  /**
26
29
  * 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
30
  */
28
- export declare function useRemediateAffectedTargetQuery(props: RemediateAffectedTargetProps, options?: Omit<UseQueryOptions<RemediateAffectedTargetOkResponse, RemediateAffectedTargetErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<RemediateAffectedTargetOkResponse, unknown>;
31
+ export declare function useRemediateAffectedTargetQuery(props: RemediateAffectedTargetProps, options?: Omit<UseQueryOptions<RemediateAffectedTargetOkResponse, RemediateAffectedTargetErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<RemediateAffectedTargetOkResponse, RemediateAffectedTargetErrorResponse>;
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { CreateIntegrationResponseBodyResponse } from '../responses/CreateIntegrationResponseBodyResponse';
3
+ import type { UpdateIntegrationRspmRequestBodyRequestBody } from '../requestBodies/UpdateIntegrationRspmRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface UpdateIntegrationRspmConfigMutationPathParams {
7
+ org: string;
8
+ project: string;
9
+ integration: string;
10
+ }
11
+ export interface UpdateIntegrationRspmConfigMutationHeaderParams {
12
+ 'Harness-Account': string;
13
+ }
14
+ export type UpdateIntegrationRspmConfigRequestBody = UpdateIntegrationRspmRequestBodyRequestBody;
15
+ export type UpdateIntegrationRspmConfigOkResponse = ResponseWithPagination<CreateIntegrationResponseBodyResponse>;
16
+ export type UpdateIntegrationRspmConfigErrorResponse = unknown;
17
+ export interface UpdateIntegrationRspmConfigProps extends UpdateIntegrationRspmConfigMutationPathParams, Omit<FetcherOptions<unknown, UpdateIntegrationRspmConfigRequestBody, UpdateIntegrationRspmConfigMutationHeaderParams>, 'url'> {
18
+ body: UpdateIntegrationRspmConfigRequestBody;
19
+ }
20
+ export declare function updateIntegrationRspmConfig(props: UpdateIntegrationRspmConfigProps): Promise<UpdateIntegrationRspmConfigOkResponse>;
21
+ /**
22
+ * Updates enabled scanners, scanner credentials, infrastructure config, cron expression, and/or integration_name on an existing integration. Used after create when the onboarding wizard collects repos before RSPM settings. integration_name may be supplied alone. type, connector_id, and is_integration_name are immutable after create.
23
+ */
24
+ export declare function useUpdateIntegrationRspmConfigMutation(options?: Omit<UseMutationOptions<UpdateIntegrationRspmConfigOkResponse, UpdateIntegrationRspmConfigErrorResponse, UpdateIntegrationRspmConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateIntegrationRspmConfigOkResponse, unknown, UpdateIntegrationRspmConfigProps, 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 { useMutation } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function updateIntegrationRspmConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/integration/${props.integration}`, method: 'PATCH' }, props));
8
+ }
9
+ /**
10
+ * Updates enabled scanners, scanner credentials, infrastructure config, cron expression, and/or integration_name on an existing integration. Used after create when the onboarding wizard collects repos before RSPM settings. integration_name may be supplied alone. type, connector_id, and is_integration_name are immutable after create.
11
+ */
12
+ export function useUpdateIntegrationRspmConfigMutation(options) {
13
+ return useMutation((mutateProps) => updateIntegrationRspmConfig(mutateProps), options);
14
+ }
@@ -0,0 +1,24 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ValidateIntegrationNameResponseBodyResponse } from '../responses/ValidateIntegrationNameResponseBodyResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface ValidateIntegrationNameQueryPathParams {
6
+ org: string;
7
+ project: string;
8
+ }
9
+ export interface ValidateIntegrationNameQueryQueryParams {
10
+ integration_name: string;
11
+ }
12
+ export interface ValidateIntegrationNameQueryHeaderParams {
13
+ 'Harness-Account': string;
14
+ }
15
+ export type ValidateIntegrationNameOkResponse = ResponseWithPagination<ValidateIntegrationNameResponseBodyResponse>;
16
+ export type ValidateIntegrationNameErrorResponse = unknown;
17
+ export interface ValidateIntegrationNameProps extends ValidateIntegrationNameQueryPathParams, Omit<FetcherOptions<ValidateIntegrationNameQueryQueryParams, unknown, ValidateIntegrationNameQueryHeaderParams>, 'url'> {
18
+ queryParams: ValidateIntegrationNameQueryQueryParams;
19
+ }
20
+ export declare function validateIntegrationName(props: ValidateIntegrationNameProps): Promise<ValidateIntegrationNameOkResponse>;
21
+ /**
22
+ * Returns whether integration_name can be used to create a named STO integration in this scope without colliding with unique_sto_*_integrationName. Does not create the integration.
23
+ */
24
+ export declare function useValidateIntegrationNameQuery(props: ValidateIntegrationNameProps, options?: Omit<UseQueryOptions<ValidateIntegrationNameOkResponse, ValidateIntegrationNameErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ValidateIntegrationNameOkResponse, 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 validateIntegrationName(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/integration/validate-name`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns whether integration_name can be used to create a named STO integration in this scope without colliding with unique_sto_*_integrationName. Does not create the integration.
11
+ */
12
+ export function useValidateIntegrationNameQuery(props, options) {
13
+ return useQuery(['validateIntegrationName', props.org, props.project, props.queryParams], ({ signal }) => validateIntegrationName(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -241,12 +241,16 @@ export type { ToggleAgentStatusErrorResponse, ToggleAgentStatusOkResponse, Toggl
241
241
  export { toggleAgentStatus, useToggleAgentStatusMutation, } from './hooks/useToggleAgentStatusMutation';
242
242
  export type { UpdateExemptionErrorResponse, UpdateExemptionMutationPathParams, UpdateExemptionMutationQueryParams, UpdateExemptionOkResponse, UpdateExemptionProps, UpdateExemptionRequestBody, } from './hooks/useUpdateExemptionMutation';
243
243
  export { updateExemption, useUpdateExemptionMutation } from './hooks/useUpdateExemptionMutation';
244
+ export type { UpdateIntegrationRspmConfigErrorResponse, UpdateIntegrationRspmConfigMutationPathParams, UpdateIntegrationRspmConfigOkResponse, UpdateIntegrationRspmConfigProps, UpdateIntegrationRspmConfigRequestBody, } from './hooks/useUpdateIntegrationRspmConfigMutation';
245
+ export { updateIntegrationRspmConfig, useUpdateIntegrationRspmConfigMutation, } from './hooks/useUpdateIntegrationRspmConfigMutation';
244
246
  export type { UpdateRemediationTrackerErrorResponse, UpdateRemediationTrackerMutationPathParams, UpdateRemediationTrackerOkResponse, UpdateRemediationTrackerProps, UpdateRemediationTrackerRequestBody, } from './hooks/useUpdateRemediationTrackerMutation';
245
247
  export { updateRemediationTracker, useUpdateRemediationTrackerMutation, } from './hooks/useUpdateRemediationTrackerMutation';
246
248
  export type { UpdateScannerConfigurationErrorResponse, UpdateScannerConfigurationMutationPathParams, UpdateScannerConfigurationOkResponse, UpdateScannerConfigurationProps, UpdateScannerConfigurationRequestBody, } from './hooks/useUpdateScannerConfigurationMutation';
247
249
  export { updateScannerConfiguration, useUpdateScannerConfigurationMutation, } from './hooks/useUpdateScannerConfigurationMutation';
248
250
  export type { UpsertEolAutoTicketConfigErrorResponse, UpsertEolAutoTicketConfigMutationPathParams, UpsertEolAutoTicketConfigOkResponse, UpsertEolAutoTicketConfigProps, UpsertEolAutoTicketConfigRequestBody, } from './hooks/useUpsertEolAutoTicketConfigMutation';
249
251
  export { upsertEolAutoTicketConfig, useUpsertEolAutoTicketConfigMutation, } from './hooks/useUpsertEolAutoTicketConfigMutation';
252
+ export type { ValidateIntegrationNameErrorResponse, ValidateIntegrationNameOkResponse, ValidateIntegrationNameProps, ValidateIntegrationNameQueryPathParams, ValidateIntegrationNameQueryQueryParams, } from './hooks/useValidateIntegrationNameQuery';
253
+ export { useValidateIntegrationNameQuery, validateIntegrationName, } from './hooks/useValidateIntegrationNameQuery';
250
254
  export type { AiWorkflowExecutionRequestBodyRequestBody } from './requestBodies/AiWorkflowExecutionRequestBodyRequestBody';
251
255
  export type { ArtifactComponentsRequestBodyRequestBody } from './requestBodies/ArtifactComponentsRequestBodyRequestBody';
252
256
  export type { ArtifactListingPipelineRequestBodyRequestBody } from './requestBodies/ArtifactListingPipelineRequestBodyRequestBody';
@@ -406,6 +410,7 @@ export type { ScannerConfigurationListingResponseBodyResponse } from './response
406
410
  export type { TicketResponseBodyResponse } from './responses/TicketResponseBodyResponse';
407
411
  export type { TokenIssueResponseBodyResponse } from './responses/TokenIssueResponseBodyResponse';
408
412
  export type { UpdateIntegrationResponseBodyResponse } from './responses/UpdateIntegrationResponseBodyResponse';
413
+ export type { ValidateIntegrationNameResponseBodyResponse } from './responses/ValidateIntegrationNameResponseBodyResponse';
409
414
  export type { VersionResponseBodyResponse } from './responses/VersionResponseBodyResponse';
410
415
  export type { ActivityDetails } from './schemas/ActivityDetails';
411
416
  export type { AffectedArtifactInfo } from './schemas/AffectedArtifactInfo';
@@ -433,6 +438,7 @@ export type { AiWorkflowExecutionStatusEnum } from './schemas/AiWorkflowExecutio
433
438
  export type { AiWorkflowExecutionStepsResponse } from './schemas/AiWorkflowExecutionStepsResponse';
434
439
  export type { AiWorkflowExecutionSummary } from './schemas/AiWorkflowExecutionSummary';
435
440
  export type { AiWorkflowIncludeScope } from './schemas/AiWorkflowIncludeScope';
441
+ export type { AiWorkflowIncludeScopeStatus } from './schemas/AiWorkflowIncludeScopeStatus';
436
442
  export type { AiWorkflowInfoByScanIdsRequest } from './schemas/AiWorkflowInfoByScanIdsRequest';
437
443
  export type { AiWorkflowInfoByScanIdsResponse } from './schemas/AiWorkflowInfoByScanIdsResponse';
438
444
  export type { AiWorkflowInfrastructureConfig } from './schemas/AiWorkflowInfrastructureConfig';
@@ -842,6 +848,7 @@ export type { UpdateAiWorkflowExecutionStatusResponse } from './schemas/UpdateAi
842
848
  export type { UpdateIntegration } from './schemas/UpdateIntegration';
843
849
  export type { UpdateIntegrationRspmRequest } from './schemas/UpdateIntegrationRspmRequest';
844
850
  export type { UpdateScannerConfigurationRequest } from './schemas/UpdateScannerConfigurationRequest';
851
+ export type { ValidateIntegrationNameResponse } from './schemas/ValidateIntegrationNameResponse';
845
852
  export type { VerificationActivity } from './schemas/VerificationActivity';
846
853
  export type { VerificationStatus } from './schemas/VerificationStatus';
847
854
  export type { VersionInfo } from './schemas/VersionInfo';
@@ -119,6 +119,8 @@ export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from '
119
119
  export { sscaLicenseUsage, useSscaLicenseUsageQuery } from './hooks/useSscaLicenseUsageQuery';
120
120
  export { toggleAgentStatus, useToggleAgentStatusMutation, } from './hooks/useToggleAgentStatusMutation';
121
121
  export { updateExemption, useUpdateExemptionMutation } from './hooks/useUpdateExemptionMutation';
122
+ export { updateIntegrationRspmConfig, useUpdateIntegrationRspmConfigMutation, } from './hooks/useUpdateIntegrationRspmConfigMutation';
122
123
  export { updateRemediationTracker, useUpdateRemediationTrackerMutation, } from './hooks/useUpdateRemediationTrackerMutation';
123
124
  export { updateScannerConfiguration, useUpdateScannerConfigurationMutation, } from './hooks/useUpdateScannerConfigurationMutation';
124
125
  export { upsertEolAutoTicketConfig, useUpsertEolAutoTicketConfigMutation, } from './hooks/useUpsertEolAutoTicketConfigMutation';
126
+ export { useValidateIntegrationNameQuery, validateIntegrationName, } from './hooks/useValidateIntegrationNameQuery';
@@ -0,0 +1,2 @@
1
+ import type { ValidateIntegrationNameResponse } from '../schemas/ValidateIntegrationNameResponse';
2
+ export type ValidateIntegrationNameResponseBodyResponse = ValidateIntegrationNameResponse;
@@ -1,4 +1,6 @@
1
+ import type { AiWorkflowIncludeScopeStatus } from '../schemas/AiWorkflowIncludeScopeStatus';
1
2
  export interface AiWorkflowConfigYamlResponse {
3
+ include_scope_status?: AiWorkflowIncludeScopeStatus;
2
4
  /**
3
5
  * Stringified YAML of the agent configuration
4
6
  */
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Whether the requested org/project is covered by account includeScope. Omitted when the request has no org (account-level GET). ENABLED_FOR_THIS_PROJECT when the exact (org, project) pair is included (or includeScope type is explicitly ALL). ENABLED_FOR_ATLEAST_ONE_PROJECT when the org has at least one listed project but the requested project is absent or the request is org-scoped. NOT_ENABLED when the master toggle is off, includeScope is null / type is blank, or the org/project is not in includeScope.
3
+ *
4
+ */
5
+ export type AiWorkflowIncludeScopeStatus = 'ENABLED_FOR_ATLEAST_ONE_PROJECT' | 'ENABLED_FOR_THIS_PROJECT' | 'NOT_ENABLED';
@@ -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 {};
@@ -17,6 +17,14 @@ export interface CreateIntegrationRequest {
17
17
  enabled_scanners?: RspmScannerId[];
18
18
  infra_config?: InfraConfigDto;
19
19
  installation_id?: string;
20
+ /**
21
+ * STO integration name. Optional when is_integration_name is true: omit the field to auto-generate a unique name (connector name, project identifier, or github_app, suffixed with _1, _2, ...). If present, must be non-blank; empty and whitespace-only values are rejected. Ignored for SCS get-or-create.
22
+ */
23
+ integration_name?: string;
24
+ /**
25
+ * When true, creates a named STO integration instead of SCS get-or-create. Name alone does not select the STO path.
26
+ */
27
+ is_integration_name?: boolean;
20
28
  /**
21
29
  * Map of scanner identifier to scanner configuration catalog id
22
30
  */
@@ -3,5 +3,9 @@ export type GetIntegrationSummaryResponse = Array<{
3
3
  github_org_url?: string;
4
4
  installation_id?: string;
5
5
  integration_id?: string;
6
+ /**
7
+ * STO integration name. Present only on named STO integrations.
8
+ */
9
+ integration_name?: string;
6
10
  type?: string;
7
11
  }>;
@@ -15,6 +15,10 @@ export interface Integration {
15
15
  enabled_scanners?: string[];
16
16
  id?: string;
17
17
  infra_config?: InfraConfigDto;
18
+ /**
19
+ * STO integration name. Present only on named STO integrations.
20
+ */
21
+ integration_name?: string;
18
22
  /**
19
23
  * @format int64
20
24
  */
@@ -1,7 +1,7 @@
1
1
  import type { RspmScannerId } from '../schemas/RspmScannerId';
2
2
  import type { InfraConfigDto } from '../schemas/InfraConfigDto';
3
3
  /**
4
- * Partial update of RSPM scan configuration on an existing integration. Only supplied fields are updated; `type` and `connector_id` are immutable after create.
4
+ * Partial update of RSPM scan configuration on an existing integration. Only supplied fields are updated; `type`, `connector_id`, and `is_integration_name` are immutable after create.
5
5
  */
6
6
  export interface UpdateIntegrationRspmRequest {
7
7
  /**
@@ -17,6 +17,10 @@ export interface UpdateIntegrationRspmRequest {
17
17
  */
18
18
  enabled_scanners?: RspmScannerId[];
19
19
  infra_config?: InfraConfigDto;
20
+ /**
21
+ * Optional rename of a named STO integration. Non-blank and unique in the project among STO rows. Same name as current is a no-op. HTTP 400 when the integration is unnamed (useIntegrationName absent or false). Omit to leave unchanged. Cannot clear the name.
22
+ */
23
+ integration_name?: string;
20
24
  /**
21
25
  * Map of scanner identifier to scanner configuration catalog id
22
26
  */
@@ -0,0 +1,6 @@
1
+ export interface ValidateIntegrationNameResponse {
2
+ /**
3
+ * True when no named STO integration (useIntegrationName=true) in this scope already uses this integration_name. False means create/rename would hit DuplicateKeyException.
4
+ */
5
+ available: boolean;
6
+ }
@@ -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": "0.86.20",
3
+ "version": "0.86.22",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",