@harnessio/react-idp-service-client 0.37.0 → 0.39.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,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ScorecardRecalibrateResponseResponse } from '../responses/ScorecardRecalibrateResponseResponse';
3
+ import type { ScorecardRecalibrateRequestRequestBody } from '../requestBodies/ScorecardRecalibrateRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ScorecardRecalibrateMutationHeaderParams {
7
+ 'Harness-Account'?: string;
8
+ }
9
+ export type ScorecardRecalibrateRequestBody = ScorecardRecalibrateRequestRequestBody;
10
+ export type ScorecardRecalibrateOkResponse = ResponseWithPagination<ScorecardRecalibrateResponseResponse>;
11
+ export type ScorecardRecalibrateErrorResponse = unknown;
12
+ export interface ScorecardRecalibrateProps extends Omit<FetcherOptions<unknown, ScorecardRecalibrateRequestBody, ScorecardRecalibrateMutationHeaderParams>, 'url'> {
13
+ body: ScorecardRecalibrateRequestBody;
14
+ }
15
+ export declare function scorecardRecalibrate(props: ScorecardRecalibrateProps): Promise<ScorecardRecalibrateOkResponse>;
16
+ /**
17
+ * API for Recalibrating the score for scorecard of entity
18
+ */
19
+ export declare function useScorecardRecalibrateMutation(options?: Omit<UseMutationOptions<ScorecardRecalibrateOkResponse, ScorecardRecalibrateErrorResponse, ScorecardRecalibrateProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ScorecardRecalibrateOkResponse, unknown, ScorecardRecalibrateProps, 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 scorecardRecalibrate(props) {
7
+ return fetcher(Object.assign({ url: `/v1/scores/recalibrate`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * API for Recalibrating the score for scorecard of entity
11
+ */
12
+ export function useScorecardRecalibrateMutation(options) {
13
+ return useMutation((mutateProps) => scorecardRecalibrate(mutateProps), options);
14
+ }
@@ -47,8 +47,6 @@ 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';
52
50
  export type { GetScorecardErrorResponse, GetScorecardOkResponse, GetScorecardProps, GetScorecardQueryPathParams, } from './hooks/useGetScorecardQuery';
53
51
  export { getScorecard, useGetScorecardQuery } from './hooks/useGetScorecardQuery';
54
52
  export type { GetScorecardsErrorResponse, GetScorecardsOkResponse, GetScorecardsProps, } from './hooks/useGetScorecardsQuery';
@@ -71,6 +69,8 @@ export type { SaveConnectorInfoErrorResponse, SaveConnectorInfoOkResponse, SaveC
71
69
  export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
72
70
  export type { SaveOrUpdatePluginAppConfigErrorResponse, SaveOrUpdatePluginAppConfigOkResponse, SaveOrUpdatePluginAppConfigProps, SaveOrUpdatePluginAppConfigRequestBody, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
73
71
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
72
+ export type { ScorecardRecalibrateErrorResponse, ScorecardRecalibrateOkResponse, ScorecardRecalibrateProps, ScorecardRecalibrateRequestBody, } from './hooks/useScorecardRecalibrateMutation';
73
+ export { scorecardRecalibrate, useScorecardRecalibrateMutation, } from './hooks/useScorecardRecalibrateMutation';
74
74
  export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
75
75
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
76
76
  export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
@@ -89,6 +89,7 @@ export type { ConnectorInfoRequestRequestBody } from './requestBodies/ConnectorI
89
89
  export type { GenerateYamlRequestRequestBody } from './requestBodies/GenerateYamlRequestRequestBody';
90
90
  export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
91
91
  export type { RequestPluginRequestRequestBody } from './requestBodies/RequestPluginRequestRequestBody';
92
+ export type { ScorecardRecalibrateRequestRequestBody } from './requestBodies/ScorecardRecalibrateRequestRequestBody';
92
93
  export type { AllowListResponseResponse } from './responses/AllowListResponseResponse';
93
94
  export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
94
95
  export type { AuthInfoResponseResponse } from './responses/AuthInfoResponseResponse';
@@ -112,7 +113,7 @@ export type { MergedPluginConfigResponseResponse } from './responses/MergedPlugi
112
113
  export type { PluginDetailedInfoResponseResponse } from './responses/PluginDetailedInfoResponseResponse';
113
114
  export type { PluginInfoResponseListResponse } from './responses/PluginInfoResponseListResponse';
114
115
  export type { ScorecardDetailsResponseResponse } from './responses/ScorecardDetailsResponseResponse';
115
- export type { ScorecardRecalibrateReponseResponse } from './responses/ScorecardRecalibrateReponseResponse';
116
+ export type { ScorecardRecalibrateResponseResponse } from './responses/ScorecardRecalibrateResponseResponse';
116
117
  export type { ScorecardResponseListResponse } from './responses/ScorecardResponseListResponse';
117
118
  export type { StatusInfoResponseResponse } from './responses/StatusInfoResponseResponse';
118
119
  export type { AllowListRequest } from './schemas/AllowListRequest';
@@ -180,6 +181,8 @@ export type { ScorecardDetails } from './schemas/ScorecardDetails';
180
181
  export type { ScorecardDetailsRequest } from './schemas/ScorecardDetailsRequest';
181
182
  export type { ScorecardDetailsResponse } from './schemas/ScorecardDetailsResponse';
182
183
  export type { ScorecardFilter } from './schemas/ScorecardFilter';
184
+ export type { ScorecardRecalibrateIdentifiers } from './schemas/ScorecardRecalibrateIdentifiers';
185
+ export type { ScorecardRecalibrateRequest } from './schemas/ScorecardRecalibrateRequest';
183
186
  export type { ScorecardRecalibrateResponse } from './schemas/ScorecardRecalibrateResponse';
184
187
  export type { ScorecardResponse } from './schemas/ScorecardResponse';
185
188
  export type { ScorecardSummaryInfo } from './schemas/ScorecardSummaryInfo';
@@ -22,7 +22,6 @@ 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';
26
25
  export { getScorecard, useGetScorecardQuery } from './hooks/useGetScorecardQuery';
27
26
  export { getScorecards, useGetScorecardsQuery } from './hooks/useGetScorecardsQuery';
28
27
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
@@ -34,6 +33,7 @@ export { saveAllowList, useSaveAllowListMutation } from './hooks/useSaveAllowLis
34
33
  export { saveAuthInfoAuthId, useSaveAuthInfoAuthIdMutation, } from './hooks/useSaveAuthInfoAuthIdMutation';
35
34
  export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
36
35
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
36
+ export { scorecardRecalibrate, useScorecardRecalibrateMutation, } from './hooks/useScorecardRecalibrateMutation';
37
37
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
38
38
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
39
39
  export { updateCheck, useUpdateCheckMutation } from './hooks/useUpdateCheckMutation';
@@ -0,0 +1,2 @@
1
+ import type { ScorecardRecalibrateRequest } from '../schemas/ScorecardRecalibrateRequest';
2
+ export type ScorecardRecalibrateRequestRequestBody = ScorecardRecalibrateRequest;
@@ -1,2 +1,2 @@
1
1
  import type { ScorecardRecalibrateResponse } from '../schemas/ScorecardRecalibrateResponse';
2
- export type ScorecardRecalibrateReponseResponse = ScorecardRecalibrateResponse;
2
+ export type ScorecardRecalibrateResponseResponse = ScorecardRecalibrateResponse;
@@ -3,6 +3,7 @@ export interface PluginInfo {
3
3
  core: boolean;
4
4
  created_by: string;
5
5
  description: string;
6
+ documentation?: string;
6
7
  enabled: boolean;
7
8
  icon_url: string;
8
9
  id: string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Identifiers needed for score recalibration
3
+ */
4
+ export interface ScorecardRecalibrateIdentifiers {
5
+ entity_identifier?: string;
6
+ scorecard_identifier?: string;
7
+ }
@@ -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 {};
@@ -0,0 +1,4 @@
1
+ import type { ScorecardRecalibrateIdentifiers } from '../schemas/ScorecardRecalibrateIdentifiers';
2
+ export interface ScorecardRecalibrateRequest {
3
+ identifiers?: ScorecardRecalibrateIdentifiers;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.37.0",
3
+ "version": "0.39.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,21 +0,0 @@
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>;
@@ -1,14 +0,0 @@
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
- }