@harnessio/react-idp-service-client 0.29.0 → 0.31.0
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/idp-service/src/services/hooks/useDeleteCheckMutation.d.ts +22 -0
- package/dist/idp-service/src/services/hooks/useDeleteCheckMutation.js +14 -0
- package/dist/idp-service/src/services/hooks/useDeleteScorecardMutation.d.ts +18 -0
- package/dist/idp-service/src/services/hooks/useDeleteScorecardMutation.js +14 -0
- package/dist/idp-service/src/services/hooks/useGetCheckQuery.d.ts +5 -1
- package/dist/idp-service/src/services/hooks/useGetCheckQuery.js +1 -1
- package/dist/idp-service/src/services/hooks/useGetDataPointsForDataSourceQuery.d.ts +19 -0
- package/dist/idp-service/src/services/hooks/{useGetDatapointsForDataourceQuery.js → useGetDataPointsForDataSourceQuery.js} +3 -3
- package/dist/idp-service/src/services/index.d.ts +8 -4
- package/dist/idp-service/src/services/index.js +3 -1
- package/dist/idp-service/src/services/schemas/CheckDetails.d.ts +0 -1
- package/dist/idp-service/src/services/schemas/DataPoint.d.ts +2 -3
- package/dist/idp-service/src/services/schemas/DataSource.d.ts +1 -1
- package/dist/idp-service/src/services/schemas/Rule.d.ts +1 -0
- package/dist/idp-service/src/services/schemas/Scorecard.d.ts +2 -0
- package/dist/idp-service/src/services/schemas/ScorecardChecks.d.ts +1 -0
- package/dist/idp-service/src/services/schemas/ScorecardDetails.d.ts +3 -2
- package/dist/idp-service/src/services/schemas/{ScorecardFilters.d.ts → ScorecardFilter.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/idp-service/src/services/hooks/useGetDatapointsForDataourceQuery.d.ts +0 -19
- /package/dist/idp-service/src/services/schemas/{ScorecardFilters.js → ScorecardFilter.js} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
3
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
|
+
export interface DeleteCheckMutationPathParams {
|
|
5
|
+
'check-id': string;
|
|
6
|
+
}
|
|
7
|
+
export interface DeleteCheckMutationQueryParams {
|
|
8
|
+
force_delete?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface DeleteCheckMutationHeaderParams {
|
|
11
|
+
'Harness-Account'?: string;
|
|
12
|
+
}
|
|
13
|
+
export type DeleteCheckOkResponse = ResponseWithPagination<unknown>;
|
|
14
|
+
export type DeleteCheckErrorResponse = unknown;
|
|
15
|
+
export interface DeleteCheckProps extends DeleteCheckMutationPathParams, Omit<FetcherOptions<DeleteCheckMutationQueryParams, unknown, DeleteCheckMutationHeaderParams>, 'url'> {
|
|
16
|
+
queryParams: DeleteCheckMutationQueryParams;
|
|
17
|
+
}
|
|
18
|
+
export declare function deleteCheck(props: DeleteCheckProps): Promise<DeleteCheckOkResponse>;
|
|
19
|
+
/**
|
|
20
|
+
* Delete check details for given checkId
|
|
21
|
+
*/
|
|
22
|
+
export declare function useDeleteCheckMutation(options?: Omit<UseMutationOptions<DeleteCheckOkResponse, DeleteCheckErrorResponse, DeleteCheckProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteCheckOkResponse, unknown, DeleteCheckProps, unknown>;
|
|
@@ -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 { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function deleteCheck(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/checks/${props['check-id']}`, method: 'DELETE' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Delete check details for given checkId
|
|
11
|
+
*/
|
|
12
|
+
export function useDeleteCheckMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => deleteCheck(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
3
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
|
+
export interface DeleteScorecardMutationPathParams {
|
|
5
|
+
'scorecard-id': string;
|
|
6
|
+
}
|
|
7
|
+
export interface DeleteScorecardMutationHeaderParams {
|
|
8
|
+
'Harness-Account'?: string;
|
|
9
|
+
}
|
|
10
|
+
export type DeleteScorecardOkResponse = ResponseWithPagination<unknown>;
|
|
11
|
+
export type DeleteScorecardErrorResponse = unknown;
|
|
12
|
+
export interface DeleteScorecardProps extends DeleteScorecardMutationPathParams, Omit<FetcherOptions<unknown, unknown, DeleteScorecardMutationHeaderParams>, 'url'> {
|
|
13
|
+
}
|
|
14
|
+
export declare function deleteScorecard(props: DeleteScorecardProps): Promise<DeleteScorecardOkResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete scorecard details for given scorecardId
|
|
17
|
+
*/
|
|
18
|
+
export declare function useDeleteScorecardMutation(options?: Omit<UseMutationOptions<DeleteScorecardOkResponse, DeleteScorecardErrorResponse, DeleteScorecardProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteScorecardOkResponse, unknown, DeleteScorecardProps, unknown>;
|
|
@@ -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 { useMutation } from '@tanstack/react-query';
|
|
5
|
+
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
+
export function deleteScorecard(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/scorecards/${props['scorecard-id']}`, method: 'DELETE' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Delete scorecard details for given scorecardId
|
|
11
|
+
*/
|
|
12
|
+
export function useDeleteScorecardMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => deleteScorecard(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -5,12 +5,16 @@ import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
|
5
5
|
export interface GetCheckQueryPathParams {
|
|
6
6
|
'check-id': string;
|
|
7
7
|
}
|
|
8
|
+
export interface GetCheckQueryQueryParams {
|
|
9
|
+
custom: boolean;
|
|
10
|
+
}
|
|
8
11
|
export interface GetCheckQueryHeaderParams {
|
|
9
12
|
'Harness-Account'?: string;
|
|
10
13
|
}
|
|
11
14
|
export type GetCheckOkResponse = ResponseWithPagination<CheckDetailsResponseResponse>;
|
|
12
15
|
export type GetCheckErrorResponse = unknown;
|
|
13
|
-
export interface GetCheckProps extends GetCheckQueryPathParams, Omit<FetcherOptions<
|
|
16
|
+
export interface GetCheckProps extends GetCheckQueryPathParams, Omit<FetcherOptions<GetCheckQueryQueryParams, unknown, GetCheckQueryHeaderParams>, 'url'> {
|
|
17
|
+
queryParams: GetCheckQueryQueryParams;
|
|
14
18
|
}
|
|
15
19
|
export declare function getCheck(props: GetCheckProps): Promise<GetCheckOkResponse>;
|
|
16
20
|
/**
|
|
@@ -10,5 +10,5 @@ export function getCheck(props) {
|
|
|
10
10
|
* Get check details for given checkId
|
|
11
11
|
*/
|
|
12
12
|
export function useGetCheckQuery(props, options) {
|
|
13
|
-
return useQuery(['get-check', props['check-id']], ({ signal }) => getCheck(Object.assign(Object.assign({}, props), { signal })), options);
|
|
13
|
+
return useQuery(['get-check', props['check-id'], props.queryParams], ({ signal }) => getCheck(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { DatapointResponseResponse } from '../responses/DatapointResponseResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetDataPointsForDataSourceQueryPathParams {
|
|
6
|
+
'data-source': string;
|
|
7
|
+
}
|
|
8
|
+
export interface GetDataPointsForDataSourceQueryHeaderParams {
|
|
9
|
+
'Harness-Account'?: string;
|
|
10
|
+
}
|
|
11
|
+
export type GetDataPointsForDataSourceOkResponse = ResponseWithPagination<DatapointResponseResponse>;
|
|
12
|
+
export type GetDataPointsForDataSourceErrorResponse = unknown;
|
|
13
|
+
export interface GetDataPointsForDataSourceProps extends GetDataPointsForDataSourceQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetDataPointsForDataSourceQueryHeaderParams>, 'url'> {
|
|
14
|
+
}
|
|
15
|
+
export declare function getDataPointsForDataSource(props: GetDataPointsForDataSourceProps): Promise<GetDataPointsForDataSourceOkResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Get DataPoints Present in DataSources
|
|
18
|
+
*/
|
|
19
|
+
export declare function useGetDataPointsForDataSourceQuery(props: GetDataPointsForDataSourceProps, options?: Omit<UseQueryOptions<GetDataPointsForDataSourceOkResponse, GetDataPointsForDataSourceErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetDataPointsForDataSourceOkResponse, unknown>;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// Please do not modify this code directly.
|
|
4
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
|
-
export function
|
|
6
|
+
export function getDataPointsForDataSource(props) {
|
|
7
7
|
return fetcher(Object.assign({ url: `/v1/data-sources/${props['data-source']}/datapoints`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Get DataPoints Present in DataSources
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
return useQuery(['get-
|
|
12
|
+
export function useGetDataPointsForDataSourceQuery(props, options) {
|
|
13
|
+
return useQuery(['get-data-points-for-data-source', props['data-source']], ({ signal }) => getDataPointsForDataSource(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -9,6 +9,10 @@ export type { CreateLayoutErrorResponse, CreateLayoutOkResponse, CreateLayoutPro
|
|
|
9
9
|
export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
|
|
10
10
|
export type { CreateScorecardErrorResponse, CreateScorecardOkResponse, CreateScorecardProps, CreateScorecardRequestBody, } from './hooks/useCreateScorecardMutation';
|
|
11
11
|
export { createScorecard, useCreateScorecardMutation } from './hooks/useCreateScorecardMutation';
|
|
12
|
+
export type { DeleteCheckErrorResponse, DeleteCheckMutationPathParams, DeleteCheckMutationQueryParams, DeleteCheckOkResponse, DeleteCheckProps, } from './hooks/useDeleteCheckMutation';
|
|
13
|
+
export { deleteCheck, useDeleteCheckMutation } from './hooks/useDeleteCheckMutation';
|
|
14
|
+
export type { DeleteScorecardErrorResponse, DeleteScorecardMutationPathParams, DeleteScorecardOkResponse, DeleteScorecardProps, } from './hooks/useDeleteScorecardMutation';
|
|
15
|
+
export { deleteScorecard, useDeleteScorecardMutation } from './hooks/useDeleteScorecardMutation';
|
|
12
16
|
export type { GetAllDatasourcesForAccountErrorResponse, GetAllDatasourcesForAccountOkResponse, GetAllDatasourcesForAccountProps, } from './hooks/useGetAllDatasourcesForAccountQuery';
|
|
13
17
|
export { getAllDatasourcesForAccount, useGetAllDatasourcesForAccountQuery, } from './hooks/useGetAllDatasourcesForAccountQuery';
|
|
14
18
|
export type { GetAllLayoutsErrorResponse, GetAllLayoutsOkResponse, GetAllLayoutsProps, } from './hooks/useGetAllLayoutsQuery';
|
|
@@ -19,14 +23,14 @@ export type { GetAuthInfoAuthIdErrorResponse, GetAuthInfoAuthIdOkResponse, GetAu
|
|
|
19
23
|
export { getAuthInfoAuthId, useGetAuthInfoAuthIdQuery } from './hooks/useGetAuthInfoAuthIdQuery';
|
|
20
24
|
export type { GetBackstagePermissionsErrorResponse, GetBackstagePermissionsOkResponse, GetBackstagePermissionsProps, } from './hooks/useGetBackstagePermissionsQuery';
|
|
21
25
|
export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
|
|
22
|
-
export type { GetCheckErrorResponse, GetCheckOkResponse, GetCheckProps, GetCheckQueryPathParams, } from './hooks/useGetCheckQuery';
|
|
26
|
+
export type { GetCheckErrorResponse, GetCheckOkResponse, GetCheckProps, GetCheckQueryPathParams, GetCheckQueryQueryParams, } from './hooks/useGetCheckQuery';
|
|
23
27
|
export { getCheck, useGetCheckQuery } from './hooks/useGetCheckQuery';
|
|
24
28
|
export type { GetChecksErrorResponse, GetChecksOkResponse, GetChecksProps, GetChecksQueryQueryParams, } from './hooks/useGetChecksQuery';
|
|
25
29
|
export { getChecks, useGetChecksQuery } from './hooks/useGetChecksQuery';
|
|
26
30
|
export type { GetConnectorInfoErrorResponse, GetConnectorInfoOkResponse, GetConnectorInfoProps, } from './hooks/useGetConnectorInfoQuery';
|
|
27
31
|
export { getConnectorInfo, useGetConnectorInfoQuery } from './hooks/useGetConnectorInfoQuery';
|
|
28
|
-
export type {
|
|
29
|
-
export {
|
|
32
|
+
export type { GetDataPointsForDataSourceErrorResponse, GetDataPointsForDataSourceOkResponse, GetDataPointsForDataSourceProps, GetDataPointsForDataSourceQueryPathParams, } from './hooks/useGetDataPointsForDataSourceQuery';
|
|
33
|
+
export { getDataPointsForDataSource, useGetDataPointsForDataSourceQuery, } from './hooks/useGetDataPointsForDataSourceQuery';
|
|
30
34
|
export type { GetHarnessEntitiesCountErrorResponse, GetHarnessEntitiesCountOkResponse, GetHarnessEntitiesCountProps, } from './hooks/useGetHarnessEntitiesCountQuery';
|
|
31
35
|
export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
|
|
32
36
|
export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, GetHarnessEntitiesProps, GetHarnessEntitiesQueryQueryParams, } from './hooks/useGetHarnessEntitiesQuery';
|
|
@@ -160,7 +164,7 @@ export type { ScorecardChecksDetails } from './schemas/ScorecardChecksDetails';
|
|
|
160
164
|
export type { ScorecardDetails } from './schemas/ScorecardDetails';
|
|
161
165
|
export type { ScorecardDetailsRequest } from './schemas/ScorecardDetailsRequest';
|
|
162
166
|
export type { ScorecardDetailsResponse } from './schemas/ScorecardDetailsResponse';
|
|
163
|
-
export type {
|
|
167
|
+
export type { ScorecardFilter } from './schemas/ScorecardFilter';
|
|
164
168
|
export type { ScorecardResponse } from './schemas/ScorecardResponse';
|
|
165
169
|
export type { StatusInfo } from './schemas/StatusInfo';
|
|
166
170
|
export type { StatusInfoResponse } from './schemas/StatusInfoResponse';
|
|
@@ -3,6 +3,8 @@ export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } fr
|
|
|
3
3
|
export { createCheck, useCreateCheckMutation } from './hooks/useCreateCheckMutation';
|
|
4
4
|
export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
|
|
5
5
|
export { createScorecard, useCreateScorecardMutation } from './hooks/useCreateScorecardMutation';
|
|
6
|
+
export { deleteCheck, useDeleteCheckMutation } from './hooks/useDeleteCheckMutation';
|
|
7
|
+
export { deleteScorecard, useDeleteScorecardMutation } from './hooks/useDeleteScorecardMutation';
|
|
6
8
|
export { getAllDatasourcesForAccount, useGetAllDatasourcesForAccountQuery, } from './hooks/useGetAllDatasourcesForAccountQuery';
|
|
7
9
|
export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
|
|
8
10
|
export { getAllowList, useGetAllowListQuery } from './hooks/useGetAllowListQuery';
|
|
@@ -11,7 +13,7 @@ export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hoo
|
|
|
11
13
|
export { getCheck, useGetCheckQuery } from './hooks/useGetCheckQuery';
|
|
12
14
|
export { getChecks, useGetChecksQuery } from './hooks/useGetChecksQuery';
|
|
13
15
|
export { getConnectorInfo, useGetConnectorInfoQuery } from './hooks/useGetConnectorInfoQuery';
|
|
14
|
-
export {
|
|
16
|
+
export { getDataPointsForDataSource, useGetDataPointsForDataSourceQuery, } from './hooks/useGetDataPointsForDataSourceQuery';
|
|
15
17
|
export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
|
|
16
18
|
export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
|
|
17
19
|
export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
* Conatins detail for single data point
|
|
3
3
|
*/
|
|
4
4
|
export interface DataPoint {
|
|
5
|
+
conditional_input_description: string;
|
|
5
6
|
description: string;
|
|
6
|
-
|
|
7
|
-
input_value?: string;
|
|
8
|
-
is_conditional?: boolean;
|
|
7
|
+
is_conditional: boolean;
|
|
9
8
|
name: string;
|
|
10
9
|
type: string;
|
|
11
10
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ScorecardFilter } from '../schemas/ScorecardFilter';
|
|
2
2
|
export interface ScorecardDetails {
|
|
3
|
+
checks_missing?: string[];
|
|
3
4
|
description?: string;
|
|
4
|
-
|
|
5
|
+
filter?: ScorecardFilter;
|
|
5
6
|
identifier: string;
|
|
6
7
|
name: string;
|
|
7
8
|
published: boolean;
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { DatapointResponseResponse } from '../responses/DatapointResponseResponse';
|
|
3
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
-
export interface GetDatapointsForDataourceQueryPathParams {
|
|
6
|
-
'data-source': string;
|
|
7
|
-
}
|
|
8
|
-
export interface GetDatapointsForDataourceQueryHeaderParams {
|
|
9
|
-
'Harness-Account'?: string;
|
|
10
|
-
}
|
|
11
|
-
export type GetDatapointsForDataourceOkResponse = ResponseWithPagination<DatapointResponseResponse>;
|
|
12
|
-
export type GetDatapointsForDataourceErrorResponse = unknown;
|
|
13
|
-
export interface GetDatapointsForDataourceProps extends GetDatapointsForDataourceQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetDatapointsForDataourceQueryHeaderParams>, 'url'> {
|
|
14
|
-
}
|
|
15
|
-
export declare function getDatapointsForDataource(props: GetDatapointsForDataourceProps): Promise<GetDatapointsForDataourceOkResponse>;
|
|
16
|
-
/**
|
|
17
|
-
* Get DataPoints Present in DataSources
|
|
18
|
-
*/
|
|
19
|
-
export declare function useGetDatapointsForDataourceQuery(props: GetDatapointsForDataourceProps, options?: Omit<UseQueryOptions<GetDatapointsForDataourceOkResponse, GetDatapointsForDataourceErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetDatapointsForDataourceOkResponse, unknown>;
|
|
File without changes
|