@harnessio/react-ssca-manager-client 0.86.9 → 0.86.10
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,40 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { FetchIntegrationReposResponseBodyResponse } from '../responses/FetchIntegrationReposResponseBodyResponse';
|
|
3
|
+
import type { FetchReposType } from '../schemas/FetchReposType';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface FetchReposQueryPathParams {
|
|
7
|
+
org: string;
|
|
8
|
+
project: string;
|
|
9
|
+
}
|
|
10
|
+
export interface FetchReposQueryQueryParams {
|
|
11
|
+
type: FetchReposType;
|
|
12
|
+
connector_id?: string;
|
|
13
|
+
installation_id?: string;
|
|
14
|
+
installation_org?: string;
|
|
15
|
+
/**
|
|
16
|
+
* @default 30
|
|
17
|
+
*/
|
|
18
|
+
limit?: number;
|
|
19
|
+
/**
|
|
20
|
+
* @default 0
|
|
21
|
+
*/
|
|
22
|
+
page?: number;
|
|
23
|
+
search_term?: string;
|
|
24
|
+
scope?: 'ACCOUNT' | 'ORGANIZATION' | 'PROJECT';
|
|
25
|
+
}
|
|
26
|
+
export interface FetchReposQueryHeaderParams {
|
|
27
|
+
'Harness-Account': string;
|
|
28
|
+
}
|
|
29
|
+
export type FetchReposOkResponse = ResponseWithPagination<FetchIntegrationReposResponseBodyResponse>;
|
|
30
|
+
export type FetchReposErrorResponse = unknown;
|
|
31
|
+
export interface FetchReposProps extends FetchReposQueryPathParams, Omit<FetcherOptions<FetchReposQueryQueryParams, unknown, FetchReposQueryHeaderParams>, 'url'> {
|
|
32
|
+
queryParams: FetchReposQueryQueryParams;
|
|
33
|
+
}
|
|
34
|
+
export declare function fetchRepos(props: FetchReposProps): Promise<FetchReposOkResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Lists repositories for an SCM connector or GitHub App installation without requiring an
|
|
37
|
+
* integration entity. Response shape matches integration fetch-repos.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare function useFetchReposQuery(props: FetchReposProps, options?: Omit<UseQueryOptions<FetchReposOkResponse, FetchReposErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<FetchReposOkResponse, unknown>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 fetchRepos(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/fetch-repos`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Lists repositories for an SCM connector or GitHub App installation without requiring an
|
|
11
|
+
* integration entity. Response shape matches integration fetch-repos.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export function useFetchReposQuery(props, options) {
|
|
15
|
+
return useQuery(['fetchRepos', props.org, props.project, props.queryParams], ({ signal }) => fetchRepos(Object.assign(Object.assign({}, props), { signal })), options);
|
|
16
|
+
}
|
|
@@ -51,6 +51,8 @@ export type { FetchPluginsForWorkflowErrorResponse, FetchPluginsForWorkflowOkRes
|
|
|
51
51
|
export { fetchPluginsForWorkflow, useFetchPluginsForWorkflowQuery, } from './hooks/useFetchPluginsForWorkflowQuery';
|
|
52
52
|
export type { FetchReposInIntegrationErrorResponse, FetchReposInIntegrationOkResponse, FetchReposInIntegrationProps, FetchReposInIntegrationQueryPathParams, FetchReposInIntegrationQueryQueryParams, } from './hooks/useFetchReposInIntegrationQuery';
|
|
53
53
|
export { fetchReposInIntegration, useFetchReposInIntegrationQuery, } from './hooks/useFetchReposInIntegrationQuery';
|
|
54
|
+
export type { FetchReposErrorResponse, FetchReposOkResponse, FetchReposProps, FetchReposQueryPathParams, FetchReposQueryQueryParams, } from './hooks/useFetchReposQuery';
|
|
55
|
+
export { fetchRepos, useFetchReposQuery } from './hooks/useFetchReposQuery';
|
|
54
56
|
export type { GetAccountAiWorkflowConfigErrorResponse, GetAccountAiWorkflowConfigOkResponse, GetAccountAiWorkflowConfigProps, GetAccountAiWorkflowConfigQueryQueryParams, } from './hooks/useGetAccountAiWorkflowConfigQuery';
|
|
55
57
|
export { getAccountAiWorkflowConfig, useGetAccountAiWorkflowConfigQuery, } from './hooks/useGetAccountAiWorkflowConfigQuery';
|
|
56
58
|
export type { GetAiBomComponentsErrorResponse, GetAiBomComponentsOkResponse, GetAiBomComponentsProps, GetAiBomComponentsQueryPathParams, GetAiBomComponentsQueryQueryParams, GetAiBomComponentsRequestBody, } from './hooks/useGetAiBomComponentsQuery';
|
|
@@ -24,6 +24,7 @@ export { fetchComplianceResultsByComplianceId, useFetchComplianceResultsByCompli
|
|
|
24
24
|
export { fetchComplianceResultsGroupById, useFetchComplianceResultsGroupByIdMutation, } from './hooks/useFetchComplianceResultsGroupByIdMutation';
|
|
25
25
|
export { fetchPluginsForWorkflow, useFetchPluginsForWorkflowQuery, } from './hooks/useFetchPluginsForWorkflowQuery';
|
|
26
26
|
export { fetchReposInIntegration, useFetchReposInIntegrationQuery, } from './hooks/useFetchReposInIntegrationQuery';
|
|
27
|
+
export { fetchRepos, useFetchReposQuery } from './hooks/useFetchReposQuery';
|
|
27
28
|
export { getAccountAiWorkflowConfig, useGetAccountAiWorkflowConfigQuery, } from './hooks/useGetAccountAiWorkflowConfigQuery';
|
|
28
29
|
export { getAiBomComponents, useGetAiBomComponentsQuery } from './hooks/useGetAiBomComponentsQuery';
|
|
29
30
|
export { getAiBomSummary, useGetAiBomSummaryQuery } from './hooks/useGetAiBomSummaryQuery';
|