@harnessio/react-idp-service-client 0.15.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
+ }
@@ -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,6 +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 { GetConnectorInfoErrorResponse, GetConnectorInfoOkResponse, GetConnectorInfoProps, } from './hooks/useGetConnectorInfoQuery';
11
+ export { getConnectorInfo, useGetConnectorInfoQuery } from './hooks/useGetConnectorInfoQuery';
10
12
  export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, GetHarnessEntitiesProps, GetHarnessEntitiesQueryQueryParams, } from './hooks/useGetHarnessEntitiesQuery';
11
13
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
12
14
  export type { GetLayoutErrorResponse, GetLayoutOkResponse, GetLayoutProps, GetLayoutQueryPathParams, } from './hooks/useGetLayoutQuery';
@@ -19,6 +21,8 @@ export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, G
19
21
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
20
22
  export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
21
23
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
24
+ export type { SaveConnectorInfoErrorResponse, SaveConnectorInfoOkResponse, SaveConnectorInfoProps, SaveConnectorInfoRequestBody, } from './hooks/useSaveConnectorInfoMutation';
25
+ export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
22
26
  export type { SaveOrUpdatePluginAppConfigErrorResponse, SaveOrUpdatePluginAppConfigOkResponse, SaveOrUpdatePluginAppConfigProps, SaveOrUpdatePluginAppConfigRequestBody, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
23
27
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
24
28
  export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
@@ -27,9 +31,11 @@ export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermission
27
31
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
28
32
  export type { AppConfigRequestRequestBody } from './requestBodies/AppConfigRequestRequestBody';
29
33
  export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
34
+ export type { ConnectorInfoRequestRequestBody } from './requestBodies/ConnectorInfoRequestRequestBody';
30
35
  export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
31
36
  export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
32
37
  export type { BackstagePermissionsResponseResponse } from './responses/BackstagePermissionsResponseResponse';
38
+ export type { ConnectorInfoResponseResponse } from './responses/ConnectorInfoResponseResponse';
33
39
  export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
34
40
  export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesResponseResponse';
35
41
  export type { LayoutResponseResponse } from './responses/LayoutResponseResponse';
@@ -46,8 +52,9 @@ export type { BackstagePermissionsRequest } from './schemas/BackstagePermissions
46
52
  export type { BackstagePermissionsResponse } from './schemas/BackstagePermissionsResponse';
47
53
  export type { CatalogConnectorInfo } from './schemas/CatalogConnectorInfo';
48
54
  export type { ConnectorDetails } from './schemas/ConnectorDetails';
55
+ export type { ConnectorInfoRequest } from './schemas/ConnectorInfoRequest';
56
+ export type { ConnectorInfoResponse } from './schemas/ConnectorInfoResponse';
49
57
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
50
- export type { EnvVariableMap } from './schemas/EnvVariableMap';
51
58
  export type { Exports } from './schemas/Exports';
52
59
  export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
53
60
  export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
@@ -2,12 +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 { getConnectorInfo, useGetConnectorInfoQuery } from './hooks/useGetConnectorInfoQuery';
5
6
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
6
7
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
7
8
  export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks/useGetPluginsInfoPluginIdQuery';
8
9
  export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
9
10
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
10
11
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
12
+ export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
11
13
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
12
14
  export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
13
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 {};
@@ -1,9 +1,9 @@
1
- import type { EnvVariableMap } from '../schemas/EnvVariableMap';
1
+ import type { BackstageEnvSecretVariable } from '../schemas/BackstageEnvSecretVariable';
2
2
  import type { Exports } from '../schemas/Exports';
3
3
  import type { PluginInfo } from '../schemas/PluginInfo';
4
4
  export interface PluginDetailedInfo {
5
5
  config: string;
6
- env_variables: EnvVariableMap[];
6
+ env_variables: BackstageEnvSecretVariable[];
7
7
  exports: Exports;
8
8
  plugin_details: PluginInfo;
9
9
  saved: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.15.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,4 +0,0 @@
1
- export interface EnvVariableMap {
2
- env_name: string;
3
- secret_id: string;
4
- }
@@ -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 {};