@harnessio/react-template-service-client 0.1.0 → 0.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.
Files changed (33) hide show
  1. package/dist/template-service/src/services/hooks/useGetInputsSchemaMutation.d.ts +19 -0
  2. package/dist/template-service/src/services/hooks/useGetInputsSchemaMutation.js +14 -0
  3. package/dist/template-service/src/services/index.d.ts +14 -0
  4. package/dist/template-service/src/services/index.js +1 -0
  5. package/dist/template-service/src/services/requestBodies/TemplateInputsSchemaRequestBodyRequestBody.d.ts +2 -0
  6. package/dist/template-service/src/services/requestBodies/TemplateInputsSchemaRequestBodyRequestBody.js +1 -0
  7. package/dist/template-service/src/services/responses/TemplateInputSchemaDetailsResponseBodyResponse.d.ts +2 -0
  8. package/dist/template-service/src/services/responses/TemplateInputSchemaDetailsResponseBodyResponse.js +1 -0
  9. package/dist/template-service/src/services/schemas/FixedValueFieldDependencyDetailsDto.d.ts +5 -0
  10. package/dist/template-service/src/services/schemas/FixedValueFieldDependencyDetailsDto.js +4 -0
  11. package/dist/template-service/src/services/schemas/InputDetailsPerFieldDto.d.ts +6 -0
  12. package/dist/template-service/src/services/schemas/InputDetailsPerFieldDto.js +4 -0
  13. package/dist/template-service/src/services/schemas/RuntimeInputDependencyDetailsDto.d.ts +4 -0
  14. package/dist/template-service/src/services/schemas/RuntimeInputDependencyDetailsDto.js +4 -0
  15. package/dist/template-service/src/services/schemas/TemplateCreateRequestBody.d.ts +22 -0
  16. package/dist/template-service/src/services/schemas/TemplateInputSchemaDetailsResponseBody.d.ts +4 -0
  17. package/dist/template-service/src/services/schemas/TemplateInputSchemaDetailsResponseBody.js +1 -0
  18. package/dist/template-service/src/services/schemas/TemplateInputsSchemaRequestBody.d.ts +3 -0
  19. package/dist/template-service/src/services/schemas/TemplateInputsSchemaRequestBody.js +4 -0
  20. package/dist/template-service/src/services/schemas/TemplateMetadataSummaryResponse.d.ts +4 -0
  21. package/dist/template-service/src/services/schemas/TemplateResponse.d.ts +4 -0
  22. package/dist/template-service/src/services/schemas/TemplateUpdateRequestBody.d.ts +22 -0
  23. package/dist/template-service/src/services/schemas/TemplateYamlInputDetailsDto.d.ts +6 -0
  24. package/dist/template-service/src/services/schemas/TemplateYamlInputDetailsDto.js +1 -0
  25. package/dist/template-service/src/services/schemas/TemplateYamlInputDto.d.ts +11 -0
  26. package/dist/template-service/src/services/schemas/TemplateYamlInputDto.js +1 -0
  27. package/dist/template-service/src/services/schemas/TemplateYamlInputMetadataDto.d.ts +6 -0
  28. package/dist/template-service/src/services/schemas/TemplateYamlInputMetadataDto.js +1 -0
  29. package/dist/template-service/src/services/schemas/YamlInputDependencyDetailsDto.d.ts +6 -0
  30. package/dist/template-service/src/services/schemas/YamlInputDependencyDetailsDto.js +1 -0
  31. package/dist/template-service/src/services/schemas/YamlInputType.d.ts +5 -0
  32. package/dist/template-service/src/services/schemas/YamlInputType.js +4 -0
  33. package/package.json +1 -1
@@ -0,0 +1,19 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TemplateInputSchemaDetailsResponseBodyResponse } from '../responses/TemplateInputSchemaDetailsResponseBodyResponse';
3
+ import type { TemplateInputsSchemaRequestBodyRequestBody } from '../requestBodies/TemplateInputsSchemaRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetInputsSchemaMutationHeaderParams {
7
+ 'Harness-Account'?: string;
8
+ }
9
+ export type GetInputsSchemaRequestBody = TemplateInputsSchemaRequestBodyRequestBody;
10
+ export type GetInputsSchemaOkResponse = ResponseWithPagination<TemplateInputSchemaDetailsResponseBodyResponse>;
11
+ export type GetInputsSchemaErrorResponse = unknown;
12
+ export interface GetInputsSchemaProps extends Omit<FetcherOptions<unknown, GetInputsSchemaRequestBody, GetInputsSchemaMutationHeaderParams>, 'url'> {
13
+ body: GetInputsSchemaRequestBody;
14
+ }
15
+ export declare function getInputsSchema(props: GetInputsSchemaProps): Promise<GetInputsSchemaOkResponse>;
16
+ /**
17
+ *
18
+ */
19
+ export declare function useGetInputsSchemaMutation(options?: Omit<UseMutationOptions<GetInputsSchemaOkResponse, GetInputsSchemaErrorResponse, GetInputsSchemaProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<GetInputsSchemaOkResponse, unknown, GetInputsSchemaProps, 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 getInputsSchema(props) {
7
+ return fetcher(Object.assign({ url: `/v1/template-schema/inputs-schema`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ *
11
+ */
12
+ export function useGetInputsSchemaMutation(options) {
13
+ return useMutation((mutateProps) => getInputsSchema(mutateProps), options);
14
+ }
@@ -11,6 +11,8 @@ export type { DeleteTemplateOrgErrorResponse, DeleteTemplateOrgMutationPathParam
11
11
  export { deleteTemplateOrg, useDeleteTemplateOrgMutation, } from './hooks/useDeleteTemplateOrgMutation';
12
12
  export type { DeleteTemplateProjectErrorResponse, DeleteTemplateProjectMutationPathParams, DeleteTemplateProjectMutationQueryParams, DeleteTemplateProjectOkResponse, DeleteTemplateProjectProps, } from './hooks/useDeleteTemplateProjectMutation';
13
13
  export { deleteTemplateProject, useDeleteTemplateProjectMutation, } from './hooks/useDeleteTemplateProjectMutation';
14
+ export type { GetInputsSchemaErrorResponse, GetInputsSchemaOkResponse, GetInputsSchemaProps, GetInputsSchemaRequestBody, } from './hooks/useGetInputsSchemaMutation';
15
+ export { getInputsSchema, useGetInputsSchemaMutation } from './hooks/useGetInputsSchemaMutation';
14
16
  export type { GetTemplateAccErrorResponse, GetTemplateAccOkResponse, GetTemplateAccProps, GetTemplateAccQueryPathParams, GetTemplateAccQueryQueryParams, } from './hooks/useGetTemplateAccQuery';
15
17
  export { getTemplateAcc, useGetTemplateAccQuery } from './hooks/useGetTemplateAccQuery';
16
18
  export type { GetTemplateOrgErrorResponse, GetTemplateOrgOkResponse, GetTemplateOrgProps, GetTemplateOrgQueryPathParams, GetTemplateOrgQueryQueryParams, } from './hooks/useGetTemplateOrgQuery';
@@ -52,22 +54,29 @@ export { updateTemplateStableProject, useUpdateTemplateStableProjectMutation, }
52
54
  export type { TemplateCreateBodyRequestBody } from './requestBodies/TemplateCreateBodyRequestBody';
53
55
  export type { TemplateFetchBodyRequestBody } from './requestBodies/TemplateFetchBodyRequestBody';
54
56
  export type { TemplateImportRequestBodyRequestBody } from './requestBodies/TemplateImportRequestBodyRequestBody';
57
+ export type { TemplateInputsSchemaRequestBodyRequestBody } from './requestBodies/TemplateInputsSchemaRequestBodyRequestBody';
55
58
  export type { TemplateUpdateBodyRequestBody } from './requestBodies/TemplateUpdateBodyRequestBody';
56
59
  export type { TemplateImportResponseBodyResponse } from './responses/TemplateImportResponseBodyResponse';
60
+ export type { TemplateInputSchemaDetailsResponseBodyResponse } from './responses/TemplateInputSchemaDetailsResponseBodyResponse';
57
61
  export type { TemplateMetaDataListResponse } from './responses/TemplateMetaDataListResponse';
58
62
  export type { TemplateResponseResponse } from './responses/TemplateResponseResponse';
59
63
  export type { TemplateSchemaResponseResponse } from './responses/TemplateSchemaResponseResponse';
60
64
  export type { TemplateUpdateStableResponseResponse } from './responses/TemplateUpdateStableResponseResponse';
61
65
  export type { TemplateWithInputsResponseResponse } from './responses/TemplateWithInputsResponseResponse';
62
66
  export type { EntityGitDetails } from './schemas/EntityGitDetails';
67
+ export type { FixedValueFieldDependencyDetailsDto } from './schemas/FixedValueFieldDependencyDetailsDto';
63
68
  export type { GitCreateDetails } from './schemas/GitCreateDetails';
64
69
  export type { GitFindDetails } from './schemas/GitFindDetails';
65
70
  export type { GitImportDetails } from './schemas/GitImportDetails';
66
71
  export type { GitUpdateDetails } from './schemas/GitUpdateDetails';
72
+ export type { InputDetailsPerFieldDto } from './schemas/InputDetailsPerFieldDto';
73
+ export type { RuntimeInputDependencyDetailsDto } from './schemas/RuntimeInputDependencyDetailsDto';
67
74
  export type { TemplateCreateRequestBody } from './schemas/TemplateCreateRequestBody';
68
75
  export type { TemplateImportRequestBody } from './schemas/TemplateImportRequestBody';
69
76
  export type { TemplateImportRequestDto } from './schemas/TemplateImportRequestDto';
70
77
  export type { TemplateImportResponseBody } from './schemas/TemplateImportResponseBody';
78
+ export type { TemplateInputSchemaDetailsResponseBody } from './schemas/TemplateInputSchemaDetailsResponseBody';
79
+ export type { TemplateInputsSchemaRequestBody } from './schemas/TemplateInputsSchemaRequestBody';
71
80
  export type { TemplateMetaDataList } from './schemas/TemplateMetaDataList';
72
81
  export type { TemplateMetadataSummaryResponse } from './schemas/TemplateMetadataSummaryResponse';
73
82
  export type { TemplateResponse } from './schemas/TemplateResponse';
@@ -75,3 +84,8 @@ export type { TemplateSchemaResponse } from './schemas/TemplateSchemaResponse';
75
84
  export type { TemplateUpdateRequestBody } from './schemas/TemplateUpdateRequestBody';
76
85
  export type { TemplateUpdateStableResponse } from './schemas/TemplateUpdateStableResponse';
77
86
  export type { TemplateWithInputsResponse } from './schemas/TemplateWithInputsResponse';
87
+ export type { TemplateYamlInputDetailsDto } from './schemas/TemplateYamlInputDetailsDto';
88
+ export type { TemplateYamlInputDto } from './schemas/TemplateYamlInputDto';
89
+ export type { TemplateYamlInputMetadataDto } from './schemas/TemplateYamlInputMetadataDto';
90
+ export type { YamlInputDependencyDetailsDto } from './schemas/YamlInputDependencyDetailsDto';
91
+ export type { YamlInputType } from './schemas/YamlInputType';
@@ -4,6 +4,7 @@ export { createTemplatesProject, useCreateTemplatesProjectMutation, } from './ho
4
4
  export { deleteTemplateAcc, useDeleteTemplateAccMutation, } from './hooks/useDeleteTemplateAccMutation';
5
5
  export { deleteTemplateOrg, useDeleteTemplateOrgMutation, } from './hooks/useDeleteTemplateOrgMutation';
6
6
  export { deleteTemplateProject, useDeleteTemplateProjectMutation, } from './hooks/useDeleteTemplateProjectMutation';
7
+ export { getInputsSchema, useGetInputsSchemaMutation } from './hooks/useGetInputsSchemaMutation';
7
8
  export { getTemplateAcc, useGetTemplateAccQuery } from './hooks/useGetTemplateAccQuery';
8
9
  export { getTemplateOrg, useGetTemplateOrgQuery } from './hooks/useGetTemplateOrgQuery';
9
10
  export { getTemplateProject, useGetTemplateProjectQuery } from './hooks/useGetTemplateProjectQuery';
@@ -0,0 +1,2 @@
1
+ import type { TemplateInputsSchemaRequestBody } from '../schemas/TemplateInputsSchemaRequestBody';
2
+ export type TemplateInputsSchemaRequestBodyRequestBody = TemplateInputsSchemaRequestBody;
@@ -0,0 +1,2 @@
1
+ import type { TemplateInputSchemaDetailsResponseBody } from '../schemas/TemplateInputSchemaDetailsResponseBody';
2
+ export type TemplateInputSchemaDetailsResponseBodyResponse = TemplateInputSchemaDetailsResponseBody;
@@ -0,0 +1,5 @@
1
+ export interface FixedValueFieldDependencyDetailsDto {
2
+ field_input_type?: string;
3
+ field_name?: string;
4
+ field_value?: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface InputDetailsPerFieldDto {
2
+ entity_type?: {};
3
+ input_type?: string;
4
+ internal_type?: string;
5
+ stage_type?: string;
6
+ }
@@ -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,4 @@
1
+ export interface RuntimeInputDependencyDetailsDto {
2
+ field_name?: string;
3
+ input_name?: string;
4
+ }
@@ -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,11 +7,33 @@ export interface TemplateCreateRequestBody {
7
7
  * Specify comment with respect to changes
8
8
  */
9
9
  comments?: string;
10
+ /**
11
+ * Pipeline description
12
+ */
13
+ description?: string;
10
14
  git_details?: GitCreateDetails;
15
+ /**
16
+ * Template identifier
17
+ */
18
+ identifier?: string;
11
19
  /**
12
20
  * True if given version for template to be set as stable
13
21
  */
14
22
  is_stable?: boolean;
23
+ /**
24
+ * Template version label
25
+ */
26
+ label?: string;
27
+ /**
28
+ * Template name
29
+ */
30
+ name?: string;
31
+ /**
32
+ * Template tags
33
+ */
34
+ tags?: {
35
+ [key: string]: string;
36
+ };
15
37
  /**
16
38
  * Yaml for creating new Template
17
39
  */
@@ -0,0 +1,4 @@
1
+ import type { TemplateYamlInputDetailsDto } from '../schemas/TemplateYamlInputDetailsDto';
2
+ export interface TemplateInputSchemaDetailsResponseBody {
3
+ inputs?: TemplateYamlInputDetailsDto[];
4
+ }
@@ -0,0 +1,3 @@
1
+ export interface TemplateInputsSchemaRequestBody {
2
+ template_yaml?: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -74,4 +74,8 @@ export interface TemplateMetadataSummaryResponse {
74
74
  * Version label of template
75
75
  */
76
76
  version_label?: string;
77
+ /**
78
+ * Specifies the yaml version of the template
79
+ */
80
+ yaml_version?: string;
77
81
  }
@@ -78,4 +78,8 @@ export interface TemplateResponse {
78
78
  * Yaml related to template
79
79
  */
80
80
  yaml: string;
81
+ /**
82
+ * Specifies the yaml version of the template
83
+ */
84
+ yaml_version?: string;
81
85
  }
@@ -7,7 +7,29 @@ export interface TemplateUpdateRequestBody {
7
7
  * Specify comment with respect to changes
8
8
  */
9
9
  comments?: string;
10
+ /**
11
+ * Pipeline description
12
+ */
13
+ description?: string;
10
14
  git_details?: GitUpdateDetails;
15
+ /**
16
+ * Template identifier
17
+ */
18
+ identifier?: string;
19
+ /**
20
+ * Template version label
21
+ */
22
+ label?: string;
23
+ /**
24
+ * Template name
25
+ */
26
+ name?: string;
27
+ /**
28
+ * Template tags
29
+ */
30
+ tags?: {
31
+ [key: string]: string;
32
+ };
11
33
  /**
12
34
  * Yaml for updating existing Template
13
35
  */
@@ -0,0 +1,6 @@
1
+ import type { TemplateYamlInputDto } from '../schemas/TemplateYamlInputDto';
2
+ import type { TemplateYamlInputMetadataDto } from '../schemas/TemplateYamlInputMetadataDto';
3
+ export interface TemplateYamlInputDetailsDto {
4
+ details?: TemplateYamlInputDto;
5
+ metadata?: TemplateYamlInputMetadataDto;
6
+ }
@@ -0,0 +1,11 @@
1
+ import type { YamlInputType } from '../schemas/YamlInputType';
2
+ export interface TemplateYamlInputDto {
3
+ allowed_values?: Array<{}>;
4
+ default?: {
5
+ [key: string]: any;
6
+ };
7
+ description?: string;
8
+ name?: string;
9
+ required?: boolean;
10
+ type?: YamlInputType;
11
+ }
@@ -0,0 +1,6 @@
1
+ import type { YamlInputDependencyDetailsDto } from '../schemas/YamlInputDependencyDetailsDto';
2
+ import type { InputDetailsPerFieldDto } from '../schemas/InputDetailsPerFieldDto';
3
+ export interface TemplateYamlInputMetadataDto {
4
+ dependencies?: YamlInputDependencyDetailsDto;
5
+ field_properties?: InputDetailsPerFieldDto[];
6
+ }
@@ -0,0 +1,6 @@
1
+ import type { FixedValueFieldDependencyDetailsDto } from '../schemas/FixedValueFieldDependencyDetailsDto';
2
+ import type { RuntimeInputDependencyDetailsDto } from '../schemas/RuntimeInputDependencyDetailsDto';
3
+ export interface YamlInputDependencyDetailsDto {
4
+ required_fixed_values?: FixedValueFieldDependencyDetailsDto[];
5
+ required_runtime_inputs?: RuntimeInputDependencyDetailsDto[];
6
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ *
3
+ */
4
+ export interface YamlInputType {
5
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-template-service-client",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Harness React template service client - Template APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",