@harnessio/react-idp-service-client 0.21.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.
Files changed (32) hide show
  1. package/dist/services/hooks/useGetPluginsInfoPluginIdQuery.d.ts +1 -1
  2. package/dist/services/hooks/useLayoutIngestMutation.d.ts +18 -0
  3. package/dist/services/hooks/useLayoutIngestMutation.js +14 -0
  4. package/dist/services/hooks/useOnboardingGenerateYamlMutation.d.ts +19 -0
  5. package/dist/services/hooks/useOnboardingGenerateYamlMutation.js +14 -0
  6. package/dist/services/index.d.ts +12 -1
  7. package/dist/services/index.js +2 -0
  8. package/dist/services/requestBodies/GenerateYamlRequestRequestBody.d.ts +2 -0
  9. package/dist/services/requestBodies/ImportHarnessEntitiesRequestRequestBody.d.ts +2 -2
  10. package/dist/services/responses/GenerateYamlResponseResponse.d.ts +2 -0
  11. package/dist/services/responses/GenerateYamlResponseResponse.js +1 -0
  12. package/dist/services/schemas/CatalogConnectorInfo.d.ts +1 -2
  13. package/dist/services/schemas/ConnectorDetails.d.ts +1 -1
  14. package/dist/services/schemas/ExportDetails.d.ts +9 -0
  15. package/dist/services/schemas/ExportDetails.js +4 -0
  16. package/dist/services/schemas/Exports.d.ts +3 -0
  17. package/dist/services/schemas/Exports.js +0 -3
  18. package/dist/services/schemas/GenerateYamlRequest.d.ts +7 -0
  19. package/dist/services/schemas/GenerateYamlRequest.js +1 -0
  20. package/dist/services/schemas/GenerateYamlResponse.d.ts +9 -0
  21. package/dist/services/schemas/GenerateYamlResponse.js +4 -0
  22. package/dist/services/schemas/ImportEntitiesBase.d.ts +8 -0
  23. package/dist/services/schemas/ImportEntitiesBase.js +1 -0
  24. package/dist/services/schemas/LayoutIngestRequest.d.ts +4 -0
  25. package/dist/services/schemas/LayoutIngestRequest.js +1 -0
  26. package/dist/services/schemas/PluginDetailedInfo.d.ts +2 -6
  27. package/dist/services/schemas/PluginDetails.d.ts +7 -0
  28. package/dist/services/schemas/PluginDetails.js +1 -0
  29. package/dist/services/schemas/PluginInfo.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/dist/services/schemas/ImportHarnessEntitiesRequest.d.ts +0 -10
  32. /package/dist/services/{schemas/ImportHarnessEntitiesRequest.js → requestBodies/GenerateYamlRequestRequestBody.js} +0 -0
@@ -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,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
+ }
@@ -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
+ }
@@ -27,6 +27,10 @@ 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';
32
+ export type { OnboardingGenerateYamlErrorResponse, OnboardingGenerateYamlOkResponse, OnboardingGenerateYamlProps, OnboardingGenerateYamlRequestBody, } from './hooks/useOnboardingGenerateYamlMutation';
33
+ export { onboardingGenerateYaml, useOnboardingGenerateYamlMutation, } from './hooks/useOnboardingGenerateYamlMutation';
30
34
  export type { PostPluginRequestErrorResponse, PostPluginRequestOkResponse, PostPluginRequestProps, PostPluginRequestRequestBody, } from './hooks/usePostPluginRequestMutation';
31
35
  export { postPluginRequest, usePostPluginRequestMutation, } from './hooks/usePostPluginRequestMutation';
32
36
  export type { SaveConnectorInfoErrorResponse, SaveConnectorInfoOkResponse, SaveConnectorInfoProps, SaveConnectorInfoRequestBody, } from './hooks/useSaveConnectorInfoMutation';
@@ -41,12 +45,14 @@ export type { AppConfigRequestRequestBody } from './requestBodies/AppConfigReque
41
45
  export type { BackstageEnvVariableBatchRequestRequestBody } from './requestBodies/BackstageEnvVariableBatchRequestRequestBody';
42
46
  export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
43
47
  export type { ConnectorInfoRequestRequestBody } from './requestBodies/ConnectorInfoRequestRequestBody';
48
+ export type { GenerateYamlRequestRequestBody } from './requestBodies/GenerateYamlRequestRequestBody';
44
49
  export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
45
50
  export type { RequestPluginRequestRequestBody } from './requestBodies/RequestPluginRequestRequestBody';
46
51
  export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
47
52
  export type { BackstageEnvVariableResponseListResponse } from './responses/BackstageEnvVariableResponseListResponse';
48
53
  export type { BackstagePermissionsResponseResponse } from './responses/BackstagePermissionsResponseResponse';
49
54
  export type { ConnectorInfoResponseResponse } from './responses/ConnectorInfoResponseResponse';
55
+ export type { GenerateYamlResponseResponse } from './responses/GenerateYamlResponseResponse';
50
56
  export type { HarnessEntitiesCountResponseResponse } from './responses/HarnessEntitiesCountResponseResponse';
51
57
  export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
52
58
  export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesResponseResponse';
@@ -70,18 +76,23 @@ export type { ConnectorDetails } from './schemas/ConnectorDetails';
70
76
  export type { ConnectorInfoRequest } from './schemas/ConnectorInfoRequest';
71
77
  export type { ConnectorInfoResponse } from './schemas/ConnectorInfoResponse';
72
78
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
79
+ export type { ExportDetails } from './schemas/ExportDetails';
73
80
  export type { Exports } from './schemas/Exports';
81
+ export type { GenerateYamlRequest } from './schemas/GenerateYamlRequest';
82
+ export type { GenerateYamlResponse } from './schemas/GenerateYamlResponse';
74
83
  export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
75
84
  export type { HarnessEntitiesCountResponse } from './schemas/HarnessEntitiesCountResponse';
76
85
  export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
86
+ export type { ImportEntitiesBase } from './schemas/ImportEntitiesBase';
77
87
  export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
78
- export type { ImportHarnessEntitiesRequest } from './schemas/ImportHarnessEntitiesRequest';
88
+ export type { LayoutIngestRequest } from './schemas/LayoutIngestRequest';
79
89
  export type { LayoutRequest } from './schemas/LayoutRequest';
80
90
  export type { LayoutResponse } from './schemas/LayoutResponse';
81
91
  export type { MergedPluginConfigResponse } from './schemas/MergedPluginConfigResponse';
82
92
  export type { MergedPluginConfigs } from './schemas/MergedPluginConfigs';
83
93
  export type { PluginDetailedInfo } from './schemas/PluginDetailedInfo';
84
94
  export type { PluginDetailedInfoResponse } from './schemas/PluginDetailedInfoResponse';
95
+ export type { PluginDetails } from './schemas/PluginDetails';
85
96
  export type { PluginInfo } from './schemas/PluginInfo';
86
97
  export type { PluginInfoResponse } from './schemas/PluginInfoResponse';
87
98
  export type { RequestPlugin } from './schemas/RequestPlugin';
@@ -12,6 +12,8 @@ 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';
16
+ export { onboardingGenerateYaml, useOnboardingGenerateYamlMutation, } from './hooks/useOnboardingGenerateYamlMutation';
15
17
  export { postPluginRequest, usePostPluginRequestMutation, } from './hooks/usePostPluginRequestMutation';
16
18
  export { saveConnectorInfo, useSaveConnectorInfoMutation, } from './hooks/useSaveConnectorInfoMutation';
17
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,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,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 {};
@@ -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 {};
@@ -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.21.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
- }