@harnessio/react-idp-service-client 0.13.0 → 0.14.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/useSaveOrUpdatePluginAppConfigMutation.d.ts +19 -0
- package/dist/services/hooks/{useInsertPluginAppConfigMutation.js → useSaveOrUpdatePluginAppConfigMutation.js} +4 -4
- package/dist/services/index.d.ts +4 -2
- package/dist/services/index.js +1 -1
- package/dist/services/schemas/AppConfig.d.ts +4 -1
- package/dist/services/schemas/AppConfig.js +0 -3
- package/dist/services/schemas/BackstageEnvSecretVariable.d.ts +5 -0
- package/dist/services/schemas/BackstageEnvSecretVariable.js +1 -0
- package/dist/services/schemas/BackstageEnvVariable.d.ts +19 -0
- package/dist/services/schemas/BackstageEnvVariable.js +4 -0
- package/package.json +1 -1
- package/dist/services/hooks/useInsertPluginAppConfigMutation.d.ts +0 -19
|
@@ -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 SaveOrUpdatePluginAppConfigMutationHeaderParams {
|
|
7
|
+
'Harness-Account'?: string;
|
|
8
|
+
}
|
|
9
|
+
export type SaveOrUpdatePluginAppConfigRequestBody = AppConfigRequestRequestBody;
|
|
10
|
+
export type SaveOrUpdatePluginAppConfigOkResponse = ResponseWithPagination<AppConfigResponseResponse>;
|
|
11
|
+
export type SaveOrUpdatePluginAppConfigErrorResponse = unknown;
|
|
12
|
+
export interface SaveOrUpdatePluginAppConfigProps extends Omit<FetcherOptions<unknown, SaveOrUpdatePluginAppConfigRequestBody, SaveOrUpdatePluginAppConfigMutationHeaderParams>, 'url'> {
|
|
13
|
+
body: SaveOrUpdatePluginAppConfigRequestBody;
|
|
14
|
+
}
|
|
15
|
+
export declare function saveOrUpdatePluginAppConfig(props: SaveOrUpdatePluginAppConfigProps): Promise<SaveOrUpdatePluginAppConfigOkResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Save or Update Plugin Config
|
|
18
|
+
*/
|
|
19
|
+
export declare function useSaveOrUpdatePluginAppConfigMutation(options?: Omit<UseMutationOptions<SaveOrUpdatePluginAppConfigOkResponse, SaveOrUpdatePluginAppConfigErrorResponse, SaveOrUpdatePluginAppConfigProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SaveOrUpdatePluginAppConfigOkResponse, unknown, SaveOrUpdatePluginAppConfigProps, unknown>;
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
// Please do not modify this code directly.
|
|
4
4
|
import { useMutation } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from './../../fetcher';
|
|
6
|
-
export function
|
|
6
|
+
export function saveOrUpdatePluginAppConfig(props) {
|
|
7
7
|
return fetcher(Object.assign({ url: `/v1/app-config`, method: 'POST' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Save or Update Plugin Config
|
|
11
11
|
*/
|
|
12
|
-
export function
|
|
13
|
-
return useMutation((mutateProps) =>
|
|
12
|
+
export function useSaveOrUpdatePluginAppConfigMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => saveOrUpdatePluginAppConfig(mutateProps), options);
|
|
14
14
|
}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ 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 {
|
|
23
|
-
export {
|
|
22
|
+
export type { SaveOrUpdatePluginAppConfigErrorResponse, SaveOrUpdatePluginAppConfigOkResponse, SaveOrUpdatePluginAppConfigProps, SaveOrUpdatePluginAppConfigRequestBody, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
|
|
23
|
+
export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
|
|
24
24
|
export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
|
|
25
25
|
export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
|
|
26
26
|
export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
@@ -39,6 +39,8 @@ export type { StatusInfoResponseResponse } from './responses/StatusInfoResponseR
|
|
|
39
39
|
export type { AppConfig } from './schemas/AppConfig';
|
|
40
40
|
export type { AppConfigRequest } from './schemas/AppConfigRequest';
|
|
41
41
|
export type { AppConfigResponse } from './schemas/AppConfigResponse';
|
|
42
|
+
export type { BackstageEnvSecretVariable } from './schemas/BackstageEnvSecretVariable';
|
|
43
|
+
export type { BackstageEnvVariable } from './schemas/BackstageEnvVariable';
|
|
42
44
|
export type { BackstagePermissions } from './schemas/BackstagePermissions';
|
|
43
45
|
export type { BackstagePermissionsRequest } from './schemas/BackstagePermissionsRequest';
|
|
44
46
|
export type { BackstagePermissionsResponse } from './schemas/BackstagePermissionsResponse';
|
package/dist/services/index.js
CHANGED
|
@@ -8,6 +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 {
|
|
11
|
+
export { saveOrUpdatePluginAppConfig, useSaveOrUpdatePluginAppConfigMutation, } from './hooks/useSaveOrUpdatePluginAppConfigMutation';
|
|
12
12
|
export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
|
|
13
13
|
export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
import type { BackstageEnvSecretVariable } from '../schemas/BackstageEnvSecretVariable';
|
|
1
2
|
export interface AppConfig {
|
|
2
3
|
config_id: string;
|
|
4
|
+
config_name: string;
|
|
3
5
|
configs: string;
|
|
4
6
|
/**
|
|
5
7
|
* @format int64
|
|
6
8
|
*/
|
|
7
9
|
created?: number;
|
|
8
|
-
enabled
|
|
10
|
+
enabled?: boolean;
|
|
9
11
|
/**
|
|
10
12
|
* @format int64
|
|
11
13
|
*/
|
|
12
14
|
enabled_disabled_at?: number;
|
|
15
|
+
env_variables: BackstageEnvSecretVariable[];
|
|
13
16
|
/**
|
|
14
17
|
* @format int64
|
|
15
18
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Backstage Env Variable
|
|
3
|
+
*/
|
|
4
|
+
export interface BackstageEnvVariable {
|
|
5
|
+
/**
|
|
6
|
+
* @format int64
|
|
7
|
+
*/
|
|
8
|
+
created?: number;
|
|
9
|
+
env_name: string;
|
|
10
|
+
identifier?: string;
|
|
11
|
+
/**
|
|
12
|
+
* This specifies the type of backstage env variable
|
|
13
|
+
*/
|
|
14
|
+
type: 'Config' | 'Secret';
|
|
15
|
+
/**
|
|
16
|
+
* @format int64
|
|
17
|
+
*/
|
|
18
|
+
updated?: number;
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
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>;
|