@harnessio/react-idp-service-client 0.48.4 → 0.49.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 (23) hide show
  1. package/dist/idp-service/src/services/hooks/useCreateIntegrationMutation.d.ts +24 -0
  2. package/dist/idp-service/src/services/hooks/useCreateIntegrationMutation.js +14 -0
  3. package/dist/idp-service/src/services/hooks/useGetIntegrationQuery.d.ts +19 -0
  4. package/dist/idp-service/src/services/hooks/useGetIntegrationQuery.js +14 -0
  5. package/dist/idp-service/src/services/hooks/useGetIntegrationsQuery.d.ts +23 -0
  6. package/dist/idp-service/src/services/hooks/useGetIntegrationsQuery.js +14 -0
  7. package/dist/idp-service/src/services/hooks/useUpdateIntegrationMutation.d.ts +27 -0
  8. package/dist/idp-service/src/services/hooks/useUpdateIntegrationMutation.js +14 -0
  9. package/dist/idp-service/src/services/index.d.ts +14 -0
  10. package/dist/idp-service/src/services/index.js +4 -0
  11. package/dist/idp-service/src/services/responses/IntegrationResponseListResponse.d.ts +2 -0
  12. package/dist/idp-service/src/services/responses/IntegrationResponseListResponse.js +1 -0
  13. package/dist/idp-service/src/services/responses/IntegrationResponseResponse.d.ts +2 -0
  14. package/dist/idp-service/src/services/responses/IntegrationResponseResponse.js +1 -0
  15. package/dist/idp-service/src/services/schemas/IntegrationRequest.d.ts +7 -0
  16. package/dist/idp-service/src/services/schemas/IntegrationRequest.js +1 -0
  17. package/dist/idp-service/src/services/schemas/IntegrationResponse.d.ts +9 -0
  18. package/dist/idp-service/src/services/schemas/IntegrationResponse.js +4 -0
  19. package/dist/idp-service/src/services/schemas/ReadValidationDetails.d.ts +3 -0
  20. package/dist/idp-service/src/services/schemas/ReadValidationDetails.js +4 -0
  21. package/dist/idp-service/src/services/schemas/WriteValidationDetails.d.ts +5 -0
  22. package/dist/idp-service/src/services/schemas/WriteValidationDetails.js +4 -0
  23. package/package.json +1 -1
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { IntegrationResponseResponse } from '../responses/IntegrationResponseResponse';
3
+ import type { IntegrationRequest } from '../schemas/IntegrationRequest';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface CreateIntegrationMutationQueryParams {
7
+ dry_run?: boolean;
8
+ write_validation?: boolean;
9
+ }
10
+ export interface CreateIntegrationMutationHeaderParams {
11
+ 'Harness-Account'?: string;
12
+ }
13
+ export type CreateIntegrationRequestBody = IntegrationRequest;
14
+ export type CreateIntegrationOkResponse = ResponseWithPagination<IntegrationResponseResponse>;
15
+ export type CreateIntegrationErrorResponse = unknown;
16
+ export interface CreateIntegrationProps extends Omit<FetcherOptions<CreateIntegrationMutationQueryParams, CreateIntegrationRequestBody, CreateIntegrationMutationHeaderParams>, 'url'> {
17
+ queryParams: CreateIntegrationMutationQueryParams;
18
+ body: CreateIntegrationRequestBody;
19
+ }
20
+ export declare function createIntegration(props: CreateIntegrationProps): Promise<CreateIntegrationOkResponse>;
21
+ /**
22
+ * Create integration
23
+ */
24
+ export declare function useCreateIntegrationMutation(options?: Omit<UseMutationOptions<CreateIntegrationOkResponse, CreateIntegrationErrorResponse, CreateIntegrationProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateIntegrationOkResponse, unknown, CreateIntegrationProps, 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/index.js';
6
+ export function createIntegration(props) {
7
+ return fetcher(Object.assign({ url: `/v1/integrations`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create integration
11
+ */
12
+ export function useCreateIntegrationMutation(options) {
13
+ return useMutation((mutateProps) => createIntegration(mutateProps), options);
14
+ }
@@ -0,0 +1,19 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { IntegrationResponseResponse } from '../responses/IntegrationResponseResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetIntegrationQueryPathParams {
6
+ 'integration-id': string;
7
+ }
8
+ export interface GetIntegrationQueryHeaderParams {
9
+ 'Harness-Account'?: string;
10
+ }
11
+ export type GetIntegrationOkResponse = ResponseWithPagination<IntegrationResponseResponse>;
12
+ export type GetIntegrationErrorResponse = unknown;
13
+ export interface GetIntegrationProps extends GetIntegrationQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetIntegrationQueryHeaderParams>, 'url'> {
14
+ }
15
+ export declare function getIntegration(props: GetIntegrationProps): Promise<GetIntegrationOkResponse>;
16
+ /**
17
+ * Get integration details for given integrationId
18
+ */
19
+ export declare function useGetIntegrationQuery(props: GetIntegrationProps, options?: Omit<UseQueryOptions<GetIntegrationOkResponse, GetIntegrationErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetIntegrationOkResponse, 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/index.js';
6
+ export function getIntegration(props) {
7
+ return fetcher(Object.assign({ url: `/v1/integrations/${props['integration-id']}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get integration details for given integrationId
11
+ */
12
+ export function useGetIntegrationQuery(props, options) {
13
+ return useQuery(['get-integration', props['integration-id']], ({ signal }) => getIntegration(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,23 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { IntegrationResponseListResponse } from '../responses/IntegrationResponseListResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface GetIntegrationsQueryQueryParams {
6
+ page?: number;
7
+ limit?: number;
8
+ sort?: string;
9
+ search_term?: string;
10
+ }
11
+ export interface GetIntegrationsQueryHeaderParams {
12
+ 'Harness-Account'?: string;
13
+ }
14
+ export type GetIntegrationsOkResponse = ResponseWithPagination<IntegrationResponseListResponse>;
15
+ export type GetIntegrationsErrorResponse = unknown;
16
+ export interface GetIntegrationsProps extends Omit<FetcherOptions<GetIntegrationsQueryQueryParams, unknown, GetIntegrationsQueryHeaderParams>, 'url'> {
17
+ queryParams: GetIntegrationsQueryQueryParams;
18
+ }
19
+ export declare function getIntegrations(props: GetIntegrationsProps): Promise<GetIntegrationsOkResponse>;
20
+ /**
21
+ * Get all integrations available
22
+ */
23
+ export declare function useGetIntegrationsQuery(props: GetIntegrationsProps, options?: Omit<UseQueryOptions<GetIntegrationsOkResponse, GetIntegrationsErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetIntegrationsOkResponse, 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/index.js';
6
+ export function getIntegrations(props) {
7
+ return fetcher(Object.assign({ url: `/v1/integrations`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get all integrations available
11
+ */
12
+ export function useGetIntegrationsQuery(props, options) {
13
+ return useQuery(['get-integrations', props.queryParams], ({ signal }) => getIntegrations(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,27 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { IntegrationResponseResponse } from '../responses/IntegrationResponseResponse';
3
+ import type { IntegrationRequest } from '../schemas/IntegrationRequest';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface UpdateIntegrationMutationPathParams {
7
+ 'integration-id': string;
8
+ }
9
+ export interface UpdateIntegrationMutationQueryParams {
10
+ dry_run?: boolean;
11
+ write_validation?: boolean;
12
+ }
13
+ export interface UpdateIntegrationMutationHeaderParams {
14
+ 'Harness-Account'?: string;
15
+ }
16
+ export type UpdateIntegrationRequestBody = IntegrationRequest;
17
+ export type UpdateIntegrationOkResponse = ResponseWithPagination<IntegrationResponseResponse>;
18
+ export type UpdateIntegrationErrorResponse = unknown;
19
+ export interface UpdateIntegrationProps extends UpdateIntegrationMutationPathParams, Omit<FetcherOptions<UpdateIntegrationMutationQueryParams, UpdateIntegrationRequestBody, UpdateIntegrationMutationHeaderParams>, 'url'> {
20
+ queryParams: UpdateIntegrationMutationQueryParams;
21
+ body: UpdateIntegrationRequestBody;
22
+ }
23
+ export declare function updateIntegration(props: UpdateIntegrationProps): Promise<UpdateIntegrationOkResponse>;
24
+ /**
25
+ * Update integration details for given integrationId
26
+ */
27
+ export declare function useUpdateIntegrationMutation(options?: Omit<UseMutationOptions<UpdateIntegrationOkResponse, UpdateIntegrationErrorResponse, UpdateIntegrationProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateIntegrationOkResponse, unknown, UpdateIntegrationProps, 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/index.js';
6
+ export function updateIntegration(props) {
7
+ return fetcher(Object.assign({ url: `/v1/integrations/${props['integration-id']}`, method: 'PUT' }, props));
8
+ }
9
+ /**
10
+ * Update integration details for given integrationId
11
+ */
12
+ export function useUpdateIntegrationMutation(options) {
13
+ return useMutation((mutateProps) => updateIntegration(mutateProps), options);
14
+ }
@@ -5,6 +5,8 @@ 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';
9
+ export { createIntegration, useCreateIntegrationMutation, } from './hooks/useCreateIntegrationMutation';
8
10
  export type { CreateLayoutErrorResponse, CreateLayoutOkResponse, CreateLayoutProps, CreateLayoutRequestBody, } from './hooks/useCreateLayoutMutation';
9
11
  export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
10
12
  export type { CreateScorecardErrorResponse, CreateScorecardOkResponse, CreateScorecardProps, CreateScorecardRequestBody, } from './hooks/useCreateScorecardMutation';
@@ -45,6 +47,10 @@ export type { GetHarnessEntitiesCountErrorResponse, GetHarnessEntitiesCountOkRes
45
47
  export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
46
48
  export type { GetHarnessEntitiesErrorResponse, GetHarnessEntitiesOkResponse, GetHarnessEntitiesProps, GetHarnessEntitiesQueryQueryParams, } from './hooks/useGetHarnessEntitiesQuery';
47
49
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
50
+ export type { GetIntegrationErrorResponse, GetIntegrationOkResponse, GetIntegrationProps, GetIntegrationQueryPathParams, } from './hooks/useGetIntegrationQuery';
51
+ export { getIntegration, useGetIntegrationQuery } from './hooks/useGetIntegrationQuery';
52
+ export type { GetIntegrationsErrorResponse, GetIntegrationsOkResponse, GetIntegrationsProps, GetIntegrationsQueryQueryParams, } from './hooks/useGetIntegrationsQuery';
53
+ export { getIntegrations, useGetIntegrationsQuery } from './hooks/useGetIntegrationsQuery';
48
54
  export type { GetLayoutErrorResponse, GetLayoutOkResponse, GetLayoutProps, GetLayoutQueryPathParams, } from './hooks/useGetLayoutQuery';
49
55
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
50
56
  export type { GetMergedPluginsConfigErrorResponse, GetMergedPluginsConfigOkResponse, GetMergedPluginsConfigProps, } from './hooks/useGetMergedPluginsConfigQuery';
@@ -93,6 +99,8 @@ export type { UpdateConfigurationEntitiesErrorResponse, UpdateConfigurationEntit
93
99
  export { updateConfigurationEntities, useUpdateConfigurationEntitiesMutation, } from './hooks/useUpdateConfigurationEntitiesMutation';
94
100
  export type { UpdateCustomPluginsInfoErrorResponse, UpdateCustomPluginsInfoMutationPathParams, UpdateCustomPluginsInfoOkResponse, UpdateCustomPluginsInfoProps, UpdateCustomPluginsInfoRequestBody, } from './hooks/useUpdateCustomPluginsInfoMutation';
95
101
  export { updateCustomPluginsInfo, useUpdateCustomPluginsInfoMutation, } from './hooks/useUpdateCustomPluginsInfoMutation';
102
+ export type { UpdateIntegrationErrorResponse, UpdateIntegrationMutationPathParams, UpdateIntegrationMutationQueryParams, UpdateIntegrationOkResponse, UpdateIntegrationProps, UpdateIntegrationRequestBody, } from './hooks/useUpdateIntegrationMutation';
103
+ export { updateIntegration, useUpdateIntegrationMutation, } from './hooks/useUpdateIntegrationMutation';
96
104
  export type { UpdateScorecardErrorResponse, UpdateScorecardMutationPathParams, UpdateScorecardOkResponse, UpdateScorecardProps, UpdateScorecardRequestBody, } from './hooks/useUpdateScorecardMutation';
97
105
  export { updateScorecard, useUpdateScorecardMutation } from './hooks/useUpdateScorecardMutation';
98
106
  export type { AppConfigRequestRequestBody } from './requestBodies/AppConfigRequestRequestBody';
@@ -127,6 +135,8 @@ export type { GenerateYamlResponseResponse } from './responses/GenerateYamlRespo
127
135
  export type { HarnessEntitiesCountResponseResponse } from './responses/HarnessEntitiesCountResponseResponse';
128
136
  export type { HarnessEntitiesResponseResponse } from './responses/HarnessEntitiesResponseResponse';
129
137
  export type { ImportEntitiesResponseResponse } from './responses/ImportEntitiesResponseResponse';
138
+ export type { IntegrationResponseListResponse } from './responses/IntegrationResponseListResponse';
139
+ export type { IntegrationResponseResponse } from './responses/IntegrationResponseResponse';
130
140
  export type { LayoutResponseResponse } from './responses/LayoutResponseResponse';
131
141
  export type { MergedPluginConfigResponseResponse } from './responses/MergedPluginConfigResponseResponse';
132
142
  export type { PluginDetailedInfoResponseResponse } from './responses/PluginDetailedInfoResponseResponse';
@@ -191,6 +201,8 @@ export type { ImportEntitiesBase } from './schemas/ImportEntitiesBase';
191
201
  export type { ImportEntitiesResponse } from './schemas/ImportEntitiesResponse';
192
202
  export type { InputDetails } from './schemas/InputDetails';
193
203
  export type { InputValue } from './schemas/InputValue';
204
+ export type { IntegrationRequest } from './schemas/IntegrationRequest';
205
+ export type { IntegrationResponse } from './schemas/IntegrationResponse';
194
206
  export type { LayoutIngestRequest } from './schemas/LayoutIngestRequest';
195
207
  export type { LayoutRequest } from './schemas/LayoutRequest';
196
208
  export type { LayoutResponse } from './schemas/LayoutResponse';
@@ -202,6 +214,7 @@ export type { PluginDetails } from './schemas/PluginDetails';
202
214
  export type { PluginInfo } from './schemas/PluginInfo';
203
215
  export type { PluginInfoResponse } from './schemas/PluginInfoResponse';
204
216
  export type { ProxyHostDetail } from './schemas/ProxyHostDetail';
217
+ export type { ReadValidationDetails } from './schemas/ReadValidationDetails';
205
218
  export type { RequestPlugin } from './schemas/RequestPlugin';
206
219
  export type { Rule } from './schemas/Rule';
207
220
  export type { Scorecard } from './schemas/Scorecard';
@@ -223,3 +236,4 @@ export type { StatusInfo } from './schemas/StatusInfo';
223
236
  export type { StatusInfoResponse } from './schemas/StatusInfoResponse';
224
237
  export type { StatusInfoV2 } from './schemas/StatusInfoV2';
225
238
  export type { User } from './schemas/User';
239
+ export type { WriteValidationDetails } from './schemas/WriteValidationDetails';
@@ -1,6 +1,7 @@
1
1
  export { createBackstageEnvVariables, useCreateBackstageEnvVariablesMutation, } from './hooks/useCreateBackstageEnvVariablesMutation';
2
2
  export { createBackstagePermissions, useCreateBackstagePermissionsMutation, } from './hooks/useCreateBackstagePermissionsMutation';
3
3
  export { createCheck, useCreateCheckMutation } from './hooks/useCreateCheckMutation';
4
+ export { createIntegration, useCreateIntegrationMutation, } from './hooks/useCreateIntegrationMutation';
4
5
  export { createLayout, useCreateLayoutMutation } from './hooks/useCreateLayoutMutation';
5
6
  export { createScorecard, useCreateScorecardMutation } from './hooks/useCreateScorecardMutation';
6
7
  export { deleteCheck, useDeleteCheckMutation } from './hooks/useDeleteCheckMutation';
@@ -21,6 +22,8 @@ export { getDataSourcesDataPointsMap, useGetDataSourcesDataPointsMapQuery, } fro
21
22
  export { getEntityFacets, useGetEntityFacetsQuery } from './hooks/useGetEntityFacetsQuery';
22
23
  export { getHarnessEntitiesCount, useGetHarnessEntitiesCountQuery, } from './hooks/useGetHarnessEntitiesCountQuery';
23
24
  export { getHarnessEntities, useGetHarnessEntitiesQuery } from './hooks/useGetHarnessEntitiesQuery';
25
+ export { getIntegration, useGetIntegrationQuery } from './hooks/useGetIntegrationQuery';
26
+ export { getIntegrations, useGetIntegrationsQuery } from './hooks/useGetIntegrationsQuery';
24
27
  export { getLayout, useGetLayoutQuery } from './hooks/useGetLayoutQuery';
25
28
  export { getMergedPluginsConfig, useGetMergedPluginsConfigQuery, } from './hooks/useGetMergedPluginsConfigQuery';
26
29
  export { getPluginsInfoPluginId, useGetPluginsInfoPluginIdQuery, } from './hooks/useGetPluginsInfoPluginIdQuery';
@@ -45,4 +48,5 @@ export { updateBackstagePermissions, useUpdateBackstagePermissionsMutation, } fr
45
48
  export { updateCheck, useUpdateCheckMutation } from './hooks/useUpdateCheckMutation';
46
49
  export { updateConfigurationEntities, useUpdateConfigurationEntitiesMutation, } from './hooks/useUpdateConfigurationEntitiesMutation';
47
50
  export { updateCustomPluginsInfo, useUpdateCustomPluginsInfoMutation, } from './hooks/useUpdateCustomPluginsInfoMutation';
51
+ export { updateIntegration, useUpdateIntegrationMutation, } from './hooks/useUpdateIntegrationMutation';
48
52
  export { updateScorecard, useUpdateScorecardMutation } from './hooks/useUpdateScorecardMutation';
@@ -0,0 +1,2 @@
1
+ import type { IntegrationResponse } from '../schemas/IntegrationResponse';
2
+ export type IntegrationResponseListResponse = IntegrationResponse[];
@@ -0,0 +1,2 @@
1
+ import type { IntegrationResponse } from '../schemas/IntegrationResponse';
2
+ export type IntegrationResponseResponse = IntegrationResponse;
@@ -0,0 +1,7 @@
1
+ import type { ReadValidationDetails } from '../schemas/ReadValidationDetails';
2
+ import type { WriteValidationDetails } from '../schemas/WriteValidationDetails';
3
+ export interface IntegrationRequest {
4
+ connector_identifier: string;
5
+ read_validation_details?: ReadValidationDetails;
6
+ write_validation_details?: WriteValidationDetails;
7
+ }
@@ -0,0 +1,9 @@
1
+ export interface IntegrationResponse {
2
+ auth_type?: string;
3
+ connector_identifier?: string;
4
+ host?: string;
5
+ identifier?: string;
6
+ name?: string;
7
+ type?: string;
8
+ via_delegate?: boolean;
9
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,3 @@
1
+ export interface ReadValidationDetails {
2
+ file_url?: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface WriteValidationDetails {
2
+ branch?: string;
3
+ path?: string;
4
+ repository?: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-idp-service-client",
3
- "version": "0.48.4",
3
+ "version": "0.49.0",
4
4
  "description": "Harness React idp service client - IDP APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",