@harnessio/react-notification-service-client 0.15.0 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/notification-service/src/services/hooks/useDeleteNotificationRuleRefMutation.d.ts +4 -3
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleAccountQuery.d.ts +3 -2
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleOrgQuery.d.ts +3 -2
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleQuery.d.ts +3 -2
- package/dist/notification-service/src/services/hooks/useUpdateNotificationRuleRefMutation.d.ts +5 -4
- package/dist/notification-service/src/services/index.d.ts +2 -1
- package/dist/notification-service/src/services/schemas/ChaosExperimentEventNotificationParamsDto.d.ts +5 -1
- package/dist/notification-service/src/services/schemas/ErrorDto.d.ts +15 -0
- package/dist/notification-service/src/services/schemas/ErrorDto.js +4 -0
- package/dist/notification-service/src/services/schemas/NotificationChannelDto.d.ts +2 -2
- package/dist/notification-service/src/services/schemas/NotificationEventConfigDto.d.ts +1 -1
- package/dist/notification-service/src/services/schemas/NotificationRuleDto.d.ts +2 -2
- package/dist/notification-service/src/services/schemas/StoExemptionEventNotificationParamsDto.d.ts +4 -0
- package/dist/notification-service/src/services/schemas/UserGroupDto.d.ts +1 -1
- package/package.json +1 -1
- package/dist/notification-service/src/services/schemas/StoExperimentEventNotificationParamsDto.d.ts +0 -4
- /package/dist/notification-service/src/services/schemas/{StoExperimentEventNotificationParamsDto.js → StoExemptionEventNotificationParamsDto.js} +0 -0
package/dist/notification-service/src/services/hooks/useDeleteNotificationRuleRefMutation.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { ErrorDto } from '../schemas/ErrorDto';
|
|
2
3
|
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
3
4
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
5
|
export interface DeleteNotificationRuleRefAccountPathParams {
|
|
@@ -8,7 +9,7 @@ export interface DeleteNotificationRuleRefAccountHeaderParams {
|
|
|
8
9
|
'Harness-Account'?: string;
|
|
9
10
|
}
|
|
10
11
|
export type DeleteNotificationRuleRefAccountOKResponse = unknown;
|
|
11
|
-
export type DeleteNotificationRuleRefAccountErrorResponse = {};
|
|
12
|
+
export type DeleteNotificationRuleRefAccountErrorResponse = {} | ErrorDto;
|
|
12
13
|
export interface DeleteNotificationRuleRefOrgPathParams {
|
|
13
14
|
org: string;
|
|
14
15
|
'notification-rule': string;
|
|
@@ -17,7 +18,7 @@ export interface DeleteNotificationRuleRefOrgHeaderParams {
|
|
|
17
18
|
'Harness-Account'?: string;
|
|
18
19
|
}
|
|
19
20
|
export type DeleteNotificationRuleRefOrgOKResponse = unknown;
|
|
20
|
-
export type DeleteNotificationRuleRefOrgErrorResponse = {};
|
|
21
|
+
export type DeleteNotificationRuleRefOrgErrorResponse = {} | ErrorDto;
|
|
21
22
|
export interface DeleteNotificationRuleRefProjectPathParams {
|
|
22
23
|
org: string;
|
|
23
24
|
project: string;
|
|
@@ -27,7 +28,7 @@ export interface DeleteNotificationRuleRefProjectHeaderParams {
|
|
|
27
28
|
'Harness-Account'?: string;
|
|
28
29
|
}
|
|
29
30
|
export type DeleteNotificationRuleRefProjectOKResponse = unknown;
|
|
30
|
-
export type DeleteNotificationRuleRefProjectErrorResponse = {};
|
|
31
|
+
export type DeleteNotificationRuleRefProjectErrorResponse = {} | ErrorDto;
|
|
31
32
|
export type DeleteNotificationRuleRefOKResponse<T> = T extends DeleteNotificationRuleRefProjectPathParams ? ResponseWithPagination<DeleteNotificationRuleRefProjectOKResponse> : T extends DeleteNotificationRuleRefOrgPathParams ? ResponseWithPagination<DeleteNotificationRuleRefOrgOKResponse> : ResponseWithPagination<DeleteNotificationRuleRefAccountOKResponse>;
|
|
32
33
|
export type DeleteNotificationRuleRefErrorResponse<T> = T extends DeleteNotificationRuleRefProjectPathParams ? DeleteNotificationRuleRefProjectErrorResponse : T extends DeleteNotificationRuleRefOrgPathParams ? DeleteNotificationRuleRefOrgErrorResponse : DeleteNotificationRuleRefAccountErrorResponse;
|
|
33
34
|
export interface DeleteNotificationRuleRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
package/dist/notification-service/src/services/hooks/useGetNotificationRuleAccountQuery.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { NotificationRuleResponseResponse } from '../responses/NotificationRuleResponseResponse';
|
|
3
|
+
import type { ErrorDto } from '../schemas/ErrorDto';
|
|
3
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
4
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
6
|
export interface GetNotificationRuleAccountQueryPathParams {
|
|
@@ -9,11 +10,11 @@ export interface GetNotificationRuleAccountQueryHeaderParams {
|
|
|
9
10
|
'Harness-Account'?: string;
|
|
10
11
|
}
|
|
11
12
|
export type GetNotificationRuleAccountOkResponse = ResponseWithPagination<NotificationRuleResponseResponse>;
|
|
12
|
-
export type GetNotificationRuleAccountErrorResponse =
|
|
13
|
+
export type GetNotificationRuleAccountErrorResponse = ErrorDto;
|
|
13
14
|
export interface GetNotificationRuleAccountProps extends GetNotificationRuleAccountQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetNotificationRuleAccountQueryHeaderParams>, 'url'> {
|
|
14
15
|
}
|
|
15
16
|
export declare function getNotificationRuleAccount(props: GetNotificationRuleAccountProps): Promise<GetNotificationRuleAccountOkResponse>;
|
|
16
17
|
/**
|
|
17
18
|
* Get notification rule
|
|
18
19
|
*/
|
|
19
|
-
export declare function useGetNotificationRuleAccountQuery(props: GetNotificationRuleAccountProps, options?: Omit<UseQueryOptions<GetNotificationRuleAccountOkResponse, GetNotificationRuleAccountErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetNotificationRuleAccountOkResponse,
|
|
20
|
+
export declare function useGetNotificationRuleAccountQuery(props: GetNotificationRuleAccountProps, options?: Omit<UseQueryOptions<GetNotificationRuleAccountOkResponse, GetNotificationRuleAccountErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetNotificationRuleAccountOkResponse, ErrorDto>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { NotificationRuleResponseResponse } from '../responses/NotificationRuleResponseResponse';
|
|
3
|
+
import type { ErrorDto } from '../schemas/ErrorDto';
|
|
3
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
4
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
6
|
export interface GetNotificationRuleOrgQueryPathParams {
|
|
@@ -10,11 +11,11 @@ export interface GetNotificationRuleOrgQueryHeaderParams {
|
|
|
10
11
|
'Harness-Account'?: string;
|
|
11
12
|
}
|
|
12
13
|
export type GetNotificationRuleOrgOkResponse = ResponseWithPagination<NotificationRuleResponseResponse>;
|
|
13
|
-
export type GetNotificationRuleOrgErrorResponse =
|
|
14
|
+
export type GetNotificationRuleOrgErrorResponse = ErrorDto;
|
|
14
15
|
export interface GetNotificationRuleOrgProps extends GetNotificationRuleOrgQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetNotificationRuleOrgQueryHeaderParams>, 'url'> {
|
|
15
16
|
}
|
|
16
17
|
export declare function getNotificationRuleOrg(props: GetNotificationRuleOrgProps): Promise<GetNotificationRuleOrgOkResponse>;
|
|
17
18
|
/**
|
|
18
19
|
* Get notification rule
|
|
19
20
|
*/
|
|
20
|
-
export declare function useGetNotificationRuleOrgQuery(props: GetNotificationRuleOrgProps, options?: Omit<UseQueryOptions<GetNotificationRuleOrgOkResponse, GetNotificationRuleOrgErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetNotificationRuleOrgOkResponse,
|
|
21
|
+
export declare function useGetNotificationRuleOrgQuery(props: GetNotificationRuleOrgProps, options?: Omit<UseQueryOptions<GetNotificationRuleOrgOkResponse, GetNotificationRuleOrgErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetNotificationRuleOrgOkResponse, ErrorDto>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { NotificationRuleResponseResponse } from '../responses/NotificationRuleResponseResponse';
|
|
3
|
+
import type { ErrorDto } from '../schemas/ErrorDto';
|
|
3
4
|
import type { ResponseWithPagination } from '../helpers';
|
|
4
5
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
6
|
export interface GetNotificationRuleQueryPathParams {
|
|
@@ -11,11 +12,11 @@ export interface GetNotificationRuleQueryHeaderParams {
|
|
|
11
12
|
'Harness-Account'?: string;
|
|
12
13
|
}
|
|
13
14
|
export type GetNotificationRuleOkResponse = ResponseWithPagination<NotificationRuleResponseResponse>;
|
|
14
|
-
export type GetNotificationRuleErrorResponse =
|
|
15
|
+
export type GetNotificationRuleErrorResponse = ErrorDto;
|
|
15
16
|
export interface GetNotificationRuleProps extends GetNotificationRuleQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetNotificationRuleQueryHeaderParams>, 'url'> {
|
|
16
17
|
}
|
|
17
18
|
export declare function getNotificationRule(props: GetNotificationRuleProps): Promise<GetNotificationRuleOkResponse>;
|
|
18
19
|
/**
|
|
19
20
|
* Get notification rule
|
|
20
21
|
*/
|
|
21
|
-
export declare function useGetNotificationRuleQuery(props: GetNotificationRuleProps, options?: Omit<UseQueryOptions<GetNotificationRuleOkResponse, GetNotificationRuleErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetNotificationRuleOkResponse,
|
|
22
|
+
export declare function useGetNotificationRuleQuery(props: GetNotificationRuleProps, options?: Omit<UseQueryOptions<GetNotificationRuleOkResponse, GetNotificationRuleErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetNotificationRuleOkResponse, ErrorDto>;
|
package/dist/notification-service/src/services/hooks/useUpdateNotificationRuleRefMutation.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
2
|
import type { NotificationRuleResponseResponse } from '../responses/NotificationRuleResponseResponse';
|
|
3
|
+
import type { ErrorDto } from '../schemas/ErrorDto';
|
|
3
4
|
import type { NotificationRuleRequestRequestBody } from '../requestBodies/NotificationRuleRequestRequestBody';
|
|
4
5
|
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
5
6
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
@@ -11,7 +12,7 @@ export interface UpdateNotificationRuleRefAccountHeaderParams {
|
|
|
11
12
|
}
|
|
12
13
|
export type UpdateNotificationRuleRefAccountRequestBody = NotificationRuleRequestRequestBody;
|
|
13
14
|
export type UpdateNotificationRuleRefAccountOKResponse = NotificationRuleResponseResponse;
|
|
14
|
-
export type UpdateNotificationRuleRefAccountErrorResponse =
|
|
15
|
+
export type UpdateNotificationRuleRefAccountErrorResponse = ErrorDto;
|
|
15
16
|
export interface UpdateNotificationRuleRefOrgPathParams {
|
|
16
17
|
org: string;
|
|
17
18
|
'notification-rule': string;
|
|
@@ -21,7 +22,7 @@ export interface UpdateNotificationRuleRefOrgHeaderParams {
|
|
|
21
22
|
}
|
|
22
23
|
export type UpdateNotificationRuleRefOrgRequestBody = NotificationRuleRequestRequestBody;
|
|
23
24
|
export type UpdateNotificationRuleRefOrgOKResponse = NotificationRuleResponseResponse;
|
|
24
|
-
export type UpdateNotificationRuleRefOrgErrorResponse =
|
|
25
|
+
export type UpdateNotificationRuleRefOrgErrorResponse = ErrorDto;
|
|
25
26
|
export interface UpdateNotificationRuleRefProjectPathParams {
|
|
26
27
|
org: string;
|
|
27
28
|
project: string;
|
|
@@ -32,11 +33,11 @@ export interface UpdateNotificationRuleRefProjectHeaderParams {
|
|
|
32
33
|
}
|
|
33
34
|
export type UpdateNotificationRuleRefProjectRequestBody = NotificationRuleRequestRequestBody;
|
|
34
35
|
export type UpdateNotificationRuleRefProjectOKResponse = NotificationRuleResponseResponse;
|
|
35
|
-
export type UpdateNotificationRuleRefProjectErrorResponse =
|
|
36
|
+
export type UpdateNotificationRuleRefProjectErrorResponse = ErrorDto;
|
|
36
37
|
export type UpdateNotificationRuleRefOKResponse<T> = T extends UpdateNotificationRuleRefProjectPathParams ? ResponseWithPagination<UpdateNotificationRuleRefProjectOKResponse> : T extends UpdateNotificationRuleRefOrgPathParams ? ResponseWithPagination<UpdateNotificationRuleRefOrgOKResponse> : ResponseWithPagination<UpdateNotificationRuleRefAccountOKResponse>;
|
|
37
38
|
export type UpdateNotificationRuleRefErrorResponse<T> = T extends UpdateNotificationRuleRefProjectPathParams ? UpdateNotificationRuleRefProjectErrorResponse : T extends UpdateNotificationRuleRefOrgPathParams ? UpdateNotificationRuleRefOrgErrorResponse : UpdateNotificationRuleRefAccountErrorResponse;
|
|
38
39
|
export interface UpdateNotificationRuleRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
39
40
|
pathParams: UpdateNotificationRuleRefAccountPathParams | UpdateNotificationRuleRefOrgPathParams | UpdateNotificationRuleRefProjectPathParams;
|
|
40
41
|
}
|
|
41
42
|
export declare function updateNotificationRuleRef<T extends UpdateNotificationRuleRefProps = UpdateNotificationRuleRefProps>(props: T): Promise<UpdateNotificationRuleRefOKResponse<GetPathParamsType<T>>>;
|
|
42
|
-
export declare function useUpdateNotificationRuleRefMutation(options?: Omit<UseMutationOptions<UpdateNotificationRuleRefOKResponse<unknown>, UpdateNotificationRuleRefErrorResponse<unknown>, UpdateNotificationRuleRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<import("..").NotificationRuleDto>,
|
|
43
|
+
export declare function useUpdateNotificationRuleRefMutation(options?: Omit<UseMutationOptions<UpdateNotificationRuleRefOKResponse<unknown>, UpdateNotificationRuleRefErrorResponse<unknown>, UpdateNotificationRuleRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<import("..").NotificationRuleDto>, ErrorDto, UpdateNotificationRuleRefProps, unknown>;
|
|
@@ -69,6 +69,7 @@ export type { DefaultNotificationTemplateSetDto } from './schemas/DefaultNotific
|
|
|
69
69
|
export type { DefaultNotificationTemplateSetResponse } from './schemas/DefaultNotificationTemplateSetResponse';
|
|
70
70
|
export type { DefaultNotificationTemplateSetResponseDto } from './schemas/DefaultNotificationTemplateSetResponseDto';
|
|
71
71
|
export type { DelegateEventNotificationParamsDto } from './schemas/DelegateEventNotificationParamsDto';
|
|
72
|
+
export type { ErrorDto } from './schemas/ErrorDto';
|
|
72
73
|
export type { EventTemplateConfigurationDto } from './schemas/EventTemplateConfigurationDto';
|
|
73
74
|
export type { FrequencyDto } from './schemas/FrequencyDto';
|
|
74
75
|
export type { NotificationChannelDto } from './schemas/NotificationChannelDto';
|
|
@@ -85,7 +86,7 @@ export type { ResourceTypeEnum } from './schemas/ResourceTypeEnum';
|
|
|
85
86
|
export type { RmgEventNotificationParamsDto } from './schemas/RmgEventNotificationParamsDto';
|
|
86
87
|
export type { SloEventNotificationParamsDto } from './schemas/SloEventNotificationParamsDto';
|
|
87
88
|
export type { Status } from './schemas/Status';
|
|
88
|
-
export type {
|
|
89
|
+
export type { StoExemptionEventNotificationParamsDto } from './schemas/StoExemptionEventNotificationParamsDto';
|
|
89
90
|
export type { UserGroupDto } from './schemas/UserGroupDto';
|
|
90
91
|
export type { ValidateIdentifierDto } from './schemas/ValidateIdentifierDto';
|
|
91
92
|
export type { WebHookHeaders } from './schemas/WebHookHeaders';
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import type { NotificationEventParamsDto } from '../schemas/NotificationEventParamsDto';
|
|
2
2
|
export interface ChaosExperimentEventNotificationParamsDto extends NotificationEventParamsDto {
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* DEPRECATED: No longer used. Kept for backwards compatibility with the frontend
|
|
5
5
|
* @deprecated
|
|
6
6
|
*/
|
|
7
7
|
chaos_experiment_ids?: string[];
|
|
8
|
+
/**
|
|
9
|
+
* For Org/Account level only. For Project level, we use NotificationEventConfig.entity_identifiers instead
|
|
10
|
+
*/
|
|
11
|
+
scope_identifiers?: string[];
|
|
8
12
|
}
|
|
@@ -15,12 +15,12 @@ export interface NotificationChannelDto {
|
|
|
15
15
|
* @format int64
|
|
16
16
|
*/
|
|
17
17
|
created?: number;
|
|
18
|
-
identifier
|
|
18
|
+
identifier: string;
|
|
19
19
|
/**
|
|
20
20
|
* @format int64
|
|
21
21
|
*/
|
|
22
22
|
last_modified?: number;
|
|
23
|
-
name
|
|
23
|
+
name: string;
|
|
24
24
|
notification_channel_type: ChannelType;
|
|
25
25
|
org?: string;
|
|
26
26
|
project?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NotificationEventParamsDto } from '../schemas/NotificationEventParamsDto';
|
|
2
2
|
export interface NotificationEventConfigDto<T0 extends NotificationEventParamsDto = NotificationEventParamsDto> {
|
|
3
3
|
entity_identifiers?: string[];
|
|
4
|
-
notification_entity
|
|
4
|
+
notification_entity: string;
|
|
5
5
|
notification_event?: string;
|
|
6
6
|
notification_event_data?: T0;
|
|
7
7
|
}
|
|
@@ -15,12 +15,12 @@ export interface NotificationRuleDto {
|
|
|
15
15
|
*/
|
|
16
16
|
created?: number;
|
|
17
17
|
custom_notification_template_ref?: CustomNotificationTemplateDto;
|
|
18
|
-
identifier
|
|
18
|
+
identifier: string;
|
|
19
19
|
/**
|
|
20
20
|
* @format int64
|
|
21
21
|
*/
|
|
22
22
|
last_modified?: number;
|
|
23
|
-
name
|
|
23
|
+
name: string;
|
|
24
24
|
notification_channel_refs?: string[];
|
|
25
25
|
notification_conditions?: NotificationConditionDto[];
|
|
26
26
|
org?: string;
|
package/package.json
CHANGED