@harnessio/react-sto-core-client 0.3.20 → 0.3.21
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/useFrontendGlobalExemptionsQuery.d.ts +4 -6
- package/dist/sto-core/src/services/hooks/useFrontendGlobalExemptionsQuery.js +2 -2
- package/dist/sto-core/src/services/index.d.ts +2 -1
- package/dist/sto-core/src/services/schemas/GlobalExemptionsRequestBody.d.ts +10 -0
- package/dist/sto-core/src/services/schemas/GlobalExemptionsRequestBody.js +4 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { FrontendSecurityReviewResponseBody } from '../schemas/FrontendSecurityReviewResponseBody';
|
|
3
3
|
import type { NotFound } from '../schemas/NotFound';
|
|
4
|
+
import type { GlobalExemptionsRequestBody } from '../schemas/GlobalExemptionsRequestBody';
|
|
4
5
|
import type { ResponseWithPagination } from '../helpers';
|
|
5
6
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
7
|
export interface FrontendGlobalExemptionsQueryQueryParams {
|
|
@@ -33,11 +34,6 @@ export interface FrontendGlobalExemptionsQueryQueryParams {
|
|
|
33
34
|
* @example 50
|
|
34
35
|
*/
|
|
35
36
|
pageSize?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Comma-separated list of organization:project pairs
|
|
38
|
-
* @example "org1:project1,org1:project2"
|
|
39
|
-
*/
|
|
40
|
-
matchesProject?: string;
|
|
41
37
|
/**
|
|
42
38
|
* Exemption status
|
|
43
39
|
* @example "Approved"
|
|
@@ -56,10 +52,12 @@ export interface FrontendGlobalExemptionsQueryHeaderParams {
|
|
|
56
52
|
*/
|
|
57
53
|
'X-Api-Key'?: string;
|
|
58
54
|
}
|
|
55
|
+
export type FrontendGlobalExemptionsRequestBody = GlobalExemptionsRequestBody;
|
|
59
56
|
export type FrontendGlobalExemptionsOkResponse = ResponseWithPagination<FrontendSecurityReviewResponseBody>;
|
|
60
57
|
export type FrontendGlobalExemptionsErrorResponse = NotFound;
|
|
61
|
-
export interface FrontendGlobalExemptionsProps extends Omit<FetcherOptions<FrontendGlobalExemptionsQueryQueryParams,
|
|
58
|
+
export interface FrontendGlobalExemptionsProps extends Omit<FetcherOptions<FrontendGlobalExemptionsQueryQueryParams, FrontendGlobalExemptionsRequestBody, FrontendGlobalExemptionsQueryHeaderParams>, 'url'> {
|
|
62
59
|
queryParams: FrontendGlobalExemptionsQueryQueryParams;
|
|
60
|
+
body: FrontendGlobalExemptionsRequestBody;
|
|
63
61
|
}
|
|
64
62
|
export declare function frontendGlobalExemptions(props: FrontendGlobalExemptionsProps): Promise<FrontendGlobalExemptionsOkResponse>;
|
|
65
63
|
/**
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function frontendGlobalExemptions(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v2/frontend/exemptions`, method: '
|
|
7
|
+
return fetcher(Object.assign({ url: `/api/v2/frontend/exemptions`, method: 'POST' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Provides data needed by the Global Exemptions Security Review page
|
|
11
11
|
*/
|
|
12
12
|
export function useFrontendGlobalExemptionsQuery(props, options) {
|
|
13
|
-
return useQuery(['Frontend#GlobalExemptions', props.queryParams], ({ signal }) => frontendGlobalExemptions(Object.assign(Object.assign({}, props), { signal })), options);
|
|
13
|
+
return useQuery(['Frontend#GlobalExemptions', props.queryParams, props.body], ({ signal }) => frontendGlobalExemptions(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -23,7 +23,7 @@ export type { FrontendAllIssuesOccurrenceDetailsErrorResponse, FrontendAllIssues
|
|
|
23
23
|
export { frontendAllIssuesOccurrenceDetails, useFrontendAllIssuesOccurrenceDetailsQuery, } from './hooks/useFrontendAllIssuesOccurrenceDetailsQuery';
|
|
24
24
|
export type { FrontendExpiringExemptionsErrorResponse, FrontendExpiringExemptionsOkResponse, FrontendExpiringExemptionsProps, FrontendExpiringExemptionsQueryPathParams, FrontendExpiringExemptionsQueryQueryParams, } from './hooks/useFrontendExpiringExemptionsQuery';
|
|
25
25
|
export { frontendExpiringExemptions, useFrontendExpiringExemptionsQuery, } from './hooks/useFrontendExpiringExemptionsQuery';
|
|
26
|
-
export type { FrontendGlobalExemptionsErrorResponse, FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsProps, FrontendGlobalExemptionsQueryQueryParams, } from './hooks/useFrontendGlobalExemptionsQuery';
|
|
26
|
+
export type { FrontendGlobalExemptionsErrorResponse, FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsProps, FrontendGlobalExemptionsQueryQueryParams, FrontendGlobalExemptionsRequestBody, } from './hooks/useFrontendGlobalExemptionsQuery';
|
|
27
27
|
export { frontendGlobalExemptions, useFrontendGlobalExemptionsQuery, } from './hooks/useFrontendGlobalExemptionsQuery';
|
|
28
28
|
export type { FrontendImpactedTargetsForExemptionErrorResponse, FrontendImpactedTargetsForExemptionOkResponse, FrontendImpactedTargetsForExemptionProps, FrontendImpactedTargetsForExemptionQueryPathParams, FrontendImpactedTargetsForExemptionQueryQueryParams, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
|
|
29
29
|
export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
|
|
@@ -102,6 +102,7 @@ export type { FrontendPipelineSecurityStepsResponseBody } from './schemas/Fronte
|
|
|
102
102
|
export type { FrontendSecurityReviewResponseBody } from './schemas/FrontendSecurityReviewResponseBody';
|
|
103
103
|
export type { FrontendTestTargetsResponseBody } from './schemas/FrontendTestTargetsResponseBody';
|
|
104
104
|
export type { GitMetadata } from './schemas/GitMetadata';
|
|
105
|
+
export type { GlobalExemptionsRequestBody } from './schemas/GlobalExemptionsRequestBody';
|
|
105
106
|
export type { HistoricalCounts } from './schemas/HistoricalCounts';
|
|
106
107
|
export type { HistoricalIssueCounts } from './schemas/HistoricalIssueCounts';
|
|
107
108
|
export type { IdResult } from './schemas/IdResult';
|