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

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 (127) hide show
  1. package/dist/sto-core/src/services/hooks/useExemptionsApproveExemptionMutation.d.ts +54 -0
  2. package/dist/sto-core/src/services/hooks/useExemptionsApproveExemptionMutation.js +14 -0
  3. package/dist/sto-core/src/services/hooks/useExemptionsPromoteExemptionMutation.d.ts +49 -0
  4. package/dist/sto-core/src/services/hooks/useExemptionsPromoteExemptionMutation.js +14 -0
  5. package/dist/sto-core/src/services/hooks/useExemptionsUpdateExemptionMutation.d.ts +49 -0
  6. package/dist/sto-core/src/services/hooks/useExemptionsUpdateExemptionMutation.js +14 -0
  7. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesDetailsQuery.d.ts +61 -0
  8. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesDetailsQuery.js +14 -0
  9. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesFiltersQuery.d.ts +32 -0
  10. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesFiltersQuery.js +14 -0
  11. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesListQuery.d.ts +78 -0
  12. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesListQuery.js +14 -0
  13. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesOccurrenceDetailsQuery.d.ts +62 -0
  14. package/dist/sto-core/src/services/hooks/useFrontendAllIssuesOccurrenceDetailsQuery.js +14 -0
  15. package/dist/sto-core/src/services/hooks/useFrontendIssueSeverityChangeQuery.d.ts +49 -0
  16. package/dist/sto-core/src/services/hooks/useFrontendIssueSeverityChangeQuery.js +14 -0
  17. package/dist/sto-core/src/services/hooks/useFrontendOverviewBaselinesQuery.d.ts +32 -0
  18. package/dist/sto-core/src/services/hooks/useFrontendOverviewBaselinesQuery.js +14 -0
  19. package/dist/sto-core/src/services/hooks/useFrontendOverviewHistoricalCountsQuery.d.ts +39 -0
  20. package/dist/sto-core/src/services/hooks/useFrontendOverviewHistoricalCountsQuery.js +14 -0
  21. package/dist/sto-core/src/services/hooks/useFrontendPipelineSecurityIssuesQuery.d.ts +106 -0
  22. package/dist/sto-core/src/services/hooks/useFrontendPipelineSecurityIssuesQuery.js +14 -0
  23. package/dist/sto-core/src/services/hooks/useFrontendPipelineSecurityStepsQuery.d.ts +37 -0
  24. package/dist/sto-core/src/services/hooks/useFrontendPipelineSecurityStepsQuery.js +14 -0
  25. package/dist/sto-core/src/services/hooks/useFrontendTestTargetsQuery.d.ts +55 -0
  26. package/dist/sto-core/src/services/hooks/useFrontendTestTargetsQuery.js +14 -0
  27. package/dist/sto-core/src/services/hooks/useIssuesFindIssueByIdQuery.d.ts +51 -0
  28. package/dist/sto-core/src/services/hooks/useIssuesFindIssueByIdQuery.js +14 -0
  29. package/dist/sto-core/src/services/hooks/usePullRequestsCreatePullRequestMutation.d.ts +54 -0
  30. package/dist/sto-core/src/services/hooks/usePullRequestsCreatePullRequestMutation.js +14 -0
  31. package/dist/sto-core/src/services/hooks/usePullRequestsGetPullRequestCorrelationQuery.d.ts +60 -0
  32. package/dist/sto-core/src/services/hooks/usePullRequestsGetPullRequestCorrelationQuery.js +14 -0
  33. package/dist/sto-core/src/services/hooks/usePullRequestsUpdatePullRequestMutation.d.ts +54 -0
  34. package/dist/sto-core/src/services/hooks/usePullRequestsUpdatePullRequestMutation.js +14 -0
  35. package/dist/sto-core/src/services/hooks/useScansScanIssueQuery.d.ts +75 -0
  36. package/dist/sto-core/src/services/hooks/useScansScanIssueQuery.js +14 -0
  37. package/dist/sto-core/src/services/hooks/useTargetsPatchTargetMutation.d.ts +49 -0
  38. package/dist/sto-core/src/services/hooks/useTargetsPatchTargetMutation.js +14 -0
  39. package/dist/sto-core/src/services/index.d.ts +81 -0
  40. package/dist/sto-core/src/services/index.js +19 -0
  41. package/dist/sto-core/src/services/schemas/AllIssueSummary.d.ts +67 -0
  42. package/dist/sto-core/src/services/schemas/AllIssueSummary.js +4 -0
  43. package/dist/sto-core/src/services/schemas/AllIssuesDetailsResult.d.ts +62 -0
  44. package/dist/sto-core/src/services/schemas/AllIssuesDetailsResult.js +1 -0
  45. package/dist/sto-core/src/services/schemas/AllIssuesFiltersResult.d.ts +10 -0
  46. package/dist/sto-core/src/services/schemas/AllIssuesFiltersResult.js +1 -0
  47. package/dist/sto-core/src/services/schemas/AllIssuesListResult.d.ts +13 -0
  48. package/dist/sto-core/src/services/schemas/AllIssuesListResult.js +1 -0
  49. package/dist/sto-core/src/services/schemas/AllIssuesOccurrenceDetailsResult.d.ts +60 -0
  50. package/dist/sto-core/src/services/schemas/AllIssuesOccurrenceDetailsResult.js +1 -0
  51. package/dist/sto-core/src/services/schemas/ApproveExemptionRequestBody.d.ts +10 -0
  52. package/dist/sto-core/src/services/schemas/ApproveExemptionRequestBody.js +4 -0
  53. package/dist/sto-core/src/services/schemas/BaselineExecutions.d.ts +10 -0
  54. package/dist/sto-core/src/services/schemas/BaselineExecutions.js +4 -0
  55. package/dist/sto-core/src/services/schemas/CreatePullRequestRequestBody.d.ts +58 -0
  56. package/dist/sto-core/src/services/schemas/CreatePullRequestRequestBody.js +4 -0
  57. package/dist/sto-core/src/services/schemas/FrontendAllIssuesDetailsResponseBody.d.ts +2 -0
  58. package/dist/sto-core/src/services/schemas/FrontendAllIssuesDetailsResponseBody.js +1 -0
  59. package/dist/sto-core/src/services/schemas/FrontendAllIssuesFiltersResponseBody.d.ts +2 -0
  60. package/dist/sto-core/src/services/schemas/FrontendAllIssuesFiltersResponseBody.js +1 -0
  61. package/dist/sto-core/src/services/schemas/FrontendAllIssuesListResponseBody.d.ts +2 -0
  62. package/dist/sto-core/src/services/schemas/FrontendAllIssuesListResponseBody.js +1 -0
  63. package/dist/sto-core/src/services/schemas/FrontendAllIssuesOccurrenceDetailsResponseBody.d.ts +2 -0
  64. package/dist/sto-core/src/services/schemas/FrontendAllIssuesOccurrenceDetailsResponseBody.js +1 -0
  65. package/dist/sto-core/src/services/schemas/FrontendIssueCounts.d.ts +47 -0
  66. package/dist/sto-core/src/services/schemas/FrontendIssueCounts.js +4 -0
  67. package/dist/sto-core/src/services/schemas/FrontendIssueSeverityChangeResponseBody.d.ts +2 -0
  68. package/dist/sto-core/src/services/schemas/FrontendIssueSeverityChangeResponseBody.js +1 -0
  69. package/dist/sto-core/src/services/schemas/FrontendOverviewBaselinesResponseBody.d.ts +2 -0
  70. package/dist/sto-core/src/services/schemas/FrontendOverviewBaselinesResponseBody.js +1 -0
  71. package/dist/sto-core/src/services/schemas/FrontendOverviewHistoricalCountsResponseBody.d.ts +2 -0
  72. package/dist/sto-core/src/services/schemas/FrontendOverviewHistoricalCountsResponseBody.js +1 -0
  73. package/dist/sto-core/src/services/schemas/FrontendPipelineSecurityIssuesResponseBody.d.ts +2 -0
  74. package/dist/sto-core/src/services/schemas/FrontendPipelineSecurityIssuesResponseBody.js +1 -0
  75. package/dist/sto-core/src/services/schemas/FrontendPipelineSecurityStepsResponseBody.d.ts +2 -0
  76. package/dist/sto-core/src/services/schemas/FrontendPipelineSecurityStepsResponseBody.js +1 -0
  77. package/dist/sto-core/src/services/schemas/FrontendTestTargetsResponseBody.d.ts +2 -0
  78. package/dist/sto-core/src/services/schemas/FrontendTestTargetsResponseBody.js +1 -0
  79. package/dist/sto-core/src/services/schemas/HistoricalCounts.d.ts +11 -0
  80. package/dist/sto-core/src/services/schemas/HistoricalCounts.js +1 -0
  81. package/dist/sto-core/src/services/schemas/HistoricalIssueCounts.d.ts +18 -0
  82. package/dist/sto-core/src/services/schemas/HistoricalIssueCounts.js +1 -0
  83. package/dist/sto-core/src/services/schemas/ImpactedTarget.d.ts +47 -0
  84. package/dist/sto-core/src/services/schemas/ImpactedTarget.js +4 -0
  85. package/dist/sto-core/src/services/schemas/Issue.d.ts +140 -0
  86. package/dist/sto-core/src/services/schemas/Issue.js +4 -0
  87. package/dist/sto-core/src/services/schemas/IssueSeverityChangeResult.d.ts +15 -0
  88. package/dist/sto-core/src/services/schemas/IssueSeverityChangeResult.js +4 -0
  89. package/dist/sto-core/src/services/schemas/LatestBaselineScanInfo.d.ts +30 -0
  90. package/dist/sto-core/src/services/schemas/LatestBaselineScanInfo.js +4 -0
  91. package/dist/sto-core/src/services/schemas/MinimalIssueCounts.d.ts +42 -0
  92. package/dist/sto-core/src/services/schemas/MinimalIssueCounts.js +4 -0
  93. package/dist/sto-core/src/services/schemas/PaginatedIssueSummaries.d.ts +13 -0
  94. package/dist/sto-core/src/services/schemas/PaginatedIssueSummaries.js +1 -0
  95. package/dist/sto-core/src/services/schemas/PatchTargetRequestBody.d.ts +35 -0
  96. package/dist/sto-core/src/services/schemas/PatchTargetRequestBody.js +4 -0
  97. package/dist/sto-core/src/services/schemas/PipelineSecurityCounts.d.ts +39 -0
  98. package/dist/sto-core/src/services/schemas/PipelineSecurityCounts.js +1 -0
  99. package/dist/sto-core/src/services/schemas/PipelineSecurityIssuesResult.d.ts +16 -0
  100. package/dist/sto-core/src/services/schemas/PipelineSecurityIssuesResult.js +1 -0
  101. package/dist/sto-core/src/services/schemas/PipelineSecurityStepsResult.d.ts +10 -0
  102. package/dist/sto-core/src/services/schemas/PipelineSecurityStepsResult.js +1 -0
  103. package/dist/sto-core/src/services/schemas/PromoteExemptionRequestBody.d.ts +20 -0
  104. package/dist/sto-core/src/services/schemas/PromoteExemptionRequestBody.js +4 -0
  105. package/dist/sto-core/src/services/schemas/PullRequestCorrelationResult.d.ts +10 -0
  106. package/dist/sto-core/src/services/schemas/PullRequestCorrelationResult.js +4 -0
  107. package/dist/sto-core/src/services/schemas/PullRequestResult.d.ts +21 -0
  108. package/dist/sto-core/src/services/schemas/PullRequestResult.js +4 -0
  109. package/dist/sto-core/src/services/schemas/PullRequestsGetPullRequestCorrelationResponseBody.d.ts +2 -0
  110. package/dist/sto-core/src/services/schemas/PullRequestsGetPullRequestCorrelationResponseBody.js +1 -0
  111. package/dist/sto-core/src/services/schemas/RefIds.d.ts +13 -0
  112. package/dist/sto-core/src/services/schemas/RefIds.js +4 -0
  113. package/dist/sto-core/src/services/schemas/StageStepId.d.ts +13 -0
  114. package/dist/sto-core/src/services/schemas/StageStepId.js +4 -0
  115. package/dist/sto-core/src/services/schemas/StepInfo.d.ts +54 -0
  116. package/dist/sto-core/src/services/schemas/StepInfo.js +4 -0
  117. package/dist/sto-core/src/services/schemas/TestTarget.d.ts +48 -0
  118. package/dist/sto-core/src/services/schemas/TestTarget.js +1 -0
  119. package/dist/sto-core/src/services/schemas/TestTargetResult.d.ts +14 -0
  120. package/dist/sto-core/src/services/schemas/TestTargetResult.js +1 -0
  121. package/dist/sto-core/src/services/schemas/TestTargetVariant.d.ts +16 -0
  122. package/dist/sto-core/src/services/schemas/TestTargetVariant.js +4 -0
  123. package/dist/sto-core/src/services/schemas/UpdateExemptionRequestBody.d.ts +43 -0
  124. package/dist/sto-core/src/services/schemas/UpdateExemptionRequestBody.js +1 -0
  125. package/dist/sto-core/src/services/schemas/UpdatePullRequestRequestBody.d.ts +55 -0
  126. package/dist/sto-core/src/services/schemas/UpdatePullRequestRequestBody.js +4 -0
  127. package/package.json +1 -1
@@ -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 frontendOverviewHistoricalCounts(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/overview/historical-counts`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides historical issue data needed by the Overview page
11
+ */
12
+ export function useFrontendOverviewHistoricalCountsQuery(props, options) {
13
+ return useQuery(['Frontend#OverviewHistoricalCounts', props.queryParams], ({ signal }) => frontendOverviewHistoricalCounts(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,106 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendPipelineSecurityIssuesResponseBody } from '../schemas/FrontendPipelineSecurityIssuesResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendPipelineSecurityIssuesQueryQueryParams {
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
+ * Harness Execution ID
24
+ * @example "abcdef1234567890ghijkl"
25
+ */
26
+ executionId: string;
27
+ /**
28
+ * Page number to fetch (starting from 0)
29
+ * @format int64
30
+ * @default 0
31
+ * @example 4
32
+ */
33
+ pageExisting?: number;
34
+ /**
35
+ * Number of results per page
36
+ * @format int64
37
+ * @default 50
38
+ * @example 50
39
+ */
40
+ pageSizeExisting?: number;
41
+ /**
42
+ * Page number to fetch (starting from 0)
43
+ * @format int64
44
+ * @default 0
45
+ * @example 4
46
+ */
47
+ pageNew?: number;
48
+ /**
49
+ * Number of results per page
50
+ * @format int64
51
+ * @default 50
52
+ * @example 50
53
+ */
54
+ pageSizeNew?: number;
55
+ /**
56
+ * @example "stage1,stage2"
57
+ */
58
+ stages?: string;
59
+ /**
60
+ * @example "stageId.step1id,stageId.step2Id"
61
+ */
62
+ steps?: string;
63
+ /**
64
+ * @example "target1111111111111111,abcdef1234567890abcdef"
65
+ */
66
+ targetIds?: string;
67
+ /**
68
+ * @example "repository,container"
69
+ */
70
+ targetTypes?: string;
71
+ /**
72
+ * @example "owasp,zap"
73
+ */
74
+ productNames?: string;
75
+ /**
76
+ * @example "Critical,High,Medium"
77
+ */
78
+ severityCodes?: string;
79
+ /**
80
+ * @default true
81
+ * @example true
82
+ */
83
+ includeExempted?: boolean;
84
+ /**
85
+ * @example "CWE-123"
86
+ */
87
+ search?: string;
88
+ /**
89
+ * @example "SAST"
90
+ */
91
+ issueTypes?: string;
92
+ /**
93
+ * @example "active,remediated"
94
+ */
95
+ status?: string;
96
+ }
97
+ export type FrontendPipelineSecurityIssuesOkResponse = ResponseWithPagination<FrontendPipelineSecurityIssuesResponseBody>;
98
+ export type FrontendPipelineSecurityIssuesErrorResponse = NotFound;
99
+ export interface FrontendPipelineSecurityIssuesProps extends Omit<FetcherOptions<FrontendPipelineSecurityIssuesQueryQueryParams, unknown>, 'url'> {
100
+ queryParams: FrontendPipelineSecurityIssuesQueryQueryParams;
101
+ }
102
+ export declare function frontendPipelineSecurityIssues(props: FrontendPipelineSecurityIssuesProps): Promise<FrontendPipelineSecurityIssuesOkResponse>;
103
+ /**
104
+ * Provide issue data needed by the PipelineSecurityView
105
+ */
106
+ export declare function useFrontendPipelineSecurityIssuesQuery(props: FrontendPipelineSecurityIssuesProps, options?: Omit<UseQueryOptions<FrontendPipelineSecurityIssuesOkResponse, FrontendPipelineSecurityIssuesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendPipelineSecurityIssuesOkResponse, 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 frontendPipelineSecurityIssues(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/pipeline-security/issues`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provide issue data needed by the PipelineSecurityView
11
+ */
12
+ export function useFrontendPipelineSecurityIssuesQuery(props, options) {
13
+ return useQuery(['Frontend#PipelineSecurityIssues', props.queryParams], ({ signal }) => frontendPipelineSecurityIssues(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,37 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendPipelineSecurityStepsResponseBody } from '../schemas/FrontendPipelineSecurityStepsResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendPipelineSecurityStepsQueryQueryParams {
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
+ * Harness Execution ID
24
+ * @example "abcdef1234567890ghijkl"
25
+ */
26
+ executionId: string;
27
+ }
28
+ export type FrontendPipelineSecurityStepsOkResponse = ResponseWithPagination<FrontendPipelineSecurityStepsResponseBody>;
29
+ export type FrontendPipelineSecurityStepsErrorResponse = NotFound;
30
+ export interface FrontendPipelineSecurityStepsProps extends Omit<FetcherOptions<FrontendPipelineSecurityStepsQueryQueryParams, unknown>, 'url'> {
31
+ queryParams: FrontendPipelineSecurityStepsQueryQueryParams;
32
+ }
33
+ export declare function frontendPipelineSecuritySteps(props: FrontendPipelineSecurityStepsProps): Promise<FrontendPipelineSecurityStepsOkResponse>;
34
+ /**
35
+ * Provide step data needed by the PipelineSecurityView
36
+ */
37
+ export declare function useFrontendPipelineSecurityStepsQuery(props: FrontendPipelineSecurityStepsProps, options?: Omit<UseQueryOptions<FrontendPipelineSecurityStepsOkResponse, FrontendPipelineSecurityStepsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendPipelineSecurityStepsOkResponse, 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 frontendPipelineSecuritySteps(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/pipeline-security/steps`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provide step data needed by the PipelineSecurityView
11
+ */
12
+ export function useFrontendPipelineSecurityStepsQuery(props, options) {
13
+ return useQuery(['Frontend#PipelineSecuritySteps', props.queryParams], ({ signal }) => frontendPipelineSecuritySteps(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,55 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendTestTargetsResponseBody } from '../schemas/FrontendTestTargetsResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendTestTargetsQueryQueryParams {
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
+ * @example "The Target"
38
+ */
39
+ search?: string;
40
+ /**
41
+ * Associated Target ID
42
+ * @example "abcdef1234567890ghijkl"
43
+ */
44
+ targetId?: string;
45
+ }
46
+ export type FrontendTestTargetsOkResponse = ResponseWithPagination<FrontendTestTargetsResponseBody>;
47
+ export type FrontendTestTargetsErrorResponse = NotFound;
48
+ export interface FrontendTestTargetsProps extends Omit<FetcherOptions<FrontendTestTargetsQueryQueryParams, unknown>, 'url'> {
49
+ queryParams: FrontendTestTargetsQueryQueryParams;
50
+ }
51
+ export declare function frontendTestTargets(props: FrontendTestTargetsProps): Promise<FrontendTestTargetsOkResponse>;
52
+ /**
53
+ * Provides data needed by the Test Targets page
54
+ */
55
+ export declare function useFrontendTestTargetsQuery(props: FrontendTestTargetsProps, options?: Omit<UseQueryOptions<FrontendTestTargetsOkResponse, FrontendTestTargetsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendTestTargetsOkResponse, 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 frontendTestTargets(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/test-targets`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides data needed by the Test Targets page
11
+ */
12
+ export function useFrontendTestTargetsQuery(props, options) {
13
+ return useQuery(['Frontend#TestTargets', props.queryParams], ({ signal }) => frontendTestTargets(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,51 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { Issue } from '../schemas/Issue';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface IssuesFindIssueByIdQueryPathParams {
7
+ /**
8
+ * The ID of the Security Issue to retrieve
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ id: string;
12
+ }
13
+ export interface IssuesFindIssueByIdQueryQueryParams {
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
+ * Associated Target ID
31
+ * @example "abcdef1234567890ghijkl"
32
+ */
33
+ targetId?: string;
34
+ }
35
+ export interface IssuesFindIssueByIdQueryHeaderParams {
36
+ /**
37
+ * Harness personal or service access token
38
+ * @example "Quis sunt illum laudantium sed exercitationem."
39
+ */
40
+ 'X-Api-Key'?: string;
41
+ }
42
+ export type IssuesFindIssueByIdOkResponse = ResponseWithPagination<Issue>;
43
+ export type IssuesFindIssueByIdErrorResponse = NotFound;
44
+ export interface IssuesFindIssueByIdProps extends IssuesFindIssueByIdQueryPathParams, Omit<FetcherOptions<IssuesFindIssueByIdQueryQueryParams, unknown, IssuesFindIssueByIdQueryHeaderParams>, 'url'> {
45
+ queryParams: IssuesFindIssueByIdQueryQueryParams;
46
+ }
47
+ export declare function issuesFindIssueById(props: IssuesFindIssueByIdProps): Promise<IssuesFindIssueByIdOkResponse>;
48
+ /**
49
+ * Find Security Issue by ID
50
+ */
51
+ export declare function useIssuesFindIssueByIdQuery(props: IssuesFindIssueByIdProps, options?: Omit<UseQueryOptions<IssuesFindIssueByIdOkResponse, IssuesFindIssueByIdErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<IssuesFindIssueByIdOkResponse, 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 issuesFindIssueById(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/issues/${props.id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Find Security Issue by ID
11
+ */
12
+ export function useIssuesFindIssueByIdQuery(props, options) {
13
+ return useQuery(['Issues#FindIssueById', props.id, props.queryParams], ({ signal }) => issuesFindIssueById(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,54 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { PullRequestResult } from '../schemas/PullRequestResult';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { CreatePullRequestRequestBody } from '../schemas/CreatePullRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface PullRequestsCreatePullRequestMutationQueryParams {
8
+ /**
9
+ * Harness Account ID
10
+ * @example "abcdef1234567890ghijkl"
11
+ */
12
+ accountId: string;
13
+ /**
14
+ * Harness Organization ID
15
+ * @example "example_org"
16
+ */
17
+ orgId?: string;
18
+ /**
19
+ * Harness Project ID
20
+ * @example "example_project"
21
+ */
22
+ projectId?: string;
23
+ /**
24
+ * @example "Github"
25
+ */
26
+ provider: string;
27
+ /**
28
+ * @example "1234567890abcdefghijkl"
29
+ */
30
+ connectorId?: string;
31
+ /**
32
+ * @example "Minima hic."
33
+ */
34
+ repositoryPath: string;
35
+ }
36
+ export interface PullRequestsCreatePullRequestMutationHeaderParams {
37
+ /**
38
+ * Harness personal or service access token
39
+ * @example "Qui quod iste accusamus aut velit rem."
40
+ */
41
+ 'X-Api-Key'?: string;
42
+ }
43
+ export type PullRequestsCreatePullRequestRequestBody = CreatePullRequestRequestBody;
44
+ export type PullRequestsCreatePullRequestOkResponse = ResponseWithPagination<PullRequestResult>;
45
+ export type PullRequestsCreatePullRequestErrorResponse = NotFound;
46
+ export interface PullRequestsCreatePullRequestProps extends Omit<FetcherOptions<PullRequestsCreatePullRequestMutationQueryParams, PullRequestsCreatePullRequestRequestBody, PullRequestsCreatePullRequestMutationHeaderParams>, 'url'> {
47
+ queryParams: PullRequestsCreatePullRequestMutationQueryParams;
48
+ body: PullRequestsCreatePullRequestRequestBody;
49
+ }
50
+ export declare function pullRequestsCreatePullRequest(props: PullRequestsCreatePullRequestProps): Promise<PullRequestsCreatePullRequestOkResponse>;
51
+ /**
52
+ * Use AI to augment the remediation steps for this Security Issue
53
+ */
54
+ export declare function usePullRequestsCreatePullRequestMutation(options?: Omit<UseMutationOptions<PullRequestsCreatePullRequestOkResponse, PullRequestsCreatePullRequestErrorResponse, PullRequestsCreatePullRequestProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PullRequestsCreatePullRequestOkResponse, NotFound, PullRequestsCreatePullRequestProps, 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 pullRequestsCreatePullRequest(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/pull-requests/repositories/pulls`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Use AI to augment the remediation steps for this Security Issue
11
+ */
12
+ export function usePullRequestsCreatePullRequestMutation(options) {
13
+ return useMutation((mutateProps) => pullRequestsCreatePullRequest(mutateProps), options);
14
+ }
@@ -0,0 +1,60 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { PullRequestsGetPullRequestCorrelationResponseBody } from '../schemas/PullRequestsGetPullRequestCorrelationResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface PullRequestsGetPullRequestCorrelationQueryQueryParams {
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
+ * @example "Github"
24
+ */
25
+ provider: string;
26
+ /**
27
+ * @example "1234567890abcdefghijkl"
28
+ */
29
+ connectorId?: string;
30
+ /**
31
+ * @example "Nihil illum."
32
+ */
33
+ repositoryPath: string;
34
+ /**
35
+ * @format int64
36
+ * @example 11
37
+ */
38
+ pullRequestNumber: number;
39
+ /**
40
+ * @example "path/to/code"
41
+ */
42
+ codePath: string;
43
+ }
44
+ export interface PullRequestsGetPullRequestCorrelationQueryHeaderParams {
45
+ /**
46
+ * Harness personal or service access token
47
+ * @example "Autem voluptate."
48
+ */
49
+ 'X-Api-Key'?: string;
50
+ }
51
+ export type PullRequestsGetPullRequestCorrelationOkResponse = ResponseWithPagination<PullRequestsGetPullRequestCorrelationResponseBody>;
52
+ export type PullRequestsGetPullRequestCorrelationErrorResponse = NotFound;
53
+ export interface PullRequestsGetPullRequestCorrelationProps extends Omit<FetcherOptions<PullRequestsGetPullRequestCorrelationQueryQueryParams, unknown, PullRequestsGetPullRequestCorrelationQueryHeaderParams>, 'url'> {
54
+ queryParams: PullRequestsGetPullRequestCorrelationQueryQueryParams;
55
+ }
56
+ export declare function pullRequestsGetPullRequestCorrelation(props: PullRequestsGetPullRequestCorrelationProps): Promise<PullRequestsGetPullRequestCorrelationOkResponse>;
57
+ /**
58
+ * Determine if a path is correlated to a Pull Request.
59
+ */
60
+ export declare function usePullRequestsGetPullRequestCorrelationQuery(props: PullRequestsGetPullRequestCorrelationProps, options?: Omit<UseQueryOptions<PullRequestsGetPullRequestCorrelationOkResponse, PullRequestsGetPullRequestCorrelationErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<PullRequestsGetPullRequestCorrelationOkResponse, 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 pullRequestsGetPullRequestCorrelation(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/pull-requests/repositories/pulls/correlation`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Determine if a path is correlated to a Pull Request.
11
+ */
12
+ export function usePullRequestsGetPullRequestCorrelationQuery(props, options) {
13
+ return useQuery(['Pull Requests#GetPullRequestCorrelation', props.queryParams], ({ signal }) => pullRequestsGetPullRequestCorrelation(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,54 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { PullRequestResult } from '../schemas/PullRequestResult';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { UpdatePullRequestRequestBody } from '../schemas/UpdatePullRequestRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface PullRequestsUpdatePullRequestMutationQueryParams {
8
+ /**
9
+ * Harness Account ID
10
+ * @example "abcdef1234567890ghijkl"
11
+ */
12
+ accountId: string;
13
+ /**
14
+ * Harness Organization ID
15
+ * @example "example_org"
16
+ */
17
+ orgId?: string;
18
+ /**
19
+ * Harness Project ID
20
+ * @example "example_project"
21
+ */
22
+ projectId?: string;
23
+ /**
24
+ * @example "Github"
25
+ */
26
+ provider: string;
27
+ /**
28
+ * @example "1234567890abcdefghijkl"
29
+ */
30
+ connectorId?: string;
31
+ /**
32
+ * @example "At quia est fugit."
33
+ */
34
+ repositoryPath: string;
35
+ }
36
+ export interface PullRequestsUpdatePullRequestMutationHeaderParams {
37
+ /**
38
+ * Harness personal or service access token
39
+ * @example "Fuga vitae animi."
40
+ */
41
+ 'X-Api-Key'?: string;
42
+ }
43
+ export type PullRequestsUpdatePullRequestRequestBody = UpdatePullRequestRequestBody;
44
+ export type PullRequestsUpdatePullRequestOkResponse = ResponseWithPagination<PullRequestResult>;
45
+ export type PullRequestsUpdatePullRequestErrorResponse = NotFound;
46
+ export interface PullRequestsUpdatePullRequestProps extends Omit<FetcherOptions<PullRequestsUpdatePullRequestMutationQueryParams, PullRequestsUpdatePullRequestRequestBody, PullRequestsUpdatePullRequestMutationHeaderParams>, 'url'> {
47
+ queryParams: PullRequestsUpdatePullRequestMutationQueryParams;
48
+ body: PullRequestsUpdatePullRequestRequestBody;
49
+ }
50
+ export declare function pullRequestsUpdatePullRequest(props: PullRequestsUpdatePullRequestProps): Promise<PullRequestsUpdatePullRequestOkResponse>;
51
+ /**
52
+ * Use AI to augment the remediation steps for this Security Issue
53
+ */
54
+ export declare function usePullRequestsUpdatePullRequestMutation(options?: Omit<UseMutationOptions<PullRequestsUpdatePullRequestOkResponse, PullRequestsUpdatePullRequestErrorResponse, PullRequestsUpdatePullRequestProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<PullRequestsUpdatePullRequestOkResponse, NotFound, PullRequestsUpdatePullRequestProps, 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 pullRequestsUpdatePullRequest(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/pull-requests/repositories/pulls`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Use AI to augment the remediation steps for this Security Issue
11
+ */
12
+ export function usePullRequestsUpdatePullRequestMutation(options) {
13
+ return useMutation((mutateProps) => pullRequestsUpdatePullRequest(mutateProps), options);
14
+ }
@@ -0,0 +1,75 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ScansScanIssueResponseBody } from '../schemas/ScansScanIssueResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ScansScanIssueQueryPathParams {
7
+ /**
8
+ * The ID of the Security Test Scan
9
+ * @example "Voluptatem omnis alias fugit."
10
+ */
11
+ id: string;
12
+ /**
13
+ * The ID of the Security Test Issue
14
+ * @example "Reprehenderit non tempore asperiores eius impedit earum."
15
+ */
16
+ issueId: string;
17
+ }
18
+ export interface ScansScanIssueQueryQueryParams {
19
+ /**
20
+ * Harness Account ID
21
+ * @example "abcdef1234567890ghijkl"
22
+ */
23
+ accountId: string;
24
+ /**
25
+ * Harness Organization ID
26
+ * @example "example_org"
27
+ */
28
+ orgId?: string;
29
+ /**
30
+ * Harness Project ID
31
+ * @example "example_project"
32
+ */
33
+ projectId?: string;
34
+ /**
35
+ * Page number to fetch (starting from 0)
36
+ * @format int64
37
+ * @default 0
38
+ * @example 4
39
+ */
40
+ page?: number;
41
+ /**
42
+ * Number of results per page
43
+ * @format int64
44
+ * @default 30
45
+ * @example 50
46
+ */
47
+ pageSize?: number;
48
+ /**
49
+ * The field to sort by
50
+ * @example "Non necessitatibus et culpa."
51
+ */
52
+ sort?: string;
53
+ /**
54
+ * The order to sort by
55
+ * @example "ASC"
56
+ */
57
+ order?: 'ASC' | 'DESC';
58
+ }
59
+ export interface ScansScanIssueQueryHeaderParams {
60
+ /**
61
+ * Harness personal or service access token
62
+ * @example "Voluptatibus ut non autem."
63
+ */
64
+ 'X-Api-Key'?: string;
65
+ }
66
+ export type ScansScanIssueOkResponse = ResponseWithPagination<ScansScanIssueResponseBody>;
67
+ export type ScansScanIssueErrorResponse = NotFound;
68
+ export interface ScansScanIssueProps extends ScansScanIssueQueryPathParams, Omit<FetcherOptions<ScansScanIssueQueryQueryParams, unknown, ScansScanIssueQueryHeaderParams>, 'url'> {
69
+ queryParams: ScansScanIssueQueryQueryParams;
70
+ }
71
+ export declare function scansScanIssue(props: ScansScanIssueProps): Promise<ScansScanIssueOkResponse>;
72
+ /**
73
+ * Returns a scan specific issue
74
+ */
75
+ export declare function useScansScanIssueQuery(props: ScansScanIssueProps, options?: Omit<UseQueryOptions<ScansScanIssueOkResponse, ScansScanIssueErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ScansScanIssueOkResponse, 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 scansScanIssue(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/scans/${props.id}/issue/${props.issueId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns a scan specific issue
11
+ */
12
+ export function useScansScanIssueQuery(props, options) {
13
+ return useQuery(['Scans#ScanIssue', props.id, props.issueId, props.queryParams], ({ signal }) => scansScanIssue(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }