@harnessio/react-idp-service-client 0.29.0 → 0.30.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.
@@ -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
+ }
@@ -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 getDatapointsForDataource(props) {
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 useGetDatapointsForDataourceQuery(props, options) {
13
- return useQuery(['get-datapoints-for-dataource', props['data-source']], ({ signal }) => getDatapointsForDataource(Object.assign(Object.assign({}, props), { signal })), options);
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';
@@ -25,8 +29,8 @@ export type { GetChecksErrorResponse, GetChecksOkResponse, GetChecksProps, GetCh
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 { GetDatapointsForDataourceErrorResponse, GetDatapointsForDataourceOkResponse, GetDatapointsForDataourceProps, GetDatapointsForDataourceQueryPathParams, } from './hooks/useGetDatapointsForDataourceQuery';
29
- export { getDatapointsForDataource, useGetDatapointsForDataourceQuery, } from './hooks/useGetDatapointsForDataourceQuery';
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';
@@ -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 { getDatapointsForDataource, useGetDatapointsForDataourceQuery, } from './hooks/useGetDatapointsForDataourceQuery';
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
- input_description?: string;
7
- input_value?: string;
8
- is_conditional?: boolean;
7
+ is_conditional: boolean;
9
8
  name: string;
10
9
  type: string;
11
10
  }
@@ -2,7 +2,7 @@
2
2
  * Contains Details for Single Data source
3
3
  */
4
4
  export interface DataSource {
5
- description?: string;
5
+ description: string;
6
6
  identifier: string;
7
7
  name: string;
8
8
  }
@@ -1,4 +1,5 @@
1
1
  export interface Rule {
2
+ conditional_input_value: string;
2
3
  data_point_identifier: string;
3
4
  data_source_identifier: string;
4
5
  operator: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.29.0",
3
+ "version": "0.30.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -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>;