@harnessio/react-idp-service-client 0.49.0 → 0.49.2
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/idp-service/src/services/hooks/useCreateIntegrationMutation.d.ts +6 -3
- package/dist/idp-service/src/services/hooks/useCreateIntegrationMutation.js +1 -1
- package/dist/idp-service/src/services/hooks/useGetIntegrationQuery.d.ts +1 -0
- package/dist/idp-service/src/services/hooks/useGetIntegrationQuery.js +2 -2
- package/dist/idp-service/src/services/hooks/useGetIntegrationsQuery.d.ts +4 -1
- package/dist/idp-service/src/services/hooks/useGetIntegrationsQuery.js +2 -2
- package/dist/idp-service/src/services/hooks/useUpdateIntegrationMutation.d.ts +3 -3
- package/dist/idp-service/src/services/hooks/useUpdateIntegrationMutation.js +1 -1
- package/dist/idp-service/src/services/index.d.ts +7 -3
- package/dist/idp-service/src/services/requestBodies/IntegrationRequestRequestBody.d.ts +2 -0
- package/dist/idp-service/src/services/schemas/BaseIntegrationRequest.d.ts +8 -0
- package/dist/idp-service/src/services/schemas/BaseIntegrationRequest.js +1 -0
- package/dist/idp-service/src/services/schemas/{IntegrationRequest.d.ts → GitIntegrationRequest.d.ts} +2 -1
- package/dist/idp-service/src/services/schemas/GitIntegrationRequest.js +1 -0
- package/dist/idp-service/src/services/schemas/GitIntegrationResponse.d.ts +13 -0
- package/dist/idp-service/src/services/schemas/GitIntegrationResponse.js +1 -0
- package/dist/idp-service/src/services/schemas/IntegrationResponse.d.ts +3 -7
- package/dist/idp-service/src/services/schemas/IntegrationResponse.js +0 -3
- package/dist/idp-service/src/services/schemas/ValidationResponse.d.ts +8 -0
- package/dist/idp-service/src/services/schemas/ValidationResponse.js +4 -0
- package/package.json +1 -1
- /package/dist/idp-service/src/services/{schemas/IntegrationRequest.js → requestBodies/IntegrationRequestRequestBody.js} +0 -0
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { IntegrationResponseResponse } from '../responses/IntegrationResponseResponse';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IntegrationRequestRequestBody } from '../requestBodies/IntegrationRequestRequestBody';
|
|
4
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
5
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface CreateIntegrationMutationPathParams {
|
|
7
|
+
integration: 'git';
|
|
8
|
+
}
|
|
6
9
|
export interface CreateIntegrationMutationQueryParams {
|
|
7
10
|
dry_run?: boolean;
|
|
8
11
|
write_validation?: boolean;
|
|
@@ -10,10 +13,10 @@ export interface CreateIntegrationMutationQueryParams {
|
|
|
10
13
|
export interface CreateIntegrationMutationHeaderParams {
|
|
11
14
|
'Harness-Account'?: string;
|
|
12
15
|
}
|
|
13
|
-
export type CreateIntegrationRequestBody =
|
|
16
|
+
export type CreateIntegrationRequestBody = IntegrationRequestRequestBody;
|
|
14
17
|
export type CreateIntegrationOkResponse = ResponseWithPagination<IntegrationResponseResponse>;
|
|
15
18
|
export type CreateIntegrationErrorResponse = unknown;
|
|
16
|
-
export interface CreateIntegrationProps extends Omit<FetcherOptions<CreateIntegrationMutationQueryParams, CreateIntegrationRequestBody, CreateIntegrationMutationHeaderParams>, 'url'> {
|
|
19
|
+
export interface CreateIntegrationProps extends CreateIntegrationMutationPathParams, Omit<FetcherOptions<CreateIntegrationMutationQueryParams, CreateIntegrationRequestBody, CreateIntegrationMutationHeaderParams>, 'url'> {
|
|
17
20
|
queryParams: CreateIntegrationMutationQueryParams;
|
|
18
21
|
body: CreateIntegrationRequestBody;
|
|
19
22
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useMutation } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function createIntegration(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/integrations`, method: 'POST' }, props));
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/integrations/${props.integration}`, method: 'POST' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Create integration
|
|
@@ -3,6 +3,7 @@ import type { IntegrationResponseResponse } from '../responses/IntegrationRespon
|
|
|
3
3
|
import type { ResponseWithPagination } from '../helpers';
|
|
4
4
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
5
|
export interface GetIntegrationQueryPathParams {
|
|
6
|
+
integration: 'git';
|
|
6
7
|
'integration-id': string;
|
|
7
8
|
}
|
|
8
9
|
export interface GetIntegrationQueryHeaderParams {
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function getIntegration(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/integrations/${props['integration-id']}`, method: 'GET' }, props));
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/integrations/${props.integration}/${props['integration-id']}`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Get integration details for given integrationId
|
|
11
11
|
*/
|
|
12
12
|
export function useGetIntegrationQuery(props, options) {
|
|
13
|
-
return useQuery(['get-integration', props['integration-id']], ({ signal }) => getIntegration(Object.assign(Object.assign({}, props), { signal })), options);
|
|
13
|
+
return useQuery(['get-integration', props.integration, props['integration-id']], ({ signal }) => getIntegration(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -2,6 +2,9 @@ import { UseQueryOptions } from '@tanstack/react-query';
|
|
|
2
2
|
import type { IntegrationResponseListResponse } from '../responses/IntegrationResponseListResponse';
|
|
3
3
|
import type { ResponseWithPagination } from '../helpers';
|
|
4
4
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetIntegrationsQueryPathParams {
|
|
6
|
+
integration: 'git';
|
|
7
|
+
}
|
|
5
8
|
export interface GetIntegrationsQueryQueryParams {
|
|
6
9
|
page?: number;
|
|
7
10
|
limit?: number;
|
|
@@ -13,7 +16,7 @@ export interface GetIntegrationsQueryHeaderParams {
|
|
|
13
16
|
}
|
|
14
17
|
export type GetIntegrationsOkResponse = ResponseWithPagination<IntegrationResponseListResponse>;
|
|
15
18
|
export type GetIntegrationsErrorResponse = unknown;
|
|
16
|
-
export interface GetIntegrationsProps extends Omit<FetcherOptions<GetIntegrationsQueryQueryParams, unknown, GetIntegrationsQueryHeaderParams>, 'url'> {
|
|
19
|
+
export interface GetIntegrationsProps extends GetIntegrationsQueryPathParams, Omit<FetcherOptions<GetIntegrationsQueryQueryParams, unknown, GetIntegrationsQueryHeaderParams>, 'url'> {
|
|
17
20
|
queryParams: GetIntegrationsQueryQueryParams;
|
|
18
21
|
}
|
|
19
22
|
export declare function getIntegrations(props: GetIntegrationsProps): Promise<GetIntegrationsOkResponse>;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
import { useQuery } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function getIntegrations(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/integrations`, method: 'GET' }, props));
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/integrations/${props.integration}`, method: 'GET' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Get all integrations available
|
|
11
11
|
*/
|
|
12
12
|
export function useGetIntegrationsQuery(props, options) {
|
|
13
|
-
return useQuery(['get-integrations', props.queryParams], ({ signal }) => getIntegrations(Object.assign(Object.assign({}, props), { signal })), options);
|
|
13
|
+
return useQuery(['get-integrations', props.integration, props.queryParams], ({ signal }) => getIntegrations(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
14
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { IntegrationResponseResponse } from '../responses/IntegrationResponseResponse';
|
|
3
|
-
import type {
|
|
3
|
+
import type { IntegrationRequestRequestBody } from '../requestBodies/IntegrationRequestRequestBody';
|
|
4
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
5
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
6
|
export interface UpdateIntegrationMutationPathParams {
|
|
7
|
+
integration: 'git';
|
|
7
8
|
'integration-id': string;
|
|
8
9
|
}
|
|
9
10
|
export interface UpdateIntegrationMutationQueryParams {
|
|
10
11
|
dry_run?: boolean;
|
|
11
|
-
write_validation?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export interface UpdateIntegrationMutationHeaderParams {
|
|
14
14
|
'Harness-Account'?: string;
|
|
15
15
|
}
|
|
16
|
-
export type UpdateIntegrationRequestBody =
|
|
16
|
+
export type UpdateIntegrationRequestBody = IntegrationRequestRequestBody;
|
|
17
17
|
export type UpdateIntegrationOkResponse = ResponseWithPagination<IntegrationResponseResponse>;
|
|
18
18
|
export type UpdateIntegrationErrorResponse = unknown;
|
|
19
19
|
export interface UpdateIntegrationProps extends UpdateIntegrationMutationPathParams, Omit<FetcherOptions<UpdateIntegrationMutationQueryParams, UpdateIntegrationRequestBody, UpdateIntegrationMutationHeaderParams>, 'url'> {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { useMutation } from '@tanstack/react-query';
|
|
5
5
|
import { fetcher } from '../../../../fetcher/index.js';
|
|
6
6
|
export function updateIntegration(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/integrations/${props['integration-id']}`, method: 'PUT' }, props));
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/integrations/${props.integration}/${props['integration-id']}`, method: 'PUT' }, props));
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Update integration details for given integrationId
|
|
@@ -5,7 +5,7 @@ export type { CreateBackstagePermissionsErrorResponse, CreateBackstagePermission
|
|
|
5
5
|
export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } from './hooks/useCreateBackstagePermissionsMutation';
|
|
6
6
|
export type { CreateCheckErrorResponse, CreateCheckOkResponse, CreateCheckProps, CreateCheckRequestBody, } from './hooks/useCreateCheckMutation';
|
|
7
7
|
export { createCheck, useCreateCheckMutation } from './hooks/useCreateCheckMutation';
|
|
8
|
-
export type { CreateIntegrationErrorResponse, CreateIntegrationMutationQueryParams, CreateIntegrationOkResponse, CreateIntegrationProps, CreateIntegrationRequestBody, } from './hooks/useCreateIntegrationMutation';
|
|
8
|
+
export type { CreateIntegrationErrorResponse, CreateIntegrationMutationPathParams, CreateIntegrationMutationQueryParams, CreateIntegrationOkResponse, CreateIntegrationProps, CreateIntegrationRequestBody, } from './hooks/useCreateIntegrationMutation';
|
|
9
9
|
export { createIntegration, useCreateIntegrationMutation, } from './hooks/useCreateIntegrationMutation';
|
|
10
10
|
export type { CreateLayoutErrorResponse, CreateLayoutOkResponse, CreateLayoutProps, CreateLayoutRequestBody, } from './hooks/useCreateLayoutMutation';
|
|
11
11
|
export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
|
|
@@ -49,7 +49,7 @@ export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, Get
|
|
|
49
49
|
export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
|
|
50
50
|
export type { GetIntegrationErrorResponse, GetIntegrationOkResponse, GetIntegrationProps, GetIntegrationQueryPathParams, } from './hooks/useGetIntegrationQuery';
|
|
51
51
|
export { getIntegration, useGetIntegrationQuery } from './hooks/useGetIntegrationQuery';
|
|
52
|
-
export type { GetIntegrationsErrorResponse, GetIntegrationsOkResponse, GetIntegrationsProps, GetIntegrationsQueryQueryParams, } from './hooks/useGetIntegrationsQuery';
|
|
52
|
+
export type { GetIntegrationsErrorResponse, GetIntegrationsOkResponse, GetIntegrationsProps, GetIntegrationsQueryPathParams, GetIntegrationsQueryQueryParams, } from './hooks/useGetIntegrationsQuery';
|
|
53
53
|
export { getIntegrations, useGetIntegrationsQuery } from './hooks/useGetIntegrationsQuery';
|
|
54
54
|
export type { GetLayoutErrorResponse, GetLayoutOkResponse, GetLayoutProps, GetLayoutQueryPathParams, } from './hooks/useGetLayoutQuery';
|
|
55
55
|
export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
|
|
@@ -112,6 +112,7 @@ export type { CustomPluginCreateRequestRequestBody } from './requestBodies/Custo
|
|
|
112
112
|
export type { CustomPluginInfoRequestRequestBody } from './requestBodies/CustomPluginInfoRequestRequestBody';
|
|
113
113
|
export type { GenerateYamlRequestRequestBody } from './requestBodies/GenerateYamlRequestRequestBody';
|
|
114
114
|
export type { ImportHarnessEntitiesRequestRequestBody } from './requestBodies/ImportHarnessEntitiesRequestRequestBody';
|
|
115
|
+
export type { IntegrationRequestRequestBody } from './requestBodies/IntegrationRequestRequestBody';
|
|
115
116
|
export type { RequestPluginRequestRequestBody } from './requestBodies/RequestPluginRequestRequestBody';
|
|
116
117
|
export type { ScorecardRecalibrateRequestRequestBody } from './requestBodies/ScorecardRecalibrateRequestRequestBody';
|
|
117
118
|
export type { AllowListResponseResponse } from './responses/AllowListResponseResponse';
|
|
@@ -162,6 +163,7 @@ export type { BackstageEnvVariableResponse } from './schemas/BackstageEnvVariabl
|
|
|
162
163
|
export type { BackstagePermissions } from './schemas/BackstagePermissions';
|
|
163
164
|
export type { BackstagePermissionsRequest } from './schemas/BackstagePermissionsRequest';
|
|
164
165
|
export type { BackstagePermissionsResponse } from './schemas/BackstagePermissionsResponse';
|
|
166
|
+
export type { BaseIntegrationRequest } from './schemas/BaseIntegrationRequest';
|
|
165
167
|
export type { CatalogConnectorInfo } from './schemas/CatalogConnectorInfo';
|
|
166
168
|
export type { Check } from './schemas/Check';
|
|
167
169
|
export type { CheckDetails } from './schemas/CheckDetails';
|
|
@@ -193,6 +195,8 @@ export type { Exports } from './schemas/Exports';
|
|
|
193
195
|
export type { Facets } from './schemas/Facets';
|
|
194
196
|
export type { GenerateYamlRequest } from './schemas/GenerateYamlRequest';
|
|
195
197
|
export type { GenerateYamlResponse } from './schemas/GenerateYamlResponse';
|
|
198
|
+
export type { GitIntegrationRequest } from './schemas/GitIntegrationRequest';
|
|
199
|
+
export type { GitIntegrationResponse } from './schemas/GitIntegrationResponse';
|
|
196
200
|
export type { HarnessBackstageEntities } from './schemas/HarnessBackstageEntities';
|
|
197
201
|
export type { HarnessEntitiesCountResponse } from './schemas/HarnessEntitiesCountResponse';
|
|
198
202
|
export type { HarnessEntitiesResponse } from './schemas/HarnessEntitiesResponse';
|
|
@@ -201,7 +205,6 @@ export type { ImportEntitiesBase } from './schemas/ImportEntitiesBase';
|
|
|
201
205
|
export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
|
|
202
206
|
export type { InputDetails } from './schemas/InputDetails';
|
|
203
207
|
export type { InputValue } from './schemas/InputValue';
|
|
204
|
-
export type { IntegrationRequest } from './schemas/IntegrationRequest';
|
|
205
208
|
export type { IntegrationResponse } from './schemas/IntegrationResponse';
|
|
206
209
|
export type { LayoutIngestRequest } from './schemas/LayoutIngestRequest';
|
|
207
210
|
export type { LayoutRequest } from './schemas/LayoutRequest';
|
|
@@ -236,4 +239,5 @@ export type { StatusInfo } from './schemas/StatusInfo';
|
|
|
236
239
|
export type { StatusInfoResponse } from './schemas/StatusInfoResponse';
|
|
237
240
|
export type { StatusInfoV2 } from './schemas/StatusInfoV2';
|
|
238
241
|
export type { User } from './schemas/User';
|
|
242
|
+
export type { ValidationResponse } from './schemas/ValidationResponse';
|
|
239
243
|
export type { WriteValidationDetails } from './schemas/WriteValidationDetails';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/idp-service/src/services/schemas/{IntegrationRequest.d.ts → GitIntegrationRequest.d.ts}
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReadValidationDetails } from '../schemas/ReadValidationDetails';
|
|
2
2
|
import type { WriteValidationDetails } from '../schemas/WriteValidationDetails';
|
|
3
|
-
|
|
3
|
+
import type { BaseIntegrationRequest } from '../schemas/BaseIntegrationRequest';
|
|
4
|
+
export interface GitIntegrationRequest extends BaseIntegrationRequest {
|
|
4
5
|
connector_identifier: string;
|
|
5
6
|
read_validation_details?: ReadValidationDetails;
|
|
6
7
|
write_validation_details?: WriteValidationDetails;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ValidationResponse } from '../schemas/ValidationResponse';
|
|
2
|
+
import type { IntegrationResponse } from '../schemas/IntegrationResponse';
|
|
3
|
+
export interface GitIntegrationResponse extends IntegrationResponse {
|
|
4
|
+
auth_type?: string;
|
|
5
|
+
connector_identifier?: string;
|
|
6
|
+
connector_type?: string;
|
|
7
|
+
display_type?: string;
|
|
8
|
+
host?: string;
|
|
9
|
+
identifier?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
validation?: ValidationResponse;
|
|
12
|
+
via_delegate?: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
+
import type { GitIntegrationResponse } from '../schemas/GitIntegrationResponse';
|
|
1
2
|
export interface IntegrationResponse {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
host?: string;
|
|
5
|
-
identifier?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
type?: string;
|
|
8
|
-
via_delegate?: boolean;
|
|
3
|
+
integration_type: 'git';
|
|
4
|
+
oneOf?: GitIntegrationResponse;
|
|
9
5
|
}
|
package/package.json
CHANGED