@harnessio/react-idp-service-client 0.21.0 → 0.22.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,18 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { LayoutIngestRequest } from '../schemas/LayoutIngestRequest';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from './../../fetcher';
5
+ export interface LayoutIngestMutationHeaderParams {
6
+ 'Harness-Account'?: string;
7
+ }
8
+ export type LayoutIngestRequestBody = LayoutIngestRequest;
9
+ export type LayoutIngestOkResponse = ResponseWithPagination<unknown>;
10
+ export type LayoutIngestErrorResponse = unknown;
11
+ export interface LayoutIngestProps extends Omit<FetcherOptions<unknown, LayoutIngestRequestBody, LayoutIngestMutationHeaderParams>, 'url'> {
12
+ body: LayoutIngestRequestBody;
13
+ }
14
+ export declare function layoutIngest(props: LayoutIngestProps): Promise<LayoutIngestOkResponse>;
15
+ /**
16
+ * Ingest plugin layout
17
+ */
18
+ export declare function useLayoutIngestMutation(options?: Omit<UseMutationOptions<LayoutIngestOkResponse, LayoutIngestErrorResponse, LayoutIngestProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<LayoutIngestOkResponse, unknown, LayoutIngestProps, 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 layoutIngest(props) {
7
+ return fetcher(Object.assign({ url: `/v1/layout/ingest`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Ingest plugin layout
11
+ */
12
+ export function useLayoutIngestMutation(options) {
13
+ return useMutation((mutateProps) => layoutIngest(mutateProps), options);
14
+ }
@@ -27,6 +27,8 @@ export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, G
27
27
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
28
28
  export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
29
29
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
30
+ export type { LayoutIngestErrorResponse, LayoutIngestOkResponse, LayoutIngestProps, LayoutIngestRequestBody, } from './hooks/useLayoutIngestMutation';
31
+ export { layoutIngest, useLayoutIngestMutation } from './hooks/useLayoutIngestMutation';
30
32
  export type { PostPluginRequestErrorResponse, PostPluginRequestOkResponse, PostPluginRequestProps, PostPluginRequestRequestBody, } from './hooks/usePostPluginRequestMutation';
31
33
  export { postPluginRequest, usePostPluginRequestMutation, } from './hooks/usePostPluginRequestMutation';
32
34
  export type { SaveConnectorInfoErrorResponse, SaveConnectorInfoOkResponse, SaveConnectorInfoProps, SaveConnectorInfoRequestBody, } from './hooks/useSaveConnectorInfoMutation';
@@ -70,18 +72,21 @@ export type { ConnectorDetails } from './schemas/ConnectorDetails';
70
72
  export type { ConnectorInfoRequest } from './schemas/ConnectorInfoRequest';
71
73
  export type { ConnectorInfoResponse } from './schemas/ConnectorInfoResponse';
72
74
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
75
+ export type { ExportDetails } from './schemas/ExportDetails';
73
76
  export type { Exports } from './schemas/Exports';
74
77
  export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
75
78
  export type { HarnessEntitiesCountResponse } from './schemas/HarnessEntitiesCountResponse';
76
79
  export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
77
80
  export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
78
81
  export type { ImportHarnessEntitiesRequest } from './schemas/ImportHarnessEntitiesRequest';
82
+ export type { LayoutIngestRequest } from './schemas/LayoutIngestRequest';
79
83
  export type { LayoutRequest } from './schemas/LayoutRequest';
80
84
  export type { LayoutResponse } from './schemas/LayoutResponse';
81
85
  export type { MergedPluginConfigResponse } from './schemas/MergedPluginConfigResponse';
82
86
  export type { MergedPluginConfigs } from './schemas/MergedPluginConfigs';
83
87
  export type { PluginDetailedInfo } from './schemas/PluginDetailedInfo';
84
88
  export type { PluginDetailedInfoResponse } from './schemas/PluginDetailedInfoResponse';
89
+ export type { PluginDetails } from './schemas/PluginDetails';
85
90
  export type { PluginInfo } from './schemas/PluginInfo';
86
91
  export type { PluginInfoResponse } from './schemas/PluginInfoResponse';
87
92
  export type { RequestPlugin } from './schemas/RequestPlugin';
@@ -12,6 +12,7 @@ export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks
12
12
  export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
13
13
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
14
14
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
15
+ export { layoutIngest, useLayoutIngestMutation } from './hooks/useLayoutIngestMutation';
15
16
  export { postPluginRequest, usePostPluginRequestMutation, } from './hooks/usePostPluginRequestMutation';
16
17
  export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
17
18
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
@@ -0,0 +1,9 @@
1
+ export interface ExportDetails {
2
+ add_by_default?: boolean;
3
+ default_route?: string;
4
+ layout_schema_specs?: {
5
+ [key: string]: any;
6
+ };
7
+ name: string;
8
+ type: string;
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,8 @@
1
+ import type { ExportDetails } from '../schemas/ExportDetails';
1
2
  export interface Exports {
2
3
  cards: number;
4
+ default_entity_types: string[];
5
+ export_details: ExportDetails[];
3
6
  pages: number;
4
7
  tab_contents: number;
5
8
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -0,0 +1,4 @@
1
+ import type { PluginDetails } from '../schemas/PluginDetails';
2
+ export interface LayoutIngestRequest {
3
+ plugin: PluginDetails;
4
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,10 +1,6 @@
1
1
  import type { BackstageEnvSecretVariable } from '../schemas/BackstageEnvSecretVariable';
2
- import type { Exports } from '../schemas/Exports';
3
- import type { PluginInfo } from '../schemas/PluginInfo';
4
- export interface PluginDetailedInfo {
5
- config: string;
2
+ import type { PluginDetails } from '../schemas/PluginDetails';
3
+ export interface PluginDetailedInfo extends PluginDetails {
6
4
  env_variables: BackstageEnvSecretVariable[];
7
- exports: Exports;
8
- plugin_details: PluginInfo;
9
5
  saved: boolean;
10
6
  }
@@ -0,0 +1,7 @@
1
+ import type { Exports } from '../schemas/Exports';
2
+ import type { PluginInfo } from '../schemas/PluginInfo';
3
+ export interface PluginDetails {
4
+ config: string;
5
+ exports: Exports;
6
+ plugin_details: PluginInfo;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",