@harnessio/react-idp-service-client 0.5.0 → 0.6.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.
@@ -0,0 +1,23 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { HarnessEntitiesResponseResponse } from '../responses/HarnessEntitiesResponseResponse';
3
+ import { FetcherOptions } from './../../fetcher';
4
+ export interface GetHarnessEntitiesQueryQueryParams {
5
+ page?: number;
6
+ limit?: number;
7
+ sort?: string;
8
+ order?: string;
9
+ search_term?: string;
10
+ }
11
+ export interface GetHarnessEntitiesQueryHeaderParams {
12
+ 'Harness-Account'?: string;
13
+ }
14
+ export type GetHarnessEntitiesOkResponse = HarnessEntitiesResponseResponse;
15
+ export type GetHarnessEntitiesErrorResponse = unknown;
16
+ export interface GetHarnessEntitiesProps extends Omit<FetcherOptions<GetHarnessEntitiesQueryQueryParams, unknown, GetHarnessEntitiesQueryHeaderParams>, 'url'> {
17
+ queryParams: GetHarnessEntitiesQueryQueryParams;
18
+ }
19
+ export declare function getHarnessEntities(props: GetHarnessEntitiesProps): Promise<GetHarnessEntitiesOkResponse>;
20
+ /**
21
+ * Get Harness Entities
22
+ */
23
+ export declare function useGetHarnessEntitiesQuery(props: GetHarnessEntitiesProps, options?: Omit<UseQueryOptions<GetHarnessEntitiesOkResponse, GetHarnessEntitiesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").HarnessEntitiesResponse, 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 getHarnessEntities(props) {
7
+ return fetcher(Object.assign({ url: `/v1/onboarding/harness-entities`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get Harness Entities
11
+ */
12
+ export function useGetHarnessEntitiesQuery(props, options) {
13
+ return useQuery(['get-harness-entities', props.queryParams], ({ signal }) => getHarnessEntities(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ImportEntitiesResponseResponse } from '../responses/ImportEntitiesResponseResponse';
3
+ import type { ImportHarnessEntitiesRequestRequestBody } from '../requestBodies/ImportHarnessEntitiesRequestRequestBody';
4
+ import { FetcherOptions } from './../../fetcher';
5
+ export interface ImportHarnessEntitiesMutationHeaderParams {
6
+ 'Harness-Account'?: string;
7
+ }
8
+ export type ImportHarnessEntitiesRequestBody = ImportHarnessEntitiesRequestRequestBody;
9
+ export type ImportHarnessEntitiesOkResponse = ImportEntitiesResponseResponse;
10
+ export type ImportHarnessEntitiesErrorResponse = unknown;
11
+ export interface ImportHarnessEntitiesProps extends Omit<FetcherOptions<unknown, ImportHarnessEntitiesRequestBody, ImportHarnessEntitiesMutationHeaderParams>, 'url'> {
12
+ body: ImportHarnessEntitiesRequestBody;
13
+ }
14
+ export declare function importHarnessEntities(props: ImportHarnessEntitiesProps): Promise<ImportHarnessEntitiesOkResponse>;
15
+ export type ImportHarnessEntitiesMutationProps<T extends keyof ImportHarnessEntitiesProps> = Omit<ImportHarnessEntitiesProps, T> & Partial<Pick<ImportHarnessEntitiesProps, T>>;
16
+ /**
17
+ * Import Harness Entities to IDP
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>;
@@ -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 importHarnessEntities(props) {
7
+ return fetcher(Object.assign({ url: `/v1/onboarding/import-harness-entities`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Import Harness Entities to IDP
11
+ */
12
+ export function useImportHarnessEntitiesMutation(props, options) {
13
+ return useMutation((mutateProps) => importHarnessEntities(Object.assign(Object.assign({}, props), mutateProps)), options);
14
+ }
@@ -0,0 +1,15 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { OnboardingAccessCheckResponseResponse } from '../responses/OnboardingAccessCheckResponseResponse';
3
+ import { FetcherOptions } from './../../fetcher';
4
+ export interface OnboardingAccessCheckQueryHeaderParams {
5
+ 'Harness-Account'?: string;
6
+ }
7
+ export type OnboardingAccessCheckOkResponse = OnboardingAccessCheckResponseResponse;
8
+ export type OnboardingAccessCheckErrorResponse = unknown;
9
+ export interface OnboardingAccessCheckProps extends Omit<FetcherOptions<unknown, unknown, OnboardingAccessCheckQueryHeaderParams>, 'url'> {
10
+ }
11
+ export declare function onboardingAccessCheck(props: OnboardingAccessCheckProps): Promise<OnboardingAccessCheckOkResponse>;
12
+ /**
13
+ * Check if User is allowed to perform IDP onboarding workflow
14
+ */
15
+ export declare function useOnboardingAccessCheckQuery(props: OnboardingAccessCheckProps, options?: Omit<UseQueryOptions<OnboardingAccessCheckOkResponse, OnboardingAccessCheckErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").OnboardingAccessCheckResponse, 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 onboardingAccessCheck(props) {
7
+ return fetcher(Object.assign({ url: `/v1/onboarding/access-check`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Check if User is allowed to perform IDP onboarding workflow
11
+ */
12
+ export function useOnboardingAccessCheckQuery(props, options) {
13
+ return useQuery(['onboarding-access-check'], ({ signal }) => onboardingAccessCheck(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -6,10 +6,16 @@ export type { GetAllLayoutsErrorResponse, GetAllLayoutsOkResponse, GetAllLayouts
6
6
  export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
7
7
  export type { GetBackstagePermissionsErrorResponse, GetBackstagePermissionsOkResponse, GetBackstagePermissionsProps, } from './hooks/useGetBackstagePermissionsQuery';
8
8
  export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
9
+ export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, GetHarnessEntitiesProps, GetHarnessEntitiesQueryQueryParams, } from './hooks/useGetHarnessEntitiesQuery';
10
+ export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
9
11
  export type { GetLayoutErrorResponse, GetLayoutOkResponse, GetLayoutProps, GetLayoutQueryPathParams, } from './hooks/useGetLayoutQuery';
10
12
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
11
13
  export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, GetStatusInfoByTypeProps, GetStatusInfoByTypeQueryPathParams, } from './hooks/useGetStatusInfoByTypeQuery';
12
14
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
15
+ export type { ImportHarnessEntitiesErrorResponse, ImportHarnessEntitiesMutationProps, ImportHarnessEntitiesOkResponse, ImportHarnessEntitiesProps, ImportHarnessEntitiesRequestBody, } from './hooks/useImportHarnessEntitiesMutation';
16
+ export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
17
+ export type { OnboardingAccessCheckErrorResponse, OnboardingAccessCheckOkResponse, OnboardingAccessCheckProps, } from './hooks/useOnboardingAccessCheckQuery';
18
+ export { onboardingAccessCheck, useOnboardingAccessCheckQuery, } from './hooks/useOnboardingAccessCheckQuery';
13
19
  export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsMutationProps, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
14
20
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
15
21
  export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
@@ -2,6 +2,9 @@ export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } fr
2
2
  export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
3
3
  export { getAllLayouts, useGetAllLayoutsQuery } from './hooks/useGetAllLayoutsQuery';
4
4
  export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
5
+ export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
5
6
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
6
7
  export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
8
+ export { importHarnessEntities, useImportHarnessEntitiesMutation, } from './hooks/useImportHarnessEntitiesMutation';
9
+ export { onboardingAccessCheck, useOnboardingAccessCheckQuery, } from './hooks/useOnboardingAccessCheckQuery';
7
10
  export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",