@harnessio/react-idp-service-client 0.22.0 → 0.24.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.
@@ -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': string;
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 { GenerateYamlResponseResponse } from '../responses/GenerateYamlResponseResponse';
3
+ import type { GenerateYamlRequestRequestBody } from '../requestBodies/GenerateYamlRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from './../../fetcher';
6
+ export interface OnboardingGenerateYamlMutationHeaderParams {
7
+ 'Harness-Account'?: string;
8
+ }
9
+ export type OnboardingGenerateYamlRequestBody = GenerateYamlRequestRequestBody;
10
+ export type OnboardingGenerateYamlOkResponse = ResponseWithPagination<GenerateYamlResponseResponse>;
11
+ export type OnboardingGenerateYamlErrorResponse = unknown;
12
+ export interface OnboardingGenerateYamlProps extends Omit<FetcherOptions<unknown, OnboardingGenerateYamlRequestBody, OnboardingGenerateYamlMutationHeaderParams>, 'url'> {
13
+ body: OnboardingGenerateYamlRequestBody;
14
+ }
15
+ export declare function onboardingGenerateYaml(props: OnboardingGenerateYamlProps): Promise<OnboardingGenerateYamlOkResponse>;
16
+ /**
17
+ * Generate YAML Definition for entity
18
+ */
19
+ export declare function useOnboardingGenerateYamlMutation(options?: Omit<UseMutationOptions<OnboardingGenerateYamlOkResponse, OnboardingGenerateYamlErrorResponse, OnboardingGenerateYamlProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<OnboardingGenerateYamlOkResponse, unknown, OnboardingGenerateYamlProps, 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 onboardingGenerateYaml(props) {
7
+ return fetcher(Object.assign({ url: `/v1/onboarding/generate-yaml`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Generate YAML Definition for entity
11
+ */
12
+ export function useOnboardingGenerateYamlMutation(options) {
13
+ return useMutation((mutateProps) => onboardingGenerateYaml(mutateProps), options);
14
+ }
@@ -29,6 +29,8 @@ export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkRespons
29
29
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
30
30
  export type { LayoutIngestErrorResponse, LayoutIngestOkResponse, LayoutIngestProps, LayoutIngestRequestBody, } from './hooks/useLayoutIngestMutation';
31
31
  export { layoutIngest, useLayoutIngestMutation } from './hooks/useLayoutIngestMutation';
32
+ export type { OnboardingGenerateYamlErrorResponse, OnboardingGenerateYamlOkResponse, OnboardingGenerateYamlProps, OnboardingGenerateYamlRequestBody, } from './hooks/useOnboardingGenerateYamlMutation';
33
+ export { onboardingGenerateYaml, useOnboardingGenerateYamlMutation, } from './hooks/useOnboardingGenerateYamlMutation';
32
34
  export type { PostPluginRequestErrorResponse, PostPluginRequestOkResponse, PostPluginRequestProps, PostPluginRequestRequestBody, } from './hooks/usePostPluginRequestMutation';
33
35
  export { postPluginRequest, usePostPluginRequestMutation, } from './hooks/usePostPluginRequestMutation';
34
36
  export type { SaveConnectorInfoErrorResponse, SaveConnectorInfoOkResponse, SaveConnectorInfoProps, SaveConnectorInfoRequestBody, } from './hooks/useSaveConnectorInfoMutation';
@@ -43,12 +45,14 @@ export type { AppConfigRequestRequestBody } from './requestBodies/AppConfigReque
43
45
  export type { BackstageEnvVariableBatchRequestRequestBody } from './requestBodies/BackstageEnvVariableBatchRequestRequestBody';
44
46
  export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
45
47
  export type { ConnectorInfoRequestRequestBody } from './requestBodies/ConnectorInfoRequestRequestBody';
48
+ export type { GenerateYamlRequestRequestBody } from './requestBodies/GenerateYamlRequestRequestBody';
46
49
  export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
47
50
  export type { RequestPluginRequestRequestBody } from './requestBodies/RequestPluginRequestRequestBody';
48
51
  export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
49
52
  export type { BackstageEnvVariableResponseListResponse } from './responses/BackstageEnvVariableResponseListResponse';
50
53
  export type { BackstagePermissionsResponseResponse } from './responses/BackstagePermissionsResponseResponse';
51
54
  export type { ConnectorInfoResponseResponse } from './responses/ConnectorInfoResponseResponse';
55
+ export type { GenerateYamlResponseResponse } from './responses/GenerateYamlResponseResponse';
52
56
  export type { HarnessEntitiesCountResponseResponse } from './responses/HarnessEntitiesCountResponseResponse';
53
57
  export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
54
58
  export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesResponseResponse';
@@ -74,11 +78,13 @@ export type { ConnectorInfoResponse } from './schemas/ConnectorInfoResponse';
74
78
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
75
79
  export type { ExportDetails } from './schemas/ExportDetails';
76
80
  export type { Exports } from './schemas/Exports';
81
+ export type { GenerateYamlRequest } from './schemas/GenerateYamlRequest';
82
+ export type { GenerateYamlResponse } from './schemas/GenerateYamlResponse';
77
83
  export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
78
84
  export type { HarnessEntitiesCountResponse } from './schemas/HarnessEntitiesCountResponse';
79
85
  export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
86
+ export type { ImportEntitiesBase } from './schemas/ImportEntitiesBase';
80
87
  export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
81
- export type { ImportHarnessEntitiesRequest } from './schemas/ImportHarnessEntitiesRequest';
82
88
  export type { LayoutIngestRequest } from './schemas/LayoutIngestRequest';
83
89
  export type { LayoutRequest } from './schemas/LayoutRequest';
84
90
  export type { LayoutResponse } from './schemas/LayoutResponse';
@@ -13,6 +13,7 @@ export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
13
13
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
14
14
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
15
15
  export { layoutIngest, useLayoutIngestMutation } from './hooks/useLayoutIngestMutation';
16
+ export { onboardingGenerateYaml, useOnboardingGenerateYamlMutation, } from './hooks/useOnboardingGenerateYamlMutation';
16
17
  export { postPluginRequest, usePostPluginRequestMutation, } from './hooks/usePostPluginRequestMutation';
17
18
  export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
18
19
  export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
@@ -0,0 +1,2 @@
1
+ import type { GenerateYamlRequest } from '../schemas/GenerateYamlRequest';
2
+ export type GenerateYamlRequestRequestBody = GenerateYamlRequest;
@@ -1,2 +1,2 @@
1
- import type { ImportHarnessEntitiesRequest } from '../schemas/ImportHarnessEntitiesRequest';
2
- export type ImportHarnessEntitiesRequestRequestBody = ImportHarnessEntitiesRequest;
1
+ import type { ImportEntitiesBase } from '../schemas/ImportEntitiesBase';
2
+ export type ImportHarnessEntitiesRequestRequestBody = ImportEntitiesBase;
@@ -0,0 +1,2 @@
1
+ import type { GenerateYamlResponse } from '../schemas/GenerateYamlResponse';
2
+ export type GenerateYamlResponseResponse = GenerateYamlResponse;
@@ -4,8 +4,7 @@ import type { ConnectorDetails } from '../schemas/ConnectorDetails';
4
4
  */
5
5
  export interface CatalogConnectorInfo {
6
6
  branch: string;
7
- infra_connector: ConnectorDetails;
7
+ connector: ConnectorDetails;
8
8
  path: string;
9
9
  repo: string;
10
- source_connector: ConnectorDetails;
11
10
  }
@@ -3,5 +3,5 @@
3
3
  */
4
4
  export interface ConnectorDetails {
5
5
  identifier: string;
6
- type: string;
6
+ type: 'AzureRepo' | 'Bitbucket' | 'Github' | 'Gitlab';
7
7
  }
@@ -0,0 +1,7 @@
1
+ import type { EntitiesForImport } from '../schemas/EntitiesForImport';
2
+ /**
3
+ * Request to generate yaml for any one entity if provided or generate sample entity yaml definition
4
+ */
5
+ export interface GenerateYamlRequest {
6
+ entities: EntitiesForImport[];
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Response contianing entity yaml definition and description about the entity
3
+ */
4
+ export interface GenerateYamlResponse {
5
+ generated_yaml: {
6
+ description: string;
7
+ yaml_def: string;
8
+ };
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 {};
@@ -0,0 +1,8 @@
1
+ import type { CatalogConnectorInfo } from '../schemas/CatalogConnectorInfo';
2
+ /**
3
+ * Abstract base for import entities
4
+ */
5
+ export interface ImportEntitiesBase {
6
+ catalog_connector_info: CatalogConnectorInfo;
7
+ type: 'All' | 'Individual' | 'Sample';
8
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -1,5 +1,5 @@
1
1
  export interface PluginInfo {
2
- category: 'CI/CD' | 'Discovery' | 'Monitoring' | 'Quality' | 'Security' | 'Source Control Mgmt';
2
+ category: string;
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.22.0",
3
+ "version": "0.24.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,10 +0,0 @@
1
- import type { CatalogConnectorInfo } from '../schemas/CatalogConnectorInfo';
2
- import type { EntitiesForImport } from '../schemas/EntitiesForImport';
3
- /**
4
- * Details of Harness Entities and Catalog Location info
5
- */
6
- export interface ImportHarnessEntitiesRequest {
7
- all_import?: boolean;
8
- catalog_connector_info: CatalogConnectorInfo;
9
- entities: EntitiesForImport[];
10
- }