@harnessio/react-template-service-client 1.1.0 → 1.2.1

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 (45) hide show
  1. package/dist/template-service/src/services/hooks/useGetGlobalTemplateCatalogSummaryQuery.d.ts +31 -0
  2. package/dist/template-service/src/services/hooks/useGetGlobalTemplateCatalogSummaryQuery.js +14 -0
  3. package/dist/template-service/src/services/hooks/useRefreshTemplateInputsAccMutation.d.ts +19 -0
  4. package/dist/template-service/src/services/hooks/useRefreshTemplateInputsAccMutation.js +14 -0
  5. package/dist/template-service/src/services/hooks/useRefreshedYamlMutation.d.ts +63 -0
  6. package/dist/template-service/src/services/hooks/useRefreshedYamlMutation.js +30 -0
  7. package/dist/template-service/src/services/hooks/useValidateTemplateInputsQuery.d.ts +53 -0
  8. package/dist/template-service/src/services/hooks/useValidateTemplateInputsQuery.js +30 -0
  9. package/dist/template-service/src/services/index.d.ts +22 -0
  10. package/dist/template-service/src/services/index.js +4 -0
  11. package/dist/template-service/src/services/requestBodies/RefreshTemplateInputsRequestBodyRequestBody.d.ts +2 -0
  12. package/dist/template-service/src/services/requestBodies/RefreshTemplateInputsRequestBodyRequestBody.js +1 -0
  13. package/dist/template-service/src/services/requestBodies/YamlRefreshRequestBodyRequestBody.d.ts +2 -0
  14. package/dist/template-service/src/services/requestBodies/YamlRefreshRequestBodyRequestBody.js +1 -0
  15. package/dist/template-service/src/services/responses/GlobalTemplateCatalogResponseResponse.d.ts +2 -0
  16. package/dist/template-service/src/services/responses/GlobalTemplateCatalogResponseResponse.js +1 -0
  17. package/dist/template-service/src/services/responses/RefreshTemplateInputsResponseBodyResponse.d.ts +2 -0
  18. package/dist/template-service/src/services/responses/RefreshTemplateInputsResponseBodyResponse.js +1 -0
  19. package/dist/template-service/src/services/responses/RefreshedYamlResponseBodyResponse.d.ts +2 -0
  20. package/dist/template-service/src/services/responses/RefreshedYamlResponseBodyResponse.js +1 -0
  21. package/dist/template-service/src/services/responses/ValidateTemplateInputsResponseBodyResponse.d.ts +2 -0
  22. package/dist/template-service/src/services/responses/ValidateTemplateInputsResponseBodyResponse.js +1 -0
  23. package/dist/template-service/src/services/schemas/CacheResponseMetadataDto.d.ts +20 -0
  24. package/dist/template-service/src/services/schemas/CacheResponseMetadataDto.js +4 -0
  25. package/dist/template-service/src/services/schemas/GitCreateDetails.d.ts +4 -0
  26. package/dist/template-service/src/services/schemas/GitUpdateDetails.d.ts +4 -0
  27. package/dist/template-service/src/services/schemas/GlobalTemplateCatalogResponseBody.d.ts +12 -0
  28. package/dist/template-service/src/services/schemas/GlobalTemplateCatalogResponseBody.js +1 -0
  29. package/dist/template-service/src/services/schemas/GlobalTemplateCategorySummary.d.ts +22 -0
  30. package/dist/template-service/src/services/schemas/GlobalTemplateCategorySummary.js +4 -0
  31. package/dist/template-service/src/services/schemas/InputDetailsDto.d.ts +1 -1
  32. package/dist/template-service/src/services/schemas/RefreshTemplateInputsRequestBody.d.ts +13 -0
  33. package/dist/template-service/src/services/schemas/RefreshTemplateInputsRequestBody.js +4 -0
  34. package/dist/template-service/src/services/schemas/RefreshTemplateInputsResponseBody.d.ts +9 -0
  35. package/dist/template-service/src/services/schemas/RefreshTemplateInputsResponseBody.js +4 -0
  36. package/dist/template-service/src/services/schemas/RefreshedYamlResponseBody.d.ts +9 -0
  37. package/dist/template-service/src/services/schemas/RefreshedYamlResponseBody.js +4 -0
  38. package/dist/template-service/src/services/schemas/TemplateMetadataFilterExpression.d.ts +3 -1
  39. package/dist/template-service/src/services/schemas/TemplateResponse.d.ts +2 -0
  40. package/dist/template-service/src/services/schemas/TemplateYamlInputDto.d.ts +1 -1
  41. package/dist/template-service/src/services/schemas/ValidateTemplateInputsResponseBody.d.ts +15 -0
  42. package/dist/template-service/src/services/schemas/ValidateTemplateInputsResponseBody.js +4 -0
  43. package/dist/template-service/src/services/schemas/YamlRefreshRequestBody.d.ts +9 -0
  44. package/dist/template-service/src/services/schemas/YamlRefreshRequestBody.js +4 -0
  45. 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,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,6 +9,8 @@ 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';
@@ -29,6 +31,10 @@ export type { ImportTemplateAccountErrorResponse, ImportTemplateAccountOKRespons
29
31
  export { importTemplate, useImportTemplateMutation } from './hooks/useImportTemplateMutation';
30
32
  export type { ListNotificationRulesWithUnresolvedInputsErrorResponse, ListNotificationRulesWithUnresolvedInputsMutationQueryParams, ListNotificationRulesWithUnresolvedInputsOkResponse, ListNotificationRulesWithUnresolvedInputsProps, ListNotificationRulesWithUnresolvedInputsRequestBody, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
31
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';
32
38
  export type { UpdateGitMetadataDetailsRefAccountErrorResponse, UpdateGitMetadataDetailsRefAccountOKResponse, UpdateGitMetadataDetailsRefAccountPathParams, UpdateGitMetadataDetailsRefAccountRequestBody, UpdateGitMetadataDetailsRefOrgErrorResponse, UpdateGitMetadataDetailsRefOrgOKResponse, UpdateGitMetadataDetailsRefOrgPathParams, UpdateGitMetadataDetailsRefOrgRequestBody, UpdateGitMetadataDetailsRefProjectErrorResponse, UpdateGitMetadataDetailsRefProjectOKResponse, UpdateGitMetadataDetailsRefProjectPathParams, UpdateGitMetadataDetailsRefProjectRequestBody, UpdateGitMetadataDetailsRefProps, } from './hooks/useUpdateGitMetadataDetailsRefMutation';
33
39
  export { updateGitMetadataDetailsRef, useUpdateGitMetadataDetailsRefMutation, } from './hooks/useUpdateGitMetadataDetailsRefMutation';
34
40
  export type { UpdateTemplateAccountErrorResponse, UpdateTemplateAccountOKResponse, UpdateTemplateAccountPathParams, UpdateTemplateAccountQueryParams, UpdateTemplateAccountRequestBody, UpdateTemplateOrgErrorResponse, UpdateTemplateOrgOKResponse, UpdateTemplateOrgPathParams, UpdateTemplateOrgRequestBody, UpdateTemplateProjectErrorResponse, UpdateTemplateProjectOKResponse, UpdateTemplateProjectPathParams, UpdateTemplateProjectRequestBody, UpdateTemplateProps, } from './hooks/useUpdateTemplateMutation';
@@ -37,7 +43,10 @@ export type { UpdateTemplateStableAccountErrorResponse, UpdateTemplateStableAcco
37
43
  export { updateTemplateStable, useUpdateTemplateStableMutation, } from './hooks/useUpdateTemplateStableMutation';
38
44
  export type { ValidateNotificationRulesWithUnresolvedInputsErrorResponse, ValidateNotificationRulesWithUnresolvedInputsMutationQueryParams, ValidateNotificationRulesWithUnresolvedInputsOkResponse, ValidateNotificationRulesWithUnresolvedInputsProps, ValidateNotificationRulesWithUnresolvedInputsRequestBody, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
39
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';
40
48
  export type { NotificationTemplateReconcileRequestBodyRequestBody } from './requestBodies/NotificationTemplateReconcileRequestBodyRequestBody';
49
+ export type { RefreshTemplateInputsRequestBodyRequestBody } from './requestBodies/RefreshTemplateInputsRequestBodyRequestBody';
41
50
  export type { TemplateCreateBodyRequestBody } from './requestBodies/TemplateCreateBodyRequestBody';
42
51
  export type { TemplateFetchBodyRequestBody } from './requestBodies/TemplateFetchBodyRequestBody';
43
52
  export type { TemplateImportRequestBodyRequestBody } from './requestBodies/TemplateImportRequestBodyRequestBody';
@@ -46,8 +55,12 @@ export type { TemplateReferenceRequestBodyRequestBody } from './requestBodies/Te
46
55
  export type { TemplateUpdateBodyRequestBody } from './requestBodies/TemplateUpdateBodyRequestBody';
47
56
  export type { TemplateUpdateGitMetadataRequestBodyRequestBody } from './requestBodies/TemplateUpdateGitMetadataRequestBodyRequestBody';
48
57
  export type { UpsertEntityTemplateReferencesRequestBodyRequestBody } from './requestBodies/UpsertEntityTemplateReferencesRequestBodyRequestBody';
58
+ export type { YamlRefreshRequestBodyRequestBody } from './requestBodies/YamlRefreshRequestBodyRequestBody';
49
59
  export type { EntityTemplateReferencesResponseResponse } from './responses/EntityTemplateReferencesResponseResponse';
60
+ export type { GlobalTemplateCatalogResponseResponse } from './responses/GlobalTemplateCatalogResponseResponse';
50
61
  export type { NotificationTemplateValidateResponseBodyResponse } from './responses/NotificationTemplateValidateResponseBodyResponse';
62
+ export type { RefreshTemplateInputsResponseBodyResponse } from './responses/RefreshTemplateInputsResponseBodyResponse';
63
+ export type { RefreshedYamlResponseBodyResponse } from './responses/RefreshedYamlResponseBodyResponse';
51
64
  export type { TemplateImportResponseBodyResponse } from './responses/TemplateImportResponseBodyResponse';
52
65
  export type { TemplateInputSchemaDetailsResponseBodyResponse } from './responses/TemplateInputSchemaDetailsResponseBodyResponse';
53
66
  export type { TemplateInputsResponseBodyResponse } from './responses/TemplateInputsResponseBodyResponse';
@@ -58,6 +71,8 @@ export type { TemplateUpdateGitMetadataResponseResponse } from './responses/Temp
58
71
  export type { TemplateUpdateStableResponseResponse } from './responses/TemplateUpdateStableResponseResponse';
59
72
  export type { TemplateWithInputsResponseResponse } from './responses/TemplateWithInputsResponseResponse';
60
73
  export type { UnresolvedNotificationRulesResponseBodyResponse } from './responses/UnresolvedNotificationRulesResponseBodyResponse';
74
+ export type { ValidateTemplateInputsResponseBodyResponse } from './responses/ValidateTemplateInputsResponseBodyResponse';
75
+ export type { CacheResponseMetadataDto } from './schemas/CacheResponseMetadataDto';
61
76
  export type { EntityGitDetails } from './schemas/EntityGitDetails';
62
77
  export type { EntityTemplateReferencesResponse } from './schemas/EntityTemplateReferencesResponse';
63
78
  export type { FixedValueFieldDependencyDetailsDto } from './schemas/FixedValueFieldDependencyDetailsDto';
@@ -66,12 +81,17 @@ export type { GitDetailsMetadata } from './schemas/GitDetailsMetadata';
66
81
  export type { GitFindDetails } from './schemas/GitFindDetails';
67
82
  export type { GitImportDetails } from './schemas/GitImportDetails';
68
83
  export type { GitUpdateDetails } from './schemas/GitUpdateDetails';
84
+ export type { GlobalTemplateCatalogResponseBody } from './schemas/GlobalTemplateCatalogResponseBody';
85
+ export type { GlobalTemplateCategorySummary } from './schemas/GlobalTemplateCategorySummary';
69
86
  export type { GovernanceStatus } from './schemas/GovernanceStatus';
70
87
  export type { InputDetailsDto } from './schemas/InputDetailsDto';
71
88
  export type { NotificationRulesData } from './schemas/NotificationRulesData';
72
89
  export type { NotificationTemplateReconcileRequestBody } from './schemas/NotificationTemplateReconcileRequestBody';
73
90
  export type { NotificationTemplateValidateResponseBody } from './schemas/NotificationTemplateValidateResponseBody';
74
91
  export type { ReferencedTemplateMetadata } from './schemas/ReferencedTemplateMetadata';
92
+ export type { RefreshTemplateInputsRequestBody } from './schemas/RefreshTemplateInputsRequestBody';
93
+ export type { RefreshTemplateInputsResponseBody } from './schemas/RefreshTemplateInputsResponseBody';
94
+ export type { RefreshedYamlResponseBody } from './schemas/RefreshedYamlResponseBody';
75
95
  export type { RuntimeInputDependencyDetailsDto } from './schemas/RuntimeInputDependencyDetailsDto';
76
96
  export type { TemplateCreateRequestBody } from './schemas/TemplateCreateRequestBody';
77
97
  export type { TemplateGovernanceMetadata } from './schemas/TemplateGovernanceMetadata';
@@ -100,5 +120,7 @@ export type { TemplateYamlInputDto } from './schemas/TemplateYamlInputDto';
100
120
  export type { TemplateYamlInputMetadataDto } from './schemas/TemplateYamlInputMetadataDto';
101
121
  export type { UnresolvedNotificationRulesResponseBody } from './schemas/UnresolvedNotificationRulesResponseBody';
102
122
  export type { UpsertEntityTemplateReferencesRequestBody } from './schemas/UpsertEntityTemplateReferencesRequestBody';
123
+ export type { ValidateTemplateInputsResponseBody } from './schemas/ValidateTemplateInputsResponseBody';
103
124
  export type { YamlInputDependencyDetailsDto } from './schemas/YamlInputDependencyDetailsDto';
104
125
  export type { YamlInputType } from './schemas/YamlInputType';
126
+ export type { YamlRefreshRequestBody } from './schemas/YamlRefreshRequestBody';
@@ -3,6 +3,7 @@ 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';
@@ -13,7 +14,10 @@ export { getTemplateStable, useGetTemplateStableQuery } from './hooks/useGetTemp
13
14
  export { getTemplatesList, useGetTemplatesListQuery } from './hooks/useGetTemplatesListQuery';
14
15
  export { importTemplate, useImportTemplateMutation } from './hooks/useImportTemplateMutation';
15
16
  export { listNotificationRulesWithUnresolvedInputs, useListNotificationRulesWithUnresolvedInputsMutation, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
17
+ export { refreshTemplateInputsAcc, useRefreshTemplateInputsAccMutation, } from './hooks/useRefreshTemplateInputsAccMutation';
18
+ export { refreshedYaml, useRefreshedYamlMutation } from './hooks/useRefreshedYamlMutation';
16
19
  export { updateGitMetadataDetailsRef, useUpdateGitMetadataDetailsRefMutation, } from './hooks/useUpdateGitMetadataDetailsRefMutation';
17
20
  export { updateTemplate, useUpdateTemplateMutation } from './hooks/useUpdateTemplateMutation';
18
21
  export { updateTemplateStable, useUpdateTemplateStableMutation, } from './hooks/useUpdateTemplateStableMutation';
19
22
  export { useValidateNotificationRulesWithUnresolvedInputsMutation, validateNotificationRulesWithUnresolvedInputs, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
23
+ export { useValidateTemplateInputsQuery, validateTemplateInputs, } from './hooks/useValidateTemplateInputsQuery';
@@ -0,0 +1,2 @@
1
+ import type { RefreshTemplateInputsRequestBody } from '../schemas/RefreshTemplateInputsRequestBody';
2
+ export type RefreshTemplateInputsRequestBodyRequestBody = RefreshTemplateInputsRequestBody;
@@ -0,0 +1,2 @@
1
+ import type { YamlRefreshRequestBody } from '../schemas/YamlRefreshRequestBody';
2
+ export type YamlRefreshRequestBodyRequestBody = YamlRefreshRequestBody;
@@ -0,0 +1,2 @@
1
+ import type { GlobalTemplateCatalogResponseBody } from '../schemas/GlobalTemplateCatalogResponseBody';
2
+ export type GlobalTemplateCatalogResponseResponse = GlobalTemplateCatalogResponseBody;
@@ -0,0 +1,2 @@
1
+ import type { RefreshTemplateInputsResponseBody } from '../schemas/RefreshTemplateInputsResponseBody';
2
+ export type RefreshTemplateInputsResponseBodyResponse = RefreshTemplateInputsResponseBody;
@@ -0,0 +1,2 @@
1
+ import type { RefreshedYamlResponseBody } from '../schemas/RefreshedYamlResponseBody';
2
+ export type RefreshedYamlResponseBodyResponse = RefreshedYamlResponseBody;
@@ -0,0 +1,2 @@
1
+ import type { ValidateTemplateInputsResponseBody } from '../schemas/ValidateTemplateInputsResponseBody';
2
+ export type ValidateTemplateInputsResponseBodyResponse = ValidateTemplateInputsResponseBody;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * This tells the state of the cache from which the template was fetched.
3
+ */
4
+ export interface CacheResponseMetadataDto {
5
+ /**
6
+ * Tells the state of cache.
7
+ */
8
+ cache_state: 'STALE_CACHE' | 'UNKNOWN' | 'VALID_CACHE';
9
+ is_sync_enabled: boolean;
10
+ /**
11
+ * Time when the cache was last updated at.
12
+ * @format int64
13
+ */
14
+ last_updated_at: number;
15
+ /**
16
+ * Time left till cache expriry.
17
+ * @format int64
18
+ */
19
+ ttl_left: number;
20
+ }
@@ -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 {};
@@ -22,6 +22,10 @@ export interface GitCreateDetails {
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
  * Name of the repository.
27
31
  */
@@ -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,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,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -1,5 +1,5 @@
1
1
  export interface InputDetailsDto {
2
- entity_group?: {};
2
+ entity_group?: 'STAGE' | 'STEP' | 'STEP_GROUP';
3
3
  entity_type?: string;
4
4
  input_type?: string;
5
5
  path?: string;
@@ -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,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,9 @@
1
+ /**
2
+ * Response body containing the refreshed template input YAML.
3
+ */
4
+ export interface RefreshTemplateInputsResponseBody {
5
+ /**
6
+ * Template input YAML with retained values and a refreshed overlay section.
7
+ */
8
+ refreshed_template_inputs?: string;
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,9 @@
1
+ /**
2
+ * Response body containing refreshed YAML.
3
+ */
4
+ export interface RefreshedYamlResponseBody {
5
+ /**
6
+ * YAML with updated template inputs.
7
+ */
8
+ refreshed_yaml?: string;
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 {};
@@ -7,4 +7,6 @@ import type { TemplateMetadataLogicalFilter } from '../schemas/TemplateMetadataL
7
7
  * - If it has "and" or "or" fields, it's a logical filter
8
8
  *
9
9
  */
10
- export type TemplateMetadataFilterExpression = TemplateMetadataPropertyFilter & TemplateMetadataLogicalFilter;
10
+ export type TemplateMetadataFilterExpression = (TemplateMetadataPropertyFilter | TemplateMetadataLogicalFilter) & {
11
+ [key: string]: any;
12
+ };
@@ -1,3 +1,4 @@
1
+ import type { CacheResponseMetadataDto } from '../schemas/CacheResponseMetadataDto';
1
2
  import type { EntityGitDetails } from '../schemas/EntityGitDetails';
2
3
  import type { TemplateGovernanceMetadata } from '../schemas/TemplateGovernanceMetadata';
3
4
  /**
@@ -8,6 +9,7 @@ export interface TemplateResponse {
8
9
  * Account identifier
9
10
  */
10
11
  account: string;
12
+ cache_response_metadata?: CacheResponseMetadataDto;
11
13
  /**
12
14
  * Defines child template type
13
15
  */
@@ -1,6 +1,6 @@
1
1
  import type { YamlInputType } from '../schemas/YamlInputType';
2
2
  export interface TemplateYamlInputDto {
3
- allowed_values?: Array<{}>;
3
+ allowed_values?: [];
4
4
  default?: {
5
5
  [key: string]: any;
6
6
  };
@@ -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
+ }
@@ -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,9 @@
1
+ /**
2
+ * Request body containing YAML to refresh template inputs for.
3
+ */
4
+ export interface YamlRefreshRequestBody {
5
+ /**
6
+ * YAML whose template inputs should be refreshed.
7
+ */
8
+ yaml: string;
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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-template-service-client",
3
- "version": "1.1.0",
3
+ "version": "1.2.1",
4
4
  "description": "Harness React template service client - Template APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",