@harnessio/react-idp-service-client 0.34.0 → 0.36.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,21 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ScorecardRecalibrateReponseResponse } from '../responses/ScorecardRecalibrateReponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetRecalibratedScoreForScorecardQueryQueryParams {
6
+ scorecard_identifier?: string;
7
+ entity_identifier?: string;
8
+ }
9
+ export interface GetRecalibratedScoreForScorecardQueryHeaderParams {
10
+ 'Harness-Account'?: string;
11
+ }
12
+ export type GetRecalibratedScoreForScorecardOkResponse = ResponseWithPagination<ScorecardRecalibrateReponseResponse>;
13
+ export type GetRecalibratedScoreForScorecardErrorResponse = unknown;
14
+ export interface GetRecalibratedScoreForScorecardProps extends Omit<FetcherOptions<GetRecalibratedScoreForScorecardQueryQueryParams, unknown, GetRecalibratedScoreForScorecardQueryHeaderParams>, 'url'> {
15
+ queryParams: GetRecalibratedScoreForScorecardQueryQueryParams;
16
+ }
17
+ export declare function getRecalibratedScoreForScorecard(props: GetRecalibratedScoreForScorecardProps): Promise<GetRecalibratedScoreForScorecardOkResponse>;
18
+ /**
19
+ * API for Recalibrating the score for scorecard of entity
20
+ */
21
+ export declare function useGetRecalibratedScoreForScorecardQuery(props: GetRecalibratedScoreForScorecardProps, options?: Omit<UseQueryOptions<GetRecalibratedScoreForScorecardOkResponse, GetRecalibratedScoreForScorecardErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetRecalibratedScoreForScorecardOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getRecalibratedScoreForScorecard(props) {
7
+ return fetcher(Object.assign({ url: `/v1/scores/recaliberate`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * API for Recalibrating the score for scorecard of entity
11
+ */
12
+ export function useGetRecalibratedScoreForScorecardQuery(props, options) {
13
+ return useQuery(['get-recalibrated-score-for-scorecard', props.queryParams], ({ signal }) => getRecalibratedScoreForScorecard(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -47,6 +47,8 @@ export type { GetPluginsInfoPluginIdErrorResponse, GetPluginsInfoPluginIdOkRespo
47
47
  export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks/useGetPluginsInfoPluginIdQuery';
48
48
  export type { GetPluginsErrorResponse, GetPluginsOkResponse, GetPluginsProps, } from './hooks/useGetPluginsQuery';
49
49
  export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
50
+ export type { GetRecalibratedScoreForScorecardErrorResponse, GetRecalibratedScoreForScorecardOkResponse, GetRecalibratedScoreForScorecardProps, GetRecalibratedScoreForScorecardQueryQueryParams, } from './hooks/useGetRecalibratedScoreForScorecardQuery';
51
+ export { getRecalibratedScoreForScorecard, useGetRecalibratedScoreForScorecardQuery, } from './hooks/useGetRecalibratedScoreForScorecardQuery';
50
52
  export type { GetScorecardErrorResponse, GetScorecardOkResponse, GetScorecardProps, GetScorecardQueryPathParams, } from './hooks/useGetScorecardQuery';
51
53
  export { getScorecard, useGetScorecardQuery } from './hooks/useGetScorecardQuery';
52
54
  export type { GetScorecardsErrorResponse, GetScorecardsOkResponse, GetScorecardsProps, } from './hooks/useGetScorecardsQuery';
@@ -110,6 +112,7 @@ export type { MergedPluginConfigResponseResponse } from './responses/MergedPlugi
110
112
  export type { PluginDetailedInfoResponseResponse } from './responses/PluginDetailedInfoResponseResponse';
111
113
  export type { PluginInfoResponseListResponse } from './responses/PluginInfoResponseListResponse';
112
114
  export type { ScorecardDetailsResponseResponse } from './responses/ScorecardDetailsResponseResponse';
115
+ export type { ScorecardRecalibrateReponseResponse } from './responses/ScorecardRecalibrateReponseResponse';
113
116
  export type { ScorecardResponseListResponse } from './responses/ScorecardResponseListResponse';
114
117
  export type { StatusInfoResponseResponse } from './responses/StatusInfoResponseResponse';
115
118
  export type { AllowListRequest } from './schemas/AllowListRequest';
@@ -133,6 +136,7 @@ export type { CheckDetailsRequest } from './schemas/CheckDetailsRequest';
133
136
  export type { CheckDetailsResponse } from './schemas/CheckDetailsResponse';
134
137
  export type { CheckListItem } from './schemas/CheckListItem';
135
138
  export type { CheckResponse } from './schemas/CheckResponse';
139
+ export type { CheckStatus } from './schemas/CheckStatus';
136
140
  export type { ConfigurationEntities } from './schemas/ConfigurationEntities';
137
141
  export type { ConnectorDetails } from './schemas/ConnectorDetails';
138
142
  export type { ConnectorInfoRequest } from './schemas/ConnectorInfoRequest';
@@ -176,6 +180,8 @@ export type { ScorecardDetails } from './schemas/ScorecardDetails';
176
180
  export type { ScorecardDetailsRequest } from './schemas/ScorecardDetailsRequest';
177
181
  export type { ScorecardDetailsResponse } from './schemas/ScorecardDetailsResponse';
178
182
  export type { ScorecardFilter } from './schemas/ScorecardFilter';
183
+ export type { ScorecardRecalibrateResponse } from './schemas/ScorecardRecalibrateResponse';
179
184
  export type { ScorecardResponse } from './schemas/ScorecardResponse';
185
+ export type { ScorecardSummaryInfo } from './schemas/ScorecardSummaryInfo';
180
186
  export type { StatusInfo } from './schemas/StatusInfo';
181
187
  export type { StatusInfoResponse } from './schemas/StatusInfoResponse';
@@ -22,6 +22,7 @@ export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
22
22
  export { getMergedPluginsConfig, useGetMergedPluginsConfigQuery, } from './hooks/useGetMergedPluginsConfigQuery';
23
23
  export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks/useGetPluginsInfoPluginIdQuery';
24
24
  export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
25
+ export { getRecalibratedScoreForScorecard, useGetRecalibratedScoreForScorecardQuery, } from './hooks/useGetRecalibratedScoreForScorecardQuery';
25
26
  export { getScorecard, useGetScorecardQuery } from './hooks/useGetScorecardQuery';
26
27
  export { getScorecards, useGetScorecardsQuery } from './hooks/useGetScorecardsQuery';
27
28
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
@@ -0,0 +1,2 @@
1
+ import type { ScorecardRecalibrateResponse } from '../schemas/ScorecardRecalibrateResponse';
2
+ export type ScorecardRecalibrateReponseResponse = ScorecardRecalibrateResponse;
@@ -6,6 +6,6 @@ export interface Check {
6
6
  description?: string;
7
7
  expression?: string;
8
8
  identifier: string;
9
- labels?: string[];
10
9
  name: string;
10
+ tags?: string[];
11
11
  }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Info for single check status
3
+ */
4
+ export interface CheckStatus {
5
+ name: string;
6
+ reason?: string;
7
+ status: 'FAIL' | 'PASS';
8
+ weight: number;
9
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -1,5 +1,5 @@
1
1
  export interface Rule {
2
- conditional_input_value: string;
2
+ conditional_input_value?: string;
3
3
  data_point_identifier: string;
4
4
  data_source_identifier: string;
5
5
  operator: string;
@@ -0,0 +1,4 @@
1
+ import type { ScorecardSummaryInfo } from '../schemas/ScorecardSummaryInfo';
2
+ export interface ScorecardRecalibrateResponse {
3
+ recalibrated_scores: ScorecardSummaryInfo;
4
+ }
@@ -0,0 +1,14 @@
1
+ import type { CheckStatus } from '../schemas/CheckStatus';
2
+ /**
3
+ * Scorecard score calculation summary info
4
+ */
5
+ export interface ScorecardSummaryInfo {
6
+ checks_statuses: CheckStatus[];
7
+ description: string;
8
+ score: number;
9
+ scorecard_name: string;
10
+ /**
11
+ * @format int64
12
+ */
13
+ timestamp: number;
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.34.0",
3
+ "version": "0.36.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",