@harnessio/react-ssca-manager-client 0.82.1 → 0.83.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.
@@ -0,0 +1,40 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AlertListingPipelineResponse } from '../schemas/AlertListingPipelineResponse';
3
+ import type { AlertListingPipelineRequestBody } from '../schemas/AlertListingPipelineRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FetchRuntimeSecurityAlertsByArtifactQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ artifact: string;
10
+ }
11
+ export interface FetchRuntimeSecurityAlertsByArtifactQueryQueryParams {
12
+ /**
13
+ * @default 0
14
+ */
15
+ page?: number;
16
+ /**
17
+ * @default 30
18
+ */
19
+ limit?: number;
20
+ /**
21
+ * @default "ASC"
22
+ */
23
+ order?: 'ASC' | 'DESC';
24
+ sort?: 'severity' | 'title';
25
+ }
26
+ export interface FetchRuntimeSecurityAlertsByArtifactQueryHeaderParams {
27
+ 'Harness-Account': string;
28
+ }
29
+ export type FetchRuntimeSecurityAlertsByArtifactRequestBody = AlertListingPipelineRequestBody;
30
+ export type FetchRuntimeSecurityAlertsByArtifactOkResponse = ResponseWithPagination<AlertListingPipelineResponse[]>;
31
+ export type FetchRuntimeSecurityAlertsByArtifactErrorResponse = unknown;
32
+ export interface FetchRuntimeSecurityAlertsByArtifactProps extends FetchRuntimeSecurityAlertsByArtifactQueryPathParams, Omit<FetcherOptions<FetchRuntimeSecurityAlertsByArtifactQueryQueryParams, FetchRuntimeSecurityAlertsByArtifactRequestBody, FetchRuntimeSecurityAlertsByArtifactQueryHeaderParams>, 'url'> {
33
+ queryParams: FetchRuntimeSecurityAlertsByArtifactQueryQueryParams;
34
+ body: FetchRuntimeSecurityAlertsByArtifactRequestBody;
35
+ }
36
+ export declare function fetchRuntimeSecurityAlertsByArtifact(props: FetchRuntimeSecurityAlertsByArtifactProps): Promise<FetchRuntimeSecurityAlertsByArtifactOkResponse>;
37
+ /**
38
+ * Fetch Runtime Security Alerts by artifact
39
+ */
40
+ export declare function useFetchRuntimeSecurityAlertsByArtifactQuery(props: FetchRuntimeSecurityAlertsByArtifactProps, options?: Omit<UseQueryOptions<FetchRuntimeSecurityAlertsByArtifactOkResponse, FetchRuntimeSecurityAlertsByArtifactErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FetchRuntimeSecurityAlertsByArtifactOkResponse, unknown>;
@@ -0,0 +1,21 @@
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 fetchRuntimeSecurityAlertsByArtifact(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/artifact/${props.artifact}/runtime-security-alerts/list`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Fetch Runtime Security Alerts by artifact
11
+ */
12
+ export function useFetchRuntimeSecurityAlertsByArtifactQuery(props, options) {
13
+ return useQuery([
14
+ 'fetchRuntimeSecurityAlertsByArtifact',
15
+ props.org,
16
+ props.project,
17
+ props.artifact,
18
+ props.queryParams,
19
+ props.body,
20
+ ], ({ signal }) => fetchRuntimeSecurityAlertsByArtifact(Object.assign(Object.assign({}, props), { signal })), options);
21
+ }
@@ -0,0 +1,25 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AlertListingPipelineResponse } from '../schemas/AlertListingPipelineResponse';
3
+ import type { AlertListingPipelineRequestBody } from '../schemas/AlertListingPipelineRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetPipelineAlertListQueryPathParams {
7
+ org: string;
8
+ project: string;
9
+ pipeline: string;
10
+ execution: string;
11
+ }
12
+ export interface GetPipelineAlertListQueryHeaderParams {
13
+ 'Harness-Account': string;
14
+ }
15
+ export type GetPipelineAlertListRequestBody = AlertListingPipelineRequestBody;
16
+ export type GetPipelineAlertListOkResponse = ResponseWithPagination<AlertListingPipelineResponse[]>;
17
+ export type GetPipelineAlertListErrorResponse = unknown;
18
+ export interface GetPipelineAlertListProps extends GetPipelineAlertListQueryPathParams, Omit<FetcherOptions<unknown, GetPipelineAlertListRequestBody, GetPipelineAlertListQueryHeaderParams>, 'url'> {
19
+ body: GetPipelineAlertListRequestBody;
20
+ }
21
+ export declare function getPipelineAlertList(props: GetPipelineAlertListProps): Promise<GetPipelineAlertListOkResponse>;
22
+ /**
23
+ * Get Alert List for Pipeline View
24
+ */
25
+ export declare function useGetPipelineAlertListQuery(props: GetPipelineAlertListProps, options?: Omit<UseQueryOptions<GetPipelineAlertListOkResponse, GetPipelineAlertListErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetPipelineAlertListOkResponse, 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 getPipelineAlertList(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/pipelines/${props.pipeline}/executions/${props.execution}/alerts`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Get Alert List for Pipeline View
11
+ */
12
+ export function useGetPipelineAlertListQuery(props, options) {
13
+ return useQuery(['getPipelineAlertList', props.org, props.project, props.pipeline, props.execution, props.body], ({ signal }) => getPipelineAlertList(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SaveResponseResponse } from '../responses/SaveResponseResponse';
3
+ import type { BaselineV2RequestBodyRequestBody } from '../requestBodies/BaselineV2RequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface SetBaselineForArtifactV2MutationPathParams {
7
+ org: string;
8
+ project: string;
9
+ source: string;
10
+ }
11
+ export interface SetBaselineForArtifactV2MutationHeaderParams {
12
+ 'Harness-Account': string;
13
+ }
14
+ export type SetBaselineForArtifactV2RequestBody = BaselineV2RequestBodyRequestBody;
15
+ export type SetBaselineForArtifactV2OkResponse = ResponseWithPagination<SaveResponseResponse>;
16
+ export type SetBaselineForArtifactV2ErrorResponse = unknown;
17
+ export interface SetBaselineForArtifactV2Props extends SetBaselineForArtifactV2MutationPathParams, Omit<FetcherOptions<unknown, SetBaselineForArtifactV2RequestBody, SetBaselineForArtifactV2MutationHeaderParams>, 'url'> {
18
+ body: SetBaselineForArtifactV2RequestBody;
19
+ }
20
+ export declare function setBaselineForArtifactV2(props: SetBaselineForArtifactV2Props): Promise<SetBaselineForArtifactV2OkResponse>;
21
+ /**
22
+ * Save the baseline for an artifact
23
+ */
24
+ export declare function useSetBaselineForArtifactV2Mutation(options?: Omit<UseMutationOptions<SetBaselineForArtifactV2OkResponse, SetBaselineForArtifactV2ErrorResponse, SetBaselineForArtifactV2Props>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SetBaselineForArtifactV2OkResponse, unknown, SetBaselineForArtifactV2Props, 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 setBaselineForArtifactV2(props) {
7
+ return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/artifact-sources/${props.source}/baseline`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Save the baseline for an artifact
11
+ */
12
+ export function useSetBaselineForArtifactV2Mutation(options) {
13
+ return useMutation((mutateProps) => setBaselineForArtifactV2(mutateProps), options);
14
+ }
@@ -35,6 +35,8 @@ export type { FetchPluginsForWorkflowErrorResponse, FetchPluginsForWorkflowOkRes
35
35
  export { fetchPluginsForWorkflow, useFetchPluginsForWorkflowQuery, } from './hooks/useFetchPluginsForWorkflowQuery';
36
36
  export type { FetchReposInIntegrationErrorResponse, FetchReposInIntegrationOkResponse, FetchReposInIntegrationProps, FetchReposInIntegrationQueryPathParams, FetchReposInIntegrationQueryQueryParams, } from './hooks/useFetchReposInIntegrationQuery';
37
37
  export { fetchReposInIntegration, useFetchReposInIntegrationQuery, } from './hooks/useFetchReposInIntegrationQuery';
38
+ export type { FetchRuntimeSecurityAlertsByArtifactErrorResponse, FetchRuntimeSecurityAlertsByArtifactOkResponse, FetchRuntimeSecurityAlertsByArtifactProps, FetchRuntimeSecurityAlertsByArtifactQueryPathParams, FetchRuntimeSecurityAlertsByArtifactQueryQueryParams, FetchRuntimeSecurityAlertsByArtifactRequestBody, } from './hooks/useFetchRuntimeSecurityAlertsByArtifactQuery';
39
+ export { fetchRuntimeSecurityAlertsByArtifact, useFetchRuntimeSecurityAlertsByArtifactQuery, } from './hooks/useFetchRuntimeSecurityAlertsByArtifactQuery';
38
40
  export type { GetAllRepositoriesSummaryErrorResponse, GetAllRepositoriesSummaryOkResponse, GetAllRepositoriesSummaryProps, GetAllRepositoriesSummaryQueryPathParams, } from './hooks/useGetAllRepositoriesSummaryQuery';
39
41
  export { getAllRepositoriesSummary, useGetAllRepositoriesSummaryQuery, } from './hooks/useGetAllRepositoriesSummaryQuery';
40
42
  export type { GetArtifactChainOfCustodyV2ErrorResponse, GetArtifactChainOfCustodyV2OkResponse, GetArtifactChainOfCustodyV2Props, GetArtifactChainOfCustodyV2QueryPathParams, } from './hooks/useGetArtifactChainOfCustodyV2Query';
@@ -91,6 +93,8 @@ export type { GetLicenseDriftErrorResponse, GetLicenseDriftOkResponse, GetLicens
91
93
  export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
92
94
  export type { GetOverallSummaryErrorResponse, GetOverallSummaryOkResponse, GetOverallSummaryProps, GetOverallSummaryQueryPathParams, } from './hooks/useGetOverallSummaryQuery';
93
95
  export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
96
+ export type { GetPipelineAlertListErrorResponse, GetPipelineAlertListOkResponse, GetPipelineAlertListProps, GetPipelineAlertListQueryPathParams, GetPipelineAlertListRequestBody, } from './hooks/useGetPipelineAlertListQuery';
97
+ export { getPipelineAlertList, useGetPipelineAlertListQuery, } from './hooks/useGetPipelineAlertListQuery';
94
98
  export type { GetPipelineArtifactListErrorResponse, GetPipelineArtifactListOkResponse, GetPipelineArtifactListProps, GetPipelineArtifactListQueryPathParams, GetPipelineArtifactListRequestBody, } from './hooks/useGetPipelineArtifactListQuery';
95
99
  export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
96
100
  export type { GetPolicyViolationsErrorResponse, GetPolicyViolationsOkResponse, GetPolicyViolationsProps, GetPolicyViolationsQueryPathParams, GetPolicyViolationsQueryQueryParams, } from './hooks/useGetPolicyViolationsQuery';
@@ -115,6 +119,8 @@ export type { PostComplianceResultStatsEvaluationBreakdownArtifactTypeErrorRespo
115
119
  export { postComplianceResultStatsEvaluationBreakdownArtifactType, usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation, } from './hooks/usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation';
116
120
  export type { PostComplianceResultStatsOverviewErrorResponse, PostComplianceResultStatsOverviewMutationPathParams, PostComplianceResultStatsOverviewMutationQueryParams, PostComplianceResultStatsOverviewOkResponse, PostComplianceResultStatsOverviewProps, PostComplianceResultStatsOverviewRequestBody, } from './hooks/usePostComplianceResultStatsOverviewMutation';
117
121
  export { postComplianceResultStatsOverview, usePostComplianceResultStatsOverviewMutation, } from './hooks/usePostComplianceResultStatsOverviewMutation';
122
+ export type { SetBaselineForArtifactV2ErrorResponse, SetBaselineForArtifactV2MutationPathParams, SetBaselineForArtifactV2OkResponse, SetBaselineForArtifactV2Props, SetBaselineForArtifactV2RequestBody, } from './hooks/useSetBaselineForArtifactV2Mutation';
123
+ export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from './hooks/useSetBaselineForArtifactV2Mutation';
118
124
  export type { SscaLicenseUsageErrorResponse, SscaLicenseUsageOkResponse, SscaLicenseUsageProps, SscaLicenseUsageQueryQueryParams, } from './hooks/useSscaLicenseUsageQuery';
119
125
  export { sscaLicenseUsage, useSscaLicenseUsageQuery } from './hooks/useSscaLicenseUsageQuery';
120
126
  export type { UpdateRemediationTrackerErrorResponse, UpdateRemediationTrackerMutationPathParams, UpdateRemediationTrackerOkResponse, UpdateRemediationTrackerProps, UpdateRemediationTrackerRequestBody, } from './hooks/useUpdateRemediationTrackerMutation';
@@ -137,6 +143,7 @@ export type { CreateComplianceStandardRequestBodyRequestBody } from './requestBo
137
143
  export type { CreateIntegrationRequestBodyRequestBody } from './requestBodies/CreateIntegrationRequestBodyRequestBody';
138
144
  export type { CreateTicketRequestBodyRequestBody } from './requestBodies/CreateTicketRequestBodyRequestBody';
139
145
  export type { DownloadSbomRequestBodyRequestBody } from './requestBodies/DownloadSbomRequestBodyRequestBody';
146
+ export type { EbpfRequestBodyRequestBody } from './requestBodies/EbpfRequestBodyRequestBody';
140
147
  export type { EnforceSbomRequestBodyRequestBody } from './requestBodies/EnforceSbomRequestBodyRequestBody';
141
148
  export type { EnforceSbomRequestBodyV2RequestBody } from './requestBodies/EnforceSbomRequestBodyV2RequestBody';
142
149
  export type { ExcludeArtifactRequestBodyRequestBody } from './requestBodies/ExcludeArtifactRequestBodyRequestBody';
@@ -233,6 +240,8 @@ export type { TokenIssueResponseBodyResponse } from './responses/TokenIssueRespo
233
240
  export type { UpdateIntegrationResponseBodyResponse } from './responses/UpdateIntegrationResponseBodyResponse';
234
241
  export type { VersionResponseBodyResponse } from './responses/VersionResponseBodyResponse';
235
242
  export type { ActivityDetails } from './schemas/ActivityDetails';
243
+ export type { AlertListingPipelineRequestBody } from './schemas/AlertListingPipelineRequestBody';
244
+ export type { AlertListingPipelineResponse } from './schemas/AlertListingPipelineResponse';
236
245
  export type { Artifact } from './schemas/Artifact';
237
246
  export type { ArtifactAndDeploymentsResponseBody } from './schemas/ArtifactAndDeploymentsResponseBody';
238
247
  export type { ArtifactChainOfCustody } from './schemas/ArtifactChainOfCustody';
@@ -329,6 +338,7 @@ export type { DeploymentsCount } from './schemas/DeploymentsCount';
329
338
  export type { DownloadSbomRequest } from './schemas/DownloadSbomRequest';
330
339
  export type { DownloadSignatureResponseBody } from './schemas/DownloadSignatureResponseBody';
331
340
  export type { DriftDetailsDto } from './schemas/DriftDetailsDto';
341
+ export type { EbpfRequestBody } from './schemas/EbpfRequestBody';
332
342
  export type { EnforceSbomRequestBody } from './schemas/EnforceSbomRequestBody';
333
343
  export type { EnforceSbomRequestBodyV2 } from './schemas/EnforceSbomRequestBodyV2';
334
344
  export type { EnforceSbomResponseBody } from './schemas/EnforceSbomResponseBody';
@@ -16,6 +16,7 @@ export { fetchComplianceResultsByComplianceId, useFetchComplianceResultsByCompli
16
16
  export { fetchComplianceResultsGroupById, useFetchComplianceResultsGroupByIdMutation, } from './hooks/useFetchComplianceResultsGroupByIdMutation';
17
17
  export { fetchPluginsForWorkflow, useFetchPluginsForWorkflowQuery, } from './hooks/useFetchPluginsForWorkflowQuery';
18
18
  export { fetchReposInIntegration, useFetchReposInIntegrationQuery, } from './hooks/useFetchReposInIntegrationQuery';
19
+ export { fetchRuntimeSecurityAlertsByArtifact, useFetchRuntimeSecurityAlertsByArtifactQuery, } from './hooks/useFetchRuntimeSecurityAlertsByArtifactQuery';
19
20
  export { getAllRepositoriesSummary, useGetAllRepositoriesSummaryQuery, } from './hooks/useGetAllRepositoriesSummaryQuery';
20
21
  export { getArtifactChainOfCustodyV2, useGetArtifactChainOfCustodyV2Query, } from './hooks/useGetArtifactChainOfCustodyV2Query';
21
22
  export { getArtifactInRemediationDetails, useGetArtifactInRemediationDetailsQuery, } from './hooks/useGetArtifactInRemediationDetailsQuery';
@@ -44,6 +45,7 @@ export { getIntegrationRepos, useGetIntegrationReposQuery, } from './hooks/useGe
44
45
  export { getIntegrationsConfig, useGetIntegrationsConfigQuery, } from './hooks/useGetIntegrationsConfigQuery';
45
46
  export { getLicenseDrift, useGetLicenseDriftQuery } from './hooks/useGetLicenseDriftQuery';
46
47
  export { getOverallSummary, useGetOverallSummaryQuery } from './hooks/useGetOverallSummaryQuery';
48
+ export { getPipelineAlertList, useGetPipelineAlertListQuery, } from './hooks/useGetPipelineAlertListQuery';
47
49
  export { getPipelineArtifactList, useGetPipelineArtifactListQuery, } from './hooks/useGetPipelineArtifactListQuery';
48
50
  export { getPolicyViolations, useGetPolicyViolationsQuery, } from './hooks/useGetPolicyViolationsQuery';
49
51
  export { getProvenance, useGetProvenanceQuery } from './hooks/useGetProvenanceQuery';
@@ -56,5 +58,6 @@ export { listIntegrations, useListIntegrationsQuery } from './hooks/useListInteg
56
58
  export { listRemediations, useListRemediationsQuery } from './hooks/useListRemediationsQuery';
57
59
  export { postComplianceResultStatsEvaluationBreakdownArtifactType, usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation, } from './hooks/usePostComplianceResultStatsEvaluationBreakdownArtifactTypeMutation';
58
60
  export { postComplianceResultStatsOverview, usePostComplianceResultStatsOverviewMutation, } from './hooks/usePostComplianceResultStatsOverviewMutation';
61
+ export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from './hooks/useSetBaselineForArtifactV2Mutation';
59
62
  export { sscaLicenseUsage, useSscaLicenseUsageQuery } from './hooks/useSscaLicenseUsageQuery';
60
63
  export { updateRemediationTracker, useUpdateRemediationTrackerMutation, } from './hooks/useUpdateRemediationTrackerMutation';
@@ -0,0 +1,2 @@
1
+ import type { EbpfRequestBody } from '../schemas/EbpfRequestBody';
2
+ export type EbpfRequestBodyRequestBody = EbpfRequestBody;
@@ -0,0 +1,3 @@
1
+ export interface AlertListingPipelineRequestBody {
2
+ search_term?: string;
3
+ }
@@ -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 {};
@@ -0,0 +1,10 @@
1
+ export interface AlertListingPipelineResponse {
2
+ container_repo?: string;
3
+ container_tag?: string;
4
+ evidence?: string;
5
+ host_node?: string;
6
+ message?: string;
7
+ rule_name?: string;
8
+ severity?: string;
9
+ timestamp?: string;
10
+ }
@@ -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 {};
@@ -0,0 +1 @@
1
+ export type EbpfRequestBody = string;
@@ -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.82.1",
3
+ "version": "0.83.1",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",