@harnessio/react-ssca-manager-client 1.0.0 → 1.0.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.
Files changed (50) hide show
  1. package/dist/ssca-manager/src/services/hooks/useGetZeroDayConfigQuery.d.ts +16 -0
  2. package/dist/ssca-manager/src/services/hooks/useGetZeroDayConfigQuery.js +14 -0
  3. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionAffectedTargetsQuery.d.ts +34 -0
  4. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionAffectedTargetsQuery.js +14 -0
  5. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionDetailQuery.d.ts +25 -0
  6. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionDetailQuery.js +14 -0
  7. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionStepsQuery.d.ts +24 -0
  8. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionStepsQuery.js +14 -0
  9. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionsQuery.d.ts +41 -0
  10. package/dist/ssca-manager/src/services/hooks/useGetZeroDayExecutionsQuery.js +14 -0
  11. package/dist/ssca-manager/src/services/hooks/useSaveZeroDayConfigMutation.d.ts +18 -0
  12. package/dist/ssca-manager/src/services/hooks/useSaveZeroDayConfigMutation.js +14 -0
  13. package/dist/ssca-manager/src/services/index.d.ts +29 -0
  14. package/dist/ssca-manager/src/services/index.js +6 -0
  15. package/dist/ssca-manager/src/services/schemas/ZeroDayAlertConfig.d.ts +21 -0
  16. package/dist/ssca-manager/src/services/schemas/ZeroDayAlertConfig.js +4 -0
  17. package/dist/ssca-manager/src/services/schemas/ZeroDayConfig.d.ts +2 -0
  18. package/dist/ssca-manager/src/services/schemas/ZeroDayExecutionSummary.d.ts +11 -0
  19. package/dist/ssca-manager/src/services/schemas/ZeroDayExecutionSummary.js +1 -0
  20. package/dist/ssca-manager/src/services/schemas/ZeroDayFindingDeleteResponse.d.ts +8 -0
  21. package/dist/ssca-manager/src/services/schemas/ZeroDayFindingDeleteResponse.js +4 -0
  22. package/dist/ssca-manager/src/services/schemas/ZeroDayFindingResponse.d.ts +25 -0
  23. package/dist/ssca-manager/src/services/schemas/ZeroDayFindingResponse.js +4 -0
  24. package/dist/ssca-manager/src/services/schemas/ZeroDayFindingUpdateRequest.d.ts +23 -0
  25. package/dist/ssca-manager/src/services/schemas/ZeroDayFindingUpdateRequest.js +4 -0
  26. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalAlertContext.d.ts +16 -0
  27. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalAlertContext.js +4 -0
  28. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalConflictResponse.d.ts +5 -0
  29. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalConflictResponse.js +4 -0
  30. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalIdentificationStatusResponse.d.ts +16 -0
  31. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalIdentificationStatusResponse.js +4 -0
  32. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalNotifyResponse.d.ts +17 -0
  33. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalNotifyResponse.js +4 -0
  34. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalResultRequest.d.ts +8 -0
  35. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalResultRequest.js +4 -0
  36. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalResultResponse.d.ts +5 -0
  37. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalResultResponse.js +4 -0
  38. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStartIdentificationResponse.d.ts +5 -0
  39. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStartIdentificationResponse.js +4 -0
  40. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStatusRequest.d.ts +4 -0
  41. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStatusRequest.js +4 -0
  42. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStatusResponse.d.ts +5 -0
  43. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStatusResponse.js +4 -0
  44. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStepExecutionRequest.d.ts +6 -0
  45. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStepExecutionRequest.js +4 -0
  46. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStepExecutionResponse.d.ts +4 -0
  47. package/dist/ssca-manager/src/services/schemas/ZeroDayInternalStepExecutionResponse.js +4 -0
  48. package/dist/ssca-manager/src/services/schemas/ZeroDayTestTriggerRequest.d.ts +20 -0
  49. package/dist/ssca-manager/src/services/schemas/ZeroDayTestTriggerRequest.js +4 -0
  50. package/package.json +1 -1
@@ -0,0 +1,16 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ZeroDayConfig } from '../schemas/ZeroDayConfig';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetZeroDayConfigQueryHeaderParams {
6
+ 'Harness-Account': string;
7
+ }
8
+ export type GetZeroDayConfigOkResponse = ResponseWithPagination<ZeroDayConfig>;
9
+ export type GetZeroDayConfigErrorResponse = unknown;
10
+ export interface GetZeroDayConfigProps extends Omit<FetcherOptions<unknown, unknown, GetZeroDayConfigQueryHeaderParams>, 'url'> {
11
+ }
12
+ export declare function getZeroDayConfig(props: GetZeroDayConfigProps): Promise<GetZeroDayConfigOkResponse>;
13
+ /**
14
+ * Returns the account-level zero-day configuration. Stored in the dedicated zeroDayConfigs collection; independent of the AI workflow config. Every zero-day endpoint fails closed: it returns 403 whenever the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off for the account, including when the flag state cannot be read.
15
+ */
16
+ export declare function useGetZeroDayConfigQuery(props: GetZeroDayConfigProps, options?: Omit<UseQueryOptions<GetZeroDayConfigOkResponse, GetZeroDayConfigErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetZeroDayConfigOkResponse, 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 getZeroDayConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/zero-day/config`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns the account-level zero-day configuration. Stored in the dedicated zeroDayConfigs collection; independent of the AI workflow config. Every zero-day endpoint fails closed: it returns 403 whenever the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off for the account, including when the flag state cannot be read.
11
+ */
12
+ export function useGetZeroDayConfigQuery(props, options) {
13
+ return useQuery(['getZeroDayConfig'], ({ signal }) => getZeroDayConfig(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,34 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AffectedArtifactInfo } from '../schemas/AffectedArtifactInfo';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetZeroDayExecutionAffectedTargetsQueryPathParams {
6
+ executionId: string;
7
+ }
8
+ export interface GetZeroDayExecutionAffectedTargetsQueryQueryParams {
9
+ cluster_id: string;
10
+ search?: string;
11
+ /**
12
+ * @default 0
13
+ */
14
+ page?: number;
15
+ /**
16
+ * @default 30
17
+ */
18
+ limit?: number;
19
+ org?: string;
20
+ project?: string;
21
+ }
22
+ export interface GetZeroDayExecutionAffectedTargetsQueryHeaderParams {
23
+ 'Harness-Account': string;
24
+ }
25
+ export type GetZeroDayExecutionAffectedTargetsOkResponse = ResponseWithPagination<AffectedArtifactInfo[]>;
26
+ export type GetZeroDayExecutionAffectedTargetsErrorResponse = unknown;
27
+ export interface GetZeroDayExecutionAffectedTargetsProps extends GetZeroDayExecutionAffectedTargetsQueryPathParams, Omit<FetcherOptions<GetZeroDayExecutionAffectedTargetsQueryQueryParams, unknown, GetZeroDayExecutionAffectedTargetsQueryHeaderParams>, 'url'> {
28
+ queryParams: GetZeroDayExecutionAffectedTargetsQueryQueryParams;
29
+ }
30
+ export declare function getZeroDayExecutionAffectedTargets(props: GetZeroDayExecutionAffectedTargetsProps): Promise<GetZeroDayExecutionAffectedTargetsOkResponse>;
31
+ /**
32
+ * Returns a page of affected targets for one dispatched finding of a zero-day global-findings execution, in the shape of GET /v1/ai-workflow-executions/{executionId}/affected-targets. cluster_id selects the finding. When org and project are given, only targets in that scope are returned. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
33
+ */
34
+ export declare function useGetZeroDayExecutionAffectedTargetsQuery(props: GetZeroDayExecutionAffectedTargetsProps, options?: Omit<UseQueryOptions<GetZeroDayExecutionAffectedTargetsOkResponse, GetZeroDayExecutionAffectedTargetsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetZeroDayExecutionAffectedTargetsOkResponse, 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 getZeroDayExecutionAffectedTargets(props) {
7
+ return fetcher(Object.assign({ url: `/v1/zero-day/executions/${props.executionId}/affected-targets`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns a page of affected targets for one dispatched finding of a zero-day global-findings execution, in the shape of GET /v1/ai-workflow-executions/{executionId}/affected-targets. cluster_id selects the finding. When org and project are given, only targets in that scope are returned. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
11
+ */
12
+ export function useGetZeroDayExecutionAffectedTargetsQuery(props, options) {
13
+ return useQuery(['getZeroDayExecutionAffectedTargets', props.executionId, props.queryParams], ({ signal }) => getZeroDayExecutionAffectedTargets(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,25 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AiWorkflowExecutionDetailResponse } from '../schemas/AiWorkflowExecutionDetailResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetZeroDayExecutionDetailQueryPathParams {
6
+ executionId: string;
7
+ }
8
+ export interface GetZeroDayExecutionDetailQueryQueryParams {
9
+ org?: string;
10
+ project?: string;
11
+ cluster_id: string;
12
+ }
13
+ export interface GetZeroDayExecutionDetailQueryHeaderParams {
14
+ 'Harness-Account': string;
15
+ }
16
+ export type GetZeroDayExecutionDetailOkResponse = ResponseWithPagination<AiWorkflowExecutionDetailResponse>;
17
+ export type GetZeroDayExecutionDetailErrorResponse = unknown;
18
+ export interface GetZeroDayExecutionDetailProps extends GetZeroDayExecutionDetailQueryPathParams, Omit<FetcherOptions<GetZeroDayExecutionDetailQueryQueryParams, unknown, GetZeroDayExecutionDetailQueryHeaderParams>, 'url'> {
19
+ queryParams: GetZeroDayExecutionDetailQueryQueryParams;
20
+ }
21
+ export declare function getZeroDayExecutionDetail(props: GetZeroDayExecutionDetailProps): Promise<GetZeroDayExecutionDetailOkResponse>;
22
+ /**
23
+ * Returns one dispatched finding of a zero-day global-findings execution in the shape of GET /v1/ai-workflow-executions/{executionId}/detail. cluster_id selects the finding because one execution covers every finding dispatched to the account. When org and project are given, the target count is limited to that scope and a finding with no in-scope target is not found. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
24
+ */
25
+ export declare function useGetZeroDayExecutionDetailQuery(props: GetZeroDayExecutionDetailProps, options?: Omit<UseQueryOptions<GetZeroDayExecutionDetailOkResponse, GetZeroDayExecutionDetailErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetZeroDayExecutionDetailOkResponse, 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 getZeroDayExecutionDetail(props) {
7
+ return fetcher(Object.assign({ url: `/v1/zero-day/executions/${props.executionId}/detail`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns one dispatched finding of a zero-day global-findings execution in the shape of GET /v1/ai-workflow-executions/{executionId}/detail. cluster_id selects the finding because one execution covers every finding dispatched to the account. When org and project are given, the target count is limited to that scope and a finding with no in-scope target is not found. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
11
+ */
12
+ export function useGetZeroDayExecutionDetailQuery(props, options) {
13
+ return useQuery(['getZeroDayExecutionDetail', props.executionId, props.queryParams], ({ signal }) => getZeroDayExecutionDetail(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,24 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { AiWorkflowExecutionStepsResponse } from '../schemas/AiWorkflowExecutionStepsResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetZeroDayExecutionStepsQueryPathParams {
6
+ executionId: string;
7
+ }
8
+ export interface GetZeroDayExecutionStepsQueryQueryParams {
9
+ org?: string;
10
+ project?: string;
11
+ }
12
+ export interface GetZeroDayExecutionStepsQueryHeaderParams {
13
+ 'Harness-Account': string;
14
+ }
15
+ export type GetZeroDayExecutionStepsOkResponse = ResponseWithPagination<AiWorkflowExecutionStepsResponse>;
16
+ export type GetZeroDayExecutionStepsErrorResponse = unknown;
17
+ export interface GetZeroDayExecutionStepsProps extends GetZeroDayExecutionStepsQueryPathParams, Omit<FetcherOptions<GetZeroDayExecutionStepsQueryQueryParams, unknown, GetZeroDayExecutionStepsQueryHeaderParams>, 'url'> {
18
+ queryParams: GetZeroDayExecutionStepsQueryQueryParams;
19
+ }
20
+ export declare function getZeroDayExecutionSteps(props: GetZeroDayExecutionStepsProps): Promise<GetZeroDayExecutionStepsOkResponse>;
21
+ /**
22
+ * Returns the stored step entries of a zero-day global-findings execution. Entries from an earlier pipeline are omitted once the execution has a current pipeline execution id. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
23
+ */
24
+ export declare function useGetZeroDayExecutionStepsQuery(props: GetZeroDayExecutionStepsProps, options?: Omit<UseQueryOptions<GetZeroDayExecutionStepsOkResponse, GetZeroDayExecutionStepsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetZeroDayExecutionStepsOkResponse, 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 getZeroDayExecutionSteps(props) {
7
+ return fetcher(Object.assign({ url: `/v1/zero-day/executions/${props.executionId}/steps`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns the stored step entries of a zero-day global-findings execution. Entries from an earlier pipeline are omitted once the execution has a current pipeline execution id. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
11
+ */
12
+ export function useGetZeroDayExecutionStepsQuery(props, options) {
13
+ return useQuery(['getZeroDayExecutionSteps', props.executionId, props.queryParams], ({ signal }) => getZeroDayExecutionSteps(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,41 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ZeroDayExecutionSummary } from '../schemas/ZeroDayExecutionSummary';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetZeroDayExecutionsQueryQueryParams {
6
+ status?: string;
7
+ /**
8
+ * @format int64
9
+ */
10
+ from_timestamp?: number;
11
+ /**
12
+ * @format int64
13
+ */
14
+ to_timestamp?: number;
15
+ batch_id?: string;
16
+ test?: boolean;
17
+ org?: string;
18
+ project?: string;
19
+ search?: string;
20
+ /**
21
+ * @default 0
22
+ */
23
+ page?: number;
24
+ /**
25
+ * @default 30
26
+ */
27
+ limit?: number;
28
+ }
29
+ export interface GetZeroDayExecutionsQueryHeaderParams {
30
+ 'Harness-Account': string;
31
+ }
32
+ export type GetZeroDayExecutionsOkResponse = ResponseWithPagination<ZeroDayExecutionSummary[]>;
33
+ export type GetZeroDayExecutionsErrorResponse = unknown;
34
+ export interface GetZeroDayExecutionsProps extends Omit<FetcherOptions<GetZeroDayExecutionsQueryQueryParams, unknown, GetZeroDayExecutionsQueryHeaderParams>, 'url'> {
35
+ queryParams: GetZeroDayExecutionsQueryQueryParams;
36
+ }
37
+ export declare function getZeroDayExecutions(props: GetZeroDayExecutionsProps): Promise<GetZeroDayExecutionsOkResponse>;
38
+ /**
39
+ * Lists executions of the zero-day global-findings flow for the account, newest first, in the shape of GET /v1/ai-workflow-executions. A dispatched execution yields one row per finding cluster; an execution with no dispatched finding yet yields one row with no cluster_id or vulnerability_finding. When org and project are given, a row is a cluster that has a target in that scope and affected_targets_count is that count. X-Total-Elements is the count of matching rows. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
40
+ */
41
+ export declare function useGetZeroDayExecutionsQuery(props: GetZeroDayExecutionsProps, options?: Omit<UseQueryOptions<GetZeroDayExecutionsOkResponse, GetZeroDayExecutionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetZeroDayExecutionsOkResponse, 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 getZeroDayExecutions(props) {
7
+ return fetcher(Object.assign({ url: `/v1/zero-day/executions`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Lists executions of the zero-day global-findings flow for the account, newest first, in the shape of GET /v1/ai-workflow-executions. A dispatched execution yields one row per finding cluster; an execution with no dispatched finding yet yields one row with no cluster_id or vulnerability_finding. When org and project are given, a row is a cluster that has a target in that scope and affected_targets_count is that count. X-Total-Elements is the count of matching rows. Requires the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag.
11
+ */
12
+ export function useGetZeroDayExecutionsQuery(props, options) {
13
+ return useQuery(['getZeroDayExecutions', props.queryParams], ({ signal }) => getZeroDayExecutions(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,18 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ZeroDayConfig } from '../schemas/ZeroDayConfig';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface SaveZeroDayConfigMutationHeaderParams {
6
+ 'Harness-Account': string;
7
+ }
8
+ export type SaveZeroDayConfigRequestBody = ZeroDayConfig;
9
+ export type SaveZeroDayConfigOkResponse = ResponseWithPagination<ZeroDayConfig>;
10
+ export type SaveZeroDayConfigErrorResponse = unknown;
11
+ export interface SaveZeroDayConfigProps extends Omit<FetcherOptions<unknown, SaveZeroDayConfigRequestBody, SaveZeroDayConfigMutationHeaderParams>, 'url'> {
12
+ body: SaveZeroDayConfigRequestBody;
13
+ }
14
+ export declare function saveZeroDayConfig(props: SaveZeroDayConfigProps): Promise<SaveZeroDayConfigOkResponse>;
15
+ /**
16
+ * Full replace: the stored configuration becomes exactly the request body, so a field that is omitted is cleared, not kept. Send the complete configuration on every call. Fails closed with 403 when the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off.
17
+ */
18
+ export declare function useSaveZeroDayConfigMutation(options?: Omit<UseMutationOptions<SaveZeroDayConfigOkResponse, SaveZeroDayConfigErrorResponse, SaveZeroDayConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveZeroDayConfigOkResponse, unknown, SaveZeroDayConfigProps, 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 saveZeroDayConfig(props) {
7
+ return fetcher(Object.assign({ url: `/v1/zero-day/config`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Full replace: the stored configuration becomes exactly the request body, so a field that is omitted is cleared, not kept. Send the complete configuration on every call. Fails closed with 403 when the SCS_ZERO_DAY_GLOBAL_FINDINGS feature flag is off.
11
+ */
12
+ export function useSaveZeroDayConfigMutation(options) {
13
+ return useMutation((mutateProps) => saveZeroDayConfig(mutateProps), options);
14
+ }
@@ -195,6 +195,16 @@ export type { GetScannerConfigurationErrorResponse, GetScannerConfigurationOkRes
195
195
  export { getScannerConfiguration, useGetScannerConfigurationQuery, } from './hooks/useGetScannerConfigurationQuery';
196
196
  export type { GetSscaSummaryErrorResponse, GetSscaSummaryOkResponse, GetSscaSummaryProps, GetSscaSummaryQueryPathParams, } from './hooks/useGetSscaSummaryQuery';
197
197
  export { getSscaSummary, useGetSscaSummaryQuery } from './hooks/useGetSscaSummaryQuery';
198
+ export type { GetZeroDayConfigErrorResponse, GetZeroDayConfigOkResponse, GetZeroDayConfigProps, } from './hooks/useGetZeroDayConfigQuery';
199
+ export { getZeroDayConfig, useGetZeroDayConfigQuery } from './hooks/useGetZeroDayConfigQuery';
200
+ export type { GetZeroDayExecutionAffectedTargetsErrorResponse, GetZeroDayExecutionAffectedTargetsOkResponse, GetZeroDayExecutionAffectedTargetsProps, GetZeroDayExecutionAffectedTargetsQueryPathParams, GetZeroDayExecutionAffectedTargetsQueryQueryParams, } from './hooks/useGetZeroDayExecutionAffectedTargetsQuery';
201
+ export { getZeroDayExecutionAffectedTargets, useGetZeroDayExecutionAffectedTargetsQuery, } from './hooks/useGetZeroDayExecutionAffectedTargetsQuery';
202
+ export type { GetZeroDayExecutionDetailErrorResponse, GetZeroDayExecutionDetailOkResponse, GetZeroDayExecutionDetailProps, GetZeroDayExecutionDetailQueryPathParams, GetZeroDayExecutionDetailQueryQueryParams, } from './hooks/useGetZeroDayExecutionDetailQuery';
203
+ export { getZeroDayExecutionDetail, useGetZeroDayExecutionDetailQuery, } from './hooks/useGetZeroDayExecutionDetailQuery';
204
+ export type { GetZeroDayExecutionStepsErrorResponse, GetZeroDayExecutionStepsOkResponse, GetZeroDayExecutionStepsProps, GetZeroDayExecutionStepsQueryPathParams, GetZeroDayExecutionStepsQueryQueryParams, } from './hooks/useGetZeroDayExecutionStepsQuery';
205
+ export { getZeroDayExecutionSteps, useGetZeroDayExecutionStepsQuery, } from './hooks/useGetZeroDayExecutionStepsQuery';
206
+ export type { GetZeroDayExecutionsErrorResponse, GetZeroDayExecutionsOkResponse, GetZeroDayExecutionsProps, GetZeroDayExecutionsQueryQueryParams, } from './hooks/useGetZeroDayExecutionsQuery';
207
+ export { getZeroDayExecutions, useGetZeroDayExecutionsQuery, } from './hooks/useGetZeroDayExecutionsQuery';
198
208
  export type { GetZeroDayRerunStatusErrorResponse, GetZeroDayRerunStatusOkResponse, GetZeroDayRerunStatusProps, } from './hooks/useGetZeroDayRerunStatusQuery';
199
209
  export { getZeroDayRerunStatus, useGetZeroDayRerunStatusQuery, } from './hooks/useGetZeroDayRerunStatusQuery';
200
210
  export type { ImportLicenseFamilyConfigErrorResponse, ImportLicenseFamilyConfigMutationPathParams, ImportLicenseFamilyConfigOkResponse, ImportLicenseFamilyConfigProps, ImportLicenseFamilyConfigRequestBody, } from './hooks/useImportLicenseFamilyConfigMutation';
@@ -245,6 +255,8 @@ export type { SaveOssScoringCapConfigErrorResponse, SaveOssScoringCapConfigOkRes
245
255
  export { saveOssScoringCapConfig, useSaveOssScoringCapConfigQuery, } from './hooks/useSaveOssScoringCapConfigQuery';
246
256
  export type { SaveProjectAiWorkflowConfigErrorResponse, SaveProjectAiWorkflowConfigMutationPathParams, SaveProjectAiWorkflowConfigMutationQueryParams, SaveProjectAiWorkflowConfigOkResponse, SaveProjectAiWorkflowConfigProps, SaveProjectAiWorkflowConfigRequestBody, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
247
257
  export { saveProjectAiWorkflowConfig, useSaveProjectAiWorkflowConfigMutation, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
258
+ export type { SaveZeroDayConfigErrorResponse, SaveZeroDayConfigOkResponse, SaveZeroDayConfigProps, SaveZeroDayConfigRequestBody, } from './hooks/useSaveZeroDayConfigMutation';
259
+ export { saveZeroDayConfig, useSaveZeroDayConfigMutation, } from './hooks/useSaveZeroDayConfigMutation';
248
260
  export type { SetBaselineForArtifactV2ErrorResponse, SetBaselineForArtifactV2MutationPathParams, SetBaselineForArtifactV2OkResponse, SetBaselineForArtifactV2Props, SetBaselineForArtifactV2RequestBody, } from './hooks/useSetBaselineForArtifactV2Mutation';
249
261
  export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from './hooks/useSetBaselineForArtifactV2Mutation';
250
262
  export type { SscaLicenseUsageErrorResponse, SscaLicenseUsageOkResponse, SscaLicenseUsageProps, SscaLicenseUsageQueryQueryParams, } from './hooks/useSscaLicenseUsageQuery';
@@ -904,9 +916,26 @@ export type { VulnerabilitySource } from './schemas/VulnerabilitySource';
904
916
  export type { VulnerabilitySourceConfigRequestBody } from './schemas/VulnerabilitySourceConfigRequestBody';
905
917
  export type { VulnerabilitySourceConfigResponse } from './schemas/VulnerabilitySourceConfigResponse';
906
918
  export type { WorkflowSource } from './schemas/WorkflowSource';
919
+ export type { ZeroDayAlertConfig } from './schemas/ZeroDayAlertConfig';
907
920
  export type { ZeroDayBatchAcceptedResponse } from './schemas/ZeroDayBatchAcceptedResponse';
908
921
  export type { ZeroDayBatchConflictResponse } from './schemas/ZeroDayBatchConflictResponse';
909
922
  export type { ZeroDayBatchDetailResponse } from './schemas/ZeroDayBatchDetailResponse';
910
923
  export type { ZeroDayConfig } from './schemas/ZeroDayConfig';
924
+ export type { ZeroDayExecutionSummary } from './schemas/ZeroDayExecutionSummary';
925
+ export type { ZeroDayFindingDeleteResponse } from './schemas/ZeroDayFindingDeleteResponse';
926
+ export type { ZeroDayFindingResponse } from './schemas/ZeroDayFindingResponse';
927
+ export type { ZeroDayFindingUpdateRequest } from './schemas/ZeroDayFindingUpdateRequest';
911
928
  export type { ZeroDayInfrastructure } from './schemas/ZeroDayInfrastructure';
929
+ export type { ZeroDayInternalAlertContext } from './schemas/ZeroDayInternalAlertContext';
930
+ export type { ZeroDayInternalConflictResponse } from './schemas/ZeroDayInternalConflictResponse';
931
+ export type { ZeroDayInternalIdentificationStatusResponse } from './schemas/ZeroDayInternalIdentificationStatusResponse';
932
+ export type { ZeroDayInternalNotifyResponse } from './schemas/ZeroDayInternalNotifyResponse';
933
+ export type { ZeroDayInternalResultRequest } from './schemas/ZeroDayInternalResultRequest';
934
+ export type { ZeroDayInternalResultResponse } from './schemas/ZeroDayInternalResultResponse';
935
+ export type { ZeroDayInternalStartIdentificationResponse } from './schemas/ZeroDayInternalStartIdentificationResponse';
936
+ export type { ZeroDayInternalStatusRequest } from './schemas/ZeroDayInternalStatusRequest';
937
+ export type { ZeroDayInternalStatusResponse } from './schemas/ZeroDayInternalStatusResponse';
938
+ export type { ZeroDayInternalStepExecutionRequest } from './schemas/ZeroDayInternalStepExecutionRequest';
939
+ export type { ZeroDayInternalStepExecutionResponse } from './schemas/ZeroDayInternalStepExecutionResponse';
912
940
  export type { ZeroDayRerunStatusResponse } from './schemas/ZeroDayRerunStatusResponse';
941
+ export type { ZeroDayTestTriggerRequest } from './schemas/ZeroDayTestTriggerRequest';
@@ -96,6 +96,11 @@ export { getSbomScoreDetailV2, useGetSbomScoreDetailV2Query, } from './hooks/use
96
96
  export { getSbomScorecard, useGetSbomScorecardQuery } from './hooks/useGetSbomScorecardQuery';
97
97
  export { getScannerConfiguration, useGetScannerConfigurationQuery, } from './hooks/useGetScannerConfigurationQuery';
98
98
  export { getSscaSummary, useGetSscaSummaryQuery } from './hooks/useGetSscaSummaryQuery';
99
+ export { getZeroDayConfig, useGetZeroDayConfigQuery } from './hooks/useGetZeroDayConfigQuery';
100
+ export { getZeroDayExecutionAffectedTargets, useGetZeroDayExecutionAffectedTargetsQuery, } from './hooks/useGetZeroDayExecutionAffectedTargetsQuery';
101
+ export { getZeroDayExecutionDetail, useGetZeroDayExecutionDetailQuery, } from './hooks/useGetZeroDayExecutionDetailQuery';
102
+ export { getZeroDayExecutionSteps, useGetZeroDayExecutionStepsQuery, } from './hooks/useGetZeroDayExecutionStepsQuery';
103
+ export { getZeroDayExecutions, useGetZeroDayExecutionsQuery, } from './hooks/useGetZeroDayExecutionsQuery';
99
104
  export { getZeroDayRerunStatus, useGetZeroDayRerunStatusQuery, } from './hooks/useGetZeroDayRerunStatusQuery';
100
105
  export { importLicenseFamilyConfig, useImportLicenseFamilyConfigMutation, } from './hooks/useImportLicenseFamilyConfigMutation';
101
106
  export { listAgentStatuses, useListAgentStatusesQuery } from './hooks/useListAgentStatusesQuery';
@@ -121,6 +126,7 @@ export { saveConnectorConfig, useSaveConnectorConfigMutation, } from './hooks/us
121
126
  export { saveContainerTargetAiWorkflowConfig, useSaveContainerTargetAiWorkflowConfigMutation, } from './hooks/useSaveContainerTargetAiWorkflowConfigMutation';
122
127
  export { saveOssScoringCapConfig, useSaveOssScoringCapConfigQuery, } from './hooks/useSaveOssScoringCapConfigQuery';
123
128
  export { saveProjectAiWorkflowConfig, useSaveProjectAiWorkflowConfigMutation, } from './hooks/useSaveProjectAiWorkflowConfigMutation';
129
+ export { saveZeroDayConfig, useSaveZeroDayConfigMutation, } from './hooks/useSaveZeroDayConfigMutation';
124
130
  export { setBaselineForArtifactV2, useSetBaselineForArtifactV2Mutation, } from './hooks/useSetBaselineForArtifactV2Mutation';
125
131
  export { sscaLicenseUsage, useSscaLicenseUsageQuery } from './hooks/useSscaLicenseUsageQuery';
126
132
  export { toggleAgentStatus, useToggleAgentStatusMutation, } from './hooks/useToggleAgentStatusMutation';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Channels that receive zero-day alerts. Omit to disable alerting.
3
+ */
4
+ export interface ZeroDayAlertConfig {
5
+ email_addresses?: string[];
6
+ google_chat_connector_refs?: string[];
7
+ ms_teams_connector_refs?: string[];
8
+ pagerduty_connector_ref?: string;
9
+ /**
10
+ * Severities that trigger alerts, e.g. CRITICAL, HIGH
11
+ */
12
+ severities?: string[];
13
+ /**
14
+ * Slack connector ref to the channel ids that receive the message
15
+ */
16
+ slack_connector_channels?: {
17
+ [key: string]: string[];
18
+ };
19
+ slack_connector_refs?: string[];
20
+ zoom_connector_refs?: string[];
21
+ }
@@ -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 {};
@@ -1,5 +1,7 @@
1
+ import type { ZeroDayAlertConfig } from '../schemas/ZeroDayAlertConfig';
1
2
  import type { ZeroDayInfrastructure } from '../schemas/ZeroDayInfrastructure';
2
3
  export interface ZeroDayConfig {
4
+ alert_config?: ZeroDayAlertConfig;
3
5
  /**
4
6
  * Whether zero-day remediation is enabled for the account
5
7
  */
@@ -0,0 +1,11 @@
1
+ import type { AiWorkflowExecutionSummary } from '../schemas/AiWorkflowExecutionSummary';
2
+ export interface ZeroDayExecutionSummary extends AiWorkflowExecutionSummary {
3
+ /**
4
+ * Finding cluster this row describes
5
+ */
6
+ cluster_id?: string;
7
+ /**
8
+ * True for runs started by the test trigger
9
+ */
10
+ test?: boolean;
11
+ }
@@ -0,0 +1,8 @@
1
+ export interface ZeroDayFindingDeleteResponse {
2
+ /**
3
+ * COMPLETED when its matches are removed, PENDING while the background cleanup finishes
4
+ */
5
+ cleanup_status: 'COMPLETED' | 'PENDING';
6
+ cluster_id: string;
7
+ outcome: 'WITHDRAWN';
8
+ }
@@ -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,25 @@
1
+ export interface ZeroDayFindingResponse {
2
+ affected_version_ranges?: string[];
3
+ cluster_id: string;
4
+ /**
5
+ * @format int64
6
+ */
7
+ content_written_at?: number;
8
+ cve_ids?: string[];
9
+ detection_time?: string;
10
+ ecosystem?: string;
11
+ exploit_lookup_status?: string;
12
+ exploit_references?: string[];
13
+ export_kind?: string;
14
+ fix_versions?: string[];
15
+ package_name?: string;
16
+ purl?: string;
17
+ severity?: string;
18
+ source_published_at?: string;
19
+ source_updated_at?: string;
20
+ source_urls?: string[];
21
+ sources?: string[];
22
+ status: 'ACTIVE' | 'WITHDRAWN';
23
+ summary?: string;
24
+ version_validation?: string;
25
+ }
@@ -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,23 @@
1
+ /**
2
+ * Patch of the editable finding fields; the trailing echo fields are accepted only when equal to the stored value.
3
+ */
4
+ export interface ZeroDayFindingUpdateRequest {
5
+ affected_version_ranges?: string[];
6
+ cluster_id?: string;
7
+ cve_ids?: string[];
8
+ detection_time?: string;
9
+ ecosystem?: string;
10
+ exploit_lookup_status?: string;
11
+ exploit_references?: string[];
12
+ export_kind?: string;
13
+ fix_versions?: string[];
14
+ package_name?: string;
15
+ purl?: string;
16
+ severity?: string;
17
+ source_published_at?: string;
18
+ source_updated_at?: string;
19
+ source_urls?: string[];
20
+ sources?: string[];
21
+ summary?: string;
22
+ version_validation?: string;
23
+ }
@@ -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,16 @@
1
+ export interface ZeroDayInternalAlertContext {
2
+ attack_surface?: string;
3
+ component_name?: string;
4
+ component_type?: string;
5
+ component_version?: string;
6
+ dependents_count?: string;
7
+ description?: string;
8
+ ecosystems?: string[];
9
+ exposure_points?: string;
10
+ notable_consumers?: string;
11
+ popularity?: string;
12
+ repo_url?: string;
13
+ risk_factor?: string;
14
+ risk_pattern?: string;
15
+ use_cases?: string[];
16
+ }
@@ -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,5 @@
1
+ export interface ZeroDayInternalConflictResponse {
2
+ claimedPipelineExecutionId?: string;
3
+ code?: string;
4
+ message?: string;
5
+ }
@@ -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,16 @@
1
+ export interface ZeroDayInternalIdentificationStatusResponse {
2
+ error?: string;
3
+ incomplete_clusters?: Array<{
4
+ cluster_id?: string;
5
+ reason?: string;
6
+ }>;
7
+ progress?: {
8
+ processed?: number;
9
+ total?: number;
10
+ };
11
+ result?: {
12
+ [key: string]: any;
13
+ };
14
+ result_truncated?: boolean;
15
+ state?: string;
16
+ }
@@ -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,17 @@
1
+ export interface ZeroDayInternalNotifyResponse {
2
+ alreadyNotified?: boolean;
3
+ attempts?: number;
4
+ channelsSent?: string[];
5
+ executionId?: string;
6
+ inFlight?: boolean;
7
+ messagePreview?: string;
8
+ /**
9
+ * @format int64
10
+ */
11
+ nextAttemptAt?: number;
12
+ notified?: boolean;
13
+ retriesExhausted?: boolean;
14
+ retryScheduled?: boolean;
15
+ skipReasons?: string[];
16
+ subject?: string;
17
+ }
@@ -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,8 @@
1
+ export interface ZeroDayInternalResultRequest {
2
+ metadata?: {
3
+ [key: string]: any;
4
+ };
5
+ results?: {
6
+ [key: string]: any;
7
+ };
8
+ }
@@ -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,5 @@
1
+ export interface ZeroDayInternalResultResponse {
2
+ alreadyStored?: boolean;
3
+ executionId?: string;
4
+ stored?: boolean;
5
+ }
@@ -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,5 @@
1
+ export interface ZeroDayInternalStartIdentificationResponse {
2
+ execution_id?: string;
3
+ state?: string;
4
+ total?: number;
5
+ }
@@ -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,4 @@
1
+ export interface ZeroDayInternalStatusRequest {
2
+ reason?: string;
3
+ status: string;
4
+ }
@@ -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,5 @@
1
+ export interface ZeroDayInternalStatusResponse {
2
+ executionId?: string;
3
+ message?: string;
4
+ status?: string;
5
+ }
@@ -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,6 @@
1
+ export interface ZeroDayInternalStepExecutionRequest {
2
+ banner?: string;
3
+ details?: string;
4
+ pipelineExecutionId?: string;
5
+ summary?: string;
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 {};
@@ -0,0 +1,4 @@
1
+ export interface ZeroDayInternalStepExecutionResponse {
2
+ executionId?: string;
3
+ stepCount?: number;
4
+ }
@@ -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,20 @@
1
+ export interface ZeroDayTestTriggerRequest {
2
+ /**
3
+ * Account the test run targets
4
+ */
5
+ account_id: string;
6
+ affected_version_ranges: string[];
7
+ cve_ids?: string[];
8
+ fix_versions?: string[];
9
+ /**
10
+ * Required when purl is not given
11
+ */
12
+ package_ecosystem?: string;
13
+ package_name: string;
14
+ purl?: string;
15
+ /**
16
+ * Defaults to HIGH
17
+ */
18
+ severity?: string;
19
+ summary?: string;
20
+ }
@@ -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": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",