@harnessio/react-template-service-client 0.4.0 → 0.6.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 (22) hide show
  1. package/dist/template-service/src/services/hooks/useGetTemplateSchemaQuery.d.ts +1 -1
  2. package/dist/template-service/src/services/hooks/useListNotificationRulesWithUnresolvedInputsMutation.d.ts +23 -0
  3. package/dist/template-service/src/services/hooks/useListNotificationRulesWithUnresolvedInputsMutation.js +14 -0
  4. package/dist/template-service/src/services/hooks/useValidateNotificationRulesWithUnresolvedInputsMutation.d.ts +23 -0
  5. package/dist/template-service/src/services/hooks/useValidateNotificationRulesWithUnresolvedInputsMutation.js +14 -0
  6. package/dist/template-service/src/services/index.d.ts +11 -0
  7. package/dist/template-service/src/services/index.js +2 -0
  8. package/dist/template-service/src/services/requestBodies/NotificationTemplateReconcileRequestBodyRequestBody.d.ts +2 -0
  9. package/dist/template-service/src/services/requestBodies/NotificationTemplateReconcileRequestBodyRequestBody.js +1 -0
  10. package/dist/template-service/src/services/responses/NotificationTemplateValidateResponseBodyResponse.d.ts +2 -0
  11. package/dist/template-service/src/services/responses/NotificationTemplateValidateResponseBodyResponse.js +1 -0
  12. package/dist/template-service/src/services/responses/UnresolvedNotificationRulesResponseBodyResponse.d.ts +2 -0
  13. package/dist/template-service/src/services/responses/UnresolvedNotificationRulesResponseBodyResponse.js +1 -0
  14. package/dist/template-service/src/services/schemas/NotificationRulesData.d.ts +3 -0
  15. package/dist/template-service/src/services/schemas/NotificationRulesData.js +4 -0
  16. package/dist/template-service/src/services/schemas/NotificationTemplateReconcileRequestBody.d.ts +6 -0
  17. package/dist/template-service/src/services/schemas/NotificationTemplateReconcileRequestBody.js +4 -0
  18. package/dist/template-service/src/services/schemas/NotificationTemplateValidateResponseBody.d.ts +3 -0
  19. package/dist/template-service/src/services/schemas/NotificationTemplateValidateResponseBody.js +4 -0
  20. package/dist/template-service/src/services/schemas/UnresolvedNotificationRulesResponseBody.d.ts +4 -0
  21. package/dist/template-service/src/services/schemas/UnresolvedNotificationRulesResponseBody.js +1 -0
  22. package/package.json +1 -1
@@ -3,7 +3,7 @@ import type { TemplateSchemaResponseResponse } from '../responses/TemplateSchema
3
3
  import type { ResponseWithPagination } from '../helpers';
4
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
5
5
  export interface GetTemplateSchemaQueryQueryParams {
6
- node_group?: 'artifactsource' | 'artifactsourcetemplate' | 'customdeployment' | 'group' | 'monitoredservice' | 'pipeline' | 'secretmanager' | 'stage' | 'step' | 'stepgroup' | 'template' | 'workspace';
6
+ node_group?: 'artifactsource' | 'artifactsourcetemplate' | 'customdeployment' | 'group' | 'monitoredservice' | 'notification' | 'pipeline' | 'secretmanager' | 'stage' | 'step' | 'stepgroup' | 'template' | 'workspace';
7
7
  node_type?: string;
8
8
  /**
9
9
  * @default "v0"
@@ -0,0 +1,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { UnresolvedNotificationRulesResponseBodyResponse } from '../responses/UnresolvedNotificationRulesResponseBodyResponse';
3
+ import type { NotificationTemplateReconcileRequestBodyRequestBody } from '../requestBodies/NotificationTemplateReconcileRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ListNotificationRulesWithUnresolvedInputsMutationQueryParams {
7
+ global_template?: boolean;
8
+ }
9
+ export interface ListNotificationRulesWithUnresolvedInputsMutationHeaderParams {
10
+ 'Harness-Account'?: string;
11
+ }
12
+ export type ListNotificationRulesWithUnresolvedInputsRequestBody = NotificationTemplateReconcileRequestBodyRequestBody;
13
+ export type ListNotificationRulesWithUnresolvedInputsOkResponse = ResponseWithPagination<UnresolvedNotificationRulesResponseBodyResponse>;
14
+ export type ListNotificationRulesWithUnresolvedInputsErrorResponse = unknown;
15
+ export interface ListNotificationRulesWithUnresolvedInputsProps extends Omit<FetcherOptions<ListNotificationRulesWithUnresolvedInputsMutationQueryParams, ListNotificationRulesWithUnresolvedInputsRequestBody, ListNotificationRulesWithUnresolvedInputsMutationHeaderParams>, 'url'> {
16
+ queryParams: ListNotificationRulesWithUnresolvedInputsMutationQueryParams;
17
+ body: ListNotificationRulesWithUnresolvedInputsRequestBody;
18
+ }
19
+ export declare function listNotificationRulesWithUnresolvedInputs(props: ListNotificationRulesWithUnresolvedInputsProps): Promise<ListNotificationRulesWithUnresolvedInputsOkResponse>;
20
+ /**
21
+ * API for retrieving notification rules with unresolved input variables
22
+ */
23
+ export declare function useListNotificationRulesWithUnresolvedInputsMutation(options?: Omit<UseMutationOptions<ListNotificationRulesWithUnresolvedInputsOkResponse, ListNotificationRulesWithUnresolvedInputsErrorResponse, ListNotificationRulesWithUnresolvedInputsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ListNotificationRulesWithUnresolvedInputsOkResponse, unknown, ListNotificationRulesWithUnresolvedInputsProps, 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 listNotificationRulesWithUnresolvedInputs(props) {
7
+ return fetcher(Object.assign({ url: `/v1/common/templates/notification-rules/unresolved-inputs`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * API for retrieving notification rules with unresolved input variables
11
+ */
12
+ export function useListNotificationRulesWithUnresolvedInputsMutation(options) {
13
+ return useMutation((mutateProps) => listNotificationRulesWithUnresolvedInputs(mutateProps), options);
14
+ }
@@ -0,0 +1,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { NotificationTemplateValidateResponseBodyResponse } from '../responses/NotificationTemplateValidateResponseBodyResponse';
3
+ import type { NotificationTemplateReconcileRequestBodyRequestBody } from '../requestBodies/NotificationTemplateReconcileRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ValidateNotificationRulesWithUnresolvedInputsMutationQueryParams {
7
+ global_template?: boolean;
8
+ }
9
+ export interface ValidateNotificationRulesWithUnresolvedInputsMutationHeaderParams {
10
+ 'Harness-Account'?: string;
11
+ }
12
+ export type ValidateNotificationRulesWithUnresolvedInputsRequestBody = NotificationTemplateReconcileRequestBodyRequestBody;
13
+ export type ValidateNotificationRulesWithUnresolvedInputsOkResponse = ResponseWithPagination<NotificationTemplateValidateResponseBodyResponse>;
14
+ export type ValidateNotificationRulesWithUnresolvedInputsErrorResponse = unknown;
15
+ export interface ValidateNotificationRulesWithUnresolvedInputsProps extends Omit<FetcherOptions<ValidateNotificationRulesWithUnresolvedInputsMutationQueryParams, ValidateNotificationRulesWithUnresolvedInputsRequestBody, ValidateNotificationRulesWithUnresolvedInputsMutationHeaderParams>, 'url'> {
16
+ queryParams: ValidateNotificationRulesWithUnresolvedInputsMutationQueryParams;
17
+ body: ValidateNotificationRulesWithUnresolvedInputsRequestBody;
18
+ }
19
+ export declare function validateNotificationRulesWithUnresolvedInputs(props: ValidateNotificationRulesWithUnresolvedInputsProps): Promise<ValidateNotificationRulesWithUnresolvedInputsOkResponse>;
20
+ /**
21
+ * API for validating notification rules with unresolved input variables
22
+ */
23
+ export declare function useValidateNotificationRulesWithUnresolvedInputsMutation(options?: Omit<UseMutationOptions<ValidateNotificationRulesWithUnresolvedInputsOkResponse, ValidateNotificationRulesWithUnresolvedInputsErrorResponse, ValidateNotificationRulesWithUnresolvedInputsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ValidateNotificationRulesWithUnresolvedInputsOkResponse, unknown, ValidateNotificationRulesWithUnresolvedInputsProps, 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 validateNotificationRulesWithUnresolvedInputs(props) {
7
+ return fetcher(Object.assign({ url: `/v1/common/templates/notification-rules/validate`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * API for validating notification rules with unresolved input variables
11
+ */
12
+ export function useValidateNotificationRulesWithUnresolvedInputsMutation(options) {
13
+ return useMutation((mutateProps) => validateNotificationRulesWithUnresolvedInputs(mutateProps), options);
14
+ }
@@ -45,6 +45,8 @@ export type { ImportTemplateOrgErrorResponse, ImportTemplateOrgMutationPathParam
45
45
  export { importTemplateOrg, useImportTemplateOrgMutation, } from './hooks/useImportTemplateOrgMutation';
46
46
  export type { ImportTemplateProjectErrorResponse, ImportTemplateProjectMutationPathParams, ImportTemplateProjectOkResponse, ImportTemplateProjectProps, ImportTemplateProjectRequestBody, } from './hooks/useImportTemplateProjectMutation';
47
47
  export { importTemplateProject, useImportTemplateProjectMutation, } from './hooks/useImportTemplateProjectMutation';
48
+ export type { ListNotificationRulesWithUnresolvedInputsErrorResponse, ListNotificationRulesWithUnresolvedInputsMutationQueryParams, ListNotificationRulesWithUnresolvedInputsOkResponse, ListNotificationRulesWithUnresolvedInputsProps, ListNotificationRulesWithUnresolvedInputsRequestBody, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
49
+ export { listNotificationRulesWithUnresolvedInputs, useListNotificationRulesWithUnresolvedInputsMutation, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
48
50
  export type { UpdateGitMetadataDetailsErrorResponse, UpdateGitMetadataDetailsMutationPathParams, UpdateGitMetadataDetailsOkResponse, UpdateGitMetadataDetailsProps, UpdateGitMetadataDetailsRequestBody, } from './hooks/useUpdateGitMetadataDetailsMutation';
49
51
  export { updateGitMetadataDetails, useUpdateGitMetadataDetailsMutation, } from './hooks/useUpdateGitMetadataDetailsMutation';
50
52
  export type { UpdateGitMetadataDetailsOrgErrorResponse, UpdateGitMetadataDetailsOrgMutationPathParams, UpdateGitMetadataDetailsOrgOkResponse, UpdateGitMetadataDetailsOrgProps, UpdateGitMetadataDetailsOrgRequestBody, } from './hooks/useUpdateGitMetadataDetailsOrgMutation';
@@ -63,12 +65,16 @@ export type { UpdateTemplateStableOrgErrorResponse, UpdateTemplateStableOrgMutat
63
65
  export { updateTemplateStableOrg, useUpdateTemplateStableOrgMutation, } from './hooks/useUpdateTemplateStableOrgMutation';
64
66
  export type { UpdateTemplateStableProjectErrorResponse, UpdateTemplateStableProjectMutationPathParams, UpdateTemplateStableProjectOkResponse, UpdateTemplateStableProjectProps, UpdateTemplateStableProjectRequestBody, } from './hooks/useUpdateTemplateStableProjectMutation';
65
67
  export { updateTemplateStableProject, useUpdateTemplateStableProjectMutation, } from './hooks/useUpdateTemplateStableProjectMutation';
68
+ export type { ValidateNotificationRulesWithUnresolvedInputsErrorResponse, ValidateNotificationRulesWithUnresolvedInputsMutationQueryParams, ValidateNotificationRulesWithUnresolvedInputsOkResponse, ValidateNotificationRulesWithUnresolvedInputsProps, ValidateNotificationRulesWithUnresolvedInputsRequestBody, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
69
+ export { useValidateNotificationRulesWithUnresolvedInputsMutation, validateNotificationRulesWithUnresolvedInputs, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
70
+ export type { NotificationTemplateReconcileRequestBodyRequestBody } from './requestBodies/NotificationTemplateReconcileRequestBodyRequestBody';
66
71
  export type { TemplateCreateBodyRequestBody } from './requestBodies/TemplateCreateBodyRequestBody';
67
72
  export type { TemplateFetchBodyRequestBody } from './requestBodies/TemplateFetchBodyRequestBody';
68
73
  export type { TemplateImportRequestBodyRequestBody } from './requestBodies/TemplateImportRequestBodyRequestBody';
69
74
  export type { TemplateInputsSchemaRequestBodyRequestBody } from './requestBodies/TemplateInputsSchemaRequestBodyRequestBody';
70
75
  export type { TemplateUpdateBodyRequestBody } from './requestBodies/TemplateUpdateBodyRequestBody';
71
76
  export type { TemplateUpdateGitMetadataRequestBodyRequestBody } from './requestBodies/TemplateUpdateGitMetadataRequestBodyRequestBody';
77
+ export type { NotificationTemplateValidateResponseBodyResponse } from './responses/NotificationTemplateValidateResponseBodyResponse';
72
78
  export type { TemplateImportResponseBodyResponse } from './responses/TemplateImportResponseBodyResponse';
73
79
  export type { TemplateInputSchemaDetailsResponseBodyResponse } from './responses/TemplateInputSchemaDetailsResponseBodyResponse';
74
80
  export type { TemplateMetaDataListResponse } from './responses/TemplateMetaDataListResponse';
@@ -77,6 +83,7 @@ export type { TemplateSchemaResponseResponse } from './responses/TemplateSchemaR
77
83
  export type { TemplateUpdateGitMetadataResponseResponse } from './responses/TemplateUpdateGitMetadataResponseResponse';
78
84
  export type { TemplateUpdateStableResponseResponse } from './responses/TemplateUpdateStableResponseResponse';
79
85
  export type { TemplateWithInputsResponseResponse } from './responses/TemplateWithInputsResponseResponse';
86
+ export type { UnresolvedNotificationRulesResponseBodyResponse } from './responses/UnresolvedNotificationRulesResponseBodyResponse';
80
87
  export type { EntityGitDetails } from './schemas/EntityGitDetails';
81
88
  export type { FixedValueFieldDependencyDetailsDto } from './schemas/FixedValueFieldDependencyDetailsDto';
82
89
  export type { GitCreateDetails } from './schemas/GitCreateDetails';
@@ -85,6 +92,9 @@ export type { GitFindDetails } from './schemas/GitFindDetails';
85
92
  export type { GitImportDetails } from './schemas/GitImportDetails';
86
93
  export type { GitUpdateDetails } from './schemas/GitUpdateDetails';
87
94
  export type { InputDetailsDto } from './schemas/InputDetailsDto';
95
+ export type { NotificationRulesData } from './schemas/NotificationRulesData';
96
+ export type { NotificationTemplateReconcileRequestBody } from './schemas/NotificationTemplateReconcileRequestBody';
97
+ export type { NotificationTemplateValidateResponseBody } from './schemas/NotificationTemplateValidateResponseBody';
88
98
  export type { RuntimeInputDependencyDetailsDto } from './schemas/RuntimeInputDependencyDetailsDto';
89
99
  export type { TemplateCreateRequestBody } from './schemas/TemplateCreateRequestBody';
90
100
  export type { TemplateImportRequestBody } from './schemas/TemplateImportRequestBody';
@@ -103,5 +113,6 @@ export type { TemplateWithInputsResponse } from './schemas/TemplateWithInputsRes
103
113
  export type { TemplateYamlInputDetailsDto } from './schemas/TemplateYamlInputDetailsDto';
104
114
  export type { TemplateYamlInputDto } from './schemas/TemplateYamlInputDto';
105
115
  export type { TemplateYamlInputMetadataDto } from './schemas/TemplateYamlInputMetadataDto';
116
+ export type { UnresolvedNotificationRulesResponseBody } from './schemas/UnresolvedNotificationRulesResponseBody';
106
117
  export type { YamlInputDependencyDetailsDto } from './schemas/YamlInputDependencyDetailsDto';
107
118
  export type { YamlInputType } from './schemas/YamlInputType';
@@ -21,6 +21,7 @@ export { getTemplatesListProject, useGetTemplatesListProjectQuery, } from './hoo
21
21
  export { importTemplateAcc, useImportTemplateAccMutation, } from './hooks/useImportTemplateAccMutation';
22
22
  export { importTemplateOrg, useImportTemplateOrgMutation, } from './hooks/useImportTemplateOrgMutation';
23
23
  export { importTemplateProject, useImportTemplateProjectMutation, } from './hooks/useImportTemplateProjectMutation';
24
+ export { listNotificationRulesWithUnresolvedInputs, useListNotificationRulesWithUnresolvedInputsMutation, } from './hooks/useListNotificationRulesWithUnresolvedInputsMutation';
24
25
  export { updateGitMetadataDetails, useUpdateGitMetadataDetailsMutation, } from './hooks/useUpdateGitMetadataDetailsMutation';
25
26
  export { updateGitMetadataDetailsOrg, useUpdateGitMetadataDetailsOrgMutation, } from './hooks/useUpdateGitMetadataDetailsOrgMutation';
26
27
  export { updateGitMetadataDetailsProject, useUpdateGitMetadataDetailsProjectMutation, } from './hooks/useUpdateGitMetadataDetailsProjectMutation';
@@ -30,3 +31,4 @@ export { updateTemplateProject, useUpdateTemplateProjectMutation, } from './hook
30
31
  export { updateTemplateStableAcc, useUpdateTemplateStableAccMutation, } from './hooks/useUpdateTemplateStableAccMutation';
31
32
  export { updateTemplateStableOrg, useUpdateTemplateStableOrgMutation, } from './hooks/useUpdateTemplateStableOrgMutation';
32
33
  export { updateTemplateStableProject, useUpdateTemplateStableProjectMutation, } from './hooks/useUpdateTemplateStableProjectMutation';
34
+ export { useValidateNotificationRulesWithUnresolvedInputsMutation, validateNotificationRulesWithUnresolvedInputs, } from './hooks/useValidateNotificationRulesWithUnresolvedInputsMutation';
@@ -0,0 +1,2 @@
1
+ import type { NotificationTemplateReconcileRequestBody } from '../schemas/NotificationTemplateReconcileRequestBody';
2
+ export type NotificationTemplateReconcileRequestBodyRequestBody = NotificationTemplateReconcileRequestBody;
@@ -0,0 +1,2 @@
1
+ import type { NotificationTemplateValidateResponseBody } from '../schemas/NotificationTemplateValidateResponseBody';
2
+ export type NotificationTemplateValidateResponseBodyResponse = NotificationTemplateValidateResponseBody;
@@ -0,0 +1,2 @@
1
+ import type { UnresolvedNotificationRulesResponseBody } from '../schemas/UnresolvedNotificationRulesResponseBody';
2
+ export type UnresolvedNotificationRulesResponseBodyResponse = UnresolvedNotificationRulesResponseBody;
@@ -0,0 +1,3 @@
1
+ export interface NotificationRulesData {
2
+ notification_rule_id?: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Please provide pipeline input YAML, which has the notification template which needs to be populated with input values.
3
+ */
4
+ export interface NotificationTemplateReconcileRequestBody {
5
+ yaml?: 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,3 @@
1
+ export interface NotificationTemplateValidateResponseBody {
2
+ is_invalid?: boolean;
3
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { NotificationRulesData } from '../schemas/NotificationRulesData';
2
+ export interface UnresolvedNotificationRulesResponseBody {
3
+ notification_rules?: NotificationRulesData[];
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-template-service-client",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Harness React template service client - Template APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",