@harnessio/react-template-service-client 1.0.0 → 1.2.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/template-service/src/services/hooks/useGetGlobalTemplateCatalogSummaryQuery.d.ts +31 -0
- package/dist/template-service/src/services/hooks/useGetGlobalTemplateCatalogSummaryQuery.js +14 -0
- package/dist/template-service/src/services/hooks/useGetTemplateInputsMutation.d.ts +53 -0
- package/dist/template-service/src/services/hooks/useGetTemplateInputsMutation.js +30 -0
- package/dist/template-service/src/services/hooks/useRefreshTemplateInputsAccMutation.d.ts +19 -0
- package/dist/template-service/src/services/hooks/useRefreshTemplateInputsAccMutation.js +14 -0
- package/dist/template-service/src/services/hooks/useRefreshedYamlMutation.d.ts +63 -0
- package/dist/template-service/src/services/hooks/useRefreshedYamlMutation.js +30 -0
- package/dist/template-service/src/services/hooks/useValidateTemplateInputsQuery.d.ts +53 -0
- package/dist/template-service/src/services/hooks/useValidateTemplateInputsQuery.js +30 -0
- package/dist/template-service/src/services/index.d.ts +25 -0
- package/dist/template-service/src/services/index.js +5 -0
- package/dist/template-service/src/services/requestBodies/RefreshTemplateInputsRequestBodyRequestBody.d.ts +2 -0
- package/dist/template-service/src/services/requestBodies/RefreshTemplateInputsRequestBodyRequestBody.js +1 -0
- package/dist/template-service/src/services/requestBodies/YamlRefreshRequestBodyRequestBody.d.ts +2 -0
- package/dist/template-service/src/services/requestBodies/YamlRefreshRequestBodyRequestBody.js +1 -0
- package/dist/template-service/src/services/responses/GlobalTemplateCatalogResponseResponse.d.ts +2 -0
- package/dist/template-service/src/services/responses/GlobalTemplateCatalogResponseResponse.js +1 -0
- package/dist/template-service/src/services/responses/RefreshTemplateInputsResponseBodyResponse.d.ts +2 -0
- package/dist/template-service/src/services/responses/RefreshTemplateInputsResponseBodyResponse.js +1 -0
- package/dist/template-service/src/services/responses/RefreshedYamlResponseBodyResponse.d.ts +2 -0
- package/dist/template-service/src/services/responses/RefreshedYamlResponseBodyResponse.js +1 -0
- package/dist/template-service/src/services/responses/TemplateInputsResponseBodyResponse.d.ts +2 -0
- package/dist/template-service/src/services/responses/TemplateInputsResponseBodyResponse.js +1 -0
- package/dist/template-service/src/services/responses/ValidateTemplateInputsResponseBodyResponse.d.ts +2 -0
- package/dist/template-service/src/services/responses/ValidateTemplateInputsResponseBodyResponse.js +1 -0
- package/dist/template-service/src/services/schemas/GitCreateDetails.d.ts +4 -0
- package/dist/template-service/src/services/schemas/GitUpdateDetails.d.ts +4 -0
- package/dist/template-service/src/services/schemas/GlobalTemplateCatalogResponseBody.d.ts +12 -0
- package/dist/template-service/src/services/schemas/GlobalTemplateCatalogResponseBody.js +1 -0
- package/dist/template-service/src/services/schemas/GlobalTemplateCategorySummary.d.ts +22 -0
- package/dist/template-service/src/services/schemas/GlobalTemplateCategorySummary.js +4 -0
- package/dist/template-service/src/services/schemas/RefreshTemplateInputsRequestBody.d.ts +13 -0
- package/dist/template-service/src/services/schemas/RefreshTemplateInputsRequestBody.js +4 -0
- package/dist/template-service/src/services/schemas/RefreshTemplateInputsResponseBody.d.ts +9 -0
- package/dist/template-service/src/services/schemas/RefreshTemplateInputsResponseBody.js +4 -0
- package/dist/template-service/src/services/schemas/RefreshedYamlResponseBody.d.ts +9 -0
- package/dist/template-service/src/services/schemas/RefreshedYamlResponseBody.js +4 -0
- package/dist/template-service/src/services/schemas/TemplateCreateRequestBody.d.ts +4 -0
- package/dist/template-service/src/services/schemas/TemplateInputsResponseBody.d.ts +16 -0
- package/dist/template-service/src/services/schemas/TemplateInputsResponseBody.js +4 -0
- package/dist/template-service/src/services/schemas/TemplateMetadataSummaryResponse.d.ts +4 -0
- package/dist/template-service/src/services/schemas/TemplateResponse.d.ts +4 -0
- package/dist/template-service/src/services/schemas/ValidateTemplateInputsResponseBody.d.ts +15 -0
- package/dist/template-service/src/services/schemas/ValidateTemplateInputsResponseBody.js +4 -0
- package/dist/template-service/src/services/schemas/YamlRefreshRequestBody.d.ts +9 -0
- package/dist/template-service/src/services/schemas/YamlRefreshRequestBody.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { GlobalTemplateCatalogResponseResponse } from '../responses/GlobalTemplateCatalogResponseResponse';
|
|
3
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetGlobalTemplateCatalogSummaryQueryQueryParams {
|
|
6
|
+
category_ids: string[];
|
|
7
|
+
/**
|
|
8
|
+
* JSON-encoded TemplateMetadataFilterExpression object for filtering templates by metadata.
|
|
9
|
+
* Supports nested AND/OR operations on filterMetadata properties.
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
metadata_filter?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface GetGlobalTemplateCatalogSummaryQueryHeaderParams {
|
|
15
|
+
'Harness-Account'?: string;
|
|
16
|
+
}
|
|
17
|
+
export type GetGlobalTemplateCatalogSummaryOkResponse = ResponseWithPagination<GlobalTemplateCatalogResponseResponse>;
|
|
18
|
+
export type GetGlobalTemplateCatalogSummaryErrorResponse = {
|
|
19
|
+
/**
|
|
20
|
+
* Error message describing the validation failure
|
|
21
|
+
*/
|
|
22
|
+
message?: string;
|
|
23
|
+
};
|
|
24
|
+
export interface GetGlobalTemplateCatalogSummaryProps extends Omit<FetcherOptions<GetGlobalTemplateCatalogSummaryQueryQueryParams, unknown, GetGlobalTemplateCatalogSummaryQueryHeaderParams>, 'url'> {
|
|
25
|
+
queryParams: GetGlobalTemplateCatalogSummaryQueryQueryParams;
|
|
26
|
+
}
|
|
27
|
+
export declare function getGlobalTemplateCatalogSummary(props: GetGlobalTemplateCatalogSummaryProps): Promise<GetGlobalTemplateCatalogSummaryOkResponse>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns aggregated global template counts for the requested category identifiers. An optional metadata filter can be applied to narrow the template set before counting.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useGetGlobalTemplateCatalogSummaryQuery(props: GetGlobalTemplateCatalogSummaryProps, options?: Omit<UseQueryOptions<GetGlobalTemplateCatalogSummaryOkResponse, GetGlobalTemplateCatalogSummaryErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetGlobalTemplateCatalogSummaryOkResponse, GetGlobalTemplateCatalogSummaryErrorResponse>;
|
|
@@ -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 getGlobalTemplateCatalogSummary(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/templates/global/catalog-summary`, method: 'GET' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Returns aggregated global template counts for the requested category identifiers. An optional metadata filter can be applied to narrow the template set before counting.
|
|
11
|
+
*/
|
|
12
|
+
export function useGetGlobalTemplateCatalogSummaryQuery(props, options) {
|
|
13
|
+
return useQuery(['get-global-template-catalog-summary', props.queryParams], ({ signal }) => getGlobalTemplateCatalogSummary(Object.assign(Object.assign({}, props), { signal })), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { TemplateInputsResponseBodyResponse } from '../responses/TemplateInputsResponseBodyResponse';
|
|
3
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface GetTemplateInputsAccountPathParams {
|
|
6
|
+
template: string;
|
|
7
|
+
}
|
|
8
|
+
export interface GetTemplateInputsAccountQueryParams {
|
|
9
|
+
version?: string;
|
|
10
|
+
branch_name?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface GetTemplateInputsAccountHeaderParams {
|
|
13
|
+
'Load-From-Cache'?: string;
|
|
14
|
+
'Harness-Account'?: string;
|
|
15
|
+
}
|
|
16
|
+
export type GetTemplateInputsAccountOKResponse = TemplateInputsResponseBodyResponse;
|
|
17
|
+
export type GetTemplateInputsAccountErrorResponse = unknown;
|
|
18
|
+
export interface GetTemplateInputsOrgPathParams {
|
|
19
|
+
org: string;
|
|
20
|
+
template: string;
|
|
21
|
+
}
|
|
22
|
+
export interface GetTemplateInputsOrgQueryParams {
|
|
23
|
+
version?: string;
|
|
24
|
+
branch_name?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface GetTemplateInputsOrgHeaderParams {
|
|
27
|
+
'Load-From-Cache'?: string;
|
|
28
|
+
'Harness-Account'?: string;
|
|
29
|
+
}
|
|
30
|
+
export type GetTemplateInputsOrgOKResponse = TemplateInputsResponseBodyResponse;
|
|
31
|
+
export type GetTemplateInputsOrgErrorResponse = unknown;
|
|
32
|
+
export interface GetTemplateInputsProjectPathParams {
|
|
33
|
+
org: string;
|
|
34
|
+
project: string;
|
|
35
|
+
template: string;
|
|
36
|
+
}
|
|
37
|
+
export interface GetTemplateInputsProjectQueryParams {
|
|
38
|
+
version?: string;
|
|
39
|
+
branch_name?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface GetTemplateInputsProjectHeaderParams {
|
|
42
|
+
'Load-From-Cache'?: string;
|
|
43
|
+
'Harness-Account'?: string;
|
|
44
|
+
}
|
|
45
|
+
export type GetTemplateInputsProjectOKResponse = TemplateInputsResponseBodyResponse;
|
|
46
|
+
export type GetTemplateInputsProjectErrorResponse = unknown;
|
|
47
|
+
export type GetTemplateInputsOKResponse<T> = T extends GetTemplateInputsProjectPathParams ? ResponseWithPagination<GetTemplateInputsProjectOKResponse> : T extends GetTemplateInputsOrgPathParams ? ResponseWithPagination<GetTemplateInputsOrgOKResponse> : ResponseWithPagination<GetTemplateInputsAccountOKResponse>;
|
|
48
|
+
export type GetTemplateInputsErrorResponse<T> = T extends GetTemplateInputsProjectPathParams ? GetTemplateInputsProjectErrorResponse : T extends GetTemplateInputsOrgPathParams ? GetTemplateInputsOrgErrorResponse : GetTemplateInputsAccountErrorResponse;
|
|
49
|
+
export interface GetTemplateInputsProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
50
|
+
pathParams: GetTemplateInputsAccountPathParams | GetTemplateInputsOrgPathParams | GetTemplateInputsProjectPathParams;
|
|
51
|
+
}
|
|
52
|
+
export declare function getTemplateInputs<T extends GetTemplateInputsProps = GetTemplateInputsProps>(props: T): Promise<GetTemplateInputsOKResponse<GetPathParamsType<T>>>;
|
|
53
|
+
export declare function useGetTemplateInputsMutation(options?: Omit<UseMutationOptions<GetTemplateInputsOKResponse<unknown>, GetTemplateInputsErrorResponse<unknown>, GetTemplateInputsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<import("..").TemplateInputsResponseBody>, unknown, GetTemplateInputsProps, unknown>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function getTemplateInputs(props) {
|
|
15
|
+
let url = `/v1/templates/${props.pathParams.template}/inputs`;
|
|
16
|
+
let method = 'POST';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/templates/${props.pathParams.template}/inputs`;
|
|
19
|
+
method = 'POST';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/templates/${props.pathParams.template}/inputs`;
|
|
23
|
+
method = 'POST';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useGetTemplateInputsMutation(options) {
|
|
29
|
+
return useMutation((mutateProps) => getTemplateInputs(mutateProps), options);
|
|
30
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { RefreshTemplateInputsResponseBodyResponse } from '../responses/RefreshTemplateInputsResponseBodyResponse';
|
|
3
|
+
import type { RefreshTemplateInputsRequestBodyRequestBody } from '../requestBodies/RefreshTemplateInputsRequestBodyRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface RefreshTemplateInputsAccMutationHeaderParams {
|
|
7
|
+
'Harness-Account'?: string;
|
|
8
|
+
}
|
|
9
|
+
export type RefreshTemplateInputsAccRequestBody = RefreshTemplateInputsRequestBodyRequestBody;
|
|
10
|
+
export type RefreshTemplateInputsAccOkResponse = ResponseWithPagination<RefreshTemplateInputsResponseBodyResponse>;
|
|
11
|
+
export type RefreshTemplateInputsAccErrorResponse = unknown;
|
|
12
|
+
export interface RefreshTemplateInputsAccProps extends Omit<FetcherOptions<unknown, RefreshTemplateInputsAccRequestBody, RefreshTemplateInputsAccMutationHeaderParams>, 'url'> {
|
|
13
|
+
body: RefreshTemplateInputsAccRequestBody;
|
|
14
|
+
}
|
|
15
|
+
export declare function refreshTemplateInputsAcc(props: RefreshTemplateInputsAccProps): Promise<RefreshTemplateInputsAccOkResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Retains the configured inputs of a v1 template reference while refreshing it against the new template body. First-class declarative inputs and the `uses` reference are preserved from the old inputs; only the `overlay` runtime-input section is recomputed from the new template definition.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useRefreshTemplateInputsAccMutation(options?: Omit<UseMutationOptions<RefreshTemplateInputsAccOkResponse, RefreshTemplateInputsAccErrorResponse, RefreshTemplateInputsAccProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<RefreshTemplateInputsAccOkResponse, unknown, RefreshTemplateInputsAccProps, 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 refreshTemplateInputsAcc(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/templates/refresh-inputs`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Retains the configured inputs of a v1 template reference while refreshing it against the new template body. First-class declarative inputs and the `uses` reference are preserved from the old inputs; only the `overlay` runtime-input section is recomputed from the new template definition.
|
|
11
|
+
*/
|
|
12
|
+
export function useRefreshTemplateInputsAccMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => refreshTemplateInputsAcc(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { RefreshedYamlResponseBodyResponse } from '../responses/RefreshedYamlResponseBodyResponse';
|
|
3
|
+
import type { YamlRefreshRequestBodyRequestBody } from '../requestBodies/YamlRefreshRequestBodyRequestBody';
|
|
4
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface RefreshedYamlAccountPathParams {
|
|
7
|
+
}
|
|
8
|
+
export interface RefreshedYamlAccountQueryParams {
|
|
9
|
+
/**
|
|
10
|
+
* @default "0"
|
|
11
|
+
*/
|
|
12
|
+
harness_yaml_version?: string;
|
|
13
|
+
branch_name?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface RefreshedYamlAccountHeaderParams {
|
|
16
|
+
'Harness-Account'?: string;
|
|
17
|
+
'Load-From-Cache'?: string;
|
|
18
|
+
}
|
|
19
|
+
export type RefreshedYamlAccountRequestBody = YamlRefreshRequestBodyRequestBody;
|
|
20
|
+
export type RefreshedYamlAccountOKResponse = RefreshedYamlResponseBodyResponse;
|
|
21
|
+
export type RefreshedYamlAccountErrorResponse = unknown;
|
|
22
|
+
export interface RefreshedYamlOrgPathParams {
|
|
23
|
+
org: string;
|
|
24
|
+
}
|
|
25
|
+
export interface RefreshedYamlOrgQueryParams {
|
|
26
|
+
/**
|
|
27
|
+
* @default "0"
|
|
28
|
+
*/
|
|
29
|
+
harness_yaml_version?: string;
|
|
30
|
+
branch_name?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface RefreshedYamlOrgHeaderParams {
|
|
33
|
+
'Harness-Account'?: string;
|
|
34
|
+
'Load-From-Cache'?: string;
|
|
35
|
+
}
|
|
36
|
+
export type RefreshedYamlOrgRequestBody = YamlRefreshRequestBodyRequestBody;
|
|
37
|
+
export type RefreshedYamlOrgOKResponse = RefreshedYamlResponseBodyResponse;
|
|
38
|
+
export type RefreshedYamlOrgErrorResponse = unknown;
|
|
39
|
+
export interface RefreshedYamlProjectPathParams {
|
|
40
|
+
org: string;
|
|
41
|
+
project: string;
|
|
42
|
+
}
|
|
43
|
+
export interface RefreshedYamlProjectQueryParams {
|
|
44
|
+
/**
|
|
45
|
+
* @default "0"
|
|
46
|
+
*/
|
|
47
|
+
harness_yaml_version?: string;
|
|
48
|
+
branch_name?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface RefreshedYamlProjectHeaderParams {
|
|
51
|
+
'Harness-Account'?: string;
|
|
52
|
+
'Load-From-Cache'?: string;
|
|
53
|
+
}
|
|
54
|
+
export type RefreshedYamlProjectRequestBody = YamlRefreshRequestBodyRequestBody;
|
|
55
|
+
export type RefreshedYamlProjectOKResponse = RefreshedYamlResponseBodyResponse;
|
|
56
|
+
export type RefreshedYamlProjectErrorResponse = unknown;
|
|
57
|
+
export type RefreshedYamlOKResponse<T> = T extends RefreshedYamlProjectPathParams ? ResponseWithPagination<RefreshedYamlProjectOKResponse> : T extends RefreshedYamlOrgPathParams ? ResponseWithPagination<RefreshedYamlOrgOKResponse> : ResponseWithPagination<RefreshedYamlAccountOKResponse>;
|
|
58
|
+
export type RefreshedYamlErrorResponse<T> = T extends RefreshedYamlProjectPathParams ? RefreshedYamlProjectErrorResponse : T extends RefreshedYamlOrgPathParams ? RefreshedYamlOrgErrorResponse : RefreshedYamlAccountErrorResponse;
|
|
59
|
+
export interface RefreshedYamlProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
60
|
+
pathParams: RefreshedYamlAccountPathParams | RefreshedYamlOrgPathParams | RefreshedYamlProjectPathParams;
|
|
61
|
+
}
|
|
62
|
+
export declare function refreshedYaml<T extends RefreshedYamlProps = RefreshedYamlProps>(props: T): Promise<RefreshedYamlOKResponse<GetPathParamsType<T>>>;
|
|
63
|
+
export declare function useRefreshedYamlMutation(options?: Omit<UseMutationOptions<RefreshedYamlOKResponse<unknown>, RefreshedYamlErrorResponse<unknown>, RefreshedYamlProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<import("..").RefreshedYamlResponseBody>, unknown, RefreshedYamlProps, unknown>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function refreshedYaml(props) {
|
|
15
|
+
let url = `/v1/templates/refreshed-yaml`;
|
|
16
|
+
let method = 'POST';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/templates/refreshed-yaml`;
|
|
19
|
+
method = 'POST';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/templates/refreshed-yaml`;
|
|
23
|
+
method = 'POST';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useRefreshedYamlMutation(options) {
|
|
29
|
+
return useMutation((mutateProps) => refreshedYaml(mutateProps), options);
|
|
30
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ValidateTemplateInputsResponseBodyResponse } from '../responses/ValidateTemplateInputsResponseBodyResponse';
|
|
3
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface ValidateTemplateInputsAccountPathParams {
|
|
6
|
+
template: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ValidateTemplateInputsAccountQueryParams {
|
|
9
|
+
version: string;
|
|
10
|
+
branch_name?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ValidateTemplateInputsAccountHeaderParams {
|
|
13
|
+
'Harness-Account'?: string;
|
|
14
|
+
'Load-From-Cache'?: string;
|
|
15
|
+
}
|
|
16
|
+
export type ValidateTemplateInputsAccountOKResponse = ValidateTemplateInputsResponseBodyResponse;
|
|
17
|
+
export type ValidateTemplateInputsAccountErrorResponse = unknown;
|
|
18
|
+
export interface ValidateTemplateInputsOrgPathParams {
|
|
19
|
+
org: string;
|
|
20
|
+
template: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ValidateTemplateInputsOrgQueryParams {
|
|
23
|
+
version: string;
|
|
24
|
+
branch_name?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ValidateTemplateInputsOrgHeaderParams {
|
|
27
|
+
'Harness-Account'?: string;
|
|
28
|
+
'Load-From-Cache'?: string;
|
|
29
|
+
}
|
|
30
|
+
export type ValidateTemplateInputsOrgOKResponse = ValidateTemplateInputsResponseBodyResponse;
|
|
31
|
+
export type ValidateTemplateInputsOrgErrorResponse = unknown;
|
|
32
|
+
export interface ValidateTemplateInputsProjectPathParams {
|
|
33
|
+
org: string;
|
|
34
|
+
project: string;
|
|
35
|
+
template: string;
|
|
36
|
+
}
|
|
37
|
+
export interface ValidateTemplateInputsProjectQueryParams {
|
|
38
|
+
version: string;
|
|
39
|
+
branch_name?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ValidateTemplateInputsProjectHeaderParams {
|
|
42
|
+
'Harness-Account'?: string;
|
|
43
|
+
'Load-From-Cache'?: string;
|
|
44
|
+
}
|
|
45
|
+
export type ValidateTemplateInputsProjectOKResponse = ValidateTemplateInputsResponseBodyResponse;
|
|
46
|
+
export type ValidateTemplateInputsProjectErrorResponse = unknown;
|
|
47
|
+
export type ValidateTemplateInputsOKResponse<T> = T extends ValidateTemplateInputsProjectPathParams ? ResponseWithPagination<ValidateTemplateInputsProjectOKResponse> : T extends ValidateTemplateInputsOrgPathParams ? ResponseWithPagination<ValidateTemplateInputsOrgOKResponse> : ResponseWithPagination<ValidateTemplateInputsAccountOKResponse>;
|
|
48
|
+
export type ValidateTemplateInputsErrorResponse<T> = T extends ValidateTemplateInputsProjectPathParams ? ValidateTemplateInputsProjectErrorResponse : T extends ValidateTemplateInputsOrgPathParams ? ValidateTemplateInputsOrgErrorResponse : ValidateTemplateInputsAccountErrorResponse;
|
|
49
|
+
export interface ValidateTemplateInputsProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
50
|
+
pathParams: ValidateTemplateInputsAccountPathParams | ValidateTemplateInputsOrgPathParams | ValidateTemplateInputsProjectPathParams;
|
|
51
|
+
}
|
|
52
|
+
export declare function validateTemplateInputs<T extends ValidateTemplateInputsProps = ValidateTemplateInputsProps>(props: T): Promise<ValidateTemplateInputsOKResponse<GetPathParamsType<T>>>;
|
|
53
|
+
export declare function useValidateTemplateInputsQuery<T extends ValidateTemplateInputsProps = ValidateTemplateInputsProps>(props: T, options?: Omit<UseQueryOptions<ValidateTemplateInputsOKResponse<GetPathParamsType<T>>, ValidateTemplateInputsErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ValidateTemplateInputsOKResponse<GetPathParamsType<T>>, ValidateTemplateInputsErrorResponse<GetPathParamsType<T>>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
function isProjectPathParams(pathParams) {
|
|
7
|
+
return !!(pathParams.org &&
|
|
8
|
+
pathParams.project);
|
|
9
|
+
}
|
|
10
|
+
function isOrgPathParams(pathParams) {
|
|
11
|
+
return !!(pathParams.org &&
|
|
12
|
+
!pathParams.project);
|
|
13
|
+
}
|
|
14
|
+
export function validateTemplateInputs(props) {
|
|
15
|
+
let url = `/v1/templates/${props.pathParams.template}/validate-template-inputs`;
|
|
16
|
+
let method = 'GET';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/templates/${props.pathParams.template}/validate-template-inputs`;
|
|
19
|
+
method = 'GET';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/templates/${props.pathParams.template}/validate-template-inputs`;
|
|
23
|
+
method = 'GET';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useValidateTemplateInputsQuery(props, options) {
|
|
29
|
+
return useQuery(['validateTemplateInputs', props.queryParams], ({ signal }) => validateTemplateInputs(Object.assign(Object.assign({}, props), { signal })), options);
|
|
30
|
+
}
|
|
@@ -9,12 +9,16 @@ export type { GetAccTemplatesInputsSchemaErrorResponse, GetAccTemplatesInputsSch
|
|
|
9
9
|
export { getAccTemplatesInputsSchema, useGetAccTemplatesInputsSchemaQuery, } from './hooks/useGetAccTemplatesInputsSchemaQuery';
|
|
10
10
|
export type { GetEntityTemplateReferencesErrorResponse, GetEntityTemplateReferencesOkResponse, GetEntityTemplateReferencesProps, GetEntityTemplateReferencesQueryPathParams, GetEntityTemplateReferencesQueryQueryParams, } from './hooks/useGetEntityTemplateReferencesQuery';
|
|
11
11
|
export { getEntityTemplateReferences, useGetEntityTemplateReferencesQuery, } from './hooks/useGetEntityTemplateReferencesQuery';
|
|
12
|
+
export type { GetGlobalTemplateCatalogSummaryErrorResponse, GetGlobalTemplateCatalogSummaryOkResponse, GetGlobalTemplateCatalogSummaryProps, GetGlobalTemplateCatalogSummaryQueryQueryParams, } from './hooks/useGetGlobalTemplateCatalogSummaryQuery';
|
|
13
|
+
export { getGlobalTemplateCatalogSummary, useGetGlobalTemplateCatalogSummaryQuery, } from './hooks/useGetGlobalTemplateCatalogSummaryQuery';
|
|
12
14
|
export type { GetInputsSchemaErrorResponse, GetInputsSchemaMutationQueryParams, GetInputsSchemaOkResponse, GetInputsSchemaProps, GetInputsSchemaRequestBody, } from './hooks/useGetInputsSchemaMutation';
|
|
13
15
|
export { getInputsSchema, useGetInputsSchemaMutation } from './hooks/useGetInputsSchemaMutation';
|
|
14
16
|
export type { GetOrgTemplatesInputsSchemaErrorResponse, GetOrgTemplatesInputsSchemaOkResponse, GetOrgTemplatesInputsSchemaProps, GetOrgTemplatesInputsSchemaQueryPathParams, } from './hooks/useGetOrgTemplatesInputsSchemaQuery';
|
|
15
17
|
export { getOrgTemplatesInputsSchema, useGetOrgTemplatesInputsSchemaQuery, } from './hooks/useGetOrgTemplatesInputsSchemaQuery';
|
|
16
18
|
export type { GetProjectTemplatesInputsSchemaErrorResponse, GetProjectTemplatesInputsSchemaOkResponse, GetProjectTemplatesInputsSchemaProps, GetProjectTemplatesInputsSchemaQueryPathParams, } from './hooks/useGetProjectTemplatesInputsSchemaQuery';
|
|
17
19
|
export { getProjectTemplatesInputsSchema, useGetProjectTemplatesInputsSchemaQuery, } from './hooks/useGetProjectTemplatesInputsSchemaQuery';
|
|
20
|
+
export type { GetTemplateInputsAccountErrorResponse, GetTemplateInputsAccountOKResponse, GetTemplateInputsAccountPathParams, GetTemplateInputsAccountQueryParams, GetTemplateInputsOrgErrorResponse, GetTemplateInputsOrgOKResponse, GetTemplateInputsOrgPathParams, GetTemplateInputsOrgQueryParams, GetTemplateInputsProjectErrorResponse, GetTemplateInputsProjectOKResponse, GetTemplateInputsProjectPathParams, GetTemplateInputsProjectQueryParams, GetTemplateInputsProps, } from './hooks/useGetTemplateInputsMutation';
|
|
21
|
+
export { getTemplateInputs, useGetTemplateInputsMutation, } from './hooks/useGetTemplateInputsMutation';
|
|
18
22
|
export type { GetTemplateAccountErrorResponse, GetTemplateAccountOKResponse, GetTemplateAccountPathParams, GetTemplateAccountQueryParams, GetTemplateOrgErrorResponse, GetTemplateOrgOKResponse, GetTemplateOrgPathParams, GetTemplateOrgQueryParams, GetTemplateProjectErrorResponse, GetTemplateProjectOKResponse, GetTemplateProjectPathParams, GetTemplateProjectQueryParams, GetTemplateProps, } from './hooks/useGetTemplateQuery';
|
|
19
23
|
export { getTemplate, useGetTemplateQuery } from './hooks/useGetTemplateQuery';
|
|
20
24
|
export type { GetTemplateSchemaErrorResponse, GetTemplateSchemaOkResponse, GetTemplateSchemaProps, GetTemplateSchemaQueryQueryParams, } from './hooks/useGetTemplateSchemaQuery';
|
|
@@ -27,6 +31,10 @@ export type { ImportTemplateAccountErrorResponse, ImportTemplateAccountOKRespons
|
|
|
27
31
|
export { importTemplate, useImportTemplateMutation } from './hooks/useImportTemplateMutation';
|
|
28
32
|
export type { ListNotificationRulesWithUnresolvedInputsErrorResponse, ListNotificationRulesWithUnresolvedInputsMutationQueryParams, ListNotificationRulesWithUnresolvedInputsOkResponse, ListNotificationRulesWithUnresolvedInputsProps, ListNotificationRulesWithUnresolvedInputsRequestBody, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
|
|
29
33
|
export { listNotificationRulesWithUnresolvedInputs, useListNotificationRulesWithUnresolvedInputsMutation, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
|
|
34
|
+
export type { RefreshTemplateInputsAccErrorResponse, RefreshTemplateInputsAccOkResponse, RefreshTemplateInputsAccProps, RefreshTemplateInputsAccRequestBody, } from './hooks/useRefreshTemplateInputsAccMutation';
|
|
35
|
+
export { refreshTemplateInputsAcc, useRefreshTemplateInputsAccMutation, } from './hooks/useRefreshTemplateInputsAccMutation';
|
|
36
|
+
export type { RefreshedYamlAccountErrorResponse, RefreshedYamlAccountOKResponse, RefreshedYamlAccountQueryParams, RefreshedYamlAccountRequestBody, RefreshedYamlOrgErrorResponse, RefreshedYamlOrgOKResponse, RefreshedYamlOrgPathParams, RefreshedYamlOrgQueryParams, RefreshedYamlOrgRequestBody, RefreshedYamlProjectErrorResponse, RefreshedYamlProjectOKResponse, RefreshedYamlProjectPathParams, RefreshedYamlProjectQueryParams, RefreshedYamlProjectRequestBody, RefreshedYamlProps, } from './hooks/useRefreshedYamlMutation';
|
|
37
|
+
export { refreshedYaml, useRefreshedYamlMutation } from './hooks/useRefreshedYamlMutation';
|
|
30
38
|
export type { UpdateGitMetadataDetailsRefAccountErrorResponse, UpdateGitMetadataDetailsRefAccountOKResponse, UpdateGitMetadataDetailsRefAccountPathParams, UpdateGitMetadataDetailsRefAccountRequestBody, UpdateGitMetadataDetailsRefOrgErrorResponse, UpdateGitMetadataDetailsRefOrgOKResponse, UpdateGitMetadataDetailsRefOrgPathParams, UpdateGitMetadataDetailsRefOrgRequestBody, UpdateGitMetadataDetailsRefProjectErrorResponse, UpdateGitMetadataDetailsRefProjectOKResponse, UpdateGitMetadataDetailsRefProjectPathParams, UpdateGitMetadataDetailsRefProjectRequestBody, UpdateGitMetadataDetailsRefProps, } from './hooks/useUpdateGitMetadataDetailsRefMutation';
|
|
31
39
|
export { updateGitMetadataDetailsRef, useUpdateGitMetadataDetailsRefMutation, } from './hooks/useUpdateGitMetadataDetailsRefMutation';
|
|
32
40
|
export type { UpdateTemplateAccountErrorResponse, UpdateTemplateAccountOKResponse, UpdateTemplateAccountPathParams, UpdateTemplateAccountQueryParams, UpdateTemplateAccountRequestBody, UpdateTemplateOrgErrorResponse, UpdateTemplateOrgOKResponse, UpdateTemplateOrgPathParams, UpdateTemplateOrgRequestBody, UpdateTemplateProjectErrorResponse, UpdateTemplateProjectOKResponse, UpdateTemplateProjectPathParams, UpdateTemplateProjectRequestBody, UpdateTemplateProps, } from './hooks/useUpdateTemplateMutation';
|
|
@@ -35,7 +43,10 @@ export type { UpdateTemplateStableAccountErrorResponse, UpdateTemplateStableAcco
|
|
|
35
43
|
export { updateTemplateStable, useUpdateTemplateStableMutation, } from './hooks/useUpdateTemplateStableMutation';
|
|
36
44
|
export type { ValidateNotificationRulesWithUnresolvedInputsErrorResponse, ValidateNotificationRulesWithUnresolvedInputsMutationQueryParams, ValidateNotificationRulesWithUnresolvedInputsOkResponse, ValidateNotificationRulesWithUnresolvedInputsProps, ValidateNotificationRulesWithUnresolvedInputsRequestBody, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
|
|
37
45
|
export { useValidateNotificationRulesWithUnresolvedInputsMutation, validateNotificationRulesWithUnresolvedInputs, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
|
|
46
|
+
export type { ValidateTemplateInputsAccountErrorResponse, ValidateTemplateInputsAccountOKResponse, ValidateTemplateInputsAccountPathParams, ValidateTemplateInputsAccountQueryParams, ValidateTemplateInputsOrgErrorResponse, ValidateTemplateInputsOrgOKResponse, ValidateTemplateInputsOrgPathParams, ValidateTemplateInputsOrgQueryParams, ValidateTemplateInputsProjectErrorResponse, ValidateTemplateInputsProjectOKResponse, ValidateTemplateInputsProjectPathParams, ValidateTemplateInputsProjectQueryParams, ValidateTemplateInputsProps, } from './hooks/useValidateTemplateInputsQuery';
|
|
47
|
+
export { useValidateTemplateInputsQuery, validateTemplateInputs, } from './hooks/useValidateTemplateInputsQuery';
|
|
38
48
|
export type { NotificationTemplateReconcileRequestBodyRequestBody } from './requestBodies/NotificationTemplateReconcileRequestBodyRequestBody';
|
|
49
|
+
export type { RefreshTemplateInputsRequestBodyRequestBody } from './requestBodies/RefreshTemplateInputsRequestBodyRequestBody';
|
|
39
50
|
export type { TemplateCreateBodyRequestBody } from './requestBodies/TemplateCreateBodyRequestBody';
|
|
40
51
|
export type { TemplateFetchBodyRequestBody } from './requestBodies/TemplateFetchBodyRequestBody';
|
|
41
52
|
export type { TemplateImportRequestBodyRequestBody } from './requestBodies/TemplateImportRequestBodyRequestBody';
|
|
@@ -44,10 +55,15 @@ export type { TemplateReferenceRequestBodyRequestBody } from './requestBodies/Te
|
|
|
44
55
|
export type { TemplateUpdateBodyRequestBody } from './requestBodies/TemplateUpdateBodyRequestBody';
|
|
45
56
|
export type { TemplateUpdateGitMetadataRequestBodyRequestBody } from './requestBodies/TemplateUpdateGitMetadataRequestBodyRequestBody';
|
|
46
57
|
export type { UpsertEntityTemplateReferencesRequestBodyRequestBody } from './requestBodies/UpsertEntityTemplateReferencesRequestBodyRequestBody';
|
|
58
|
+
export type { YamlRefreshRequestBodyRequestBody } from './requestBodies/YamlRefreshRequestBodyRequestBody';
|
|
47
59
|
export type { EntityTemplateReferencesResponseResponse } from './responses/EntityTemplateReferencesResponseResponse';
|
|
60
|
+
export type { GlobalTemplateCatalogResponseResponse } from './responses/GlobalTemplateCatalogResponseResponse';
|
|
48
61
|
export type { NotificationTemplateValidateResponseBodyResponse } from './responses/NotificationTemplateValidateResponseBodyResponse';
|
|
62
|
+
export type { RefreshTemplateInputsResponseBodyResponse } from './responses/RefreshTemplateInputsResponseBodyResponse';
|
|
63
|
+
export type { RefreshedYamlResponseBodyResponse } from './responses/RefreshedYamlResponseBodyResponse';
|
|
49
64
|
export type { TemplateImportResponseBodyResponse } from './responses/TemplateImportResponseBodyResponse';
|
|
50
65
|
export type { TemplateInputSchemaDetailsResponseBodyResponse } from './responses/TemplateInputSchemaDetailsResponseBodyResponse';
|
|
66
|
+
export type { TemplateInputsResponseBodyResponse } from './responses/TemplateInputsResponseBodyResponse';
|
|
51
67
|
export type { TemplateMetaDataListResponse } from './responses/TemplateMetaDataListResponse';
|
|
52
68
|
export type { TemplateResponseResponse } from './responses/TemplateResponseResponse';
|
|
53
69
|
export type { TemplateSchemaResponseResponse } from './responses/TemplateSchemaResponseResponse';
|
|
@@ -55,6 +71,7 @@ export type { TemplateUpdateGitMetadataResponseResponse } from './responses/Temp
|
|
|
55
71
|
export type { TemplateUpdateStableResponseResponse } from './responses/TemplateUpdateStableResponseResponse';
|
|
56
72
|
export type { TemplateWithInputsResponseResponse } from './responses/TemplateWithInputsResponseResponse';
|
|
57
73
|
export type { UnresolvedNotificationRulesResponseBodyResponse } from './responses/UnresolvedNotificationRulesResponseBodyResponse';
|
|
74
|
+
export type { ValidateTemplateInputsResponseBodyResponse } from './responses/ValidateTemplateInputsResponseBodyResponse';
|
|
58
75
|
export type { EntityGitDetails } from './schemas/EntityGitDetails';
|
|
59
76
|
export type { EntityTemplateReferencesResponse } from './schemas/EntityTemplateReferencesResponse';
|
|
60
77
|
export type { FixedValueFieldDependencyDetailsDto } from './schemas/FixedValueFieldDependencyDetailsDto';
|
|
@@ -63,12 +80,17 @@ export type { GitDetailsMetadata } from './schemas/GitDetailsMetadata';
|
|
|
63
80
|
export type { GitFindDetails } from './schemas/GitFindDetails';
|
|
64
81
|
export type { GitImportDetails } from './schemas/GitImportDetails';
|
|
65
82
|
export type { GitUpdateDetails } from './schemas/GitUpdateDetails';
|
|
83
|
+
export type { GlobalTemplateCatalogResponseBody } from './schemas/GlobalTemplateCatalogResponseBody';
|
|
84
|
+
export type { GlobalTemplateCategorySummary } from './schemas/GlobalTemplateCategorySummary';
|
|
66
85
|
export type { GovernanceStatus } from './schemas/GovernanceStatus';
|
|
67
86
|
export type { InputDetailsDto } from './schemas/InputDetailsDto';
|
|
68
87
|
export type { NotificationRulesData } from './schemas/NotificationRulesData';
|
|
69
88
|
export type { NotificationTemplateReconcileRequestBody } from './schemas/NotificationTemplateReconcileRequestBody';
|
|
70
89
|
export type { NotificationTemplateValidateResponseBody } from './schemas/NotificationTemplateValidateResponseBody';
|
|
71
90
|
export type { ReferencedTemplateMetadata } from './schemas/ReferencedTemplateMetadata';
|
|
91
|
+
export type { RefreshTemplateInputsRequestBody } from './schemas/RefreshTemplateInputsRequestBody';
|
|
92
|
+
export type { RefreshTemplateInputsResponseBody } from './schemas/RefreshTemplateInputsResponseBody';
|
|
93
|
+
export type { RefreshedYamlResponseBody } from './schemas/RefreshedYamlResponseBody';
|
|
72
94
|
export type { RuntimeInputDependencyDetailsDto } from './schemas/RuntimeInputDependencyDetailsDto';
|
|
73
95
|
export type { TemplateCreateRequestBody } from './schemas/TemplateCreateRequestBody';
|
|
74
96
|
export type { TemplateGovernanceMetadata } from './schemas/TemplateGovernanceMetadata';
|
|
@@ -78,6 +100,7 @@ export type { TemplateImportRequestBody } from './schemas/TemplateImportRequestB
|
|
|
78
100
|
export type { TemplateImportRequestDto } from './schemas/TemplateImportRequestDto';
|
|
79
101
|
export type { TemplateImportResponseBody } from './schemas/TemplateImportResponseBody';
|
|
80
102
|
export type { TemplateInputSchemaDetailsResponseBody } from './schemas/TemplateInputSchemaDetailsResponseBody';
|
|
103
|
+
export type { TemplateInputsResponseBody } from './schemas/TemplateInputsResponseBody';
|
|
81
104
|
export type { TemplateInputsSchemaRequestBody } from './schemas/TemplateInputsSchemaRequestBody';
|
|
82
105
|
export type { TemplateMetaDataList } from './schemas/TemplateMetaDataList';
|
|
83
106
|
export type { TemplateMetadataFilterExpression } from './schemas/TemplateMetadataFilterExpression';
|
|
@@ -96,5 +119,7 @@ export type { TemplateYamlInputDto } from './schemas/TemplateYamlInputDto';
|
|
|
96
119
|
export type { TemplateYamlInputMetadataDto } from './schemas/TemplateYamlInputMetadataDto';
|
|
97
120
|
export type { UnresolvedNotificationRulesResponseBody } from './schemas/UnresolvedNotificationRulesResponseBody';
|
|
98
121
|
export type { UpsertEntityTemplateReferencesRequestBody } from './schemas/UpsertEntityTemplateReferencesRequestBody';
|
|
122
|
+
export type { ValidateTemplateInputsResponseBody } from './schemas/ValidateTemplateInputsResponseBody';
|
|
99
123
|
export type { YamlInputDependencyDetailsDto } from './schemas/YamlInputDependencyDetailsDto';
|
|
100
124
|
export type { YamlInputType } from './schemas/YamlInputType';
|
|
125
|
+
export type { YamlRefreshRequestBody } from './schemas/YamlRefreshRequestBody';
|
|
@@ -3,16 +3,21 @@ export { deleteEntityTemplateReferences, useDeleteEntityTemplateReferencesMutati
|
|
|
3
3
|
export { deleteTemplate, useDeleteTemplateMutation } from './hooks/useDeleteTemplateMutation';
|
|
4
4
|
export { getAccTemplatesInputsSchema, useGetAccTemplatesInputsSchemaQuery, } from './hooks/useGetAccTemplatesInputsSchemaQuery';
|
|
5
5
|
export { getEntityTemplateReferences, useGetEntityTemplateReferencesQuery, } from './hooks/useGetEntityTemplateReferencesQuery';
|
|
6
|
+
export { getGlobalTemplateCatalogSummary, useGetGlobalTemplateCatalogSummaryQuery, } from './hooks/useGetGlobalTemplateCatalogSummaryQuery';
|
|
6
7
|
export { getInputsSchema, useGetInputsSchemaMutation } from './hooks/useGetInputsSchemaMutation';
|
|
7
8
|
export { getOrgTemplatesInputsSchema, useGetOrgTemplatesInputsSchemaQuery, } from './hooks/useGetOrgTemplatesInputsSchemaQuery';
|
|
8
9
|
export { getProjectTemplatesInputsSchema, useGetProjectTemplatesInputsSchemaQuery, } from './hooks/useGetProjectTemplatesInputsSchemaQuery';
|
|
10
|
+
export { getTemplateInputs, useGetTemplateInputsMutation, } from './hooks/useGetTemplateInputsMutation';
|
|
9
11
|
export { getTemplate, useGetTemplateQuery } from './hooks/useGetTemplateQuery';
|
|
10
12
|
export { getTemplateSchema, useGetTemplateSchemaQuery } from './hooks/useGetTemplateSchemaQuery';
|
|
11
13
|
export { getTemplateStable, useGetTemplateStableQuery } from './hooks/useGetTemplateStableQuery';
|
|
12
14
|
export { getTemplatesList, useGetTemplatesListQuery } from './hooks/useGetTemplatesListQuery';
|
|
13
15
|
export { importTemplate, useImportTemplateMutation } from './hooks/useImportTemplateMutation';
|
|
14
16
|
export { listNotificationRulesWithUnresolvedInputs, useListNotificationRulesWithUnresolvedInputsMutation, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
|
|
17
|
+
export { refreshTemplateInputsAcc, useRefreshTemplateInputsAccMutation, } from './hooks/useRefreshTemplateInputsAccMutation';
|
|
18
|
+
export { refreshedYaml, useRefreshedYamlMutation } from './hooks/useRefreshedYamlMutation';
|
|
15
19
|
export { updateGitMetadataDetailsRef, useUpdateGitMetadataDetailsRefMutation, } from './hooks/useUpdateGitMetadataDetailsRefMutation';
|
|
16
20
|
export { updateTemplate, useUpdateTemplateMutation } from './hooks/useUpdateTemplateMutation';
|
|
17
21
|
export { updateTemplateStable, useUpdateTemplateStableMutation, } from './hooks/useUpdateTemplateStableMutation';
|
|
18
22
|
export { useValidateNotificationRulesWithUnresolvedInputsMutation, validateNotificationRulesWithUnresolvedInputs, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
|
|
23
|
+
export { useValidateTemplateInputsQuery, validateTemplateInputs, } from './hooks/useValidateTemplateInputsQuery';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/template-service/src/services/responses/RefreshTemplateInputsResponseBodyResponse.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/template-service/src/services/responses/ValidateTemplateInputsResponseBodyResponse.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -22,6 +22,10 @@ export interface GitUpdateDetails {
|
|
|
22
22
|
* File path of the Entity in the repository.
|
|
23
23
|
*/
|
|
24
24
|
file_path?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Is Git Experience repo harness code.
|
|
27
|
+
*/
|
|
28
|
+
is_harness_code_repo?: boolean;
|
|
25
29
|
/**
|
|
26
30
|
* Last commit identifier (for Git Repositories other than Github).
|
|
27
31
|
*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { GlobalTemplateCategorySummary } from '../schemas/GlobalTemplateCategorySummary';
|
|
2
|
+
/**
|
|
3
|
+
* Global template catalog summary response with per-category counts
|
|
4
|
+
*/
|
|
5
|
+
export interface GlobalTemplateCatalogResponseBody {
|
|
6
|
+
categories?: GlobalTemplateCategorySummary[];
|
|
7
|
+
/**
|
|
8
|
+
* Sum of template counts across all requested categories
|
|
9
|
+
* @format int64
|
|
10
|
+
*/
|
|
11
|
+
total_count?: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Aggregated global template count for a Harness-managed category
|
|
3
|
+
*/
|
|
4
|
+
export interface GlobalTemplateCategorySummary {
|
|
5
|
+
/**
|
|
6
|
+
* Category identifier from global template config metadata
|
|
7
|
+
*/
|
|
8
|
+
category: string;
|
|
9
|
+
/**
|
|
10
|
+
* Number of stable global step templates in this category
|
|
11
|
+
* @format int64
|
|
12
|
+
*/
|
|
13
|
+
count: number;
|
|
14
|
+
/**
|
|
15
|
+
* Harness design system icon identifier
|
|
16
|
+
*/
|
|
17
|
+
icon: string;
|
|
18
|
+
/**
|
|
19
|
+
* UI display label for the category
|
|
20
|
+
*/
|
|
21
|
+
label_name: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request body for refreshing the runtime inputs of a v1 template reference.
|
|
3
|
+
*/
|
|
4
|
+
export interface RefreshTemplateInputsRequestBody {
|
|
5
|
+
/**
|
|
6
|
+
* New template definition YAML (template.inputs schema plus the template body).
|
|
7
|
+
*/
|
|
8
|
+
new_template_inputs?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Currently configured input YAML of the template reference whose values should be retained.
|
|
11
|
+
*/
|
|
12
|
+
old_template_inputs?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TemplateInputsResponseBody {
|
|
2
|
+
/**
|
|
3
|
+
* Map of input name to input definition (type, default, required, enum, etc.)
|
|
4
|
+
*/
|
|
5
|
+
inputs?: {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Template YAML with nested template refs resolved
|
|
10
|
+
*/
|
|
11
|
+
resolved_template_yaml?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Runtime input form YAML with input placeholders and defaults
|
|
14
|
+
*/
|
|
15
|
+
template_yaml?: string;
|
|
16
|
+
}
|
|
@@ -53,6 +53,10 @@ export interface TemplateMetadataSummaryResponse {
|
|
|
53
53
|
* Scope of template
|
|
54
54
|
*/
|
|
55
55
|
scope?: 'account' | 'org' | 'project' | 'unknown';
|
|
56
|
+
/**
|
|
57
|
+
* Semantic template labels
|
|
58
|
+
*/
|
|
59
|
+
semantic_labels?: string[];
|
|
56
60
|
/**
|
|
57
61
|
* True if this version is stable version of Template
|
|
58
62
|
*/
|
|
@@ -47,6 +47,10 @@ export interface TemplateResponse {
|
|
|
47
47
|
* Scope of template
|
|
48
48
|
*/
|
|
49
49
|
scope?: 'account' | 'org' | 'project' | 'unknown';
|
|
50
|
+
/**
|
|
51
|
+
* Semantic template labels
|
|
52
|
+
*/
|
|
53
|
+
semantic_labels?: string[];
|
|
50
54
|
/**
|
|
51
55
|
* True if this version is stable version of Template
|
|
52
56
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response body for template input validation.
|
|
3
|
+
*/
|
|
4
|
+
export interface ValidateTemplateInputsResponseBody {
|
|
5
|
+
/**
|
|
6
|
+
* Summary of validation errors when valid_yaml is false.
|
|
7
|
+
*/
|
|
8
|
+
error_node_summary?: {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Whether the template inputs in the YAML are valid.
|
|
13
|
+
*/
|
|
14
|
+
valid_yaml?: boolean;
|
|
15
|
+
}
|
package/package.json
CHANGED