@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.
Files changed (21) hide show
  1. package/dist/idp-service/src/services/hooks/useDeleteCheckMutation.d.ts +22 -0
  2. package/dist/idp-service/src/services/hooks/useDeleteCheckMutation.js +14 -0
  3. package/dist/idp-service/src/services/hooks/useDeleteScorecardMutation.d.ts +18 -0
  4. package/dist/idp-service/src/services/hooks/useDeleteScorecardMutation.js +14 -0
  5. package/dist/idp-service/src/services/hooks/useGetCheckQuery.d.ts +5 -1
  6. package/dist/idp-service/src/services/hooks/useGetCheckQuery.js +1 -1
  7. package/dist/idp-service/src/services/hooks/useGetDataPointsForDataSourceQuery.d.ts +19 -0
  8. package/dist/idp-service/src/services/hooks/{useGetDatapointsForDataourceQuery.js → useGetDataPointsForDataSourceQuery.js} +3 -3
  9. package/dist/idp-service/src/services/index.d.ts +8 -4
  10. package/dist/idp-service/src/services/index.js +3 -1
  11. package/dist/idp-service/src/services/schemas/CheckDetails.d.ts +0 -1
  12. package/dist/idp-service/src/services/schemas/DataPoint.d.ts +2 -3
  13. package/dist/idp-service/src/services/schemas/DataSource.d.ts +1 -1
  14. package/dist/idp-service/src/services/schemas/Rule.d.ts +1 -0
  15. package/dist/idp-service/src/services/schemas/Scorecard.d.ts +2 -0
  16. package/dist/idp-service/src/services/schemas/ScorecardChecks.d.ts +1 -0
  17. package/dist/idp-service/src/services/schemas/ScorecardDetails.d.ts +3 -2
  18. package/dist/idp-service/src/services/schemas/{ScorecardFilters.d.ts → ScorecardFilter.d.ts} +1 -1
  19. package/package.json +1 -1
  20. package/dist/idp-service/src/services/hooks/useGetDatapointsForDataourceQuery.d.ts +0 -19
  21. /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<unknown, unknown, GetCheckQueryHeaderParams>, 'url'> {
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 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';
@@ -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 { 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';
@@ -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 { ScorecardFilters } from './schemas/ScorecardFilters';
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 { 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';
@@ -7,5 +7,4 @@ export interface CheckDetails extends Check {
7
7
  harness_managed?: boolean;
8
8
  rule_strategy: 'ALL_OF' | 'ANY_OF';
9
9
  rules: Rule[];
10
- tags?: string[];
11
10
  }
@@ -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;
@@ -1,7 +1,9 @@
1
1
  import type { Check } from '../schemas/Check';
2
2
  export interface Scorecard {
3
3
  checks: Check[];
4
+ checks_missing?: string[];
4
5
  description?: string;
5
6
  identifier: string;
6
7
  name: string;
8
+ published?: boolean;
7
9
  }
@@ -1,4 +1,5 @@
1
1
  export interface ScorecardChecks {
2
+ custom: boolean;
2
3
  identifier: string;
3
4
  /**
4
5
  * @format double
@@ -1,7 +1,8 @@
1
- import type { ScorecardFilters } from '../schemas/ScorecardFilters';
1
+ import type { ScorecardFilter } from '../schemas/ScorecardFilter';
2
2
  export interface ScorecardDetails {
3
+ checks_missing?: string[];
3
4
  description?: string;
4
- filters: ScorecardFilters[];
5
+ filter?: ScorecardFilter;
5
6
  identifier: string;
6
7
  name: string;
7
8
  published: boolean;
@@ -1,4 +1,4 @@
1
- export interface ScorecardFilters {
1
+ export interface ScorecardFilter {
2
2
  kind: string;
3
3
  lifecycle?: string[];
4
4
  owners?: 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.31.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>;