@harnessio/react-notification-service-client 0.3.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 (40) hide show
  1. package/dist/notification-service/src/services/hooks/useListNotificationChannelsRefQuery.d.ts +15 -0
  2. package/dist/notification-service/src/services/hooks/useListNotificationRulesRefQuery.d.ts +10 -4
  3. package/dist/notification-service/src/services/hooks/useNotificationResourceListQuery.d.ts +16 -0
  4. package/dist/notification-service/src/services/hooks/useNotificationResourceListQuery.js +14 -0
  5. package/dist/notification-service/src/services/hooks/useValidateNotificationChannelRefMutation.d.ts +37 -0
  6. package/dist/notification-service/src/services/hooks/useValidateNotificationChannelRefMutation.js +30 -0
  7. package/dist/notification-service/src/services/hooks/useValidateNotificationRuleRefMutation.d.ts +37 -0
  8. package/dist/notification-service/src/services/hooks/useValidateNotificationRuleRefMutation.js +30 -0
  9. package/dist/notification-service/src/services/index.d.ts +17 -1
  10. package/dist/notification-service/src/services/index.js +3 -0
  11. package/dist/notification-service/src/services/responses/NotificationResourceListResponse.d.ts +2 -0
  12. package/dist/notification-service/src/services/responses/NotificationResourceListResponse.js +1 -0
  13. package/dist/notification-service/src/services/responses/ValidateRuleIdentifierResponseResponse.d.ts +1 -0
  14. package/dist/notification-service/src/services/responses/ValidateRuleIdentifierResponseResponse.js +1 -0
  15. package/dist/notification-service/src/services/schemas/ChannelDto.d.ts +4 -1
  16. package/dist/notification-service/src/services/schemas/ChannelDto.js +0 -3
  17. package/dist/notification-service/src/services/schemas/ChannelType.d.ts +1 -2
  18. package/dist/notification-service/src/services/schemas/DelegateEventNotificationParamsDto.d.ts +6 -0
  19. package/dist/notification-service/src/services/schemas/DelegateEventNotificationParamsDto.js +1 -0
  20. package/dist/notification-service/src/services/schemas/FrequencyDto.d.ts +4 -0
  21. package/dist/notification-service/src/services/schemas/NotificationChannelDto.d.ts +7 -3
  22. package/dist/notification-service/src/services/schemas/NotificationConditionDto.d.ts +5 -0
  23. package/dist/notification-service/src/services/schemas/NotificationConditionDto.js +1 -0
  24. package/dist/notification-service/src/services/schemas/NotificationEventConfigDto.d.ts +6 -0
  25. package/dist/notification-service/src/services/schemas/NotificationEventConfigDto.js +1 -0
  26. package/dist/notification-service/src/services/schemas/NotificationEventParamsDto.d.ts +7 -0
  27. package/dist/notification-service/src/services/schemas/NotificationEventParamsDto.js +1 -0
  28. package/dist/notification-service/src/services/schemas/NotificationResourceDto.d.ts +8 -0
  29. package/dist/notification-service/src/services/schemas/NotificationResourceDto.js +4 -0
  30. package/dist/notification-service/src/services/schemas/NotificationRuleDto.d.ts +10 -16
  31. package/dist/notification-service/src/services/schemas/ResourceTypeEnum.d.ts +1 -0
  32. package/dist/notification-service/src/services/schemas/ResourceTypeEnum.js +4 -0
  33. package/dist/notification-service/src/services/schemas/Status.d.ts +1 -2
  34. package/dist/notification-service/src/services/schemas/UserGroupDto.d.ts +5 -0
  35. package/dist/notification-service/src/services/schemas/UserGroupDto.js +4 -0
  36. package/dist/notification-service/src/services/schemas/WebHookHeaders.d.ts +4 -0
  37. package/dist/notification-service/src/services/schemas/WebHookHeaders.js +4 -0
  38. package/package.json +1 -1
  39. package/dist/notification-service/src/services/schemas/UserGroup.d.ts +0 -5
  40. /package/dist/notification-service/src/services/schemas/{UserGroup.js → FrequencyDto.js} +0 -0
@@ -13,6 +13,11 @@ export interface ListNotificationChannelsRefAccountQueryParams {
13
13
  sort?: 'created' | 'identifier' | 'name' | 'updated';
14
14
  order?: 'ASC' | 'DESC';
15
15
  notification_channel_type?: string;
16
+ /**
17
+ * @default 0
18
+ */
19
+ page?: number;
20
+ include_parent_scope?: boolean;
16
21
  }
17
22
  export interface ListNotificationChannelsRefAccountHeaderParams {
18
23
  'Harness-Account'?: string;
@@ -31,6 +36,11 @@ export interface ListNotificationChannelsRefOrgQueryParams {
31
36
  sort?: 'created' | 'identifier' | 'name' | 'updated';
32
37
  order?: 'ASC' | 'DESC';
33
38
  notification_channel_type?: string;
39
+ /**
40
+ * @default 0
41
+ */
42
+ page?: number;
43
+ include_parent_scope?: boolean;
34
44
  }
35
45
  export interface ListNotificationChannelsRefOrgHeaderParams {
36
46
  'Harness-Account'?: string;
@@ -50,6 +60,11 @@ export interface ListNotificationChannelsRefProjectQueryParams {
50
60
  sort?: 'created' | 'identifier' | 'name' | 'updated';
51
61
  order?: 'ASC' | 'DESC';
52
62
  notification_channel_type?: string;
63
+ /**
64
+ * @default 0
65
+ */
66
+ page?: number;
67
+ include_parent_scope?: boolean;
53
68
  }
54
69
  export interface ListNotificationChannelsRefProjectHeaderParams {
55
70
  'Harness-Account'?: string;
@@ -16,6 +16,8 @@ export interface ListNotificationRulesRefAccountQueryParams {
16
16
  sort?: 'created' | 'identifier' | 'name' | 'updated';
17
17
  order?: 'ASC' | 'DESC';
18
18
  search_term?: string;
19
+ resource?: string;
20
+ event?: string;
19
21
  }
20
22
  export interface ListNotificationRulesRefAccountHeaderParams {
21
23
  'Harness-Account'?: string;
@@ -37,6 +39,8 @@ export interface ListNotificationRulesRefOrgQueryParams {
37
39
  sort?: 'created' | 'identifier' | 'name' | 'updated';
38
40
  order?: 'ASC' | 'DESC';
39
41
  search_term?: string;
42
+ resource?: string;
43
+ event?: string;
40
44
  }
41
45
  export interface ListNotificationRulesRefOrgHeaderParams {
42
46
  'Harness-Account'?: string;
@@ -48,10 +52,6 @@ export interface ListNotificationRulesRefProjectPathParams {
48
52
  project: string;
49
53
  }
50
54
  export interface ListNotificationRulesRefProjectQueryParams {
51
- /**
52
- * @default 0
53
- */
54
- page?: number;
55
55
  /**
56
56
  * @default 30
57
57
  */
@@ -59,6 +59,12 @@ export interface ListNotificationRulesRefProjectQueryParams {
59
59
  sort?: 'created' | 'identifier' | 'name' | 'updated';
60
60
  order?: 'ASC' | 'DESC';
61
61
  search_term?: string;
62
+ /**
63
+ * @default 0
64
+ */
65
+ page?: number;
66
+ resource?: string;
67
+ event?: string;
62
68
  }
63
69
  export interface ListNotificationRulesRefProjectHeaderParams {
64
70
  'Harness-Account'?: string;
@@ -0,0 +1,16 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { NotificationResourceDto } from '../schemas/NotificationResourceDto';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export interface NotificationResourceListQueryHeaderParams {
6
+ 'Harness-Account'?: string;
7
+ }
8
+ export type NotificationResourceListOkResponse = ResponseWithPagination<NotificationResourceDto[]>;
9
+ export type NotificationResourceListErrorResponse = unknown;
10
+ export interface NotificationResourceListProps extends Omit<FetcherOptions<unknown, unknown, NotificationResourceListQueryHeaderParams>, 'url'> {
11
+ }
12
+ export declare function notificationResourceList(props: NotificationResourceListProps): Promise<NotificationResourceListOkResponse>;
13
+ /**
14
+ * List of notification entities and events
15
+ */
16
+ export declare function useNotificationResourceListQuery(props: NotificationResourceListProps, options?: Omit<UseQueryOptions<NotificationResourceListOkResponse, NotificationResourceListErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<NotificationResourceListOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function notificationResourceList(props) {
7
+ return fetcher(Object.assign({ url: `/v1/notification-resource-list`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * List of notification entities and events
11
+ */
12
+ export function useNotificationResourceListQuery(props, options) {
13
+ return useQuery(['notification-resource-list'], ({ signal }) => notificationResourceList(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,37 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
3
+ import { FetcherOptions } from '../../../../fetcher/index.js';
4
+ export interface ValidateNotificationChannelRefAccountPathParams {
5
+ 'notification-channel': string;
6
+ }
7
+ export interface ValidateNotificationChannelRefAccountHeaderParams {
8
+ 'Harness-Account'?: string;
9
+ }
10
+ export type ValidateNotificationChannelRefAccountOKResponse = unknown;
11
+ export type ValidateNotificationChannelRefAccountErrorResponse = unknown;
12
+ export interface ValidateNotificationChannelRefOrgPathParams {
13
+ org: string;
14
+ 'notification-channel': string;
15
+ }
16
+ export interface ValidateNotificationChannelRefOrgHeaderParams {
17
+ 'Harness-Account'?: string;
18
+ }
19
+ export type ValidateNotificationChannelRefOrgOKResponse = unknown;
20
+ export type ValidateNotificationChannelRefOrgErrorResponse = unknown;
21
+ export interface ValidateNotificationChannelRefProjectPathParams {
22
+ org: string;
23
+ project: string;
24
+ 'notification-channel': string;
25
+ }
26
+ export interface ValidateNotificationChannelRefProjectHeaderParams {
27
+ 'Harness-Account'?: string;
28
+ }
29
+ export type ValidateNotificationChannelRefProjectOKResponse = unknown;
30
+ export type ValidateNotificationChannelRefProjectErrorResponse = unknown;
31
+ export type ValidateNotificationChannelRefOKResponse<T> = T extends ValidateNotificationChannelRefProjectPathParams ? ResponseWithPagination<ValidateNotificationChannelRefProjectOKResponse> : T extends ValidateNotificationChannelRefOrgPathParams ? ResponseWithPagination<ValidateNotificationChannelRefOrgOKResponse> : ResponseWithPagination<ValidateNotificationChannelRefAccountOKResponse>;
32
+ export type ValidateNotificationChannelRefErrorResponse<T> = T extends ValidateNotificationChannelRefProjectPathParams ? ValidateNotificationChannelRefProjectErrorResponse : T extends ValidateNotificationChannelRefOrgPathParams ? ValidateNotificationChannelRefOrgErrorResponse : ValidateNotificationChannelRefAccountErrorResponse;
33
+ export interface ValidateNotificationChannelRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
34
+ pathParams: ValidateNotificationChannelRefAccountPathParams | ValidateNotificationChannelRefOrgPathParams | ValidateNotificationChannelRefProjectPathParams;
35
+ }
36
+ export declare function validateNotificationChannelRef<T extends ValidateNotificationChannelRefProps = ValidateNotificationChannelRefProps>(props: T): Promise<ValidateNotificationChannelRefOKResponse<GetPathParamsType<T>>>;
37
+ export declare function useValidateNotificationChannelRefMutation(options?: Omit<UseMutationOptions<ValidateNotificationChannelRefOKResponse<unknown>, ValidateNotificationChannelRefErrorResponse<unknown>, ValidateNotificationChannelRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<unknown>, unknown, ValidateNotificationChannelRefProps, 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 validateNotificationChannelRef(props) {
15
+ let url = `/v1/validate-channels/${props.pathParams['notification-channel']}`;
16
+ let method = 'GET';
17
+ if (isProjectPathParams(props.pathParams)) {
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/validate-channels/${props.pathParams['notification-channel']}`;
19
+ method = 'GET';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/validate-channels/${props.pathParams['notification-channel']}`;
23
+ method = 'GET';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useValidateNotificationChannelRefMutation(options) {
29
+ return useMutation((mutateProps) => validateNotificationChannelRef(mutateProps), options);
30
+ }
@@ -0,0 +1,37 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
3
+ import { FetcherOptions } from '../../../../fetcher/index.js';
4
+ export interface ValidateNotificationRuleRefAccountPathParams {
5
+ 'notification-rule': string;
6
+ }
7
+ export interface ValidateNotificationRuleRefAccountHeaderParams {
8
+ 'Harness-Account'?: string;
9
+ }
10
+ export type ValidateNotificationRuleRefAccountOKResponse = unknown;
11
+ export type ValidateNotificationRuleRefAccountErrorResponse = unknown;
12
+ export interface ValidateNotificationRuleRefOrgPathParams {
13
+ org: string;
14
+ 'notification-rule': string;
15
+ }
16
+ export interface ValidateNotificationRuleRefOrgHeaderParams {
17
+ 'Harness-Account'?: string;
18
+ }
19
+ export type ValidateNotificationRuleRefOrgOKResponse = unknown;
20
+ export type ValidateNotificationRuleRefOrgErrorResponse = unknown;
21
+ export interface ValidateNotificationRuleRefProjectPathParams {
22
+ org: string;
23
+ project: string;
24
+ 'notification-rule': string;
25
+ }
26
+ export interface ValidateNotificationRuleRefProjectHeaderParams {
27
+ 'Harness-Account'?: string;
28
+ }
29
+ export type ValidateNotificationRuleRefProjectOKResponse = unknown;
30
+ export type ValidateNotificationRuleRefProjectErrorResponse = unknown;
31
+ export type ValidateNotificationRuleRefOKResponse<T> = T extends ValidateNotificationRuleRefProjectPathParams ? ResponseWithPagination<ValidateNotificationRuleRefProjectOKResponse> : T extends ValidateNotificationRuleRefOrgPathParams ? ResponseWithPagination<ValidateNotificationRuleRefOrgOKResponse> : ResponseWithPagination<ValidateNotificationRuleRefAccountOKResponse>;
32
+ export type ValidateNotificationRuleRefErrorResponse<T> = T extends ValidateNotificationRuleRefProjectPathParams ? ValidateNotificationRuleRefProjectErrorResponse : T extends ValidateNotificationRuleRefOrgPathParams ? ValidateNotificationRuleRefOrgErrorResponse : ValidateNotificationRuleRefAccountErrorResponse;
33
+ export interface ValidateNotificationRuleRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
34
+ pathParams: ValidateNotificationRuleRefAccountPathParams | ValidateNotificationRuleRefOrgPathParams | ValidateNotificationRuleRefProjectPathParams;
35
+ }
36
+ export declare function validateNotificationRuleRef<T extends ValidateNotificationRuleRefProps = ValidateNotificationRuleRefProps>(props: T): Promise<ValidateNotificationRuleRefOKResponse<GetPathParamsType<T>>>;
37
+ export declare function useValidateNotificationRuleRefMutation(options?: Omit<UseMutationOptions<ValidateNotificationRuleRefOKResponse<unknown>, ValidateNotificationRuleRefErrorResponse<unknown>, ValidateNotificationRuleRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<unknown>, unknown, ValidateNotificationRuleRefProps, 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 validateNotificationRuleRef(props) {
15
+ let url = `/v1/validate-rules/${props.pathParams['notification-rule']}`;
16
+ let method = 'GET';
17
+ if (isProjectPathParams(props.pathParams)) {
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/notification-rules/validate/${props.pathParams['notification-rule']}`;
19
+ method = 'GET';
20
+ }
21
+ else if (isOrgPathParams(props.pathParams)) {
22
+ url = `/v1/orgs/${props.pathParams.org}/validate-rules/${props.pathParams['notification-rule']}`;
23
+ method = 'GET';
24
+ }
25
+ return fetcher(Object.assign({ url,
26
+ method }, props));
27
+ }
28
+ export function useValidateNotificationRuleRefMutation(options) {
29
+ return useMutation((mutateProps) => validateNotificationRuleRef(mutateProps), options);
30
+ }
@@ -23,19 +23,35 @@ export type { ListNotificationChannelsRefAccountErrorResponse, ListNotificationC
23
23
  export { listNotificationChannelsRef, useListNotificationChannelsRefQuery, } from './hooks/useListNotificationChannelsRefQuery';
24
24
  export type { ListNotificationRulesRefAccountErrorResponse, ListNotificationRulesRefAccountOKResponse, ListNotificationRulesRefAccountQueryParams, ListNotificationRulesRefOrgErrorResponse, ListNotificationRulesRefOrgOKResponse, ListNotificationRulesRefOrgPathParams, ListNotificationRulesRefOrgQueryParams, ListNotificationRulesRefProjectErrorResponse, ListNotificationRulesRefProjectOKResponse, ListNotificationRulesRefProjectPathParams, ListNotificationRulesRefProjectQueryParams, ListNotificationRulesRefProps, } from './hooks/useListNotificationRulesRefQuery';
25
25
  export { listNotificationRulesRef, useListNotificationRulesRefQuery, } from './hooks/useListNotificationRulesRefQuery';
26
+ export type { NotificationResourceListErrorResponse, NotificationResourceListOkResponse, NotificationResourceListProps, } from './hooks/useNotificationResourceListQuery';
27
+ export { notificationResourceList, useNotificationResourceListQuery, } from './hooks/useNotificationResourceListQuery';
26
28
  export type { UpdateNotificationChannelRefAccountErrorResponse, UpdateNotificationChannelRefAccountOKResponse, UpdateNotificationChannelRefAccountPathParams, UpdateNotificationChannelRefAccountRequestBody, UpdateNotificationChannelRefOrgErrorResponse, UpdateNotificationChannelRefOrgOKResponse, UpdateNotificationChannelRefOrgPathParams, UpdateNotificationChannelRefOrgRequestBody, UpdateNotificationChannelRefProjectErrorResponse, UpdateNotificationChannelRefProjectOKResponse, UpdateNotificationChannelRefProjectPathParams, UpdateNotificationChannelRefProjectRequestBody, UpdateNotificationChannelRefProps, } from './hooks/useUpdateNotificationChannelRefMutation';
27
29
  export { updateNotificationChannelRef, useUpdateNotificationChannelRefMutation, } from './hooks/useUpdateNotificationChannelRefMutation';
28
30
  export type { UpdateNotificationRuleRefAccountErrorResponse, UpdateNotificationRuleRefAccountOKResponse, UpdateNotificationRuleRefAccountPathParams, UpdateNotificationRuleRefAccountRequestBody, UpdateNotificationRuleRefOrgErrorResponse, UpdateNotificationRuleRefOrgOKResponse, UpdateNotificationRuleRefOrgPathParams, UpdateNotificationRuleRefOrgRequestBody, UpdateNotificationRuleRefProjectErrorResponse, UpdateNotificationRuleRefProjectOKResponse, UpdateNotificationRuleRefProjectPathParams, UpdateNotificationRuleRefProjectRequestBody, UpdateNotificationRuleRefProps, } from './hooks/useUpdateNotificationRuleRefMutation';
29
31
  export { updateNotificationRuleRef, useUpdateNotificationRuleRefMutation, } from './hooks/useUpdateNotificationRuleRefMutation';
32
+ export type { ValidateNotificationChannelRefAccountErrorResponse, ValidateNotificationChannelRefAccountOKResponse, ValidateNotificationChannelRefAccountPathParams, ValidateNotificationChannelRefOrgErrorResponse, ValidateNotificationChannelRefOrgOKResponse, ValidateNotificationChannelRefOrgPathParams, ValidateNotificationChannelRefProjectErrorResponse, ValidateNotificationChannelRefProjectOKResponse, ValidateNotificationChannelRefProjectPathParams, ValidateNotificationChannelRefProps, } from './hooks/useValidateNotificationChannelRefMutation';
33
+ export { useValidateNotificationChannelRefMutation, validateNotificationChannelRef, } from './hooks/useValidateNotificationChannelRefMutation';
34
+ export type { ValidateNotificationRuleRefAccountErrorResponse, ValidateNotificationRuleRefAccountOKResponse, ValidateNotificationRuleRefAccountPathParams, ValidateNotificationRuleRefOrgErrorResponse, ValidateNotificationRuleRefOrgOKResponse, ValidateNotificationRuleRefOrgPathParams, ValidateNotificationRuleRefProjectErrorResponse, ValidateNotificationRuleRefProjectOKResponse, ValidateNotificationRuleRefProjectPathParams, ValidateNotificationRuleRefProps, } from './hooks/useValidateNotificationRuleRefMutation';
35
+ export { useValidateNotificationRuleRefMutation, validateNotificationRuleRef, } from './hooks/useValidateNotificationRuleRefMutation';
30
36
  export type { NotificationChannelRequestRequestBody } from './requestBodies/NotificationChannelRequestRequestBody';
31
37
  export type { NotificationRuleRequestRequestBody } from './requestBodies/NotificationRuleRequestRequestBody';
32
38
  export type { NotificationChannelListResponseResponse } from './responses/NotificationChannelListResponseResponse';
33
39
  export type { NotificationChannelResponseResponse } from './responses/NotificationChannelResponseResponse';
40
+ export type { NotificationResourceListResponse } from './responses/NotificationResourceListResponse';
34
41
  export type { NotificationRuleListResponseResponse } from './responses/NotificationRuleListResponseResponse';
35
42
  export type { NotificationRuleResponseResponse } from './responses/NotificationRuleResponseResponse';
43
+ export type { ValidateRuleIdentifierResponseResponse } from './responses/ValidateRuleIdentifierResponseResponse';
36
44
  export type { ChannelDto } from './schemas/ChannelDto';
37
45
  export type { ChannelType } from './schemas/ChannelType';
46
+ export type { DelegateEventNotificationParamsDto } from './schemas/DelegateEventNotificationParamsDto';
47
+ export type { FrequencyDto } from './schemas/FrequencyDto';
38
48
  export type { NotificationChannelDto } from './schemas/NotificationChannelDto';
49
+ export type { NotificationConditionDto } from './schemas/NotificationConditionDto';
50
+ export type { NotificationEventConfigDto } from './schemas/NotificationEventConfigDto';
51
+ export type { NotificationEventParamsDto } from './schemas/NotificationEventParamsDto';
52
+ export type { NotificationResourceDto } from './schemas/NotificationResourceDto';
39
53
  export type { NotificationRuleDto } from './schemas/NotificationRuleDto';
54
+ export type { ResourceTypeEnum } from './schemas/ResourceTypeEnum';
40
55
  export type { Status } from './schemas/Status';
41
- export type { UserGroup } from './schemas/UserGroup';
56
+ export type { UserGroupDto } from './schemas/UserGroupDto';
57
+ export type { WebHookHeaders } from './schemas/WebHookHeaders';
@@ -10,5 +10,8 @@ export { getNotificationRuleOrg, useGetNotificationRuleOrgQuery, } from './hooks
10
10
  export { getNotificationRule, useGetNotificationRuleQuery, } from './hooks/useGetNotificationRuleQuery';
11
11
  export { listNotificationChannelsRef, useListNotificationChannelsRefQuery, } from './hooks/useListNotificationChannelsRefQuery';
12
12
  export { listNotificationRulesRef, useListNotificationRulesRefQuery, } from './hooks/useListNotificationRulesRefQuery';
13
+ export { notificationResourceList, useNotificationResourceListQuery, } from './hooks/useNotificationResourceListQuery';
13
14
  export { updateNotificationChannelRef, useUpdateNotificationChannelRefMutation, } from './hooks/useUpdateNotificationChannelRefMutation';
14
15
  export { updateNotificationRuleRef, useUpdateNotificationRuleRefMutation, } from './hooks/useUpdateNotificationRuleRefMutation';
16
+ export { useValidateNotificationChannelRefMutation, validateNotificationChannelRef, } from './hooks/useValidateNotificationChannelRefMutation';
17
+ export { useValidateNotificationRuleRefMutation, validateNotificationRuleRef, } from './hooks/useValidateNotificationRuleRefMutation';
@@ -0,0 +1,2 @@
1
+ import type { NotificationResourceDto } from '../schemas/NotificationResourceDto';
2
+ export type NotificationResourceListResponse = NotificationResourceDto[];
@@ -0,0 +1 @@
1
+ export type ValidateRuleIdentifierResponseResponse = unknown;
@@ -1,8 +1,11 @@
1
+ import type { WebHookHeaders } from '../schemas/WebHookHeaders';
2
+ import type { UserGroupDto } from '../schemas/UserGroupDto';
1
3
  export interface ChannelDto {
2
4
  email_ids?: string[];
5
+ headers?: WebHookHeaders;
3
6
  ms_team_keys?: string[];
4
7
  pager_duty_integration_keys?: string[];
5
8
  slack_webhook_urls?: string[];
6
- user_groups?: string[];
9
+ user_groups?: UserGroupDto[];
7
10
  webhook_urls?: string[];
8
11
  }
@@ -1,4 +1 @@
1
- /* eslint-disable */
2
- // This code is autogenerated using @harnessio/oats-cli.
3
- // Please do not modify this code directly.
4
1
  export {};
@@ -1,5 +1,4 @@
1
1
  /**
2
2
  * Notification Channel Type
3
3
  */
4
- export interface ChannelType {
5
- }
4
+ export type ChannelType = 'EMAIL' | 'MSTEAMS' | 'PAGERDUTY' | 'SLACK' | 'WEBHOOK';
@@ -0,0 +1,6 @@
1
+ import type { FrequencyDto } from '../schemas/FrequencyDto';
2
+ import type { NotificationEventParamsDto } from '../schemas/NotificationEventParamsDto';
3
+ export interface DelegateEventNotificationParamsDto extends NotificationEventParamsDto {
4
+ delegate_group_ids?: string[];
5
+ frequency?: FrequencyDto;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface FrequencyDto {
2
+ key?: string;
3
+ value?: string;
4
+ }
@@ -7,11 +7,15 @@ import type { Status } from '../schemas/Status';
7
7
  export interface NotificationChannelDto {
8
8
  account?: string;
9
9
  channel?: ChannelDto;
10
+ /**
11
+ * @format int64
12
+ */
10
13
  created?: number;
11
- created_by?: {
12
- [key: string]: any;
13
- };
14
14
  identifier?: string;
15
+ /**
16
+ * @format int64
17
+ */
18
+ last_modified?: number;
15
19
  name?: string;
16
20
  notification_channel_type?: ChannelType;
17
21
  org?: string;
@@ -0,0 +1,5 @@
1
+ import type { NotificationEventConfigDto } from '../schemas/NotificationEventConfigDto';
2
+ export interface NotificationConditionDto {
3
+ condition_name?: string;
4
+ notification_event_configs?: NotificationEventConfigDto[];
5
+ }
@@ -0,0 +1,6 @@
1
+ import type { NotificationEventParamsDto } from '../schemas/NotificationEventParamsDto';
2
+ export interface NotificationEventConfigDto<T0 extends NotificationEventParamsDto = NotificationEventParamsDto> {
3
+ notification_entity?: string;
4
+ notification_event?: string;
5
+ notification_event_data?: T0;
6
+ }
@@ -0,0 +1,7 @@
1
+ import type { ResourceTypeEnum } from '../schemas/ResourceTypeEnum';
2
+ /**
3
+ * Notification Event Params
4
+ */
5
+ export interface NotificationEventParamsDto {
6
+ type?: ResourceTypeEnum;
7
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Notification resource and list of events
3
+ */
4
+ export interface NotificationResourceDto {
5
+ enabled?: boolean;
6
+ events?: string[];
7
+ resource_name?: string;
8
+ }
@@ -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,28 +1,22 @@
1
- import type { NotificationChannelDto } from '../schemas/NotificationChannelDto';
1
+ import type { NotificationConditionDto } from '../schemas/NotificationConditionDto';
2
2
  import type { Status } from '../schemas/Status';
3
3
  /**
4
4
  * Notification Rule DTO
5
5
  */
6
6
  export interface NotificationRuleDto {
7
7
  account?: string;
8
+ /**
9
+ * @format int64
10
+ */
8
11
  created?: number;
9
- created_by?: {
10
- [key: string]: any;
11
- };
12
12
  identifier?: string;
13
+ /**
14
+ * @format int64
15
+ */
16
+ last_modified?: number;
13
17
  name?: string;
14
- notification_conditions?: Array<{
15
- condition_name?: string;
16
- notification_event_configs?: Array<{
17
- notification_channels?: NotificationChannelDto[];
18
- notification_entity?: string;
19
- notification_event?: string;
20
- notification_event_data?: {
21
- [key: string]: any;
22
- };
23
- }>;
24
- }>;
25
- notification_entity?: string;
18
+ notification_channel_refs?: string[];
19
+ notification_conditions?: NotificationConditionDto[];
26
20
  org?: string;
27
21
  project?: string;
28
22
  status?: Status;
@@ -0,0 +1 @@
1
+ export type ResourceTypeEnum = 'DELEGATE';
@@ -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,4 @@
1
1
  /**
2
2
  * Notification Rule Status
3
3
  */
4
- export interface Status {
5
- }
4
+ export type Status = 'DISABLED' | 'ENABLED';
@@ -0,0 +1,5 @@
1
+ export interface UserGroupDto {
2
+ identifier?: string;
3
+ org?: string;
4
+ project?: 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,4 @@
1
+ export interface WebHookHeaders {
2
+ key?: string;
3
+ value?: 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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-notification-service-client",
3
- "version": "0.3.0",
3
+ "version": "0.6.0",
4
4
  "description": "Harness React Notification service client - Notification APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,5 +0,0 @@
1
- export interface UserGroup {
2
- identifier?: string;
3
- org_identifier?: string;
4
- project_identifier?: string;
5
- }