@harnessio/react-sto-core-client 0.3.17 → 0.3.18
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 → useFrontendGlobalExemptionsMutation.d.ts} +14 -11
- package/dist/sto-core/src/services/hooks/{useFrontendGlobalExemptionsQuery.js → useFrontendGlobalExemptionsMutation.js} +4 -4
- package/dist/sto-core/src/services/index.d.ts +2 -2
- package/dist/sto-core/src/services/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { FrontendSecurityReviewResponseBody } from '../schemas/FrontendSecurityReviewResponseBody';
|
|
3
3
|
import type { NotFound } from '../schemas/NotFound';
|
|
4
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
5
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
-
export interface
|
|
6
|
+
export interface FrontendGlobalExemptionsMutationQueryParams {
|
|
7
7
|
/**
|
|
8
8
|
* Harness Account ID
|
|
9
9
|
* @example "abcdef1234567890ghijkl"
|
|
@@ -33,11 +33,6 @@ export interface FrontendGlobalExemptionsQueryQueryParams {
|
|
|
33
33
|
* @example 50
|
|
34
34
|
*/
|
|
35
35
|
pageSize?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Comma-separated list of organization:project pairs
|
|
38
|
-
* @example "org1:project1,org1:project2"
|
|
39
|
-
*/
|
|
40
|
-
matchesProject?: string;
|
|
41
36
|
/**
|
|
42
37
|
* Exemption status
|
|
43
38
|
* @example "Approved"
|
|
@@ -49,20 +44,28 @@ export interface FrontendGlobalExemptionsQueryQueryParams {
|
|
|
49
44
|
*/
|
|
50
45
|
search?: string;
|
|
51
46
|
}
|
|
52
|
-
export interface
|
|
47
|
+
export interface FrontendGlobalExemptionsMutationHeaderParams {
|
|
53
48
|
/**
|
|
54
49
|
* Harness personal or service access token
|
|
55
50
|
* @example "Ea id."
|
|
56
51
|
*/
|
|
57
52
|
'X-Api-Key'?: string;
|
|
58
53
|
}
|
|
54
|
+
export type FrontendGlobalExemptionsRequestBody = {
|
|
55
|
+
/**
|
|
56
|
+
* List of organization:project pairs
|
|
57
|
+
* @example ["org1:project1","org2:project2"]
|
|
58
|
+
*/
|
|
59
|
+
orgProjectFilter?: string[];
|
|
60
|
+
};
|
|
59
61
|
export type FrontendGlobalExemptionsOkResponse = ResponseWithPagination<FrontendSecurityReviewResponseBody>;
|
|
60
62
|
export type FrontendGlobalExemptionsErrorResponse = NotFound;
|
|
61
|
-
export interface FrontendGlobalExemptionsProps extends Omit<FetcherOptions<
|
|
62
|
-
queryParams:
|
|
63
|
+
export interface FrontendGlobalExemptionsProps extends Omit<FetcherOptions<FrontendGlobalExemptionsMutationQueryParams, FrontendGlobalExemptionsRequestBody, FrontendGlobalExemptionsMutationHeaderParams>, 'url'> {
|
|
64
|
+
queryParams: FrontendGlobalExemptionsMutationQueryParams;
|
|
65
|
+
body: FrontendGlobalExemptionsRequestBody;
|
|
63
66
|
}
|
|
64
67
|
export declare function frontendGlobalExemptions(props: FrontendGlobalExemptionsProps): Promise<FrontendGlobalExemptionsOkResponse>;
|
|
65
68
|
/**
|
|
66
69
|
* Provides data needed by the Global Exemptions Security Review page
|
|
67
70
|
*/
|
|
68
|
-
export declare function
|
|
71
|
+
export declare function useFrontendGlobalExemptionsMutation(options?: Omit<UseMutationOptions<FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsErrorResponse, FrontendGlobalExemptionsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<FrontendGlobalExemptionsOkResponse, NotFound, FrontendGlobalExemptionsProps, unknown>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
// This code is autogenerated using @harnessio/oats-cli.
|
|
3
3
|
// Please do not modify this code directly.
|
|
4
|
-
import {
|
|
4
|
+
import { useMutation } 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
|
-
export function
|
|
13
|
-
return
|
|
12
|
+
export function useFrontendGlobalExemptionsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => frontendGlobalExemptions(mutateProps), options);
|
|
14
14
|
}
|
|
@@ -23,8 +23,8 @@ 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,
|
|
27
|
-
export { frontendGlobalExemptions,
|
|
26
|
+
export type { FrontendGlobalExemptionsErrorResponse, FrontendGlobalExemptionsMutationQueryParams, FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsProps, FrontendGlobalExemptionsRequestBody, } from './hooks/useFrontendGlobalExemptionsMutation';
|
|
27
|
+
export { frontendGlobalExemptions, useFrontendGlobalExemptionsMutation, } from './hooks/useFrontendGlobalExemptionsMutation';
|
|
28
28
|
export type { FrontendImpactedTargetsForExemptionErrorResponse, FrontendImpactedTargetsForExemptionOkResponse, FrontendImpactedTargetsForExemptionProps, FrontendImpactedTargetsForExemptionQueryPathParams, FrontendImpactedTargetsForExemptionQueryQueryParams, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
|
|
29
29
|
export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
|
|
30
30
|
export type { FrontendIssueForExemptionErrorResponse, FrontendIssueForExemptionOkResponse, FrontendIssueForExemptionProps, FrontendIssueForExemptionQueryPathParams, FrontendIssueForExemptionQueryQueryParams, } from './hooks/useFrontendIssueForExemptionQuery';
|
|
@@ -10,7 +10,7 @@ export { frontendAllIssuesFilters, useFrontendAllIssuesFiltersQuery, } from './h
|
|
|
10
10
|
export { frontendAllIssuesList, useFrontendAllIssuesListQuery, } from './hooks/useFrontendAllIssuesListQuery';
|
|
11
11
|
export { frontendAllIssuesOccurrenceDetails, useFrontendAllIssuesOccurrenceDetailsQuery, } from './hooks/useFrontendAllIssuesOccurrenceDetailsQuery';
|
|
12
12
|
export { frontendExpiringExemptions, useFrontendExpiringExemptionsQuery, } from './hooks/useFrontendExpiringExemptionsQuery';
|
|
13
|
-
export { frontendGlobalExemptions,
|
|
13
|
+
export { frontendGlobalExemptions, useFrontendGlobalExemptionsMutation, } from './hooks/useFrontendGlobalExemptionsMutation';
|
|
14
14
|
export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
|
|
15
15
|
export { frontendIssueForExemption, useFrontendIssueForExemptionQuery, } from './hooks/useFrontendIssueForExemptionQuery';
|
|
16
16
|
export { frontendIssueSeverityChange, useFrontendIssueSeverityChangeQuery, } from './hooks/useFrontendIssueSeverityChangeQuery';
|