@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,54 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { Exemption } from '../schemas/Exemption';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ApproveExemptionRequestBody } from '../schemas/ApproveExemptionRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface ExemptionsApproveExemptionMutationPathParams {
8
+ /**
9
+ * The ID of the Exemption to update
10
+ * @example "abcdef1234567890ghijkl"
11
+ */
12
+ id: string;
13
+ /**
14
+ * The approval action to take on the Exemption
15
+ * @example "approve"
16
+ */
17
+ action: 'approve' | 'reject';
18
+ }
19
+ export interface ExemptionsApproveExemptionMutationQueryParams {
20
+ /**
21
+ * Harness Account ID
22
+ * @example "abcdef1234567890ghijkl"
23
+ */
24
+ accountId: string;
25
+ /**
26
+ * Harness Organization ID
27
+ * @example "example_org"
28
+ */
29
+ orgId?: string;
30
+ /**
31
+ * Harness Project ID
32
+ * @example "example_project"
33
+ */
34
+ projectId?: string;
35
+ }
36
+ export interface ExemptionsApproveExemptionMutationHeaderParams {
37
+ /**
38
+ * Harness personal or service access token
39
+ * @example "Aut quis doloribus facere."
40
+ */
41
+ 'X-Api-Key'?: string;
42
+ }
43
+ export type ExemptionsApproveExemptionRequestBody = ApproveExemptionRequestBody;
44
+ export type ExemptionsApproveExemptionOkResponse = ResponseWithPagination<Exemption>;
45
+ export type ExemptionsApproveExemptionErrorResponse = NotFound;
46
+ export interface ExemptionsApproveExemptionProps extends ExemptionsApproveExemptionMutationPathParams, Omit<FetcherOptions<ExemptionsApproveExemptionMutationQueryParams, ExemptionsApproveExemptionRequestBody, ExemptionsApproveExemptionMutationHeaderParams>, 'url'> {
47
+ queryParams: ExemptionsApproveExemptionMutationQueryParams;
48
+ body: ExemptionsApproveExemptionRequestBody;
49
+ }
50
+ export declare function exemptionsApproveExemption(props: ExemptionsApproveExemptionProps): Promise<ExemptionsApproveExemptionOkResponse>;
51
+ /**
52
+ * Approve/reject an existing Exemption
53
+ */
54
+ export declare function useExemptionsApproveExemptionMutation(options?: Omit<UseMutationOptions<ExemptionsApproveExemptionOkResponse, ExemptionsApproveExemptionErrorResponse, ExemptionsApproveExemptionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ExemptionsApproveExemptionOkResponse, NotFound, ExemptionsApproveExemptionProps, 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 exemptionsApproveExemption(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/exemptions/${props.id}/${props.action}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Approve/reject an existing Exemption
11
+ */
12
+ export function useExemptionsApproveExemptionMutation(options) {
13
+ return useMutation((mutateProps) => exemptionsApproveExemption(mutateProps), options);
14
+ }
@@ -0,0 +1,49 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { Exemption } from '../schemas/Exemption';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { PromoteExemptionRequestBody } from '../schemas/PromoteExemptionRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface ExemptionsPromoteExemptionMutationPathParams {
8
+ /**
9
+ * The ID of the Exemption to promote
10
+ * @example "abcdef1234567890ghijkl"
11
+ */
12
+ id: string;
13
+ }
14
+ export interface ExemptionsPromoteExemptionMutationQueryParams {
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 ExemptionsPromoteExemptionMutationHeaderParams {
32
+ /**
33
+ * Harness personal or service access token
34
+ * @example "Ducimus adipisci ea."
35
+ */
36
+ 'X-Api-Key'?: string;
37
+ }
38
+ export type ExemptionsPromoteExemptionRequestBody = PromoteExemptionRequestBody;
39
+ export type ExemptionsPromoteExemptionOkResponse = ResponseWithPagination<Exemption>;
40
+ export type ExemptionsPromoteExemptionErrorResponse = NotFound;
41
+ export interface ExemptionsPromoteExemptionProps extends ExemptionsPromoteExemptionMutationPathParams, Omit<FetcherOptions<ExemptionsPromoteExemptionMutationQueryParams, ExemptionsPromoteExemptionRequestBody, ExemptionsPromoteExemptionMutationHeaderParams>, 'url'> {
42
+ queryParams: ExemptionsPromoteExemptionMutationQueryParams;
43
+ body: ExemptionsPromoteExemptionRequestBody;
44
+ }
45
+ export declare function exemptionsPromoteExemption(props: ExemptionsPromoteExemptionProps): Promise<ExemptionsPromoteExemptionOkResponse>;
46
+ /**
47
+ * Promote an existing Exemption to a higher scope
48
+ */
49
+ export declare function useExemptionsPromoteExemptionMutation(options?: Omit<UseMutationOptions<ExemptionsPromoteExemptionOkResponse, ExemptionsPromoteExemptionErrorResponse, ExemptionsPromoteExemptionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ExemptionsPromoteExemptionOkResponse, NotFound, ExemptionsPromoteExemptionProps, 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 exemptionsPromoteExemption(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/exemptions/${props.id}/promote`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Promote an existing Exemption to a higher scope
11
+ */
12
+ export function useExemptionsPromoteExemptionMutation(options) {
13
+ return useMutation((mutateProps) => exemptionsPromoteExemption(mutateProps), options);
14
+ }
@@ -0,0 +1,49 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { Exemption } from '../schemas/Exemption';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { UpdateExemptionRequestBody } from '../schemas/UpdateExemptionRequestBody';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface ExemptionsUpdateExemptionMutationPathParams {
8
+ /**
9
+ * The ID of the Exemption to update
10
+ * @example "abcdef1234567890ghijkl"
11
+ */
12
+ id: string;
13
+ }
14
+ export interface ExemptionsUpdateExemptionMutationQueryParams {
15
+ /**
16
+ * Harness Account ID
17
+ * @example "abcdef1234567890ghijkl"
18
+ */
19
+ accountId: string;
20
+ /**
21
+ * ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
22
+ * @example "your_project"
23
+ */
24
+ orgId?: string;
25
+ /**
26
+ * ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
27
+ * @example "your_project"
28
+ */
29
+ projectId?: string;
30
+ }
31
+ export interface ExemptionsUpdateExemptionMutationHeaderParams {
32
+ /**
33
+ * Harness personal or service access token
34
+ * @example "Adipisci ut."
35
+ */
36
+ 'X-Api-Key'?: string;
37
+ }
38
+ export type ExemptionsUpdateExemptionRequestBody = UpdateExemptionRequestBody;
39
+ export type ExemptionsUpdateExemptionOkResponse = ResponseWithPagination<Exemption>;
40
+ export type ExemptionsUpdateExemptionErrorResponse = NotFound;
41
+ export interface ExemptionsUpdateExemptionProps extends ExemptionsUpdateExemptionMutationPathParams, Omit<FetcherOptions<ExemptionsUpdateExemptionMutationQueryParams, ExemptionsUpdateExemptionRequestBody, ExemptionsUpdateExemptionMutationHeaderParams>, 'url'> {
42
+ queryParams: ExemptionsUpdateExemptionMutationQueryParams;
43
+ body: ExemptionsUpdateExemptionRequestBody;
44
+ }
45
+ export declare function exemptionsUpdateExemption(props: ExemptionsUpdateExemptionProps): Promise<ExemptionsUpdateExemptionOkResponse>;
46
+ /**
47
+ * Update an existing Exemption
48
+ */
49
+ export declare function useExemptionsUpdateExemptionMutation(options?: Omit<UseMutationOptions<ExemptionsUpdateExemptionOkResponse, ExemptionsUpdateExemptionErrorResponse, ExemptionsUpdateExemptionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ExemptionsUpdateExemptionOkResponse, NotFound, ExemptionsUpdateExemptionProps, 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 exemptionsUpdateExemption(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/exemptions/${props.id}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Update an existing Exemption
11
+ */
12
+ export function useExemptionsUpdateExemptionMutation(options) {
13
+ return useMutation((mutateProps) => exemptionsUpdateExemption(mutateProps), options);
14
+ }
@@ -0,0 +1,61 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendAllIssuesDetailsResponseBody } from '../schemas/FrontendAllIssuesDetailsResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendAllIssuesDetailsQueryPathParams {
7
+ /**
8
+ * The ID of the Security Issue
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ issueId: string;
12
+ }
13
+ export interface FrontendAllIssuesDetailsQueryQueryParams {
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
+ * @example "None,Pending,Rejected,Expired"
31
+ */
32
+ exemptionStatuses?: string;
33
+ /**
34
+ * @example "A Target Name"
35
+ */
36
+ search?: string;
37
+ /**
38
+ * Page number to fetch (starting from 0)
39
+ * @format int64
40
+ * @default 0
41
+ * @example 4
42
+ */
43
+ page?: number;
44
+ /**
45
+ * Number of results per page
46
+ * @format int64
47
+ * @default 30
48
+ * @example 50
49
+ */
50
+ pageSize?: number;
51
+ }
52
+ export type FrontendAllIssuesDetailsOkResponse = ResponseWithPagination<FrontendAllIssuesDetailsResponseBody>;
53
+ export type FrontendAllIssuesDetailsErrorResponse = NotFound;
54
+ export interface FrontendAllIssuesDetailsProps extends FrontendAllIssuesDetailsQueryPathParams, Omit<FetcherOptions<FrontendAllIssuesDetailsQueryQueryParams, unknown>, 'url'> {
55
+ queryParams: FrontendAllIssuesDetailsQueryQueryParams;
56
+ }
57
+ export declare function frontendAllIssuesDetails(props: FrontendAllIssuesDetailsProps): Promise<FrontendAllIssuesDetailsOkResponse>;
58
+ /**
59
+ * Provides issue details for a project's latest baseline scans
60
+ */
61
+ export declare function useFrontendAllIssuesDetailsQuery(props: FrontendAllIssuesDetailsProps, options?: Omit<UseQueryOptions<FrontendAllIssuesDetailsOkResponse, FrontendAllIssuesDetailsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendAllIssuesDetailsOkResponse, 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 frontendAllIssuesDetails(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/all-issues/issues/${props.issueId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides issue details for a project's latest baseline scans
11
+ */
12
+ export function useFrontendAllIssuesDetailsQuery(props, options) {
13
+ return useQuery(['Frontend#AllIssuesDetails', props.issueId, props.queryParams], ({ signal }) => frontendAllIssuesDetails(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,32 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendAllIssuesFiltersResponseBody } from '../schemas/FrontendAllIssuesFiltersResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendAllIssuesFiltersQueryQueryParams {
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
+ export type FrontendAllIssuesFiltersOkResponse = ResponseWithPagination<FrontendAllIssuesFiltersResponseBody>;
24
+ export type FrontendAllIssuesFiltersErrorResponse = NotFound;
25
+ export interface FrontendAllIssuesFiltersProps extends Omit<FetcherOptions<FrontendAllIssuesFiltersQueryQueryParams, unknown>, 'url'> {
26
+ queryParams: FrontendAllIssuesFiltersQueryQueryParams;
27
+ }
28
+ export declare function frontendAllIssuesFilters(props: FrontendAllIssuesFiltersProps): Promise<FrontendAllIssuesFiltersOkResponse>;
29
+ /**
30
+ * Provide list of filters for a projects latest baseline scans
31
+ */
32
+ export declare function useFrontendAllIssuesFiltersQuery(props: FrontendAllIssuesFiltersProps, options?: Omit<UseQueryOptions<FrontendAllIssuesFiltersOkResponse, FrontendAllIssuesFiltersErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendAllIssuesFiltersOkResponse, 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 frontendAllIssuesFilters(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/all-issues/filters`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provide list of filters for a projects latest baseline scans
11
+ */
12
+ export function useFrontendAllIssuesFiltersQuery(props, options) {
13
+ return useQuery(['Frontend#AllIssuesFilters', props.queryParams], ({ signal }) => frontendAllIssuesFilters(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,78 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendAllIssuesListResponseBody } from '../schemas/FrontendAllIssuesListResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendAllIssuesListQueryQueryParams {
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 "target1111111111111111,abcdef1234567890abcdef"
38
+ */
39
+ targetIds?: string;
40
+ /**
41
+ * @example "repository,container"
42
+ */
43
+ targetTypes?: string;
44
+ /**
45
+ * @example "pipeline1,pipeline2"
46
+ */
47
+ pipelineIds?: string;
48
+ /**
49
+ * @example "owasp,zap"
50
+ */
51
+ scanTools?: string;
52
+ /**
53
+ * @example "Critical,High,Medium"
54
+ */
55
+ severityCodes?: string;
56
+ /**
57
+ * @example "None,Pending,Rejected,Expired"
58
+ */
59
+ exemptionStatuses?: string;
60
+ /**
61
+ * @example "CWE-123"
62
+ */
63
+ search?: string;
64
+ /**
65
+ * @example "SAST"
66
+ */
67
+ issueTypes?: string;
68
+ }
69
+ export type FrontendAllIssuesListOkResponse = ResponseWithPagination<FrontendAllIssuesListResponseBody>;
70
+ export type FrontendAllIssuesListErrorResponse = NotFound;
71
+ export interface FrontendAllIssuesListProps extends Omit<FetcherOptions<FrontendAllIssuesListQueryQueryParams, unknown>, 'url'> {
72
+ queryParams: FrontendAllIssuesListQueryQueryParams;
73
+ }
74
+ export declare function frontendAllIssuesList(props: FrontendAllIssuesListProps): Promise<FrontendAllIssuesListOkResponse>;
75
+ /**
76
+ * Provides a paginated list of issues for a project found in the latest baseline scans
77
+ */
78
+ export declare function useFrontendAllIssuesListQuery(props: FrontendAllIssuesListProps, options?: Omit<UseQueryOptions<FrontendAllIssuesListOkResponse, FrontendAllIssuesListErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendAllIssuesListOkResponse, 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 frontendAllIssuesList(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/all-issues/issues`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides a paginated list of issues for a project found in the latest baseline scans
11
+ */
12
+ export function useFrontendAllIssuesListQuery(props, options) {
13
+ return useQuery(['Frontend#AllIssuesList', props.queryParams], ({ signal }) => frontendAllIssuesList(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,62 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendAllIssuesOccurrenceDetailsResponseBody } from '../schemas/FrontendAllIssuesOccurrenceDetailsResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendAllIssuesOccurrenceDetailsQueryPathParams {
7
+ /**
8
+ * The ID of the Security Issue
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ issueId: string;
12
+ /**
13
+ * Associated Target ID
14
+ * @example "abcdef1234567890ghijkl"
15
+ */
16
+ targetId: string;
17
+ }
18
+ export interface FrontendAllIssuesOccurrenceDetailsQueryQueryParams {
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
+ * @example "CWE-123"
50
+ */
51
+ search?: string;
52
+ }
53
+ export type FrontendAllIssuesOccurrenceDetailsOkResponse = ResponseWithPagination<FrontendAllIssuesOccurrenceDetailsResponseBody>;
54
+ export type FrontendAllIssuesOccurrenceDetailsErrorResponse = NotFound;
55
+ export interface FrontendAllIssuesOccurrenceDetailsProps extends FrontendAllIssuesOccurrenceDetailsQueryPathParams, Omit<FetcherOptions<FrontendAllIssuesOccurrenceDetailsQueryQueryParams, unknown>, 'url'> {
56
+ queryParams: FrontendAllIssuesOccurrenceDetailsQueryQueryParams;
57
+ }
58
+ export declare function frontendAllIssuesOccurrenceDetails(props: FrontendAllIssuesOccurrenceDetailsProps): Promise<FrontendAllIssuesOccurrenceDetailsOkResponse>;
59
+ /**
60
+ * Provide list of filters for the latest scans of a baseline
61
+ */
62
+ export declare function useFrontendAllIssuesOccurrenceDetailsQuery(props: FrontendAllIssuesOccurrenceDetailsProps, options?: Omit<UseQueryOptions<FrontendAllIssuesOccurrenceDetailsOkResponse, FrontendAllIssuesOccurrenceDetailsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendAllIssuesOccurrenceDetailsOkResponse, 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 frontendAllIssuesOccurrenceDetails(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/all-issues/issues/${props.issueId}/targets/${props.targetId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provide list of filters for the latest scans of a baseline
11
+ */
12
+ export function useFrontendAllIssuesOccurrenceDetailsQuery(props, options) {
13
+ return useQuery(['Frontend#AllIssuesOccurrenceDetails', props.issueId, props.targetId, props.queryParams], ({ signal }) => frontendAllIssuesOccurrenceDetails(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,49 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendIssueSeverityChangeResponseBody } from '../schemas/FrontendIssueSeverityChangeResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendIssueSeverityChangeQueryPathParams {
7
+ /**
8
+ * ID of Security Test Exemption
9
+ * @example "abcdef1234567890ghijkl"
10
+ */
11
+ exemptionId: string;
12
+ }
13
+ export interface FrontendIssueSeverityChangeQueryQueryParams {
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
+ * The Security Scan execution that detected this Security Issue
31
+ * @example "abcdef1234567890ghijkl"
32
+ */
33
+ scanId?: string;
34
+ /**
35
+ * The ID of the Security Issue
36
+ * @example "abcdef1234567890ghijkl"
37
+ */
38
+ issueId: string;
39
+ }
40
+ export type FrontendIssueSeverityChangeOkResponse = ResponseWithPagination<FrontendIssueSeverityChangeResponseBody>;
41
+ export type FrontendIssueSeverityChangeErrorResponse = NotFound;
42
+ export interface FrontendIssueSeverityChangeProps extends FrontendIssueSeverityChangeQueryPathParams, Omit<FetcherOptions<FrontendIssueSeverityChangeQueryQueryParams, unknown>, 'url'> {
43
+ queryParams: FrontendIssueSeverityChangeQueryQueryParams;
44
+ }
45
+ export declare function frontendIssueSeverityChange(props: FrontendIssueSeverityChangeProps): Promise<FrontendIssueSeverityChangeOkResponse>;
46
+ /**
47
+ * Provides the severity change for an issue when approving occurrence level exemption
48
+ */
49
+ export declare function useFrontendIssueSeverityChangeQuery(props: FrontendIssueSeverityChangeProps, options?: Omit<UseQueryOptions<FrontendIssueSeverityChangeOkResponse, FrontendIssueSeverityChangeErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendIssueSeverityChangeOkResponse, 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 frontendIssueSeverityChange(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/exemption/${props.exemptionId}/issue-severity-change`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides the severity change for an issue when approving occurrence level exemption
11
+ */
12
+ export function useFrontendIssueSeverityChangeQuery(props, options) {
13
+ return useQuery(['Frontend#IssueSeverityChange', props.exemptionId, props.queryParams], ({ signal }) => frontendIssueSeverityChange(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,32 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendOverviewBaselinesResponseBody } from '../schemas/FrontendOverviewBaselinesResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendOverviewBaselinesQueryQueryParams {
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
+ export type FrontendOverviewBaselinesOkResponse = ResponseWithPagination<FrontendOverviewBaselinesResponseBody>;
24
+ export type FrontendOverviewBaselinesErrorResponse = NotFound;
25
+ export interface FrontendOverviewBaselinesProps extends Omit<FetcherOptions<FrontendOverviewBaselinesQueryQueryParams, unknown>, 'url'> {
26
+ queryParams: FrontendOverviewBaselinesQueryQueryParams;
27
+ }
28
+ export declare function frontendOverviewBaselines(props: FrontendOverviewBaselinesProps): Promise<FrontendOverviewBaselinesOkResponse>;
29
+ /**
30
+ * Provides baseline execution data needed by the Overview page
31
+ */
32
+ export declare function useFrontendOverviewBaselinesQuery(props: FrontendOverviewBaselinesProps, options?: Omit<UseQueryOptions<FrontendOverviewBaselinesOkResponse, FrontendOverviewBaselinesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendOverviewBaselinesOkResponse, 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 frontendOverviewBaselines(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/frontend/overview/baselines`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Provides baseline execution data needed by the Overview page
11
+ */
12
+ export function useFrontendOverviewBaselinesQuery(props, options) {
13
+ return useQuery(['Frontend#OverviewBaselines', props.queryParams], ({ signal }) => frontendOverviewBaselines(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,39 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { FrontendOverviewHistoricalCountsResponseBody } from '../schemas/FrontendOverviewHistoricalCountsResponseBody';
3
+ import type { NotFound } from '../schemas/NotFound';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface FrontendOverviewHistoricalCountsQueryQueryParams {
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
+ * Number of days of Baseline Issue counts to return
24
+ * @format int64
25
+ * @default 30
26
+ * @example 84
27
+ */
28
+ days?: number;
29
+ }
30
+ export type FrontendOverviewHistoricalCountsOkResponse = ResponseWithPagination<FrontendOverviewHistoricalCountsResponseBody>;
31
+ export type FrontendOverviewHistoricalCountsErrorResponse = NotFound;
32
+ export interface FrontendOverviewHistoricalCountsProps extends Omit<FetcherOptions<FrontendOverviewHistoricalCountsQueryQueryParams, unknown>, 'url'> {
33
+ queryParams: FrontendOverviewHistoricalCountsQueryQueryParams;
34
+ }
35
+ export declare function frontendOverviewHistoricalCounts(props: FrontendOverviewHistoricalCountsProps): Promise<FrontendOverviewHistoricalCountsOkResponse>;
36
+ /**
37
+ * Provides historical issue data needed by the Overview page
38
+ */
39
+ export declare function useFrontendOverviewHistoricalCountsQuery(props: FrontendOverviewHistoricalCountsProps, options?: Omit<UseQueryOptions<FrontendOverviewHistoricalCountsOkResponse, FrontendOverviewHistoricalCountsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendOverviewHistoricalCountsOkResponse, NotFound>;