@harnessio/react-idp-service-client 0.3.0 → 0.4.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/useCreateBackstagePermissionsMutation.d.ts +19 -0
- package/dist/services/hooks/useCreateBackstagePermissionsMutation.js +14 -0
- package/dist/services/hooks/useGetBackstagePermissionsQuery.d.ts +15 -0
- package/dist/services/hooks/useGetBackstagePermissionsQuery.js +14 -0
- package/dist/services/hooks/useGetStatusInfoByTypeQuery.d.ts +1 -1
- package/dist/services/hooks/useUpdateBackstagePermissionsMutation.d.ts +19 -0
- package/dist/services/hooks/useUpdateBackstagePermissionsMutation.js +14 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/index.js +3 -0
- package/dist/services/requestBodies/BackstagePermissionsRequestRequestBody.d.ts +2 -0
- package/dist/services/requestBodies/BackstagePermissionsRequestRequestBody.js +1 -0
- package/dist/services/responses/BackstagePermissionsResponseResponse.d.ts +2 -0
- package/dist/services/responses/BackstagePermissionsResponseResponse.js +1 -0
- package/dist/services/schemas/BackstagePermissions.d.ts +13 -0
- package/dist/services/schemas/BackstagePermissions.js +4 -0
- package/dist/services/schemas/BackstagePermissionsRequest.d.ts +4 -0
- package/dist/services/schemas/BackstagePermissionsRequest.js +1 -0
- package/dist/services/schemas/BackstagePermissionsResponse.d.ts +4 -0
- package/dist/services/schemas/BackstagePermissionsResponse.js +1 -0
- package/dist/services/schemas/StatusInfo.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { BackstagePermissionsResponseResponse } from '../responses/BackstagePermissionsResponseResponse';
|
|
3
|
+
import type { BackstagePermissionsRequestRequestBody } from '../requestBodies/BackstagePermissionsRequestRequestBody';
|
|
4
|
+
import { FetcherOptions } from './../../fetcher';
|
|
5
|
+
export interface CreateBackstagePermissionsMutationHeaderParams {
|
|
6
|
+
'Harness-Account'?: string;
|
|
7
|
+
}
|
|
8
|
+
export type CreateBackstagePermissionsRequestBody = BackstagePermissionsRequestRequestBody;
|
|
9
|
+
export type CreateBackstagePermissionsOkResponse = BackstagePermissionsResponseResponse;
|
|
10
|
+
export type CreateBackstagePermissionsErrorResponse = unknown;
|
|
11
|
+
export interface CreateBackstagePermissionsProps extends Omit<FetcherOptions<unknown, CreateBackstagePermissionsRequestBody, CreateBackstagePermissionsMutationHeaderParams>, 'url'> {
|
|
12
|
+
body: CreateBackstagePermissionsRequestBody;
|
|
13
|
+
}
|
|
14
|
+
export declare function createBackstagePermissions(props: CreateBackstagePermissionsProps): Promise<CreateBackstagePermissionsOkResponse>;
|
|
15
|
+
export type CreateBackstagePermissionsMutationProps<T extends keyof CreateBackstagePermissionsProps> = Omit<CreateBackstagePermissionsProps, T> & Partial<Pick<CreateBackstagePermissionsProps, T>>;
|
|
16
|
+
/**
|
|
17
|
+
* Creates backstage Permissions for a given account
|
|
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>;
|
|
@@ -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 createBackstagePermissions(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/backstage-permissions`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates backstage Permissions for a given account
|
|
11
|
+
*/
|
|
12
|
+
export function useCreateBackstagePermissionsMutation(props, options) {
|
|
13
|
+
return useMutation((mutateProps) => createBackstagePermissions(Object.assign(Object.assign({}, props), mutateProps)), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { BackstagePermissionsResponseResponse } from '../responses/BackstagePermissionsResponseResponse';
|
|
3
|
+
import { FetcherOptions } from './../../fetcher';
|
|
4
|
+
export interface GetBackstagePermissionsQueryHeaderParams {
|
|
5
|
+
'Harness-Account'?: string;
|
|
6
|
+
}
|
|
7
|
+
export type GetBackstagePermissionsOkResponse = BackstagePermissionsResponseResponse;
|
|
8
|
+
export type GetBackstagePermissionsErrorResponse = unknown;
|
|
9
|
+
export interface GetBackstagePermissionsProps extends Omit<FetcherOptions<unknown, unknown, GetBackstagePermissionsQueryHeaderParams>, 'url'> {
|
|
10
|
+
}
|
|
11
|
+
export declare function getBackstagePermissions(props: GetBackstagePermissionsProps): Promise<GetBackstagePermissionsOkResponse>;
|
|
12
|
+
/**
|
|
13
|
+
* Get all backstage permissions for a given account
|
|
14
|
+
*/
|
|
15
|
+
export declare function useGetBackstagePermissionsQuery(props: GetBackstagePermissionsProps, options?: Omit<UseQueryOptions<GetBackstagePermissionsOkResponse, GetBackstagePermissionsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<import("..").BackstagePermissionsResponse, 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 getBackstagePermissions(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/backstage-permissions`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get all backstage permissions for a given account
|
|
11
|
+
*/
|
|
12
|
+
export function useGetBackstagePermissionsQuery(props, options) {
|
|
13
|
+
return useQuery(['get-backstage-permissions'], ({ signal }) => getBackstagePermissions(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -2,7 +2,7 @@ import { UseQueryOptions } from '@tanstack/react-query';
|
|
|
2
2
|
import type { StatusInfoResponseResponse } from '../responses/StatusInfoResponseResponse';
|
|
3
3
|
import { FetcherOptions } from './../../fetcher';
|
|
4
4
|
export interface GetStatusInfoByTypeQueryPathParams {
|
|
5
|
-
type:
|
|
5
|
+
type: 'infra' | 'onboarding';
|
|
6
6
|
}
|
|
7
7
|
export interface GetStatusInfoByTypeQueryHeaderParams {
|
|
8
8
|
'Harness-Account'?: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { BackstagePermissionsResponseResponse } from '../responses/BackstagePermissionsResponseResponse';
|
|
3
|
+
import type { BackstagePermissionsRequestRequestBody } from '../requestBodies/BackstagePermissionsRequestRequestBody';
|
|
4
|
+
import { FetcherOptions } from './../../fetcher';
|
|
5
|
+
export interface UpdateBackstagePermissionsMutationHeaderParams {
|
|
6
|
+
'Harness-Account'?: string;
|
|
7
|
+
}
|
|
8
|
+
export type UpdateBackstagePermissionsRequestBody = BackstagePermissionsRequestRequestBody;
|
|
9
|
+
export type UpdateBackstagePermissionsOkResponse = BackstagePermissionsResponseResponse;
|
|
10
|
+
export type UpdateBackstagePermissionsErrorResponse = unknown;
|
|
11
|
+
export interface UpdateBackstagePermissionsProps extends Omit<FetcherOptions<unknown, UpdateBackstagePermissionsRequestBody, UpdateBackstagePermissionsMutationHeaderParams>, 'url'> {
|
|
12
|
+
body: UpdateBackstagePermissionsRequestBody;
|
|
13
|
+
}
|
|
14
|
+
export declare function updateBackstagePermissions(props: UpdateBackstagePermissionsProps): Promise<UpdateBackstagePermissionsOkResponse>;
|
|
15
|
+
export type UpdateBackstagePermissionsMutationProps<T extends keyof UpdateBackstagePermissionsProps> = Omit<UpdateBackstagePermissionsProps, T> & Partial<Pick<UpdateBackstagePermissionsProps, T>>;
|
|
16
|
+
/**
|
|
17
|
+
* Update Backstage Permission
|
|
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>;
|
|
@@ -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 updateBackstagePermissions(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/backstage-permissions`, method: 'PUT' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Update Backstage Permission
|
|
11
|
+
*/
|
|
12
|
+
export function useUpdateBackstagePermissionsMutation(props, options) {
|
|
13
|
+
return useMutation((mutateProps) => updateBackstagePermissions(Object.assign(Object.assign({}, props), mutateProps)), options);
|
|
14
|
+
}
|
package/dist/services/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export type { CreateBackstagePermissionsErrorResponse, CreateBackstagePermissionsMutationProps, CreateBackstagePermissionsOkResponse, CreateBackstagePermissionsProps, CreateBackstagePermissionsRequestBody, } from './hooks/useCreateBackstagePermissionsMutation';
|
|
2
|
+
export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } from './hooks/useCreateBackstagePermissionsMutation';
|
|
3
|
+
export type { GetBackstagePermissionsErrorResponse, GetBackstagePermissionsOkResponse, GetBackstagePermissionsProps, } from './hooks/useGetBackstagePermissionsQuery';
|
|
4
|
+
export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
|
|
1
5
|
export type { GetHarnessEntitiesV1ErrorResponse, GetHarnessEntitiesV1OkResponse, GetHarnessEntitiesV1Props, GetHarnessEntitiesV1QueryPathParams, GetHarnessEntitiesV1QueryQueryParams, } from './hooks/useGetHarnessEntitiesV1Query';
|
|
2
6
|
export { getHarnessEntitiesV1, useGetHarnessEntitiesV1Query, } from './hooks/useGetHarnessEntitiesV1Query';
|
|
3
7
|
export type { GetStatusInfoByTypeErrorResponse, GetStatusInfoByTypeOkResponse, GetStatusInfoByTypeProps, GetStatusInfoByTypeQueryPathParams, } from './hooks/useGetStatusInfoByTypeQuery';
|
|
@@ -6,10 +10,14 @@ export type { ImportHarnessEntitiesV1ErrorResponse, ImportHarnessEntitiesV1Mutat
|
|
|
6
10
|
export { importHarnessEntitiesV1, useImportHarnessEntitiesV1Mutation, } from './hooks/useImportHarnessEntitiesV1Mutation';
|
|
7
11
|
export type { OnboardingAccessCheckV1ErrorResponse, OnboardingAccessCheckV1OkResponse, OnboardingAccessCheckV1Props, OnboardingAccessCheckV1QueryPathParams, } from './hooks/useOnboardingAccessCheckV1Query';
|
|
8
12
|
export { onboardingAccessCheckV1, useOnboardingAccessCheckV1Query, } from './hooks/useOnboardingAccessCheckV1Query';
|
|
13
|
+
export type { UpdateBackstagePermissionsErrorResponse, UpdateBackstagePermissionsMutationProps, UpdateBackstagePermissionsOkResponse, UpdateBackstagePermissionsProps, UpdateBackstagePermissionsRequestBody, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
14
|
+
export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
15
|
+
export type { BackstagePermissionsRequestRequestBody } from './requestBodies/BackstagePermissionsRequestRequestBody';
|
|
9
16
|
export type { EnvironmentSecretRequestListRequestBody } from './requestBodies/EnvironmentSecretRequestListRequestBody';
|
|
10
17
|
export type { EnvironmentSecretRequestRequestBody } from './requestBodies/EnvironmentSecretRequestRequestBody';
|
|
11
18
|
export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
|
|
12
19
|
export type { StatusInfoRequestRequestBody } from './requestBodies/StatusInfoRequestRequestBody';
|
|
20
|
+
export type { BackstagePermissionsResponseResponse } from './responses/BackstagePermissionsResponseResponse';
|
|
13
21
|
export type { EnvironmentSecretResponseListResponse } from './responses/EnvironmentSecretResponseListResponse';
|
|
14
22
|
export type { EnvironmentSecretResponseResponse } from './responses/EnvironmentSecretResponseResponse';
|
|
15
23
|
export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
|
|
@@ -17,6 +25,9 @@ export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesR
|
|
|
17
25
|
export type { NamespaceResponseResponse } from './responses/NamespaceResponseResponse';
|
|
18
26
|
export type { OnboardingAccessCheckResponseResponse } from './responses/OnboardingAccessCheckResponseResponse';
|
|
19
27
|
export type { StatusInfoResponseResponse } from './responses/StatusInfoResponseResponse';
|
|
28
|
+
export type { BackstagePermissions } from './schemas/BackstagePermissions';
|
|
29
|
+
export type { BackstagePermissionsRequest } from './schemas/BackstagePermissionsRequest';
|
|
30
|
+
export type { BackstagePermissionsResponse } from './schemas/BackstagePermissionsResponse';
|
|
20
31
|
export type { CatalogConnectorInfo } from './schemas/CatalogConnectorInfo';
|
|
21
32
|
export type { ConnectorDetails } from './schemas/ConnectorDetails';
|
|
22
33
|
export type { EntitiesForImport } from './schemas/EntitiesForImport';
|
package/dist/services/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } from './hooks/useCreateBackstagePermissionsMutation';
|
|
2
|
+
export { getBackstagePermissions, useGetBackstagePermissionsQuery, } from './hooks/useGetBackstagePermissionsQuery';
|
|
1
3
|
export { getHarnessEntitiesV1, useGetHarnessEntitiesV1Query, } from './hooks/useGetHarnessEntitiesV1Query';
|
|
2
4
|
export { getStatusInfoByType, useGetStatusInfoByTypeQuery, } from './hooks/useGetStatusInfoByTypeQuery';
|
|
3
5
|
export { importHarnessEntitiesV1, useImportHarnessEntitiesV1Mutation, } from './hooks/useImportHarnessEntitiesV1Mutation';
|
|
4
6
|
export { onboardingAccessCheckV1, useOnboardingAccessCheckV1Query, } from './hooks/useOnboardingAccessCheckV1Query';
|
|
7
|
+
export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } from './hooks/useUpdateBackstagePermissionsMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|