@harnessio/react-sto-core-client 0.3.18 → 0.3.20
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/{useFrontendGlobalExemptionsMutation.d.ts → useFrontendGlobalExemptionsQuery.d.ts} +11 -14
- package/dist/sto-core/src/services/hooks/{useFrontendGlobalExemptionsMutation.js → useFrontendGlobalExemptionsQuery.js} +4 -4
- package/dist/sto-core/src/services/hooks/useProductsListProductsQuery.d.ts +5 -0
- 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 { UseQueryOptions } 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 FrontendGlobalExemptionsQueryQueryParams {
|
|
7
7
|
/**
|
|
8
8
|
* Harness Account ID
|
|
9
9
|
* @example "abcdef1234567890ghijkl"
|
|
@@ -33,6 +33,11 @@ export interface FrontendGlobalExemptionsMutationQueryParams {
|
|
|
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;
|
|
36
41
|
/**
|
|
37
42
|
* Exemption status
|
|
38
43
|
* @example "Approved"
|
|
@@ -44,28 +49,20 @@ export interface FrontendGlobalExemptionsMutationQueryParams {
|
|
|
44
49
|
*/
|
|
45
50
|
search?: string;
|
|
46
51
|
}
|
|
47
|
-
export interface
|
|
52
|
+
export interface FrontendGlobalExemptionsQueryHeaderParams {
|
|
48
53
|
/**
|
|
49
54
|
* Harness personal or service access token
|
|
50
55
|
* @example "Ea id."
|
|
51
56
|
*/
|
|
52
57
|
'X-Api-Key'?: string;
|
|
53
58
|
}
|
|
54
|
-
export type FrontendGlobalExemptionsRequestBody = {
|
|
55
|
-
/**
|
|
56
|
-
* List of organization:project pairs
|
|
57
|
-
* @example ["org1:project1","org2:project2"]
|
|
58
|
-
*/
|
|
59
|
-
orgProjectFilter?: string[];
|
|
60
|
-
};
|
|
61
59
|
export type FrontendGlobalExemptionsOkResponse = ResponseWithPagination<FrontendSecurityReviewResponseBody>;
|
|
62
60
|
export type FrontendGlobalExemptionsErrorResponse = NotFound;
|
|
63
|
-
export interface FrontendGlobalExemptionsProps extends Omit<FetcherOptions<
|
|
64
|
-
queryParams:
|
|
65
|
-
body: FrontendGlobalExemptionsRequestBody;
|
|
61
|
+
export interface FrontendGlobalExemptionsProps extends Omit<FetcherOptions<FrontendGlobalExemptionsQueryQueryParams, unknown, FrontendGlobalExemptionsQueryHeaderParams>, 'url'> {
|
|
62
|
+
queryParams: FrontendGlobalExemptionsQueryQueryParams;
|
|
66
63
|
}
|
|
67
64
|
export declare function frontendGlobalExemptions(props: FrontendGlobalExemptionsProps): Promise<FrontendGlobalExemptionsOkResponse>;
|
|
68
65
|
/**
|
|
69
66
|
* Provides data needed by the Global Exemptions Security Review page
|
|
70
67
|
*/
|
|
71
|
-
export declare function
|
|
68
|
+
export declare function useFrontendGlobalExemptionsQuery(props: FrontendGlobalExemptionsProps, options?: Omit<UseQueryOptions<FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FrontendGlobalExemptionsOkResponse, NotFound>;
|
|
@@ -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 { 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: 'GET' }, 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 useFrontendGlobalExemptionsQuery(props, options) {
|
|
13
|
+
return useQuery(['Frontend#GlobalExemptions', props.queryParams], ({ signal }) => frontendGlobalExemptions(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -4,6 +4,11 @@ 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 ProductsListProductsQueryQueryParams {
|
|
7
|
+
/**
|
|
8
|
+
* Harness Account ID
|
|
9
|
+
* @example "abcdef1234567890ghijkl"
|
|
10
|
+
*/
|
|
11
|
+
accountId?: string;
|
|
7
12
|
/**
|
|
8
13
|
* Page number to fetch (starting from 0)
|
|
9
14
|
* @format int64
|
|
@@ -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,
|
|
27
|
-
export { frontendGlobalExemptions,
|
|
26
|
+
export type { FrontendGlobalExemptionsErrorResponse, FrontendGlobalExemptionsOkResponse, FrontendGlobalExemptionsProps, FrontendGlobalExemptionsQueryQueryParams, } from './hooks/useFrontendGlobalExemptionsQuery';
|
|
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';
|
|
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, useFrontendGlobalExemptionsQuery, } from './hooks/useFrontendGlobalExemptionsQuery';
|
|
14
14
|
export { frontendImpactedTargetsForExemption, useFrontendImpactedTargetsForExemptionQuery, } from './hooks/useFrontendImpactedTargetsForExemptionQuery';
|
|
15
15
|
export { frontendIssueForExemption, useFrontendIssueForExemptionQuery, } from './hooks/useFrontendIssueForExemptionQuery';
|
|
16
16
|
export { frontendIssueSeverityChange, useFrontendIssueSeverityChangeQuery, } from './hooks/useFrontendIssueSeverityChangeQuery';
|