@harnessio/react-idp-service-client 0.8.0 → 0.10.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 (67) hide show
  1. package/dist/fetcher.js +17 -1
  2. package/dist/services/helpers.d.ts +13 -0
  3. package/dist/services/hooks/useCreateBackstagePermissionsMutation.d.ts +3 -3
  4. package/dist/services/hooks/useCreateBackstagePermissionsMutation.js +2 -2
  5. package/dist/services/hooks/useCreateLayoutMutation.d.ts +3 -3
  6. package/dist/services/hooks/useCreateLayoutMutation.js +2 -2
  7. package/dist/services/hooks/useGetAllLayoutsQuery.d.ts +3 -2
  8. package/dist/services/hooks/useGetBackstagePermissionsQuery.d.ts +3 -2
  9. package/dist/services/hooks/useGetHarnessEntitiesQuery.d.ts +3 -2
  10. package/dist/services/hooks/useGetLayoutQuery.d.ts +3 -2
  11. package/dist/services/hooks/useGetPluginsInfoPluginIdQuery.d.ts +19 -0
  12. package/dist/services/hooks/useGetPluginsInfoPluginIdQuery.js +14 -0
  13. package/dist/services/hooks/useGetPluginsQuery.d.ts +16 -0
  14. package/dist/services/hooks/useGetPluginsQuery.js +14 -0
  15. package/dist/services/hooks/useGetStatusInfoByTypeQuery.d.ts +3 -2
  16. package/dist/services/hooks/useImportHarnessEntitiesMutation.d.ts +3 -3
  17. package/dist/services/hooks/useImportHarnessEntitiesMutation.js +2 -2
  18. package/dist/services/hooks/useTogglePluginForAccountMutation.d.ts +23 -0
  19. package/dist/services/hooks/useTogglePluginForAccountMutation.js +14 -0
  20. package/dist/services/hooks/useUpdateBackstagePermissionsMutation.d.ts +3 -3
  21. package/dist/services/hooks/useUpdateBackstagePermissionsMutation.js +2 -2
  22. package/dist/services/index.d.ts +20 -21
  23. package/dist/services/index.js +3 -0
  24. package/dist/services/responses/AppConfigResponseResponse.d.ts +2 -0
  25. package/dist/services/responses/PluginDetailedInfoResponseResponse.d.ts +2 -0
  26. package/dist/services/responses/PluginInfoResponseListResponse.d.ts +2 -0
  27. package/dist/services/schemas/AppConfig.d.ts +17 -0
  28. package/dist/services/schemas/AppConfigResponse.d.ts +4 -0
  29. package/dist/services/schemas/PluginDetailedInfo.d.ts +8 -0
  30. package/dist/services/schemas/PluginDetailedInfoResponse.d.ts +4 -0
  31. package/dist/services/schemas/PluginInfo.d.ts +7 -0
  32. package/dist/services/schemas/PluginInfoResponse.d.ts +4 -0
  33. package/package.json +2 -1
  34. package/dist/services/requestBodies/EnvironmentSecretRequestListRequestBody.d.ts +0 -2
  35. package/dist/services/requestBodies/EnvironmentSecretRequestRequestBody.d.ts +0 -2
  36. package/dist/services/requestBodies/LayoutRequestRequestBody.d.ts +0 -2
  37. package/dist/services/requestBodies/ManualImportEntityRequestRequestBody.d.ts +0 -2
  38. package/dist/services/requestBodies/StatusInfoRequestRequestBody.d.ts +0 -2
  39. package/dist/services/responses/EnvironmentSecretResponseListResponse.d.ts +0 -2
  40. package/dist/services/responses/EnvironmentSecretResponseResponse.d.ts +0 -2
  41. package/dist/services/responses/NamespaceResponseResponse.d.ts +0 -2
  42. package/dist/services/responses/OnboardingAccessCheckResponseResponse.d.ts +0 -2
  43. package/dist/services/responses/OnboardingAccessCheckResponseResponse.js +0 -1
  44. package/dist/services/schemas/EnvironmentSecret.d.ts +0 -14
  45. package/dist/services/schemas/EnvironmentSecretRequest.d.ts +0 -4
  46. package/dist/services/schemas/EnvironmentSecretRequest.js +0 -1
  47. package/dist/services/schemas/EnvironmentSecretResponse.d.ts +0 -4
  48. package/dist/services/schemas/EnvironmentSecretResponse.js +0 -1
  49. package/dist/services/schemas/ManualImportEntityRequest.d.ts +0 -10
  50. package/dist/services/schemas/NamepsaceResponse.d.ts +0 -5
  51. package/dist/services/schemas/NamepsaceResponse.js +0 -1
  52. package/dist/services/schemas/NamespaceInfo.d.ts +0 -7
  53. package/dist/services/schemas/NamespaceInfo.js +0 -4
  54. package/dist/services/schemas/OnboardingAccessCheckResponse.d.ts +0 -6
  55. package/dist/services/schemas/OnboardingAccessCheckResponse.js +0 -4
  56. package/dist/services/schemas/StatusInfoRequest.d.ts +0 -4
  57. package/dist/services/schemas/StatusInfoRequest.js +0 -1
  58. /package/dist/services/{requestBodies/EnvironmentSecretRequestListRequestBody.js → helpers.js} +0 -0
  59. /package/dist/services/{requestBodies/EnvironmentSecretRequestRequestBody.js → responses/AppConfigResponseResponse.js} +0 -0
  60. /package/dist/services/{requestBodies/LayoutRequestRequestBody.js → responses/PluginDetailedInfoResponseResponse.js} +0 -0
  61. /package/dist/services/{requestBodies/ManualImportEntityRequestRequestBody.js → responses/PluginInfoResponseListResponse.js} +0 -0
  62. /package/dist/services/schemas/{EnvironmentSecret.js → AppConfig.js} +0 -0
  63. /package/dist/services/{requestBodies/StatusInfoRequestRequestBody.js → schemas/AppConfigResponse.js} +0 -0
  64. /package/dist/services/{responses/EnvironmentSecretResponseListResponse.js → schemas/PluginDetailedInfo.js} +0 -0
  65. /package/dist/services/{responses/EnvironmentSecretResponseResponse.js → schemas/PluginDetailedInfoResponse.js} +0 -0
  66. /package/dist/services/schemas/{ManualImportEntityRequest.js → PluginInfo.js} +0 -0
  67. /package/dist/services/{responses/NamespaceResponseResponse.js → schemas/PluginInfoResponse.js} +0 -0
package/dist/fetcher.js CHANGED
@@ -39,10 +39,26 @@ export function fetcher(options) {
39
39
  response = (_b = fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.responseInterceptor) === null || _b === void 0 ? void 0 : _b.call(fetcherCallbacks, response.clone());
40
40
  }
41
41
  const contentType = response.headers.get('Content-Type');
42
+ let total, pageSize, pageNumber, pageCount, pagination;
43
+ try {
44
+ total = response.headers.get('x-total-elements');
45
+ pageSize = response.headers.get('x-page-size');
46
+ pageNumber = response.headers.get('x-page-number');
47
+ pagination = total || pageSize || pageNumber;
48
+ if (pagination) {
49
+ total = Number(total);
50
+ pageSize = Number(pageSize);
51
+ pageCount = Math.ceil(total / pageSize);
52
+ pageNumber = Number(pageNumber);
53
+ }
54
+ }
55
+ catch (e) {
56
+ throw new Error('HarnessReactAPIClient: An error occurred while parsing pagination headers. ' + e);
57
+ }
42
58
  const asJson = contentType && JSON_CONTENT_TYPES.some((h) => contentType.startsWith(h));
43
59
  const data = yield (asJson ? response.json() : response.text());
44
60
  if (response.ok) {
45
- return data;
61
+ return (Object.assign({ content: data }, (pagination ? { pagination: { total, pageCount, pageSize, pageNumber } } : {})));
46
62
  }
47
63
  throw data;
48
64
  });
@@ -0,0 +1,13 @@
1
+ export type GetPathParamsType<T> = T extends {
2
+ pathParams: infer R;
3
+ } ? R : never;
4
+ export interface ResponseWithPagination<T> {
5
+ content: T;
6
+ pagination?: {
7
+ total?: number;
8
+ pageSize?: number;
9
+ pageNumber?: number;
10
+ };
11
+ }
12
+ export type WithOptional<TInput, Tkeys extends keyof TInput> = Omit<TInput, Tkeys> & Partial<Pick<TInput, Tkeys>>;
13
+ export type PickPartial<TInput, Tkeys extends keyof TInput> = Pick<Partial<TInput>, Tkeys>;
@@ -1,19 +1,19 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
2
  import type { BackstagePermissionsResponseResponse } from '../responses/BackstagePermissionsResponseResponse';
3
3
  import type { BackstagePermissionsRequestRequestBody } from '../requestBodies/BackstagePermissionsRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
4
5
  import { FetcherOptions } from './../../fetcher';
5
6
  export interface CreateBackstagePermissionsMutationHeaderParams {
6
7
  'Harness-Account'?: string;
7
8
  }
8
9
  export type CreateBackstagePermissionsRequestBody = BackstagePermissionsRequestRequestBody;
9
- export type CreateBackstagePermissionsOkResponse = BackstagePermissionsResponseResponse;
10
+ export type CreateBackstagePermissionsOkResponse = ResponseWithPagination<BackstagePermissionsResponseResponse>;
10
11
  export type CreateBackstagePermissionsErrorResponse = unknown;
11
12
  export interface CreateBackstagePermissionsProps extends Omit<FetcherOptions<unknown, CreateBackstagePermissionsRequestBody, CreateBackstagePermissionsMutationHeaderParams>, 'url'> {
12
13
  body: CreateBackstagePermissionsRequestBody;
13
14
  }
14
15
  export declare function createBackstagePermissions(props: CreateBackstagePermissionsProps): Promise<CreateBackstagePermissionsOkResponse>;
15
- export type CreateBackstagePermissionsMutationProps<T extends keyof CreateBackstagePermissionsProps> = Omit<CreateBackstagePermissionsProps, T> & Partial<Pick<CreateBackstagePermissionsProps, T>>;
16
16
  /**
17
17
  * Creates backstage Permissions for a given account
18
18
  */
19
- export declare function useCreateBackstagePermissionsMutation<T extends keyof CreateBackstagePermissionsProps>(props: Pick<Partial<CreateBackstagePermissionsProps>, T>, options?: Omit<UseMutationOptions<CreateBackstagePermissionsOkResponse, CreateBackstagePermissionsErrorResponse, CreateBackstagePermissionsMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<import("..").BackstagePermissionsResponse, unknown, CreateBackstagePermissionsMutationProps<T>, unknown>;
19
+ export declare function useCreateBackstagePermissionsMutation(options?: Omit<UseMutationOptions<CreateBackstagePermissionsOkResponse, CreateBackstagePermissionsErrorResponse, CreateBackstagePermissionsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateBackstagePermissionsOkResponse, unknown, CreateBackstagePermissionsProps, unknown>;
@@ -9,6 +9,6 @@ export function createBackstagePermissions(props) {
9
9
  /**
10
10
  * Creates backstage Permissions for a given account
11
11
  */
12
- export function useCreateBackstagePermissionsMutation(props, options) {
13
- return useMutation((mutateProps) => createBackstagePermissions(Object.assign(Object.assign({}, props), mutateProps)), options);
12
+ export function useCreateBackstagePermissionsMutation(options) {
13
+ return useMutation((mutateProps) => createBackstagePermissions(mutateProps), options);
14
14
  }
@@ -1,19 +1,19 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
2
  import type { LayoutResponseResponse } from '../responses/LayoutResponseResponse';
3
3
  import type { LayoutRequest } from '../schemas/LayoutRequest';
4
+ import type { ResponseWithPagination } from '../helpers';
4
5
  import { FetcherOptions } from './../../fetcher';
5
6
  export interface CreateLayoutMutationHeaderParams {
6
7
  'Harness-Account'?: string;
7
8
  }
8
9
  export type CreateLayoutRequestBody = LayoutRequest;
9
- export type CreateLayoutOkResponse = LayoutResponseResponse;
10
+ export type CreateLayoutOkResponse = ResponseWithPagination<LayoutResponseResponse>;
10
11
  export type CreateLayoutErrorResponse = unknown;
11
12
  export interface CreateLayoutProps extends Omit<FetcherOptions<unknown, CreateLayoutRequestBody, CreateLayoutMutationHeaderParams>, 'url'> {
12
13
  body: CreateLayoutRequestBody;
13
14
  }
14
15
  export declare function createLayout(props: CreateLayoutProps): Promise<CreateLayoutOkResponse>;
15
- export type CreateLayoutMutationProps<T extends keyof CreateLayoutProps> = Omit<CreateLayoutProps, T> & Partial<Pick<CreateLayoutProps, T>>;
16
16
  /**
17
17
  * Create layout
18
18
  */
19
- export declare function useCreateLayoutMutation<T extends keyof CreateLayoutProps>(props: Pick<Partial<CreateLayoutProps>, T>, options?: Omit<UseMutationOptions<CreateLayoutOkResponse, CreateLayoutErrorResponse, CreateLayoutMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<import("..").LayoutResponse, unknown, CreateLayoutMutationProps<T>, unknown>;
19
+ export declare function useCreateLayoutMutation(options?: Omit<UseMutationOptions<CreateLayoutOkResponse, CreateLayoutErrorResponse, CreateLayoutProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateLayoutOkResponse, unknown, CreateLayoutProps, unknown>;
@@ -9,6 +9,6 @@ export function createLayout(props) {
9
9
  /**
10
10
  * Create layout
11
11
  */
12
- export function useCreateLayoutMutation(props, options) {
13
- return useMutation((mutateProps) => createLayout(Object.assign(Object.assign({}, props), mutateProps)), options);
12
+ export function useCreateLayoutMutation(options) {
13
+ return useMutation((mutateProps) => createLayout(mutateProps), options);
14
14
  }
@@ -1,10 +1,11 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { LayoutResponseResponse } from '../responses/LayoutResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
3
4
  import { FetcherOptions } from './../../fetcher';
4
5
  export interface GetAllLayoutsQueryHeaderParams {
5
6
  'Harness-Account'?: string;
6
7
  }
7
- export type GetAllLayoutsOkResponse = LayoutResponseResponse;
8
+ export type GetAllLayoutsOkResponse = ResponseWithPagination<LayoutResponseResponse>;
8
9
  export type GetAllLayoutsErrorResponse = unknown;
9
10
  export interface GetAllLayoutsProps extends Omit<FetcherOptions<unknown, unknown, GetAllLayoutsQueryHeaderParams>, 'url'> {
10
11
  }
@@ -12,4 +13,4 @@ export declare function getAllLayouts(props: GetAllLayoutsProps): Promise<GetAll
12
13
  /**
13
14
  * Get all layouts
14
15
  */
15
- export declare function useGetAllLayoutsQuery(props: GetAllLayoutsProps, options?: Omit<UseQueryOptions<GetAllLayoutsOkResponse, GetAllLayoutsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").LayoutResponse, unknown>;
16
+ export declare function useGetAllLayoutsQuery(props: GetAllLayoutsProps, options?: Omit<UseQueryOptions<GetAllLayoutsOkResponse, GetAllLayoutsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetAllLayoutsOkResponse, unknown>;
@@ -1,10 +1,11 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { BackstagePermissionsResponseResponse } from '../responses/BackstagePermissionsResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
3
4
  import { FetcherOptions } from './../../fetcher';
4
5
  export interface GetBackstagePermissionsQueryHeaderParams {
5
6
  'Harness-Account'?: string;
6
7
  }
7
- export type GetBackstagePermissionsOkResponse = BackstagePermissionsResponseResponse;
8
+ export type GetBackstagePermissionsOkResponse = ResponseWithPagination<BackstagePermissionsResponseResponse>;
8
9
  export type GetBackstagePermissionsErrorResponse = unknown;
9
10
  export interface GetBackstagePermissionsProps extends Omit<FetcherOptions<unknown, unknown, GetBackstagePermissionsQueryHeaderParams>, 'url'> {
10
11
  }
@@ -12,4 +13,4 @@ export declare function getBackstagePermissions(props: GetBackstagePermissionsPr
12
13
  /**
13
14
  * Get all backstage permissions for a given account
14
15
  */
15
- export declare function useGetBackstagePermissionsQuery(props: GetBackstagePermissionsProps, options?: Omit<UseQueryOptions<GetBackstagePermissionsOkResponse, GetBackstagePermissionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").BackstagePermissionsResponse, unknown>;
16
+ export declare function useGetBackstagePermissionsQuery(props: GetBackstagePermissionsProps, options?: Omit<UseQueryOptions<GetBackstagePermissionsOkResponse, GetBackstagePermissionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetBackstagePermissionsOkResponse, unknown>;
@@ -1,5 +1,6 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { HarnessEntitiesResponseResponse } from '../responses/HarnessEntitiesResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
3
4
  import { FetcherOptions } from './../../fetcher';
4
5
  export interface GetHarnessEntitiesQueryQueryParams {
5
6
  page?: number;
@@ -11,7 +12,7 @@ export interface GetHarnessEntitiesQueryQueryParams {
11
12
  export interface GetHarnessEntitiesQueryHeaderParams {
12
13
  'Harness-Account'?: string;
13
14
  }
14
- export type GetHarnessEntitiesOkResponse = HarnessEntitiesResponseResponse;
15
+ export type GetHarnessEntitiesOkResponse = ResponseWithPagination<HarnessEntitiesResponseResponse>;
15
16
  export type GetHarnessEntitiesErrorResponse = unknown;
16
17
  export interface GetHarnessEntitiesProps extends Omit<FetcherOptions<GetHarnessEntitiesQueryQueryParams, unknown, GetHarnessEntitiesQueryHeaderParams>, 'url'> {
17
18
  queryParams: GetHarnessEntitiesQueryQueryParams;
@@ -20,4 +21,4 @@ export declare function getHarnessEntities(props: GetHarnessEntitiesProps): Prom
20
21
  /**
21
22
  * Get Harness Entities
22
23
  */
23
- export declare function useGetHarnessEntitiesQuery(props: GetHarnessEntitiesProps, options?: Omit<UseQueryOptions<GetHarnessEntitiesOkResponse, GetHarnessEntitiesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").HarnessEntitiesResponse, unknown>;
24
+ export declare function useGetHarnessEntitiesQuery(props: GetHarnessEntitiesProps, options?: Omit<UseQueryOptions<GetHarnessEntitiesOkResponse, GetHarnessEntitiesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetHarnessEntitiesOkResponse, unknown>;
@@ -1,5 +1,6 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { LayoutResponseResponse } from '../responses/LayoutResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
3
4
  import { FetcherOptions } from './../../fetcher';
4
5
  export interface GetLayoutQueryPathParams {
5
6
  'layout-identifier': string;
@@ -7,7 +8,7 @@ export interface GetLayoutQueryPathParams {
7
8
  export interface GetLayoutQueryHeaderParams {
8
9
  'Harness-Account'?: string;
9
10
  }
10
- export type GetLayoutOkResponse = LayoutResponseResponse;
11
+ export type GetLayoutOkResponse = ResponseWithPagination<LayoutResponseResponse>;
11
12
  export type GetLayoutErrorResponse = unknown;
12
13
  export interface GetLayoutProps extends GetLayoutQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetLayoutQueryHeaderParams>, 'url'> {
13
14
  }
@@ -15,4 +16,4 @@ export declare function getLayout(props: GetLayoutProps): Promise<GetLayoutOkRes
15
16
  /**
16
17
  * Get Layout
17
18
  */
18
- export declare function useGetLayoutQuery(props: GetLayoutProps, options?: Omit<UseQueryOptions<GetLayoutOkResponse, GetLayoutErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").LayoutResponse, unknown>;
19
+ export declare function useGetLayoutQuery(props: GetLayoutProps, options?: Omit<UseQueryOptions<GetLayoutOkResponse, GetLayoutErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetLayoutOkResponse, unknown>;
@@ -0,0 +1,19 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { PluginDetailedInfoResponseResponse } from '../responses/PluginDetailedInfoResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from './../../fetcher';
5
+ export interface GetPluginsInfoPluginIdQueryPathParams {
6
+ 'plugin-id': string;
7
+ }
8
+ export interface GetPluginsInfoPluginIdQueryHeaderParams {
9
+ 'Harness-Account'?: string;
10
+ }
11
+ export type GetPluginsInfoPluginIdOkResponse = ResponseWithPagination<PluginDetailedInfoResponseResponse>;
12
+ export type GetPluginsInfoPluginIdErrorResponse = unknown;
13
+ export interface GetPluginsInfoPluginIdProps extends GetPluginsInfoPluginIdQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetPluginsInfoPluginIdQueryHeaderParams>, 'url'> {
14
+ }
15
+ export declare function getPluginsInfoPluginId(props: GetPluginsInfoPluginIdProps): Promise<GetPluginsInfoPluginIdOkResponse>;
16
+ /**
17
+ * Get plugin details for given pluginId
18
+ */
19
+ export declare function useGetPluginsInfoPluginIdQuery(props: GetPluginsInfoPluginIdProps, options?: Omit<UseQueryOptions<GetPluginsInfoPluginIdOkResponse, GetPluginsInfoPluginIdErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetPluginsInfoPluginIdOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from './../../fetcher';
6
+ export function getPluginsInfoPluginId(props) {
7
+ return fetcher(Object.assign({ url: `/v1/plugins-info/${props['plugin-id']}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get plugin details for given pluginId
11
+ */
12
+ export function useGetPluginsInfoPluginIdQuery(props, options) {
13
+ return useQuery(['get-plugins-info-plugin-id', props['plugin-id']], ({ signal }) => getPluginsInfoPluginId(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,16 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { PluginInfoResponseListResponse } from '../responses/PluginInfoResponseListResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from './../../fetcher';
5
+ export interface GetPluginsQueryHeaderParams {
6
+ 'Harness-Account'?: string;
7
+ }
8
+ export type GetPluginsOkResponse = ResponseWithPagination<PluginInfoResponseListResponse>;
9
+ export type GetPluginsErrorResponse = unknown;
10
+ export interface GetPluginsProps extends Omit<FetcherOptions<unknown, unknown, GetPluginsQueryHeaderParams>, 'url'> {
11
+ }
12
+ export declare function getPlugins(props: GetPluginsProps): Promise<GetPluginsOkResponse>;
13
+ /**
14
+ * Get all plugins available
15
+ */
16
+ export declare function useGetPluginsQuery(props: GetPluginsProps, options?: Omit<UseQueryOptions<GetPluginsOkResponse, GetPluginsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetPluginsOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from './../../fetcher';
6
+ export function getPlugins(props) {
7
+ return fetcher(Object.assign({ url: `/v1/plugins-info`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get all plugins available
11
+ */
12
+ export function useGetPluginsQuery(props, options) {
13
+ return useQuery(['get-plugins'], ({ signal }) => getPlugins(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -1,5 +1,6 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
2
  import type { StatusInfoResponseResponse } from '../responses/StatusInfoResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
3
4
  import { FetcherOptions } from './../../fetcher';
4
5
  export interface GetStatusInfoByTypeQueryPathParams {
5
6
  type: 'infra' | 'onboarding';
@@ -7,7 +8,7 @@ export interface GetStatusInfoByTypeQueryPathParams {
7
8
  export interface GetStatusInfoByTypeQueryHeaderParams {
8
9
  'Harness-Account'?: string;
9
10
  }
10
- export type GetStatusInfoByTypeOkResponse = StatusInfoResponseResponse;
11
+ export type GetStatusInfoByTypeOkResponse = ResponseWithPagination<StatusInfoResponseResponse>;
11
12
  export type GetStatusInfoByTypeErrorResponse = unknown;
12
13
  export interface GetStatusInfoByTypeProps extends GetStatusInfoByTypeQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetStatusInfoByTypeQueryHeaderParams>, 'url'> {
13
14
  }
@@ -15,4 +16,4 @@ export declare function getStatusInfoByType(props: GetStatusInfoByTypeProps): Pr
15
16
  /**
16
17
  * Get status info for the given type
17
18
  */
18
- export declare function useGetStatusInfoByTypeQuery(props: GetStatusInfoByTypeProps, options?: Omit<UseQueryOptions<GetStatusInfoByTypeOkResponse, GetStatusInfoByTypeErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").StatusInfoResponse, unknown>;
19
+ export declare function useGetStatusInfoByTypeQuery(props: GetStatusInfoByTypeProps, options?: Omit<UseQueryOptions<GetStatusInfoByTypeOkResponse, GetStatusInfoByTypeErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetStatusInfoByTypeOkResponse, unknown>;
@@ -1,19 +1,19 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
2
  import type { ImportEntitiesResponseResponse } from '../responses/ImportEntitiesResponseResponse';
3
3
  import type { ImportHarnessEntitiesRequestRequestBody } from '../requestBodies/ImportHarnessEntitiesRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
4
5
  import { FetcherOptions } from './../../fetcher';
5
6
  export interface ImportHarnessEntitiesMutationHeaderParams {
6
7
  'Harness-Account'?: string;
7
8
  }
8
9
  export type ImportHarnessEntitiesRequestBody = ImportHarnessEntitiesRequestRequestBody;
9
- export type ImportHarnessEntitiesOkResponse = ImportEntitiesResponseResponse;
10
+ export type ImportHarnessEntitiesOkResponse = ResponseWithPagination<ImportEntitiesResponseResponse>;
10
11
  export type ImportHarnessEntitiesErrorResponse = unknown;
11
12
  export interface ImportHarnessEntitiesProps extends Omit<FetcherOptions<unknown, ImportHarnessEntitiesRequestBody, ImportHarnessEntitiesMutationHeaderParams>, 'url'> {
12
13
  body: ImportHarnessEntitiesRequestBody;
13
14
  }
14
15
  export declare function importHarnessEntities(props: ImportHarnessEntitiesProps): Promise<ImportHarnessEntitiesOkResponse>;
15
- export type ImportHarnessEntitiesMutationProps<T extends keyof ImportHarnessEntitiesProps> = Omit<ImportHarnessEntitiesProps, T> & Partial<Pick<ImportHarnessEntitiesProps, T>>;
16
16
  /**
17
17
  * Import Harness Entities to IDP
18
18
  */
19
- export declare function useImportHarnessEntitiesMutation<T extends keyof ImportHarnessEntitiesProps>(props: Pick<Partial<ImportHarnessEntitiesProps>, T>, options?: Omit<UseMutationOptions<ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<import("..").ImportEntitiesResponse, unknown, ImportHarnessEntitiesMutationProps<T>, unknown>;
19
+ export declare function useImportHarnessEntitiesMutation(options?: Omit<UseMutationOptions<ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ImportHarnessEntitiesOkResponse, unknown, ImportHarnessEntitiesProps, unknown>;
@@ -9,6 +9,6 @@ export function importHarnessEntities(props) {
9
9
  /**
10
10
  * Import Harness Entities to IDP
11
11
  */
12
- export function useImportHarnessEntitiesMutation(props, options) {
13
- return useMutation((mutateProps) => importHarnessEntities(Object.assign(Object.assign({}, props), mutateProps)), options);
12
+ export function useImportHarnessEntitiesMutation(options) {
13
+ return useMutation((mutateProps) => importHarnessEntities(mutateProps), options);
14
14
  }
@@ -0,0 +1,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { AppConfigResponseResponse } from '../responses/AppConfigResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from './../../fetcher';
5
+ export interface TogglePluginForAccountMutationPathParams {
6
+ 'plugin-id': string;
7
+ }
8
+ export interface TogglePluginForAccountMutationQueryParams {
9
+ enabled?: boolean;
10
+ }
11
+ export interface TogglePluginForAccountMutationHeaderParams {
12
+ 'Harness-Account'?: string;
13
+ }
14
+ export type TogglePluginForAccountOkResponse = ResponseWithPagination<AppConfigResponseResponse>;
15
+ export type TogglePluginForAccountErrorResponse = unknown;
16
+ export interface TogglePluginForAccountProps extends TogglePluginForAccountMutationPathParams, Omit<FetcherOptions<TogglePluginForAccountMutationQueryParams, unknown, TogglePluginForAccountMutationHeaderParams>, 'url'> {
17
+ queryParams: TogglePluginForAccountMutationQueryParams;
18
+ }
19
+ export declare function togglePluginForAccount(props: TogglePluginForAccountProps): Promise<TogglePluginForAccountOkResponse>;
20
+ /**
21
+ *
22
+ */
23
+ export declare function useTogglePluginForAccountMutation(options?: Omit<UseMutationOptions<TogglePluginForAccountOkResponse, TogglePluginForAccountErrorResponse, TogglePluginForAccountProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<TogglePluginForAccountOkResponse, unknown, TogglePluginForAccountProps, 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 togglePluginForAccount(props) {
7
+ return fetcher(Object.assign({ url: `/v1/plugin-toggle/${props['plugin-id']}`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ *
11
+ */
12
+ export function useTogglePluginForAccountMutation(options) {
13
+ return useMutation((mutateProps) => togglePluginForAccount(mutateProps), options);
14
+ }
@@ -1,19 +1,19 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
2
  import type { BackstagePermissionsResponseResponse } from '../responses/BackstagePermissionsResponseResponse';
3
3
  import type { BackstagePermissionsRequestRequestBody } from '../requestBodies/BackstagePermissionsRequestRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
4
5
  import { FetcherOptions } from './../../fetcher';
5
6
  export interface UpdateBackstagePermissionsMutationHeaderParams {
6
7
  'Harness-Account'?: string;
7
8
  }
8
9
  export type UpdateBackstagePermissionsRequestBody = BackstagePermissionsRequestRequestBody;
9
- export type UpdateBackstagePermissionsOkResponse = BackstagePermissionsResponseResponse;
10
+ export type UpdateBackstagePermissionsOkResponse = ResponseWithPagination<BackstagePermissionsResponseResponse>;
10
11
  export type UpdateBackstagePermissionsErrorResponse = unknown;
11
12
  export interface UpdateBackstagePermissionsProps extends Omit<FetcherOptions<unknown, UpdateBackstagePermissionsRequestBody, UpdateBackstagePermissionsMutationHeaderParams>, 'url'> {
12
13
  body: UpdateBackstagePermissionsRequestBody;
13
14
  }
14
15
  export declare function updateBackstagePermissions(props: UpdateBackstagePermissionsProps): Promise<UpdateBackstagePermissionsOkResponse>;
15
- export type UpdateBackstagePermissionsMutationProps<T extends keyof UpdateBackstagePermissionsProps> = Omit<UpdateBackstagePermissionsProps, T> & Partial<Pick<UpdateBackstagePermissionsProps, T>>;
16
16
  /**
17
17
  * Update Backstage Permission
18
18
  */
19
- export declare function useUpdateBackstagePermissionsMutation<T extends keyof UpdateBackstagePermissionsProps>(props: Pick<Partial<UpdateBackstagePermissionsProps>, T>, options?: Omit<UseMutationOptions<UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsMutationProps<T>>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<import("..").BackstagePermissionsResponse, unknown, UpdateBackstagePermissionsMutationProps<T>, unknown>;
19
+ export declare function useUpdateBackstagePermissionsMutation(options?: Omit<UseMutationOptions<UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateBackstagePermissionsOkResponse, unknown, UpdateBackstagePermissionsProps, unknown>;
@@ -9,6 +9,6 @@ export function updateBackstagePermissions(props) {
9
9
  /**
10
10
  * Update Backstage Permission
11
11
  */
12
- export function useUpdateBackstagePermissionsMutation(props, options) {
13
- return useMutation((mutateProps) => updateBackstagePermissions(Object.assign(Object.assign({}, props), mutateProps)), options);
12
+ export function useUpdateBackstagePermissionsMutation(options) {
13
+ return useMutation((mutateProps) => updateBackstagePermissions(mutateProps), options);
14
14
  }
@@ -1,6 +1,7 @@
1
- export type { CreateBackstagePermissionsErrorResponse, CreateBackstagePermissionsMutationProps, CreateBackstagePermissionsOkResponse, CreateBackstagePermissionsProps, CreateBackstagePermissionsRequestBody, } from './hooks/useCreateBackstagePermissionsMutation';
1
+ export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
+ export type { CreateBackstagePermissionsErrorResponse, CreateBackstagePermissionsOkResponse, CreateBackstagePermissionsProps, CreateBackstagePermissionsRequestBody, } from './hooks/useCreateBackstagePermissionsMutation';
2
3
  export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } from './hooks/useCreateBackstagePermissionsMutation';
3
- export type { CreateLayoutErrorResponse, CreateLayoutMutationProps, CreateLayoutOkResponse, CreateLayoutProps, CreateLayoutRequestBody, } from './hooks/useCreateLayoutMutation';
4
+ export type { CreateLayoutErrorResponse, CreateLayoutOkResponse, CreateLayoutProps, CreateLayoutRequestBody, } from './hooks/useCreateLayoutMutation';
4
5
  export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
5
6
  export type { GetAllLayoutsErrorResponse, GetAllLayoutsOkResponse, GetAllLayoutsProps, } from './hooks/useGetAllLayoutsQuery';
6
7
  export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
@@ -10,47 +11,45 @@ export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, Get
10
11
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
11
12
  export type { GetLayoutErrorResponse, GetLayoutOkResponse, GetLayoutProps, GetLayoutQueryPathParams, } from './hooks/useGetLayoutQuery';
12
13
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
14
+ export type { GetPluginsInfoPluginIdErrorResponse, GetPluginsInfoPluginIdOkResponse, GetPluginsInfoPluginIdProps, GetPluginsInfoPluginIdQueryPathParams, } from './hooks/useGetPluginsInfoPluginIdQuery';
15
+ export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks/useGetPluginsInfoPluginIdQuery';
16
+ export type { GetPluginsErrorResponse, GetPluginsOkResponse, GetPluginsProps, } from './hooks/useGetPluginsQuery';
17
+ export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
13
18
  export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, GetStatusInfoByTypeProps, GetStatusInfoByTypeQueryPathParams, } from './hooks/useGetStatusInfoByTypeQuery';
14
19
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
15
- export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesMutationProps, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
20
+ export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
16
21
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
17
- export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsMutationProps, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
22
+ export type { TogglePluginForAccountErrorResponse, TogglePluginForAccountMutationPathParams, TogglePluginForAccountMutationQueryParams, TogglePluginForAccountOkResponse, TogglePluginForAccountProps, } from './hooks/useTogglePluginForAccountMutation';
23
+ export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
24
+ export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
18
25
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
19
26
  export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
20
- export type { EnvironmentSecretRequestListRequestBody } from './requestBodies/EnvironmentSecretRequestListRequestBody';
21
- export type { EnvironmentSecretRequestRequestBody } from './requestBodies/EnvironmentSecretRequestRequestBody';
22
27
  export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
23
- export type { LayoutRequestRequestBody } from './requestBodies/LayoutRequestRequestBody';
24
- export type { ManualImportEntityRequestRequestBody } from './requestBodies/ManualImportEntityRequestRequestBody';
25
- export type { StatusInfoRequestRequestBody } from './requestBodies/StatusInfoRequestRequestBody';
28
+ export type { AppConfigResponseResponse } from './responses/AppConfigResponseResponse';
26
29
  export type { BackstagePermissionsResponseResponse } from './responses/BackstagePermissionsResponseResponse';
27
- export type { EnvironmentSecretResponseListResponse } from './responses/EnvironmentSecretResponseListResponse';
28
- export type { EnvironmentSecretResponseResponse } from './responses/EnvironmentSecretResponseResponse';
29
30
  export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
30
31
  export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesResponseResponse';
31
32
  export type { LayoutResponseResponse } from './responses/LayoutResponseResponse';
32
- export type { NamespaceResponseResponse } from './responses/NamespaceResponseResponse';
33
- export type { OnboardingAccessCheckResponseResponse } from './responses/OnboardingAccessCheckResponseResponse';
33
+ export type { PluginDetailedInfoResponseResponse } from './responses/PluginDetailedInfoResponseResponse';
34
+ export type { PluginInfoResponseListResponse } from './responses/PluginInfoResponseListResponse';
34
35
  export type { StatusInfoResponseResponse } from './responses/StatusInfoResponseResponse';
36
+ export type { AppConfig } from './schemas/AppConfig';
37
+ export type { AppConfigResponse } from './schemas/AppConfigResponse';
35
38
  export type { BackstagePermissions } from './schemas/BackstagePermissions';
36
39
  export type { BackstagePermissionsRequest } from './schemas/BackstagePermissionsRequest';
37
40
  export type { BackstagePermissionsResponse } from './schemas/BackstagePermissionsResponse';
38
41
  export type { CatalogConnectorInfo } from './schemas/CatalogConnectorInfo';
39
42
  export type { ConnectorDetails } from './schemas/ConnectorDetails';
40
43
  export type { EntitiesForImport } from './schemas/EntitiesForImport';
41
- export type { EnvironmentSecret } from './schemas/EnvironmentSecret';
42
- export type { EnvironmentSecretRequest } from './schemas/EnvironmentSecretRequest';
43
- export type { EnvironmentSecretResponse } from './schemas/EnvironmentSecretResponse';
44
44
  export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
45
45
  export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
46
46
  export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
47
47
  export type { ImportHarnessEntitiesRequest } from './schemas/ImportHarnessEntitiesRequest';
48
48
  export type { LayoutRequest } from './schemas/LayoutRequest';
49
49
  export type { LayoutResponse } from './schemas/LayoutResponse';
50
- export type { ManualImportEntityRequest } from './schemas/ManualImportEntityRequest';
51
- export type { NamepsaceResponse } from './schemas/NamepsaceResponse';
52
- export type { NamespaceInfo } from './schemas/NamespaceInfo';
53
- export type { OnboardingAccessCheckResponse } from './schemas/OnboardingAccessCheckResponse';
50
+ export type { PluginDetailedInfo } from './schemas/PluginDetailedInfo';
51
+ export type { PluginDetailedInfoResponse } from './schemas/PluginDetailedInfoResponse';
52
+ export type { PluginInfo } from './schemas/PluginInfo';
53
+ export type { PluginInfoResponse } from './schemas/PluginInfoResponse';
54
54
  export type { StatusInfo } from './schemas/StatusInfo';
55
- export type { StatusInfoRequest } from './schemas/StatusInfoRequest';
56
55
  export type { StatusInfoResponse } from './schemas/StatusInfoResponse';
@@ -4,6 +4,9 @@ export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQu
4
4
  export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
5
5
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
6
6
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
7
+ export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks/useGetPluginsInfoPluginIdQuery';
8
+ export { getPlugins, useGetPluginsQuery } from './hooks/useGetPluginsQuery';
7
9
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
8
10
  export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
11
+ export { togglePluginForAccount, useTogglePluginForAccountMutation, } from './hooks/useTogglePluginForAccountMutation';
9
12
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
@@ -0,0 +1,2 @@
1
+ import type { AppConfigResponse } from '../schemas/AppConfigResponse';
2
+ export type AppConfigResponseResponse = AppConfigResponse;
@@ -0,0 +1,2 @@
1
+ import type { PluginDetailedInfoResponse } from '../schemas/PluginDetailedInfoResponse';
2
+ export type PluginDetailedInfoResponseResponse = PluginDetailedInfoResponse;
@@ -0,0 +1,2 @@
1
+ import type { PluginInfoResponse } from '../schemas/PluginInfoResponse';
2
+ export type PluginInfoResponseListResponse = PluginInfoResponse[];
@@ -0,0 +1,17 @@
1
+ export interface AppConfig {
2
+ configId?: string;
3
+ configs?: string;
4
+ /**
5
+ * @format int64
6
+ */
7
+ createdAt?: number;
8
+ enabled?: boolean;
9
+ /**
10
+ * @format int64
11
+ */
12
+ enabledDisabledAt?: number;
13
+ /**
14
+ * @format int64
15
+ */
16
+ lastModifiedAt?: number;
17
+ }
@@ -0,0 +1,4 @@
1
+ import type { AppConfig } from '../schemas/AppConfig';
2
+ export interface AppConfigResponse {
3
+ appConfig?: AppConfig;
4
+ }
@@ -0,0 +1,8 @@
1
+ import type { PluginInfo } from '../schemas/PluginInfo';
2
+ export interface PluginDetailedInfo {
3
+ category?: 'CI/CD' | 'Monitoring';
4
+ config?: string;
5
+ description?: string;
6
+ pluginDetails?: PluginInfo;
7
+ source?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ import type { PluginDetailedInfo } from '../schemas/PluginDetailedInfo';
2
+ export interface PluginDetailedInfoResponse {
3
+ plugin?: PluginDetailedInfo;
4
+ }
@@ -0,0 +1,7 @@
1
+ export interface PluginInfo {
2
+ createdBy?: string;
3
+ enabled?: boolean;
4
+ iconUrl?: string;
5
+ id?: string;
6
+ name?: string;
7
+ }
@@ -0,0 +1,4 @@
1
+ import type { PluginInfo } from '../schemas/PluginInfo';
2
+ export interface PluginInfoResponse {
3
+ plugin?: PluginInfo;
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -35,6 +35,7 @@
35
35
  "devDependencies": {
36
36
  "@harnessio/oats-cli": "^2.1.1",
37
37
  "@harnessio/oats-plugin-react-query": "^2.1.2",
38
+ "@harnessio/oats-plugin-react-query-harness": "^0.4.0",
38
39
  "@types/node": "^18.11.9",
39
40
  "@types/react": "^18.0.24",
40
41
  "eslint": "^8.15.0",
@@ -1,2 +0,0 @@
1
- import type { EnvironmentSecretRequest } from '../schemas/EnvironmentSecretRequest';
2
- export type EnvironmentSecretRequestListRequestBody = EnvironmentSecretRequest[];
@@ -1,2 +0,0 @@
1
- import type { EnvironmentSecretRequest } from '../schemas/EnvironmentSecretRequest';
2
- export type EnvironmentSecretRequestRequestBody = EnvironmentSecretRequest;
@@ -1,2 +0,0 @@
1
- import type { LayoutRequest } from '../schemas/LayoutRequest';
2
- export type LayoutRequestRequestBody = LayoutRequest;
@@ -1,2 +0,0 @@
1
- import type { ManualImportEntityRequest } from '../schemas/ManualImportEntityRequest';
2
- export type ManualImportEntityRequestRequestBody = ManualImportEntityRequest;
@@ -1,2 +0,0 @@
1
- import type { StatusInfoRequest } from '../schemas/StatusInfoRequest';
2
- export type StatusInfoRequestRequestBody = StatusInfoRequest;
@@ -1,2 +0,0 @@
1
- import type { EnvironmentSecretResponse } from '../schemas/EnvironmentSecretResponse';
2
- export type EnvironmentSecretResponseListResponse = EnvironmentSecretResponse[];
@@ -1,2 +0,0 @@
1
- import type { EnvironmentSecretResponse } from '../schemas/EnvironmentSecretResponse';
2
- export type EnvironmentSecretResponseResponse = EnvironmentSecretResponse;
@@ -1,2 +0,0 @@
1
- import type { NamepsaceResponse } from '../schemas/NamepsaceResponse';
2
- export type NamespaceResponseResponse = NamepsaceResponse;
@@ -1,2 +0,0 @@
1
- import type { OnboardingAccessCheckResponse } from '../schemas/OnboardingAccessCheckResponse';
2
- export type OnboardingAccessCheckResponseResponse = OnboardingAccessCheckResponse;
@@ -1,14 +0,0 @@
1
- export interface EnvironmentSecret {
2
- /**
3
- * @format int64
4
- */
5
- created?: number;
6
- decrypted_value?: string;
7
- env_name?: string;
8
- identifier?: string;
9
- secret_identifier?: string;
10
- /**
11
- * @format int64
12
- */
13
- updated?: number;
14
- }
@@ -1,4 +0,0 @@
1
- import type { EnvironmentSecret } from '../schemas/EnvironmentSecret';
2
- export interface EnvironmentSecretRequest {
3
- secret?: EnvironmentSecret;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- import type { EnvironmentSecret } from '../schemas/EnvironmentSecret';
2
- export interface EnvironmentSecretResponse {
3
- secret?: EnvironmentSecret;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- /**
2
- * Details of entity to import manually to IDP
3
- */
4
- export interface ManualImportEntityRequest {
5
- entityName: string;
6
- /**
7
- * yaml in form on json
8
- */
9
- yaml: string;
10
- }
@@ -1,5 +0,0 @@
1
- import type { NamespaceInfo } from '../schemas/NamespaceInfo';
2
- /**
3
- * Namespace response body
4
- */
5
- export type NamepsaceResponse = NamespaceInfo;
@@ -1 +0,0 @@
1
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * Namespace response body content
3
- */
4
- export interface NamespaceInfo {
5
- accountIdentifier?: string;
6
- namespace?: string;
7
- }
@@ -1,4 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- export {};
@@ -1,6 +0,0 @@
1
- /**
2
- * Response to check whether user is allowed to perform IDP onboarding or not
3
- */
4
- export interface OnboardingAccessCheckResponse {
5
- access: string;
6
- }
@@ -1,4 +0,0 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
- export {};
@@ -1,4 +0,0 @@
1
- import type { StatusInfo } from '../schemas/StatusInfo';
2
- export interface StatusInfoRequest {
3
- status?: StatusInfo;
4
- }
@@ -1 +0,0 @@
1
- export {};