@harnessio/react-sto-core-client 0.3.5 → 0.3.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/useExemptionsFindExemptionByIdQuery.d.ts +3 -3
- package/dist/sto-core/src/services/index.d.ts +2 -0
- package/dist/sto-core/src/services/schemas/ApproveExemptionRequestBody.d.ts +6 -1
- package/dist/sto-core/src/services/schemas/ExemptionWithComment.d.ts +13 -0
- package/dist/sto-core/src/services/schemas/ExemptionWithComment.js +1 -0
- package/dist/sto-core/src/services/schemas/ExemptionsFindExemptionByIdResponseBody.d.ts +2 -0
- package/dist/sto-core/src/services/schemas/ExemptionsFindExemptionByIdResponseBody.js +1 -0
- package/dist/sto-core/src/services/schemas/PromoteExemptionRequestBody.d.ts +6 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ExemptionsFindExemptionByIdResponseBody } from '../schemas/ExemptionsFindExemptionByIdResponseBody';
|
|
3
3
|
import type { NotFound } from '../schemas/NotFound';
|
|
4
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
5
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
6
|
export interface ExemptionsFindExemptionByIdQueryPathParams {
|
|
7
7
|
/**
|
|
8
8
|
* The ID of the Exemption to retrieve
|
|
9
|
-
* @example "
|
|
9
|
+
* @example "MipZ3daNhtT3wgLnyfDems"
|
|
10
10
|
*/
|
|
11
11
|
id: string;
|
|
12
12
|
}
|
|
@@ -43,7 +43,7 @@ export interface ExemptionsFindExemptionByIdQueryHeaderParams {
|
|
|
43
43
|
*/
|
|
44
44
|
'X-Api-Key'?: string;
|
|
45
45
|
}
|
|
46
|
-
export type ExemptionsFindExemptionByIdOkResponse = ResponseWithPagination<
|
|
46
|
+
export type ExemptionsFindExemptionByIdOkResponse = ResponseWithPagination<ExemptionsFindExemptionByIdResponseBody>;
|
|
47
47
|
export type ExemptionsFindExemptionByIdErrorResponse = NotFound;
|
|
48
48
|
export interface ExemptionsFindExemptionByIdProps extends ExemptionsFindExemptionByIdQueryPathParams, Omit<FetcherOptions<ExemptionsFindExemptionByIdQueryQueryParams, unknown, ExemptionsFindExemptionByIdQueryHeaderParams>, 'url'> {
|
|
49
49
|
queryParams: ExemptionsFindExemptionByIdQueryQueryParams;
|
|
@@ -75,7 +75,9 @@ export type { CreateExemptionRequestBody } from './schemas/CreateExemptionReques
|
|
|
75
75
|
export type { CreatePullRequestRequestBody } from './schemas/CreatePullRequestRequestBody';
|
|
76
76
|
export type { Exemption } from './schemas/Exemption';
|
|
77
77
|
export type { ExemptionImpactedTargetsResult } from './schemas/ExemptionImpactedTargetsResult';
|
|
78
|
+
export type { ExemptionWithComment } from './schemas/ExemptionWithComment';
|
|
78
79
|
export type { ExemptionsCreateExemptionResponseBody } from './schemas/ExemptionsCreateExemptionResponseBody';
|
|
80
|
+
export type { ExemptionsFindExemptionByIdResponseBody } from './schemas/ExemptionsFindExemptionByIdResponseBody';
|
|
79
81
|
export type { ExemptionsListExemptionsResponseBody } from './schemas/ExemptionsListExemptionsResponseBody';
|
|
80
82
|
export type { FrontendAllIssuesDetailsResponseBody } from './schemas/FrontendAllIssuesDetailsResponseBody';
|
|
81
83
|
export type { FrontendAllIssuesFiltersResponseBody } from './schemas/FrontendAllIssuesFiltersResponseBody';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @example {"approverId":"user111111111111111111"}
|
|
2
|
+
* @example {"approverId":"user111111111111111111","comment":"This is a comment for the approval or rejection of the exemption"}
|
|
3
3
|
*/
|
|
4
4
|
export interface ApproveExemptionRequestBody {
|
|
5
5
|
/**
|
|
@@ -7,4 +7,9 @@ export interface ApproveExemptionRequestBody {
|
|
|
7
7
|
* @example "user111111111111111111"
|
|
8
8
|
*/
|
|
9
9
|
approverId: string;
|
|
10
|
+
/**
|
|
11
|
+
* Comment to be added to the Exemption approval or rejection
|
|
12
|
+
* @example "This is a comment for the approval or rejection of the exemption"
|
|
13
|
+
*/
|
|
14
|
+
comment?: string;
|
|
10
15
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Exemption } from '../schemas/Exemption';
|
|
2
|
+
/**
|
|
3
|
+
* Exemption with comment
|
|
4
|
+
* @example {"comment":"This exemption was reviewed by the security team.","exemption":{"approverId":"user111111111111111111","canApproveFor":["ACCOUNT","ORG","PROJECT","PIPELINE"],"canCancel":true,"canCreate":true,"canReApprove":true,"canReject":true,"created":1651578240,"exemptionStatusAtScan":"Approved","expiration":1651578240,"id":"abcdef1234567890ghijkl","isDeleted":true,"issueId":"abcdef1234567890ghijkl","lastModified":1651578240,"link":"https://example.com/ABC-1234","numOccurrences":10,"occurrences":[42,666],"orgId":"your_project","pendingChanges":{"durationDays":7},"pipelineId":"your_pipeline","projectId":"your_project","reason":"Waiting on upstream bug fix","requesterId":"user111111111111111111","scanId":"abcdef1234567890ghijkl","scope":"PROJECT","search":"CWE-123,5","status":"Expired","targetId":"abcdef1234567890ghijkl","type":"Other"}}
|
|
5
|
+
*/
|
|
6
|
+
export interface ExemptionWithComment {
|
|
7
|
+
/**
|
|
8
|
+
* The additional comment to include with the exemption
|
|
9
|
+
* @example "This exemption was reviewed by the security team."
|
|
10
|
+
*/
|
|
11
|
+
comment?: string;
|
|
12
|
+
exemption: Exemption;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @example {"approverId":"user111111111111111111","pipelineId":"abcdef1234567890ghijkl","targetId":"abcdef1234567890ghijkl"}
|
|
2
|
+
* @example {"approverId":"user111111111111111111","comment":"This is a comment for the approval or rejection of the exemption","pipelineId":"abcdef1234567890ghijkl","targetId":"abcdef1234567890ghijkl"}
|
|
3
3
|
*/
|
|
4
4
|
export interface PromoteExemptionRequestBody {
|
|
5
5
|
/**
|
|
@@ -7,6 +7,11 @@ export interface PromoteExemptionRequestBody {
|
|
|
7
7
|
* @example "user111111111111111111"
|
|
8
8
|
*/
|
|
9
9
|
approverId: string;
|
|
10
|
+
/**
|
|
11
|
+
* Comment to be added to the Exemption approval or rejection
|
|
12
|
+
* @example "This is a comment for the approval or rejection of the exemption"
|
|
13
|
+
*/
|
|
14
|
+
comment?: string;
|
|
10
15
|
/**
|
|
11
16
|
* Harness STO pipeline ID
|
|
12
17
|
* @example "abcdef1234567890ghijkl"
|