@harnessio/react-sto-core-client 0.3.2 → 0.3.4

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 (59) hide show
  1. package/dist/sto-core/src/services/hooks/useExemptionsCreateExemptionMutation.d.ts +42 -0
  2. package/dist/sto-core/src/services/hooks/useExemptionsCreateExemptionMutation.js +14 -0
  3. package/dist/sto-core/src/services/hooks/useExemptionsFindExemptionByIdQuery.d.ts +55 -0
  4. package/dist/sto-core/src/services/hooks/useExemptionsFindExemptionByIdQuery.js +14 -0
  5. package/dist/sto-core/src/services/hooks/useExemptionsListExemptionsQuery.d.ts +53 -0
  6. package/dist/sto-core/src/services/hooks/useExemptionsListExemptionsQuery.js +14 -0
  7. package/dist/sto-core/src/services/hooks/useFrontendExpiringExemptionsQuery.d.ts +46 -0
  8. package/dist/sto-core/src/services/hooks/useFrontendExpiringExemptionsQuery.js +14 -0
  9. package/dist/sto-core/src/services/hooks/useFrontendGlobalExemptionsQuery.d.ts +61 -0
  10. package/dist/sto-core/src/services/hooks/useFrontendGlobalExemptionsQuery.js +14 -0
  11. package/dist/sto-core/src/services/hooks/useFrontendSecurityReviewQuery.d.ts +56 -0
  12. package/dist/sto-core/src/services/hooks/useFrontendSecurityReviewQuery.js +14 -0
  13. package/dist/sto-core/src/services/hooks/useIssuesIssuesAugmentRemediationMutation.d.ts +49 -0
  14. package/dist/sto-core/src/services/hooks/useIssuesIssuesAugmentRemediationMutation.js +14 -0
  15. package/dist/sto-core/src/services/hooks/useTargetsFindTargetByIdQuery.d.ts +46 -0
  16. package/dist/sto-core/src/services/hooks/useTargetsFindTargetByIdQuery.js +14 -0
  17. package/dist/sto-core/src/services/index.d.ts +35 -2
  18. package/dist/sto-core/src/services/index.js +8 -1
  19. package/dist/sto-core/src/services/schemas/AugmentRemediationMetadata.d.ts +10 -0
  20. package/dist/sto-core/src/services/schemas/AugmentRemediationMetadata.js +1 -0
  21. package/dist/sto-core/src/services/schemas/AugmentRemediationResult.d.ts +19 -0
  22. package/dist/sto-core/src/services/schemas/AugmentRemediationResult.js +1 -0
  23. package/dist/sto-core/src/services/schemas/AugmentRemediationWarning.d.ts +13 -0
  24. package/dist/sto-core/src/services/schemas/AugmentRemediationWarning.js +4 -0
  25. package/dist/sto-core/src/services/schemas/CreateExemptionRequestBody.d.ts +68 -0
  26. package/dist/sto-core/src/services/schemas/CreateExemptionRequestBody.js +1 -0
  27. package/dist/sto-core/src/services/schemas/Exemption.d.ts +149 -0
  28. package/dist/sto-core/src/services/schemas/Exemption.js +1 -0
  29. package/dist/sto-core/src/services/schemas/ExemptionsCreateExemptionResponseBody.d.ts +2 -0
  30. package/dist/sto-core/src/services/schemas/ExemptionsCreateExemptionResponseBody.js +1 -0
  31. package/dist/sto-core/src/services/schemas/ExemptionsListExemptionsResponseBody.d.ts +12 -0
  32. package/dist/sto-core/src/services/schemas/ExemptionsListExemptionsResponseBody.js +1 -0
  33. package/dist/sto-core/src/services/schemas/FrontendExemption.d.ts +132 -0
  34. package/dist/sto-core/src/services/schemas/FrontendExemption.js +1 -0
  35. package/dist/sto-core/src/services/schemas/FrontendExemptionCounts.d.ts +33 -0
  36. package/dist/sto-core/src/services/schemas/FrontendExemptionCounts.js +4 -0
  37. package/dist/sto-core/src/services/schemas/FrontendExpiringExemptionsResponseBody.d.ts +2 -0
  38. package/dist/sto-core/src/services/schemas/FrontendExpiringExemptionsResponseBody.js +1 -0
  39. package/dist/sto-core/src/services/schemas/FrontendSecurityReviewResponseBody.d.ts +2 -0
  40. package/dist/sto-core/src/services/schemas/FrontendSecurityReviewResponseBody.js +1 -0
  41. package/dist/sto-core/src/services/schemas/IdResult.d.ts +10 -0
  42. package/dist/sto-core/src/services/schemas/IdResult.js +4 -0
  43. package/dist/sto-core/src/services/schemas/IssueSummaries.d.ts +12 -0
  44. package/dist/sto-core/src/services/schemas/IssueSummaries.js +1 -0
  45. package/dist/sto-core/src/services/schemas/IssueSummary.d.ts +94 -0
  46. package/dist/sto-core/src/services/schemas/IssueSummary.js +4 -0
  47. package/dist/sto-core/src/services/schemas/IssuesAugmentRemediationRequestBody.d.ts +28 -0
  48. package/dist/sto-core/src/services/schemas/IssuesAugmentRemediationRequestBody.js +4 -0
  49. package/dist/sto-core/src/services/schemas/IssuesIssuesAugmentRemediationResponseBody.d.ts +2 -0
  50. package/dist/sto-core/src/services/schemas/IssuesIssuesAugmentRemediationResponseBody.js +1 -0
  51. package/dist/sto-core/src/services/schemas/PendingChanges.d.ts +11 -0
  52. package/dist/sto-core/src/services/schemas/PendingChanges.js +4 -0
  53. package/dist/sto-core/src/services/schemas/SecurityReviewResult.d.ts +16 -0
  54. package/dist/sto-core/src/services/schemas/SecurityReviewResult.js +1 -0
  55. package/dist/sto-core/src/services/schemas/Target.d.ts +62 -0
  56. package/dist/sto-core/src/services/schemas/Target.js +4 -0
  57. package/package.json +1 -1
  58. package/dist/sto-core/src/services/hooks/useTargetsDeleteTargetMutation.d.ts +0 -38
  59. package/dist/sto-core/src/services/hooks/useTargetsDeleteTargetMutation.js +0 -14
@@ -0,0 +1,42 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ExemptionsCreateExemptionResponseBody } from '../schemas/ExemptionsCreateExemptionResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { CreateExemptionRequestBody } from '../schemas/CreateExemptionRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface ExemptionsCreateExemptionMutationQueryParams {
8
+ /**
9
+ * Harness Account ID
10
+ * @example "abcdef1234567890ghijkl"
11
+ */
12
+ accountId: string;
13
+ /**
14
+ * ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
15
+ * @example "your_project"
16
+ */
17
+ orgId: string;
18
+ /**
19
+ * ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
20
+ * @example "your_project"
21
+ */
22
+ projectId: string;
23
+ }
24
+ export interface ExemptionsCreateExemptionMutationHeaderParams {
25
+ /**
26
+ * Harness personal or service access token
27
+ * @example "Rerum quos."
28
+ */
29
+ 'X-Api-Key'?: string;
30
+ }
31
+ export type ExemptionsCreateExemptionRequestBody = CreateExemptionRequestBody;
32
+ export type ExemptionsCreateExemptionOkResponse = ResponseWithPagination<ExemptionsCreateExemptionResponseBody>;
33
+ export type ExemptionsCreateExemptionErrorResponse = NotFound;
34
+ export interface ExemptionsCreateExemptionProps extends Omit<FetcherOptions<ExemptionsCreateExemptionMutationQueryParams, ExemptionsCreateExemptionRequestBody, ExemptionsCreateExemptionMutationHeaderParams>, 'url'> {
35
+ queryParams: ExemptionsCreateExemptionMutationQueryParams;
36
+ body: ExemptionsCreateExemptionRequestBody;
37
+ }
38
+ export declare function exemptionsCreateExemption(props: ExemptionsCreateExemptionProps): Promise<ExemptionsCreateExemptionOkResponse>;
39
+ /**
40
+ * Create a new Exemption
41
+ */
42
+ export declare function useExemptionsCreateExemptionMutation(options?: Omit<UseMutationOptions<ExemptionsCreateExemptionOkResponse, ExemptionsCreateExemptionErrorResponse, ExemptionsCreateExemptionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ExemptionsCreateExemptionOkResponse, NotFound, ExemptionsCreateExemptionProps, 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 exemptionsCreateExemption(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/exemptions`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create a new Exemption
11
+ */
12
+ export function useExemptionsCreateExemptionMutation(options) {
13
+ return useMutation((mutateProps) => exemptionsCreateExemption(mutateProps), options);
14
+ }
@@ -0,0 +1,55 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { Exemption } from '../schemas/Exemption';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ExemptionsFindExemptionByIdQueryPathParams {
7
+ /**
8
+ * The ID of the Exemption to retrieve
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ id: string;
12
+ }
13
+ export interface ExemptionsFindExemptionByIdQueryQueryParams {
14
+ /**
15
+ * Harness Account ID
16
+ * @example "abcdef1234567890ghijkl"
17
+ */
18
+ accountId: string;
19
+ /**
20
+ * Harness Organization ID
21
+ * @example "example_org"
22
+ */
23
+ orgId?: string;
24
+ /**
25
+ * Harness Project ID
26
+ * @example "example_project"
27
+ */
28
+ projectId?: string;
29
+ /**
30
+ * Harness Execution ID
31
+ * @example "abcdef1234567890ghijkl"
32
+ */
33
+ executionId?: string;
34
+ /**
35
+ * Ignore scope
36
+ */
37
+ ignoreScope?: boolean;
38
+ }
39
+ export interface ExemptionsFindExemptionByIdQueryHeaderParams {
40
+ /**
41
+ * Harness personal or service access token
42
+ * @example "Et et."
43
+ */
44
+ 'X-Api-Key'?: string;
45
+ }
46
+ export type ExemptionsFindExemptionByIdOkResponse = ResponseWithPagination<Exemption>;
47
+ export type ExemptionsFindExemptionByIdErrorResponse = NotFound;
48
+ export interface ExemptionsFindExemptionByIdProps extends ExemptionsFindExemptionByIdQueryPathParams, Omit<FetcherOptions<ExemptionsFindExemptionByIdQueryQueryParams, unknown, ExemptionsFindExemptionByIdQueryHeaderParams>, 'url'> {
49
+ queryParams: ExemptionsFindExemptionByIdQueryQueryParams;
50
+ }
51
+ export declare function exemptionsFindExemptionById(props: ExemptionsFindExemptionByIdProps): Promise<ExemptionsFindExemptionByIdOkResponse>;
52
+ /**
53
+ * Find Exemption by ID
54
+ */
55
+ export declare function useExemptionsFindExemptionByIdQuery(props: ExemptionsFindExemptionByIdProps, options?: Omit<UseQueryOptions<ExemptionsFindExemptionByIdOkResponse, ExemptionsFindExemptionByIdErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ExemptionsFindExemptionByIdOkResponse, NotFound>;
@@ -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 exemptionsFindExemptionById(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/exemptions/${props.id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Find Exemption by ID
11
+ */
12
+ export function useExemptionsFindExemptionByIdQuery(props, options) {
13
+ return useQuery(['Exemptions#FindExemptionById', props.id, props.queryParams], ({ signal }) => exemptionsFindExemptionById(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,53 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ExemptionsListExemptionsResponseBody } from '../schemas/ExemptionsListExemptionsResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ExemptionsListExemptionsQueryQueryParams {
7
+ /**
8
+ * Harness Account ID
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ accountId: string;
12
+ /**
13
+ * Page number to fetch (starting from 0)
14
+ * @format int64
15
+ * @default 0
16
+ * @example 4
17
+ */
18
+ page?: number;
19
+ /**
20
+ * Number of results per page
21
+ * @format int64
22
+ * @default 30
23
+ * @example 50
24
+ */
25
+ pageSize?: number;
26
+ /**
27
+ * Harness Organization ID
28
+ * @example "example_org"
29
+ */
30
+ orgId?: string;
31
+ /**
32
+ * Harness Project ID
33
+ * @example "example_project"
34
+ */
35
+ projectId?: string;
36
+ }
37
+ export interface ExemptionsListExemptionsQueryHeaderParams {
38
+ /**
39
+ * Harness personal or service access token
40
+ * @example "Voluptas eos rerum eos omnis accusamus."
41
+ */
42
+ 'X-Api-Key'?: string;
43
+ }
44
+ export type ExemptionsListExemptionsOkResponse = ResponseWithPagination<ExemptionsListExemptionsResponseBody>;
45
+ export type ExemptionsListExemptionsErrorResponse = NotFound;
46
+ export interface ExemptionsListExemptionsProps extends Omit<FetcherOptions<ExemptionsListExemptionsQueryQueryParams, unknown, ExemptionsListExemptionsQueryHeaderParams>, 'url'> {
47
+ queryParams: ExemptionsListExemptionsQueryQueryParams;
48
+ }
49
+ export declare function exemptionsListExemptions(props: ExemptionsListExemptionsProps): Promise<ExemptionsListExemptionsOkResponse>;
50
+ /**
51
+ * List a collection of Exemptions
52
+ */
53
+ export declare function useExemptionsListExemptionsQuery(props: ExemptionsListExemptionsProps, options?: Omit<UseQueryOptions<ExemptionsListExemptionsOkResponse, ExemptionsListExemptionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ExemptionsListExemptionsOkResponse, NotFound>;
@@ -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 exemptionsListExemptions(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/exemptions`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * List a collection of Exemptions
11
+ */
12
+ export function useExemptionsListExemptionsQuery(props, options) {
13
+ return useQuery(['Exemptions#ListExemptions', props.queryParams], ({ signal }) => exemptionsListExemptions(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,46 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendExpiringExemptionsResponseBody } from '../schemas/FrontendExpiringExemptionsResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendExpiringExemptionsQueryPathParams {
7
+ /**
8
+ * Harness pipeline execution ID
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ executionId: string;
12
+ }
13
+ export interface FrontendExpiringExemptionsQueryQueryParams {
14
+ /**
15
+ * Harness Account ID
16
+ * @example "abcdef1234567890ghijkl"
17
+ */
18
+ accountId: string;
19
+ /**
20
+ * Harness Organization ID
21
+ * @example "example_org"
22
+ */
23
+ orgId: string;
24
+ /**
25
+ * Harness Project ID
26
+ * @example "example_project"
27
+ */
28
+ projectId: string;
29
+ /**
30
+ * Number of days of Baseline Issue counts to return
31
+ * @format int64
32
+ * @default 7
33
+ * @example 3885
34
+ */
35
+ days?: number;
36
+ }
37
+ export type FrontendExpiringExemptionsOkResponse = ResponseWithPagination<FrontendExpiringExemptionsResponseBody>;
38
+ export type FrontendExpiringExemptionsErrorResponse = NotFound;
39
+ export interface FrontendExpiringExemptionsProps extends FrontendExpiringExemptionsQueryPathParams, Omit<FetcherOptions<FrontendExpiringExemptionsQueryQueryParams, unknown>, 'url'> {
40
+ queryParams: FrontendExpiringExemptionsQueryQueryParams;
41
+ }
42
+ export declare function frontendExpiringExemptions(props: FrontendExpiringExemptionsProps): Promise<FrontendExpiringExemptionsOkResponse>;
43
+ /**
44
+ * Returns issue summaries that are going to expire
45
+ */
46
+ export declare function useFrontendExpiringExemptionsQuery(props: FrontendExpiringExemptionsProps, options?: Omit<UseQueryOptions<FrontendExpiringExemptionsOkResponse, FrontendExpiringExemptionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendExpiringExemptionsOkResponse, NotFound>;
@@ -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 frontendExpiringExemptions(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/expiring-exemptions/${props.executionId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns issue summaries that are going to expire
11
+ */
12
+ export function useFrontendExpiringExemptionsQuery(props, options) {
13
+ return useQuery(['Frontend#ExpiringExemptions', props.executionId, props.queryParams], ({ signal }) => frontendExpiringExemptions(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,61 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendSecurityReviewResponseBody } from '../schemas/FrontendSecurityReviewResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendGlobalExemptionsQueryQueryParams {
7
+ /**
8
+ * Harness Account ID
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ accountId: string;
12
+ /**
13
+ * Harness Organization ID
14
+ * @example "example_org"
15
+ */
16
+ orgId?: string;
17
+ /**
18
+ * Harness Project ID
19
+ * @example "example_project"
20
+ */
21
+ projectId?: string;
22
+ /**
23
+ * Page number to fetch (starting from 0)
24
+ * @format int64
25
+ * @default 0
26
+ * @example 4
27
+ */
28
+ page?: number;
29
+ /**
30
+ * Number of results per page
31
+ * @format int64
32
+ * @default 30
33
+ * @example 50
34
+ */
35
+ pageSize?: number;
36
+ /**
37
+ * Comma-separated list of organization:project pairs
38
+ * @example "org1:project1,org1:project2"
39
+ */
40
+ matchesProject?: string;
41
+ /**
42
+ * Exemption status
43
+ * @example "Approved"
44
+ */
45
+ status: 'Approved' | 'Canceled' | 'Expired' | 'Pending' | 'Rejected';
46
+ /**
47
+ * @default ""
48
+ * @example "Keyword search. Searches Title, Reason & Type"
49
+ */
50
+ search?: string;
51
+ }
52
+ export type FrontendGlobalExemptionsOkResponse = ResponseWithPagination<FrontendSecurityReviewResponseBody>;
53
+ export type FrontendGlobalExemptionsErrorResponse = NotFound;
54
+ export interface FrontendGlobalExemptionsProps extends Omit<FetcherOptions<FrontendGlobalExemptionsQueryQueryParams, unknown>, 'url'> {
55
+ queryParams: FrontendGlobalExemptionsQueryQueryParams;
56
+ }
57
+ export declare function frontendGlobalExemptions(props: FrontendGlobalExemptionsProps): Promise<FrontendGlobalExemptionsOkResponse>;
58
+ /**
59
+ * Provides data needed by the Global Exemptions Security Review page
60
+ */
61
+ export declare function useFrontendGlobalExemptionsQuery(props: FrontendGlobalExemptionsProps, options?: Omit<UseQueryOptions<FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendGlobalExemptionsOkResponse, NotFound>;
@@ -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 frontendGlobalExemptions(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/exemptions`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides data needed by the Global Exemptions Security Review page
11
+ */
12
+ export function useFrontendGlobalExemptionsQuery(props, options) {
13
+ return useQuery(['Frontend#GlobalExemptions', props.queryParams], ({ signal }) => frontendGlobalExemptions(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,56 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendSecurityReviewResponseBody } from '../schemas/FrontendSecurityReviewResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendSecurityReviewQueryQueryParams {
7
+ /**
8
+ * Harness Account ID
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ accountId: string;
12
+ /**
13
+ * Harness Organization ID
14
+ * @example "example_org"
15
+ */
16
+ orgId: string;
17
+ /**
18
+ * Harness Project ID
19
+ * @example "example_project"
20
+ */
21
+ projectId: string;
22
+ /**
23
+ * Page number to fetch (starting from 0)
24
+ * @format int64
25
+ * @default 0
26
+ * @example 4
27
+ */
28
+ page?: number;
29
+ /**
30
+ * Number of results per page
31
+ * @format int64
32
+ * @default 30
33
+ * @example 50
34
+ */
35
+ pageSize?: number;
36
+ /**
37
+ * Exemption status
38
+ * @example "Approved"
39
+ */
40
+ status: 'Approved' | 'Canceled' | 'Expired' | 'Pending' | 'Rejected';
41
+ /**
42
+ * @default ""
43
+ * @example "Keyword search. Searches Title, Reason & Type"
44
+ */
45
+ search?: string;
46
+ }
47
+ export type FrontendSecurityReviewOkResponse = ResponseWithPagination<FrontendSecurityReviewResponseBody>;
48
+ export type FrontendSecurityReviewErrorResponse = NotFound;
49
+ export interface FrontendSecurityReviewProps extends Omit<FetcherOptions<FrontendSecurityReviewQueryQueryParams, unknown>, 'url'> {
50
+ queryParams: FrontendSecurityReviewQueryQueryParams;
51
+ }
52
+ export declare function frontendSecurityReview(props: FrontendSecurityReviewProps): Promise<FrontendSecurityReviewOkResponse>;
53
+ /**
54
+ * Provides data needed by the Security Review page
55
+ */
56
+ export declare function useFrontendSecurityReviewQuery(props: FrontendSecurityReviewProps, options?: Omit<UseQueryOptions<FrontendSecurityReviewOkResponse, FrontendSecurityReviewErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendSecurityReviewOkResponse, NotFound>;
@@ -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 frontendSecurityReview(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/security-review`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides data needed by the Security Review page
11
+ */
12
+ export function useFrontendSecurityReviewQuery(props, options) {
13
+ return useQuery(['Frontend#SecurityReview', props.queryParams], ({ signal }) => frontendSecurityReview(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,49 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { IssuesIssuesAugmentRemediationResponseBody } from '../schemas/IssuesIssuesAugmentRemediationResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { IssuesAugmentRemediationRequestBody } from '../schemas/IssuesAugmentRemediationRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface IssuesIssuesAugmentRemediationMutationPathParams {
8
+ /**
9
+ * The ID of the Security Issue to augment
10
+ * @example "1234567890abcdefghijkl"
11
+ */
12
+ id: string;
13
+ }
14
+ export interface IssuesIssuesAugmentRemediationMutationQueryParams {
15
+ /**
16
+ * Harness Account ID
17
+ * @example "abcdef1234567890ghijkl"
18
+ */
19
+ accountId: string;
20
+ /**
21
+ * Harness Organization ID
22
+ * @example "example_org"
23
+ */
24
+ orgId?: string;
25
+ /**
26
+ * Harness Project ID
27
+ * @example "example_project"
28
+ */
29
+ projectId?: string;
30
+ }
31
+ export interface IssuesIssuesAugmentRemediationMutationHeaderParams {
32
+ /**
33
+ * Harness personal or service access token
34
+ * @example "Ut omnis accusantium dolores."
35
+ */
36
+ 'X-Api-Key'?: string;
37
+ }
38
+ export type IssuesIssuesAugmentRemediationRequestBody = IssuesAugmentRemediationRequestBody;
39
+ export type IssuesIssuesAugmentRemediationOkResponse = ResponseWithPagination<IssuesIssuesAugmentRemediationResponseBody>;
40
+ export type IssuesIssuesAugmentRemediationErrorResponse = NotFound;
41
+ export interface IssuesIssuesAugmentRemediationProps extends IssuesIssuesAugmentRemediationMutationPathParams, Omit<FetcherOptions<IssuesIssuesAugmentRemediationMutationQueryParams, IssuesIssuesAugmentRemediationRequestBody, IssuesIssuesAugmentRemediationMutationHeaderParams>, 'url'> {
42
+ queryParams: IssuesIssuesAugmentRemediationMutationQueryParams;
43
+ body: IssuesIssuesAugmentRemediationRequestBody;
44
+ }
45
+ export declare function issuesIssuesAugmentRemediation(props: IssuesIssuesAugmentRemediationProps): Promise<IssuesIssuesAugmentRemediationOkResponse>;
46
+ /**
47
+ * Use AI to augment the remediation steps for this Security Issue
48
+ */
49
+ export declare function useIssuesIssuesAugmentRemediationMutation(options?: Omit<UseMutationOptions<IssuesIssuesAugmentRemediationOkResponse, IssuesIssuesAugmentRemediationErrorResponse, IssuesIssuesAugmentRemediationProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<IssuesIssuesAugmentRemediationOkResponse, NotFound, IssuesIssuesAugmentRemediationProps, 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 issuesIssuesAugmentRemediation(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/issues/${props.id}/augment-remediation`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Use AI to augment the remediation steps for this Security Issue
11
+ */
12
+ export function useIssuesIssuesAugmentRemediationMutation(options) {
13
+ return useMutation((mutateProps) => issuesIssuesAugmentRemediation(mutateProps), options);
14
+ }
@@ -0,0 +1,46 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { Target } from '../schemas/Target';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface TargetsFindTargetByIdQueryPathParams {
7
+ /**
8
+ * The ID of the Test Target to retrieve
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ id: string;
12
+ }
13
+ export interface TargetsFindTargetByIdQueryQueryParams {
14
+ /**
15
+ * Harness Account ID
16
+ * @example "abcdef1234567890ghijkl"
17
+ */
18
+ accountId: string;
19
+ /**
20
+ * Harness Organization ID
21
+ * @example "example_org"
22
+ */
23
+ orgId: string;
24
+ /**
25
+ * Harness Project ID
26
+ * @example "example_project"
27
+ */
28
+ projectId: string;
29
+ }
30
+ export interface TargetsFindTargetByIdQueryHeaderParams {
31
+ /**
32
+ * Harness personal or service access token
33
+ * @example "Esse sit consequuntur."
34
+ */
35
+ 'X-Api-Key'?: string;
36
+ }
37
+ export type TargetsFindTargetByIdOkResponse = ResponseWithPagination<Target>;
38
+ export type TargetsFindTargetByIdErrorResponse = NotFound;
39
+ export interface TargetsFindTargetByIdProps extends TargetsFindTargetByIdQueryPathParams, Omit<FetcherOptions<TargetsFindTargetByIdQueryQueryParams, unknown, TargetsFindTargetByIdQueryHeaderParams>, 'url'> {
40
+ queryParams: TargetsFindTargetByIdQueryQueryParams;
41
+ }
42
+ export declare function targetsFindTargetById(props: TargetsFindTargetByIdProps): Promise<TargetsFindTargetByIdOkResponse>;
43
+ /**
44
+ * Find Test Target by ID
45
+ */
46
+ export declare function useTargetsFindTargetByIdQuery(props: TargetsFindTargetByIdProps, options?: Omit<UseQueryOptions<TargetsFindTargetByIdOkResponse, TargetsFindTargetByIdErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<TargetsFindTargetByIdOkResponse, NotFound>;
@@ -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 targetsFindTargetById(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/targets/${props.id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Find Test Target by ID
11
+ */
12
+ export function useTargetsFindTargetByIdQuery(props, options) {
13
+ return useQuery(['Targets#FindTargetById', props.id, props.queryParams], ({ signal }) => targetsFindTargetById(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -1,21 +1,54 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
+ export type { ExemptionsCreateExemptionErrorResponse, ExemptionsCreateExemptionMutationQueryParams, ExemptionsCreateExemptionOkResponse, ExemptionsCreateExemptionProps, ExemptionsCreateExemptionRequestBody, } from './hooks/useExemptionsCreateExemptionMutation';
3
+ export { exemptionsCreateExemption, useExemptionsCreateExemptionMutation, } from './hooks/useExemptionsCreateExemptionMutation';
2
4
  export type { ExemptionsDeleteExemptionErrorResponse, ExemptionsDeleteExemptionMutationPathParams, ExemptionsDeleteExemptionMutationQueryParams, ExemptionsDeleteExemptionOkResponse, ExemptionsDeleteExemptionProps, } from './hooks/useExemptionsDeleteExemptionMutation';
3
5
  export { exemptionsDeleteExemption, useExemptionsDeleteExemptionMutation, } from './hooks/useExemptionsDeleteExemptionMutation';
6
+ export type { ExemptionsFindExemptionByIdErrorResponse, ExemptionsFindExemptionByIdOkResponse, ExemptionsFindExemptionByIdProps, ExemptionsFindExemptionByIdQueryPathParams, ExemptionsFindExemptionByIdQueryQueryParams, } from './hooks/useExemptionsFindExemptionByIdQuery';
7
+ export { exemptionsFindExemptionById, useExemptionsFindExemptionByIdQuery, } from './hooks/useExemptionsFindExemptionByIdQuery';
8
+ export type { ExemptionsListExemptionsErrorResponse, ExemptionsListExemptionsOkResponse, ExemptionsListExemptionsProps, ExemptionsListExemptionsQueryQueryParams, } from './hooks/useExemptionsListExemptionsQuery';
9
+ export { exemptionsListExemptions, useExemptionsListExemptionsQuery, } from './hooks/useExemptionsListExemptionsQuery';
10
+ export type { FrontendExpiringExemptionsErrorResponse, FrontendExpiringExemptionsOkResponse, FrontendExpiringExemptionsProps, FrontendExpiringExemptionsQueryPathParams, FrontendExpiringExemptionsQueryQueryParams, } from './hooks/useFrontendExpiringExemptionsQuery';
11
+ export { frontendExpiringExemptions, useFrontendExpiringExemptionsQuery, } from './hooks/useFrontendExpiringExemptionsQuery';
12
+ export type { FrontendGlobalExemptionsErrorResponse, FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsProps, FrontendGlobalExemptionsQueryQueryParams, } from './hooks/useFrontendGlobalExemptionsQuery';
13
+ export { frontendGlobalExemptions, useFrontendGlobalExemptionsQuery, } from './hooks/useFrontendGlobalExemptionsQuery';
4
14
  export type { FrontendImpactedTargetsForExemptionErrorResponse, FrontendImpactedTargetsForExemptionOkResponse, FrontendImpactedTargetsForExemptionProps, FrontendImpactedTargetsForExemptionQueryPathParams, FrontendImpactedTargetsForExemptionQueryQueryParams, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
5
15
  export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
6
16
  export type { FrontendIssueForExemptionErrorResponse, FrontendIssueForExemptionOkResponse, FrontendIssueForExemptionProps, FrontendIssueForExemptionQueryPathParams, FrontendIssueForExemptionQueryQueryParams, } from './hooks/useFrontendIssueForExemptionQuery';
7
17
  export { frontendIssueForExemption, useFrontendIssueForExemptionQuery, } from './hooks/useFrontendIssueForExemptionQuery';
18
+ export type { FrontendSecurityReviewErrorResponse, FrontendSecurityReviewOkResponse, FrontendSecurityReviewProps, FrontendSecurityReviewQueryQueryParams, } from './hooks/useFrontendSecurityReviewQuery';
19
+ export { frontendSecurityReview, useFrontendSecurityReviewQuery, } from './hooks/useFrontendSecurityReviewQuery';
20
+ export type { IssuesIssuesAugmentRemediationErrorResponse, IssuesIssuesAugmentRemediationMutationPathParams, IssuesIssuesAugmentRemediationMutationQueryParams, IssuesIssuesAugmentRemediationOkResponse, IssuesIssuesAugmentRemediationProps, IssuesIssuesAugmentRemediationRequestBody, } from './hooks/useIssuesIssuesAugmentRemediationMutation';
21
+ export { issuesIssuesAugmentRemediation, useIssuesIssuesAugmentRemediationMutation, } from './hooks/useIssuesIssuesAugmentRemediationMutation';
8
22
  export type { ScansScanIssueOccurrencesErrorResponse, ScansScanIssueOccurrencesOkResponse, ScansScanIssueOccurrencesProps, ScansScanIssueOccurrencesQueryPathParams, ScansScanIssueOccurrencesQueryQueryParams, } from './hooks/useScansScanIssueOccurrencesQuery';
9
23
  export { scansScanIssueOccurrences, useScansScanIssueOccurrencesQuery, } from './hooks/useScansScanIssueOccurrencesQuery';
10
- export type { TargetsDeleteTargetErrorResponse, TargetsDeleteTargetMutationPathParams, TargetsDeleteTargetMutationQueryParams, TargetsDeleteTargetOkResponse, TargetsDeleteTargetProps, } from './hooks/useTargetsDeleteTargetMutation';
11
- export { targetsDeleteTarget, useTargetsDeleteTargetMutation, } from './hooks/useTargetsDeleteTargetMutation';
24
+ export type { TargetsFindTargetByIdErrorResponse, TargetsFindTargetByIdOkResponse, TargetsFindTargetByIdProps, TargetsFindTargetByIdQueryPathParams, TargetsFindTargetByIdQueryQueryParams, } from './hooks/useTargetsFindTargetByIdQuery';
25
+ export { targetsFindTargetById, useTargetsFindTargetByIdQuery, } from './hooks/useTargetsFindTargetByIdQuery';
26
+ export type { AugmentRemediationMetadata } from './schemas/AugmentRemediationMetadata';
27
+ export type { AugmentRemediationResult } from './schemas/AugmentRemediationResult';
28
+ export type { AugmentRemediationWarning } from './schemas/AugmentRemediationWarning';
29
+ export type { CreateExemptionRequestBody } from './schemas/CreateExemptionRequestBody';
30
+ export type { Exemption } from './schemas/Exemption';
12
31
  export type { ExemptionImpactedTargetsResult } from './schemas/ExemptionImpactedTargetsResult';
32
+ export type { ExemptionsCreateExemptionResponseBody } from './schemas/ExemptionsCreateExemptionResponseBody';
33
+ export type { ExemptionsListExemptionsResponseBody } from './schemas/ExemptionsListExemptionsResponseBody';
34
+ export type { FrontendExemption } from './schemas/FrontendExemption';
35
+ export type { FrontendExemptionCounts } from './schemas/FrontendExemptionCounts';
13
36
  export type { FrontendExemptionTargets } from './schemas/FrontendExemptionTargets';
37
+ export type { FrontendExpiringExemptionsResponseBody } from './schemas/FrontendExpiringExemptionsResponseBody';
14
38
  export type { FrontendImpactedTargetsForExemptionResponseBody } from './schemas/FrontendImpactedTargetsForExemptionResponseBody';
15
39
  export type { FrontendIssueForExemptionResponseBody } from './schemas/FrontendIssueForExemptionResponseBody';
40
+ export type { FrontendSecurityReviewResponseBody } from './schemas/FrontendSecurityReviewResponseBody';
16
41
  export type { GitMetadata } from './schemas/GitMetadata';
42
+ export type { IdResult } from './schemas/IdResult';
17
43
  export type { IssueForExemptionResult } from './schemas/IssueForExemptionResult';
18
44
  export type { IssueInScan } from './schemas/IssueInScan';
45
+ export type { IssueSummaries } from './schemas/IssueSummaries';
46
+ export type { IssueSummary } from './schemas/IssueSummary';
47
+ export type { IssuesAugmentRemediationRequestBody } from './schemas/IssuesAugmentRemediationRequestBody';
48
+ export type { IssuesIssuesAugmentRemediationResponseBody } from './schemas/IssuesIssuesAugmentRemediationResponseBody';
19
49
  export type { NotFound } from './schemas/NotFound';
20
50
  export type { Pagination } from './schemas/Pagination';
51
+ export type { PendingChanges } from './schemas/PendingChanges';
21
52
  export type { ScansScanIssueResponseBody } from './schemas/ScansScanIssueResponseBody';
53
+ export type { SecurityReviewResult } from './schemas/SecurityReviewResult';
54
+ export type { Target } from './schemas/Target';
@@ -1,5 +1,12 @@
1
+ export { exemptionsCreateExemption, useExemptionsCreateExemptionMutation, } from './hooks/useExemptionsCreateExemptionMutation';
1
2
  export { exemptionsDeleteExemption, useExemptionsDeleteExemptionMutation, } from './hooks/useExemptionsDeleteExemptionMutation';
3
+ export { exemptionsFindExemptionById, useExemptionsFindExemptionByIdQuery, } from './hooks/useExemptionsFindExemptionByIdQuery';
4
+ export { exemptionsListExemptions, useExemptionsListExemptionsQuery, } from './hooks/useExemptionsListExemptionsQuery';
5
+ export { frontendExpiringExemptions, useFrontendExpiringExemptionsQuery, } from './hooks/useFrontendExpiringExemptionsQuery';
6
+ export { frontendGlobalExemptions, useFrontendGlobalExemptionsQuery, } from './hooks/useFrontendGlobalExemptionsQuery';
2
7
  export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
3
8
  export { frontendIssueForExemption, useFrontendIssueForExemptionQuery, } from './hooks/useFrontendIssueForExemptionQuery';
9
+ export { frontendSecurityReview, useFrontendSecurityReviewQuery, } from './hooks/useFrontendSecurityReviewQuery';
10
+ export { issuesIssuesAugmentRemediation, useIssuesIssuesAugmentRemediationMutation, } from './hooks/useIssuesIssuesAugmentRemediationMutation';
4
11
  export { scansScanIssueOccurrences, useScansScanIssueOccurrencesQuery, } from './hooks/useScansScanIssueOccurrencesQuery';
5
- export { targetsDeleteTarget, useTargetsDeleteTargetMutation, } from './hooks/useTargetsDeleteTargetMutation';
12
+ export { targetsFindTargetById, useTargetsFindTargetByIdQuery, } from './hooks/useTargetsFindTargetByIdQuery';
@@ -0,0 +1,10 @@
1
+ import type { AugmentRemediationWarning } from '../schemas/AugmentRemediationWarning';
2
+ /**
3
+ * @example {"warnings":[{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."},{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."},{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."}]}
4
+ */
5
+ export interface AugmentRemediationMetadata {
6
+ /**
7
+ * @example [{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."},{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."},{"message":"Fugiat quia architecto et earum.","source":"Est consequatur et."}]
8
+ */
9
+ warnings: AugmentRemediationWarning[];
10
+ }