@harnessio/react-idp-service-client 0.16.0 → 0.17.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,13 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { ConnectorInfoResponseResponse } from '../responses/ConnectorInfoResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from './../../fetcher';
5
+ export type GetConnectorInfoOkResponse = ResponseWithPagination<ConnectorInfoResponseResponse>;
6
+ export type GetConnectorInfoErrorResponse = unknown;
7
+ export interface GetConnectorInfoProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
8
+ }
9
+ export declare function getConnectorInfo(props: GetConnectorInfoProps): Promise<GetConnectorInfoOkResponse>;
10
+ /**
11
+ * Get Connector Info
12
+ */
13
+ export declare function useGetConnectorInfoQuery(props: GetConnectorInfoProps, options?: Omit<UseQueryOptions<GetConnectorInfoOkResponse, GetConnectorInfoErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetConnectorInfoOkResponse, 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';
6
+ export function getConnectorInfo(props) {
7
+ return fetcher(Object.assign({ url: `/v1/connector-info`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get Connector Info
11
+ */
12
+ export function useGetConnectorInfoQuery(props, options) {
13
+ return useQuery(['get-connector-info'], ({ signal }) => getConnectorInfo(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -8,7 +8,6 @@ export interface GetHarnessEntitiesQueryQueryParams {
8
8
  sort?: string;
9
9
  order?: string;
10
10
  search_term?: string;
11
- projects_to_filter?: string[];
12
11
  }
13
12
  export interface GetHarnessEntitiesQueryHeaderParams {
14
13
  'Harness-Account'?: string;
@@ -3,7 +3,7 @@ import type { PluginDetailedInfoResponseResponse } from '../responses/PluginDeta
3
3
  import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from './../../fetcher';
5
5
  export interface GetPluginsInfoPluginIdQueryPathParams {
6
- 'plugin-id': 'github-pull-requests-board' | 'harness-ci-cd' | 'kafka' | 'lighthouse' | 'pager-duty' | 'snyk-security' | 'todo';
6
+ 'plugin-id': 'github-pull-requests-board' | 'harness-ci-cd' | 'pager-duty' | 'snyk-security';
7
7
  }
8
8
  export interface GetPluginsInfoPluginIdQueryHeaderParams {
9
9
  'Harness-Account'?: string;
@@ -0,0 +1,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ConnectorInfoResponseResponse } from '../responses/ConnectorInfoResponseResponse';
3
+ import type { ConnectorInfoRequestRequestBody } from '../requestBodies/ConnectorInfoRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from './../../fetcher';
6
+ export interface SaveConnectorInfoMutationHeaderParams {
7
+ 'Harness-Account'?: string;
8
+ }
9
+ export type SaveConnectorInfoRequestBody = ConnectorInfoRequestRequestBody;
10
+ export type SaveConnectorInfoOkResponse = ResponseWithPagination<ConnectorInfoResponseResponse>;
11
+ export type SaveConnectorInfoErrorResponse = unknown;
12
+ export interface SaveConnectorInfoProps extends Omit<FetcherOptions<unknown, SaveConnectorInfoRequestBody, SaveConnectorInfoMutationHeaderParams>, 'url'> {
13
+ body: SaveConnectorInfoRequestBody;
14
+ }
15
+ export declare function saveConnectorInfo(props: SaveConnectorInfoProps): Promise<SaveConnectorInfoOkResponse>;
16
+ /**
17
+ * Create or update connector info
18
+ */
19
+ export declare function useSaveConnectorInfoMutation(options?: Omit<UseMutationOptions<SaveConnectorInfoOkResponse, SaveConnectorInfoErrorResponse, SaveConnectorInfoProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveConnectorInfoOkResponse, unknown, SaveConnectorInfoProps, 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';
6
+ export function saveConnectorInfo(props) {
7
+ return fetcher(Object.assign({ url: `/v1/connector-info`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create or update connector info
11
+ */
12
+ export function useSaveConnectorInfoMutation(options) {
13
+ return useMutation((mutateProps) => saveConnectorInfo(mutateProps), options);
14
+ }
@@ -7,8 +7,8 @@ export type { GetAllLayoutsErrorResponse, GetAllLayoutsOkResponse, GetAllLayouts
7
7
  export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
8
8
  export type { GetBackstagePermissionsErrorResponse, GetBackstagePermissionsOkResponse, GetBackstagePermissionsProps, } from './hooks/useGetBackstagePermissionsQuery';
9
9
  export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
10
- export type { GetHarnessEntitiesCountErrorResponse, GetHarnessEntitiesCountOkResponse, GetHarnessEntitiesCountProps, } from './hooks/useGetHarnessEntitiesCountQuery';
11
- export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
10
+ export type { GetConnectorInfoErrorResponse, GetConnectorInfoOkResponse, GetConnectorInfoProps, } from './hooks/useGetConnectorInfoQuery';
11
+ export { getConnectorInfo, useGetConnectorInfoQuery } from './hooks/useGetConnectorInfoQuery';
12
12
  export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, GetHarnessEntitiesProps, GetHarnessEntitiesQueryQueryParams, } from './hooks/useGetHarnessEntitiesQuery';
13
13
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
14
14
  export type { GetLayoutErrorResponse, GetLayoutOkResponse, GetLayoutProps, GetLayoutQueryPathParams, } from './hooks/useGetLayoutQuery';
@@ -21,6 +21,8 @@ export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, G
21
21
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
22
22
  export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
23
23
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
24
+ export type { SaveConnectorInfoErrorResponse, SaveConnectorInfoOkResponse, SaveConnectorInfoProps, SaveConnectorInfoRequestBody, } from './hooks/useSaveConnectorInfoMutation';
25
+ export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
24
26
  export type { SaveOrUpdatePluginAppConfigErrorResponse, SaveOrUpdatePluginAppConfigOkResponse, SaveOrUpdatePluginAppConfigProps, SaveOrUpdatePluginAppConfigRequestBody, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
25
27
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
26
28
  export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
@@ -29,10 +31,11 @@ export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermission
29
31
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
30
32
  export type { AppConfigRequestRequestBody } from './requestBodies/AppConfigRequestRequestBody';
31
33
  export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
34
+ export type { ConnectorInfoRequestRequestBody } from './requestBodies/ConnectorInfoRequestRequestBody';
32
35
  export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
33
36
  export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
34
37
  export type { BackstagePermissionsResponseResponse } from './responses/BackstagePermissionsResponseResponse';
35
- export type { HarnessEntitiesCountResponseResponse } from './responses/HarnessEntitiesCountResponseResponse';
38
+ export type { ConnectorInfoResponseResponse } from './responses/ConnectorInfoResponseResponse';
36
39
  export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
37
40
  export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesResponseResponse';
38
41
  export type { LayoutResponseResponse } from './responses/LayoutResponseResponse';
@@ -49,6 +52,8 @@ export type { BackstagePermissionsRequest } from './schemas/BackstagePermissions
49
52
  export type { BackstagePermissionsResponse } from './schemas/BackstagePermissionsResponse';
50
53
  export type { CatalogConnectorInfo } from './schemas/CatalogConnectorInfo';
51
54
  export type { ConnectorDetails } from './schemas/ConnectorDetails';
55
+ export type { ConnectorInfoRequest } from './schemas/ConnectorInfoRequest';
56
+ export type { ConnectorInfoResponse } from './schemas/ConnectorInfoResponse';
52
57
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
53
58
  export type { Exports } from './schemas/Exports';
54
59
  export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
@@ -2,13 +2,14 @@ export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } fr
2
2
  export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
3
3
  export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
4
4
  export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
5
- export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
5
+ export { getConnectorInfo, useGetConnectorInfoQuery } from './hooks/useGetConnectorInfoQuery';
6
6
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
7
7
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
8
8
  export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks/useGetPluginsInfoPluginIdQuery';
9
9
  export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
10
10
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
11
11
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
12
+ export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
12
13
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
13
14
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
14
15
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
@@ -0,0 +1,2 @@
1
+ import type { ConnectorInfoRequest } from '../schemas/ConnectorInfoRequest';
2
+ export type ConnectorInfoRequestRequestBody = ConnectorInfoRequest;
@@ -0,0 +1,2 @@
1
+ import type { ConnectorInfoResponse } from '../schemas/ConnectorInfoResponse';
2
+ export type ConnectorInfoResponseResponse = ConnectorInfoResponse;
@@ -0,0 +1,4 @@
1
+ import type { ConnectorDetails } from '../schemas/ConnectorDetails';
2
+ export interface ConnectorInfoRequest {
3
+ connector_details?: ConnectorDetails;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { ConnectorDetails } from '../schemas/ConnectorDetails';
2
+ export interface ConnectorInfoResponse {
3
+ connector_details?: ConnectorDetails;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -2,4 +2,9 @@ import type { HarnessBackstageEntities } from '../schemas/HarnessBackstageEntiti
2
2
  /**
3
3
  * Response for harness entities mapping with backstage entities
4
4
  */
5
- export type HarnessEntitiesResponse = HarnessBackstageEntities[];
5
+ export interface HarnessEntitiesResponse {
6
+ harness_backstage_entities: HarnessBackstageEntities[];
7
+ org_count: number;
8
+ project_count: number;
9
+ service_count: number;
10
+ }
@@ -1,5 +1,5 @@
1
1
  export interface PluginInfo {
2
- category: 'CI/CD' | 'Discovery' | 'Monitoring' | 'Quality' | 'Security' | 'Source Control Mgmt';
2
+ category: 'CI/CD' | 'Monitoring' | 'Security' | 'Source Control Mgmt';
3
3
  core: boolean;
4
4
  created_by: string;
5
5
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.16.0",
3
+ "version": "0.17.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,16 +0,0 @@
1
- import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { HarnessEntitiesCountResponseResponse } from '../responses/HarnessEntitiesCountResponseResponse';
3
- import type { ResponseWithPagination } from '../helpers';
4
- import { FetcherOptions } from './../../fetcher';
5
- export interface GetHarnessEntitiesCountQueryHeaderParams {
6
- 'Harness-Account'?: string;
7
- }
8
- export type GetHarnessEntitiesCountOkResponse = ResponseWithPagination<HarnessEntitiesCountResponseResponse>;
9
- export type GetHarnessEntitiesCountErrorResponse = unknown;
10
- export interface GetHarnessEntitiesCountProps extends Omit<FetcherOptions<unknown, unknown, GetHarnessEntitiesCountQueryHeaderParams>, 'url'> {
11
- }
12
- export declare function getHarnessEntitiesCount(props: GetHarnessEntitiesCountProps): Promise<GetHarnessEntitiesCountOkResponse>;
13
- /**
14
- * Get Harness Entities Count
15
- */
16
- export declare function useGetHarnessEntitiesCountQuery(props: GetHarnessEntitiesCountProps, options?: Omit<UseQueryOptions<GetHarnessEntitiesCountOkResponse, GetHarnessEntitiesCountErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetHarnessEntitiesCountOkResponse, 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';
6
- export function getHarnessEntitiesCount(props) {
7
- return fetcher(Object.assign({ url: `/v1/onboarding/harness-entities-count`, method: 'GET' }, props));
8
- }
9
- /**
10
- * Get Harness Entities Count
11
- */
12
- export function useGetHarnessEntitiesCountQuery(props, options) {
13
- return useQuery(['get-harness-entities-count'], ({ signal }) => getHarnessEntitiesCount(Object.assign(Object.assign({}, props), { signal })), options);
14
- }
@@ -1,3 +0,0 @@
1
- export interface HarnessEntitiesCountResponseResponse {
2
- id?: string;
3
- }
@@ -1,4 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- export {};