@harnessio/react-idp-service-client 0.11.0 → 0.13.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.
- package/dist/services/hooks/useGetPluginsInfoPluginIdQuery.d.ts +1 -1
- package/dist/services/hooks/useInsertPluginAppConfigMutation.d.ts +19 -0
- package/dist/services/hooks/useInsertPluginAppConfigMutation.js +14 -0
- package/dist/services/hooks/useTogglePluginForAccountMutation.d.ts +2 -2
- package/dist/services/hooks/useTogglePluginForAccountMutation.js +1 -1
- package/dist/services/index.d.ts +5 -0
- package/dist/services/index.js +1 -0
- package/dist/services/requestBodies/AppConfigRequestRequestBody.d.ts +2 -0
- package/dist/services/requestBodies/AppConfigRequestRequestBody.js +1 -0
- package/dist/services/schemas/AppConfig.d.ts +6 -6
- package/dist/services/schemas/AppConfigRequest.d.ts +4 -0
- package/dist/services/schemas/AppConfigRequest.js +1 -0
- package/dist/services/schemas/AppConfigResponse.d.ts +1 -1
- package/dist/services/schemas/CatalogConnectorInfo.d.ts +2 -2
- package/dist/services/schemas/EntitiesForImport.d.ts +1 -1
- package/dist/services/schemas/Exports.d.ts +5 -0
- package/dist/services/schemas/Exports.js +4 -0
- package/dist/services/schemas/HarnessBackstageEntities.d.ts +1 -1
- package/dist/services/schemas/HarnessEntitiesResponse.d.ts +4 -4
- package/dist/services/schemas/ImportHarnessEntitiesRequest.d.ts +2 -2
- package/dist/services/schemas/LayoutRequest.d.ts +2 -2
- package/dist/services/schemas/PluginDetailedInfo.d.ts +4 -8
- package/dist/services/schemas/PluginDetailedInfoResponse.d.ts +1 -1
- package/dist/services/schemas/PluginInfo.d.ts +10 -5
- package/dist/services/schemas/PluginInfoResponse.d.ts +1 -1
- package/dist/services/schemas/StatusInfo.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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': 'harness-ci-cd' | 'pager-duty' | 'snyk-security';
|
|
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 { AppConfigResponseResponse } from '../responses/AppConfigResponseResponse';
|
|
3
|
+
import type { AppConfigRequestRequestBody } from '../requestBodies/AppConfigRequestRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from './../../fetcher';
|
|
6
|
+
export interface InsertPluginAppConfigMutationHeaderParams {
|
|
7
|
+
'Harness-Account'?: string;
|
|
8
|
+
}
|
|
9
|
+
export type InsertPluginAppConfigRequestBody = AppConfigRequestRequestBody;
|
|
10
|
+
export type InsertPluginAppConfigOkResponse = ResponseWithPagination<AppConfigResponseResponse>;
|
|
11
|
+
export type InsertPluginAppConfigErrorResponse = unknown;
|
|
12
|
+
export interface InsertPluginAppConfigProps extends Omit<FetcherOptions<unknown, InsertPluginAppConfigRequestBody, InsertPluginAppConfigMutationHeaderParams>, 'url'> {
|
|
13
|
+
body: InsertPluginAppConfigRequestBody;
|
|
14
|
+
}
|
|
15
|
+
export declare function insertPluginAppConfig(props: InsertPluginAppConfigProps): Promise<InsertPluginAppConfigOkResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Insert Plugin Config
|
|
18
|
+
*/
|
|
19
|
+
export declare function useInsertPluginAppConfigMutation(options?: Omit<UseMutationOptions<InsertPluginAppConfigOkResponse, InsertPluginAppConfigErrorResponse, InsertPluginAppConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<InsertPluginAppConfigOkResponse, unknown, InsertPluginAppConfigProps, 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 insertPluginAppConfig(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/app-config`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Insert Plugin Config
|
|
11
|
+
*/
|
|
12
|
+
export function useInsertPluginAppConfigMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => insertPluginAppConfig(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -6,7 +6,7 @@ export interface TogglePluginForAccountMutationPathParams {
|
|
|
6
6
|
'plugin-id': string;
|
|
7
7
|
}
|
|
8
8
|
export interface TogglePluginForAccountMutationQueryParams {
|
|
9
|
-
enabled
|
|
9
|
+
enabled: boolean;
|
|
10
10
|
}
|
|
11
11
|
export interface TogglePluginForAccountMutationHeaderParams {
|
|
12
12
|
'Harness-Account'?: string;
|
|
@@ -18,6 +18,6 @@ export interface TogglePluginForAccountProps extends TogglePluginForAccountMutat
|
|
|
18
18
|
}
|
|
19
19
|
export declare function togglePluginForAccount(props: TogglePluginForAccountProps): Promise<TogglePluginForAccountOkResponse>;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* Toggle Backstage Plugin
|
|
22
22
|
*/
|
|
23
23
|
export declare function useTogglePluginForAccountMutation(options?: Omit<UseMutationOptions<TogglePluginForAccountOkResponse, TogglePluginForAccountErrorResponse, TogglePluginForAccountProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<TogglePluginForAccountOkResponse, unknown, TogglePluginForAccountProps, unknown>;
|
|
@@ -7,7 +7,7 @@ export function togglePluginForAccount(props) {
|
|
|
7
7
|
return fetcher(Object.assign({ url: `/v1/plugin-toggle/${props['plugin-id']}`, method: 'POST' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Toggle Backstage Plugin
|
|
11
11
|
*/
|
|
12
12
|
export function useTogglePluginForAccountMutation(options) {
|
|
13
13
|
return useMutation((mutateProps) => togglePluginForAccount(mutateProps), options);
|
package/dist/services/index.d.ts
CHANGED
|
@@ -19,10 +19,13 @@ export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, G
|
|
|
19
19
|
export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
|
|
20
20
|
export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
|
|
21
21
|
export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
|
|
22
|
+
export type { InsertPluginAppConfigErrorResponse, InsertPluginAppConfigOkResponse, InsertPluginAppConfigProps, InsertPluginAppConfigRequestBody, } from './hooks/useInsertPluginAppConfigMutation';
|
|
23
|
+
export { insertPluginAppConfig, useInsertPluginAppConfigMutation, } from './hooks/useInsertPluginAppConfigMutation';
|
|
22
24
|
export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
|
|
23
25
|
export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
|
|
24
26
|
export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
25
27
|
export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
28
|
+
export type { AppConfigRequestRequestBody } from './requestBodies/AppConfigRequestRequestBody';
|
|
26
29
|
export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
|
|
27
30
|
export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
|
|
28
31
|
export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
|
|
@@ -34,6 +37,7 @@ export type { PluginDetailedInfoResponseResponse } from './responses/PluginDetai
|
|
|
34
37
|
export type { PluginInfoResponseListResponse } from './responses/PluginInfoResponseListResponse';
|
|
35
38
|
export type { StatusInfoResponseResponse } from './responses/StatusInfoResponseResponse';
|
|
36
39
|
export type { AppConfig } from './schemas/AppConfig';
|
|
40
|
+
export type { AppConfigRequest } from './schemas/AppConfigRequest';
|
|
37
41
|
export type { AppConfigResponse } from './schemas/AppConfigResponse';
|
|
38
42
|
export type { BackstagePermissions } from './schemas/BackstagePermissions';
|
|
39
43
|
export type { BackstagePermissionsRequest } from './schemas/BackstagePermissionsRequest';
|
|
@@ -41,6 +45,7 @@ export type { BackstagePermissionsResponse } from './schemas/BackstagePermission
|
|
|
41
45
|
export type { CatalogConnectorInfo } from './schemas/CatalogConnectorInfo';
|
|
42
46
|
export type { ConnectorDetails } from './schemas/ConnectorDetails';
|
|
43
47
|
export type { EntitiesForImport } from './schemas/EntitiesForImport';
|
|
48
|
+
export type { Exports } from './schemas/Exports';
|
|
44
49
|
export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
|
|
45
50
|
export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
|
|
46
51
|
export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
|
package/dist/services/index.js
CHANGED
|
@@ -8,5 +8,6 @@ export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks
|
|
|
8
8
|
export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
|
|
9
9
|
export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
|
|
10
10
|
export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
|
|
11
|
+
export { insertPluginAppConfig, useInsertPluginAppConfigMutation, } from './hooks/useInsertPluginAppConfigMutation';
|
|
11
12
|
export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
|
|
12
13
|
export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export interface AppConfig {
|
|
2
|
-
|
|
3
|
-
configs
|
|
2
|
+
config_id: string;
|
|
3
|
+
configs: string;
|
|
4
4
|
/**
|
|
5
5
|
* @format int64
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
enabled
|
|
7
|
+
created?: number;
|
|
8
|
+
enabled: boolean;
|
|
9
9
|
/**
|
|
10
10
|
* @format int64
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
enabled_disabled_at?: number;
|
|
13
13
|
/**
|
|
14
14
|
* @format int64
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
updated?: number;
|
|
17
17
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,8 +4,8 @@ import type { ConnectorDetails } from '../schemas/ConnectorDetails';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface CatalogConnectorInfo {
|
|
6
6
|
branch: string;
|
|
7
|
-
|
|
7
|
+
infra_connector: ConnectorDetails;
|
|
8
8
|
path: string;
|
|
9
9
|
repo: string;
|
|
10
|
-
|
|
10
|
+
source_connector: ConnectorDetails;
|
|
11
11
|
}
|
|
@@ -3,8 +3,8 @@ import type { HarnessBackstageEntities } from '../schemas/HarnessBackstageEntiti
|
|
|
3
3
|
* Response for harness entities mapping with backstage entities
|
|
4
4
|
*/
|
|
5
5
|
export interface HarnessEntitiesResponse {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
harness_backstage_entities: HarnessBackstageEntities[];
|
|
7
|
+
org_count: number;
|
|
8
|
+
project_count: number;
|
|
9
|
+
service_count: number;
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import type { EntitiesForImport } from '../schemas/EntitiesForImport';
|
|
|
4
4
|
* Details of Harness Entities and Catalog Location info
|
|
5
5
|
*/
|
|
6
6
|
export interface ImportHarnessEntitiesRequest {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
all_import?: boolean;
|
|
8
|
+
catalog_connector_info: CatalogConnectorInfo;
|
|
9
9
|
entities: EntitiesForImport[];
|
|
10
10
|
}
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
+
import type { Exports } from '../schemas/Exports';
|
|
1
2
|
import type { PluginInfo } from '../schemas/PluginInfo';
|
|
2
3
|
export interface PluginDetailedInfo {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
layout?: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
pluginDetails?: PluginInfo;
|
|
10
|
-
source?: string;
|
|
4
|
+
config: string;
|
|
5
|
+
exports: Exports;
|
|
6
|
+
plugin_details: PluginInfo;
|
|
11
7
|
}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export interface PluginInfo {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
category: 'CI/CD' | 'Monitoring' | 'Security' | 'Source Control Mgmt';
|
|
3
|
+
core: boolean;
|
|
4
|
+
created_by: string;
|
|
5
|
+
description: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
icon_url: string;
|
|
8
|
+
id: string;
|
|
9
|
+
image_url: string;
|
|
10
|
+
name: string;
|
|
11
|
+
source: string;
|
|
7
12
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export interface StatusInfo {
|
|
2
|
-
|
|
2
|
+
current_status?: 'COMPLETED' | 'FAILED' | 'NOT_FOUND' | 'PENDING' | 'RUNNING';
|
|
3
3
|
reason?: string;
|
|
4
4
|
/**
|
|
5
5
|
* @format int64
|
|
6
6
|
*/
|
|
7
|
-
|
|
7
|
+
updated_at?: number;
|
|
8
8
|
}
|