@harnessio/react-sto-core-client 0.7.4 → 0.7.6
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.
- package/dist/sto-core/src/services/hooks/useExemptionsGetExemptionForIssueQuery.d.ts +46 -0
- package/dist/sto-core/src/services/hooks/useExemptionsGetExemptionForIssueQuery.js +14 -0
- package/dist/sto-core/src/services/index.d.ts +2 -2
- package/dist/sto-core/src/services/index.js +1 -1
- package/dist/sto-core/src/services/schemas/AllIssuesDetailsV2Result.d.ts +6 -1
- package/package.json +1 -1
- package/dist/sto-core/src/services/hooks/useExemptionsGetProjectLevelExemptionForIssueQuery.d.ts +0 -46
- package/dist/sto-core/src/services/hooks/useExemptionsGetProjectLevelExemptionForIssueQuery.js +0 -14
|
@@ -0,0 +1,46 @@
|
|
|
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 ExemptionsGetExemptionForIssueQueryPathParams {
|
|
7
|
+
/**
|
|
8
|
+
* Issue ID to find exemption for
|
|
9
|
+
* @example "abcdef1234567890ghijkl"
|
|
10
|
+
*/
|
|
11
|
+
issueId: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ExemptionsGetExemptionForIssueQueryQueryParams {
|
|
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 ExemptionsGetExemptionForIssueQueryHeaderParams {
|
|
31
|
+
/**
|
|
32
|
+
* Harness personal or service access token
|
|
33
|
+
* @example "Quaerat aliquam est."
|
|
34
|
+
*/
|
|
35
|
+
'X-Api-Key'?: string;
|
|
36
|
+
}
|
|
37
|
+
export type ExemptionsGetExemptionForIssueOkResponse = ResponseWithPagination<Exemption>;
|
|
38
|
+
export type ExemptionsGetExemptionForIssueErrorResponse = NotFound;
|
|
39
|
+
export interface ExemptionsGetExemptionForIssueProps extends ExemptionsGetExemptionForIssueQueryPathParams, Omit<FetcherOptions<ExemptionsGetExemptionForIssueQueryQueryParams, unknown, ExemptionsGetExemptionForIssueQueryHeaderParams>, 'url'> {
|
|
40
|
+
queryParams: ExemptionsGetExemptionForIssueQueryQueryParams;
|
|
41
|
+
}
|
|
42
|
+
export declare function exemptionsGetExemptionForIssue(props: ExemptionsGetExemptionForIssueProps): Promise<ExemptionsGetExemptionForIssueOkResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get the highest-priority exemption for an issue across all scopes (account, org, project)
|
|
45
|
+
*/
|
|
46
|
+
export declare function useExemptionsGetExemptionForIssueQuery(props: ExemptionsGetExemptionForIssueProps, options?: Omit<UseQueryOptions<ExemptionsGetExemptionForIssueOkResponse, ExemptionsGetExemptionForIssueErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ExemptionsGetExemptionForIssueOkResponse, 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 exemptionsGetExemptionForIssue(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/api/v2/exemptions/issue/${props.issueId}`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get the highest-priority exemption for an issue across all scopes (account, org, project)
|
|
11
|
+
*/
|
|
12
|
+
export function useExemptionsGetExemptionForIssueQuery(props, options) {
|
|
13
|
+
return useQuery(['Exemptions#GetExemptionForIssue', props.issueId, props.queryParams], ({ signal }) => exemptionsGetExemptionForIssue(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -7,8 +7,8 @@ export type { ExemptionsDeleteExemptionErrorResponse, ExemptionsDeleteExemptionM
|
|
|
7
7
|
export { exemptionsDeleteExemption, useExemptionsDeleteExemptionMutation, } from './hooks/useExemptionsDeleteExemptionMutation';
|
|
8
8
|
export type { ExemptionsFindExemptionByIdErrorResponse, ExemptionsFindExemptionByIdOkResponse, ExemptionsFindExemptionByIdProps, ExemptionsFindExemptionByIdQueryPathParams, ExemptionsFindExemptionByIdQueryQueryParams, } from './hooks/useExemptionsFindExemptionByIdQuery';
|
|
9
9
|
export { exemptionsFindExemptionById, useExemptionsFindExemptionByIdQuery, } from './hooks/useExemptionsFindExemptionByIdQuery';
|
|
10
|
-
export type {
|
|
11
|
-
export {
|
|
10
|
+
export type { ExemptionsGetExemptionForIssueErrorResponse, ExemptionsGetExemptionForIssueOkResponse, ExemptionsGetExemptionForIssueProps, ExemptionsGetExemptionForIssueQueryPathParams, ExemptionsGetExemptionForIssueQueryQueryParams, } from './hooks/useExemptionsGetExemptionForIssueQuery';
|
|
11
|
+
export { exemptionsGetExemptionForIssue, useExemptionsGetExemptionForIssueQuery, } from './hooks/useExemptionsGetExemptionForIssueQuery';
|
|
12
12
|
export type { ExemptionsListExemptionsErrorResponse, ExemptionsListExemptionsOkResponse, ExemptionsListExemptionsProps, ExemptionsListExemptionsQueryQueryParams, } from './hooks/useExemptionsListExemptionsQuery';
|
|
13
13
|
export { exemptionsListExemptions, useExemptionsListExemptionsQuery, } from './hooks/useExemptionsListExemptionsQuery';
|
|
14
14
|
export type { ExemptionsPromoteExemptionErrorResponse, ExemptionsPromoteExemptionMutationPathParams, ExemptionsPromoteExemptionMutationQueryParams, ExemptionsPromoteExemptionOkResponse, ExemptionsPromoteExemptionProps, ExemptionsPromoteExemptionRequestBody, } from './hooks/useExemptionsPromoteExemptionMutation';
|
|
@@ -2,7 +2,7 @@ export { exemptionsApproveExemption, useExemptionsApproveExemptionMutation, } fr
|
|
|
2
2
|
export { exemptionsCreateExemption, useExemptionsCreateExemptionMutation, } from './hooks/useExemptionsCreateExemptionMutation';
|
|
3
3
|
export { exemptionsDeleteExemption, useExemptionsDeleteExemptionMutation, } from './hooks/useExemptionsDeleteExemptionMutation';
|
|
4
4
|
export { exemptionsFindExemptionById, useExemptionsFindExemptionByIdQuery, } from './hooks/useExemptionsFindExemptionByIdQuery';
|
|
5
|
-
export {
|
|
5
|
+
export { exemptionsGetExemptionForIssue, useExemptionsGetExemptionForIssueQuery, } from './hooks/useExemptionsGetExemptionForIssueQuery';
|
|
6
6
|
export { exemptionsListExemptions, useExemptionsListExemptionsQuery, } from './hooks/useExemptionsListExemptionsQuery';
|
|
7
7
|
export { exemptionsPromoteExemption, useExemptionsPromoteExemptionMutation, } from './hooks/useExemptionsPromoteExemptionMutation';
|
|
8
8
|
export { exemptionsUpdateExemption, useExemptionsUpdateExemptionMutation, } from './hooks/useExemptionsUpdateExemptionMutation';
|
|
@@ -3,7 +3,7 @@ import type { OverrideResult } from '../schemas/OverrideResult';
|
|
|
3
3
|
import type { Pagination } from '../schemas/Pagination';
|
|
4
4
|
import type { RefIds } from '../schemas/RefIds';
|
|
5
5
|
/**
|
|
6
|
-
* @example {"description":"Optio et.","epssLastModified":"2025-05-01","epssPercentile":0.15,"epssScore":0.035,"impactedTargets":[{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."},{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."},{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."}],"issueType":"Aut qui dolorem expedita qui repudiandae perferendis.","lastDetected":1634836529,"overrides":[{"created":1651578240,"fieldName":"severityCode","impactedTargetId":"target1111111111111111","originalFieldValue":"Low","overrideFieldValue":"Low","overrideId":"override1234","reason":"Waiting on upstream bug fix","requesterEmail":"user@harness.io","requesterId":"user111111111111111111","requesterName":"firstname lastname"},{"created":1651578240,"fieldName":"severityCode","impactedTargetId":"target1111111111111111","originalFieldValue":"Low","overrideFieldValue":"Low","overrideId":"override1234","reason":"Waiting on upstream bug fix","requesterEmail":"user@harness.io","requesterId":"user111111111111111111","requesterName":"firstname lastname"}],"pagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12},"reachability":"reachable","referenceIdentifiers":[{"id":"Earum voluptatibus quam qui ea.","type":"Dicta vel."},{"id":"Earum voluptatibus quam qui ea.","type":"Dicta vel."},{"id":"Earum voluptatibus quam qui ea.","type":"Dicta vel."}],"scanTool":"owasp","severityCode":"High","status":"Active","targetType":"Voluptates quas minus eum impedit.","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash"}
|
|
6
|
+
* @example {"description":"Optio et.","epssLastModified":"2025-05-01","epssPercentile":0.15,"epssScore":0.035,"exemptionStatus":"Pending","impactedTargets":[{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."},{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."},{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."}],"issueType":"Aut qui dolorem expedita qui repudiandae perferendis.","lastDetected":1634836529,"overrides":[{"created":1651578240,"fieldName":"severityCode","impactedTargetId":"target1111111111111111","originalFieldValue":"Low","overrideFieldValue":"Low","overrideId":"override1234","reason":"Waiting on upstream bug fix","requesterEmail":"user@harness.io","requesterId":"user111111111111111111","requesterName":"firstname lastname"},{"created":1651578240,"fieldName":"severityCode","impactedTargetId":"target1111111111111111","originalFieldValue":"Low","overrideFieldValue":"Low","overrideId":"override1234","reason":"Waiting on upstream bug fix","requesterEmail":"user@harness.io","requesterId":"user111111111111111111","requesterName":"firstname lastname"}],"pagination":{"link":"","page":4,"pageSize":20,"totalItems":230,"totalPages":12},"reachability":"reachable","referenceIdentifiers":[{"id":"Earum voluptatibus quam qui ea.","type":"Dicta vel."},{"id":"Earum voluptatibus quam qui ea.","type":"Dicta vel."},{"id":"Earum voluptatibus quam qui ea.","type":"Dicta vel."}],"scanTool":"owasp","severityCode":"High","status":"Active","targetType":"Voluptates quas minus eum impedit.","title":"Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash"}
|
|
7
7
|
*/
|
|
8
8
|
export interface AllIssuesDetailsV2Result {
|
|
9
9
|
/**
|
|
@@ -28,6 +28,11 @@ export interface AllIssuesDetailsV2Result {
|
|
|
28
28
|
* @example 0.035
|
|
29
29
|
*/
|
|
30
30
|
epssScore?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Status of project scoped exemption for this issue
|
|
33
|
+
* @example "Pending"
|
|
34
|
+
*/
|
|
35
|
+
exemptionStatus?: string;
|
|
31
36
|
/**
|
|
32
37
|
* List of Impacted Targets
|
|
33
38
|
* @example [{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."},{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."},{"executionId":"abcdef1234567890ghijkl","exemptionId":"abcdef1234567890ghijkl","exemptionStatus":"Pending","id":"target1111111111111111","lastDetected":1634836529,"name":"The Target Name","numOccurrences":10,"pipelineId":"example_pipeline","reachability":"reachable","status":"Remediated","userEmail":"user@gmail.com","userId":"Distinctio laborum.","userName":"firstname lastname","variantName":"Impedit ratione iure voluptate."}]
|
package/package.json
CHANGED
package/dist/sto-core/src/services/hooks/useExemptionsGetProjectLevelExemptionForIssueQuery.d.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
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 ExemptionsGetProjectLevelExemptionForIssueQueryPathParams {
|
|
7
|
-
/**
|
|
8
|
-
* Issue ID to find exemption for
|
|
9
|
-
* @example "abcdef1234567890ghijkl"
|
|
10
|
-
*/
|
|
11
|
-
issueId: string;
|
|
12
|
-
}
|
|
13
|
-
export interface ExemptionsGetProjectLevelExemptionForIssueQueryQueryParams {
|
|
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 ExemptionsGetProjectLevelExemptionForIssueQueryHeaderParams {
|
|
31
|
-
/**
|
|
32
|
-
* Harness personal or service access token
|
|
33
|
-
* @example "Quaerat aliquam est."
|
|
34
|
-
*/
|
|
35
|
-
'X-Api-Key'?: string;
|
|
36
|
-
}
|
|
37
|
-
export type ExemptionsGetProjectLevelExemptionForIssueOkResponse = ResponseWithPagination<Exemption>;
|
|
38
|
-
export type ExemptionsGetProjectLevelExemptionForIssueErrorResponse = NotFound;
|
|
39
|
-
export interface ExemptionsGetProjectLevelExemptionForIssueProps extends ExemptionsGetProjectLevelExemptionForIssueQueryPathParams, Omit<FetcherOptions<ExemptionsGetProjectLevelExemptionForIssueQueryQueryParams, unknown, ExemptionsGetProjectLevelExemptionForIssueQueryHeaderParams>, 'url'> {
|
|
40
|
-
queryParams: ExemptionsGetProjectLevelExemptionForIssueQueryQueryParams;
|
|
41
|
-
}
|
|
42
|
-
export declare function exemptionsGetProjectLevelExemptionForIssue(props: ExemptionsGetProjectLevelExemptionForIssueProps): Promise<ExemptionsGetProjectLevelExemptionForIssueOkResponse>;
|
|
43
|
-
/**
|
|
44
|
-
* Get the highest-priority project-level exemption for an issue
|
|
45
|
-
*/
|
|
46
|
-
export declare function useExemptionsGetProjectLevelExemptionForIssueQuery(props: ExemptionsGetProjectLevelExemptionForIssueProps, options?: Omit<UseQueryOptions<ExemptionsGetProjectLevelExemptionForIssueOkResponse, ExemptionsGetProjectLevelExemptionForIssueErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ExemptionsGetProjectLevelExemptionForIssueOkResponse, NotFound>;
|
package/dist/sto-core/src/services/hooks/useExemptionsGetProjectLevelExemptionForIssueQuery.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
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 exemptionsGetProjectLevelExemptionForIssue(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v2/exemptions/for-issue/${props.issueId}`, method: 'GET' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Get the highest-priority project-level exemption for an issue
|
|
11
|
-
*/
|
|
12
|
-
export function useExemptionsGetProjectLevelExemptionForIssueQuery(props, options) {
|
|
13
|
-
return useQuery(['Exemptions#GetProjectLevelExemptionForIssue', props.issueId, props.queryParams], ({ signal }) => exemptionsGetProjectLevelExemptionForIssue(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
-
}
|