@harnessio/react-notification-service-client 0.6.1 → 0.7.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/useCreateAttachmentMutation.d.ts +19 -0
- package/dist/notification-service/src/services/hooks/useCreateAttachmentMutation.js +14 -0
- package/dist/notification-service/src/services/index.d.ts +6 -0
- package/dist/notification-service/src/services/index.js +1 -0
- package/dist/notification-service/src/services/requestBodies/SaveAttachmentRequestRequestBody.d.ts +1 -0
- package/dist/notification-service/src/services/requestBodies/SaveAttachmentRequestRequestBody.js +1 -0
- package/dist/notification-service/src/services/responses/SaveAttachmentResponseResponse.d.ts +4 -0
- package/dist/notification-service/src/services/responses/SaveAttachmentResponseResponse.js +4 -0
- package/dist/notification-service/src/services/schemas/AttachmentDto.d.ts +10 -0
- package/dist/notification-service/src/services/schemas/AttachmentDto.js +4 -0
- package/dist/notification-service/src/services/schemas/ChaosExperimentEventNotificationParamsDto.d.ts +8 -0
- package/dist/notification-service/src/services/schemas/ChaosExperimentEventNotificationParamsDto.js +1 -0
- package/dist/notification-service/src/services/schemas/DelegateEventNotificationParamsDto.d.ts +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 -0
- package/dist/notification-service/src/services/schemas/ResourceTypeEnum.d.ts +1 -1
- package/package.json +1 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { SaveAttachmentResponseResponse } from '../responses/SaveAttachmentResponseResponse';
|
|
3
|
+
import type { SaveAttachmentRequestRequestBody } from '../requestBodies/SaveAttachmentRequestRequestBody';
|
|
4
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface CreateAttachmentMutationHeaderParams {
|
|
7
|
+
'Harness-Account'?: string;
|
|
8
|
+
}
|
|
9
|
+
export type CreateAttachmentRequestBody = SaveAttachmentRequestRequestBody;
|
|
10
|
+
export type CreateAttachmentOkResponse = ResponseWithPagination<SaveAttachmentResponseResponse>;
|
|
11
|
+
export type CreateAttachmentErrorResponse = unknown;
|
|
12
|
+
export interface CreateAttachmentProps extends Omit<FetcherOptions<unknown, CreateAttachmentRequestBody, CreateAttachmentMutationHeaderParams>, 'url'> {
|
|
13
|
+
body: CreateAttachmentRequestBody;
|
|
14
|
+
}
|
|
15
|
+
export declare function createAttachment(props: CreateAttachmentProps): Promise<CreateAttachmentOkResponse>;
|
|
16
|
+
/**
|
|
17
|
+
* Save Notification Attachment
|
|
18
|
+
*/
|
|
19
|
+
export declare function useCreateAttachmentMutation(options?: Omit<UseMutationOptions<CreateAttachmentOkResponse, CreateAttachmentErrorResponse, CreateAttachmentProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateAttachmentOkResponse, unknown, CreateAttachmentProps, 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 createAttachment(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/v1/attachments`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Save Notification Attachment
|
|
11
|
+
*/
|
|
12
|
+
export function useCreateAttachmentMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => createAttachment(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
|
+
export type { CreateAttachmentErrorResponse, CreateAttachmentOkResponse, CreateAttachmentProps, CreateAttachmentRequestBody, } from './hooks/useCreateAttachmentMutation';
|
|
3
|
+
export { createAttachment, useCreateAttachmentMutation } from './hooks/useCreateAttachmentMutation';
|
|
2
4
|
export type { CreateNotificationChannelRefAccountErrorResponse, CreateNotificationChannelRefAccountOKResponse, CreateNotificationChannelRefAccountRequestBody, CreateNotificationChannelRefOrgErrorResponse, CreateNotificationChannelRefOrgOKResponse, CreateNotificationChannelRefOrgPathParams, CreateNotificationChannelRefOrgRequestBody, CreateNotificationChannelRefProjectErrorResponse, CreateNotificationChannelRefProjectOKResponse, CreateNotificationChannelRefProjectPathParams, CreateNotificationChannelRefProjectRequestBody, CreateNotificationChannelRefProps, } from './hooks/useCreateNotificationChannelRefMutation';
|
|
3
5
|
export { createNotificationChannelRef, useCreateNotificationChannelRefMutation, } from './hooks/useCreateNotificationChannelRefMutation';
|
|
4
6
|
export type { CreateNotificationRuleRefAccountErrorResponse, CreateNotificationRuleRefAccountOKResponse, CreateNotificationRuleRefAccountRequestBody, CreateNotificationRuleRefOrgErrorResponse, CreateNotificationRuleRefOrgOKResponse, CreateNotificationRuleRefOrgPathParams, CreateNotificationRuleRefOrgRequestBody, CreateNotificationRuleRefProjectErrorResponse, CreateNotificationRuleRefProjectOKResponse, CreateNotificationRuleRefProjectPathParams, CreateNotificationRuleRefProjectRequestBody, CreateNotificationRuleRefProps, } from './hooks/useCreateNotificationRuleRefMutation';
|
|
@@ -35,14 +37,18 @@ export type { ValidateNotificationRuleRefAccountErrorResponse, ValidateNotificat
|
|
|
35
37
|
export { useValidateNotificationRuleRefMutation, validateNotificationRuleRef, } from './hooks/useValidateNotificationRuleRefMutation';
|
|
36
38
|
export type { NotificationChannelRequestRequestBody } from './requestBodies/NotificationChannelRequestRequestBody';
|
|
37
39
|
export type { NotificationRuleRequestRequestBody } from './requestBodies/NotificationRuleRequestRequestBody';
|
|
40
|
+
export type { SaveAttachmentRequestRequestBody } from './requestBodies/SaveAttachmentRequestRequestBody';
|
|
38
41
|
export type { NotificationChannelListResponseResponse } from './responses/NotificationChannelListResponseResponse';
|
|
39
42
|
export type { NotificationChannelResponseResponse } from './responses/NotificationChannelResponseResponse';
|
|
40
43
|
export type { NotificationResourceListResponse } from './responses/NotificationResourceListResponse';
|
|
41
44
|
export type { NotificationRuleListResponseResponse } from './responses/NotificationRuleListResponseResponse';
|
|
42
45
|
export type { NotificationRuleResponseResponse } from './responses/NotificationRuleResponseResponse';
|
|
46
|
+
export type { SaveAttachmentResponseResponse } from './responses/SaveAttachmentResponseResponse';
|
|
43
47
|
export type { ValidateIdentifierResponseResponse } from './responses/ValidateIdentifierResponseResponse';
|
|
48
|
+
export type { AttachmentDto } from './schemas/AttachmentDto';
|
|
44
49
|
export type { ChannelDto } from './schemas/ChannelDto';
|
|
45
50
|
export type { ChannelType } from './schemas/ChannelType';
|
|
51
|
+
export type { ChaosExperimentEventNotificationParamsDto } from './schemas/ChaosExperimentEventNotificationParamsDto';
|
|
46
52
|
export type { DelegateEventNotificationParamsDto } from './schemas/DelegateEventNotificationParamsDto';
|
|
47
53
|
export type { FrequencyDto } from './schemas/FrequencyDto';
|
|
48
54
|
export type { NotificationChannelDto } from './schemas/NotificationChannelDto';
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { createAttachment, useCreateAttachmentMutation } from './hooks/useCreateAttachmentMutation';
|
|
1
2
|
export { createNotificationChannelRef, useCreateNotificationChannelRefMutation, } from './hooks/useCreateNotificationChannelRefMutation';
|
|
2
3
|
export { createNotificationRuleRef, useCreateNotificationRuleRefMutation, } from './hooks/useCreateNotificationRuleRefMutation';
|
|
3
4
|
export { deleteNotificationChannelRef, useDeleteNotificationChannelRefMutation, } from './hooks/useDeleteNotificationChannelRefMutation';
|
package/dist/notification-service/src/services/requestBodies/SaveAttachmentRequestRequestBody.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type SaveAttachmentRequestRequestBody = unknown;
|
package/dist/notification-service/src/services/requestBodies/SaveAttachmentRequestRequestBody.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NotificationEventParamsDto } from '../schemas/NotificationEventParamsDto';
|
|
2
|
+
export interface ChaosExperimentEventNotificationParamsDto extends NotificationEventParamsDto {
|
|
3
|
+
/**
|
|
4
|
+
* Deprecated, Use notificationEventConfig.entity_identifiers instead
|
|
5
|
+
* @deprecated
|
|
6
|
+
*/
|
|
7
|
+
chaos_experiment_ids?: string[];
|
|
8
|
+
}
|
package/dist/notification-service/src/services/schemas/ChaosExperimentEventNotificationParamsDto.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/notification-service/src/services/schemas/DelegateEventNotificationParamsDto.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { FrequencyDto } from '../schemas/FrequencyDto';
|
|
2
2
|
import type { NotificationEventParamsDto } from '../schemas/NotificationEventParamsDto';
|
|
3
3
|
export interface DelegateEventNotificationParamsDto extends NotificationEventParamsDto {
|
|
4
|
+
/**
|
|
5
|
+
* Deprecated, Use notificationEventConfig.entity_identifiers instead
|
|
6
|
+
* @deprecated
|
|
7
|
+
*/
|
|
4
8
|
delegate_group_ids?: string[];
|
|
5
9
|
frequency?: FrequencyDto;
|
|
6
10
|
}
|
|
@@ -6,7 +6,7 @@ import type { Status } from '../schemas/Status';
|
|
|
6
6
|
*/
|
|
7
7
|
export interface NotificationChannelDto {
|
|
8
8
|
account?: string;
|
|
9
|
-
channel
|
|
9
|
+
channel: ChannelDto;
|
|
10
10
|
/**
|
|
11
11
|
* @format int64
|
|
12
12
|
*/
|
|
@@ -17,7 +17,7 @@ export interface NotificationChannelDto {
|
|
|
17
17
|
*/
|
|
18
18
|
last_modified?: number;
|
|
19
19
|
name?: string;
|
|
20
|
-
notification_channel_type
|
|
20
|
+
notification_channel_type: ChannelType;
|
|
21
21
|
org?: string;
|
|
22
22
|
project?: string;
|
|
23
23
|
status?: Status;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { NotificationEventParamsDto } from '../schemas/NotificationEventParamsDto';
|
|
2
2
|
export interface NotificationEventConfigDto<T0 extends NotificationEventParamsDto = NotificationEventParamsDto> {
|
|
3
|
+
entity_identifiers?: string[];
|
|
3
4
|
notification_entity?: string;
|
|
4
5
|
notification_event?: string;
|
|
5
6
|
notification_event_data?: T0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type ResourceTypeEnum = 'DELEGATE';
|
|
1
|
+
export type ResourceTypeEnum = 'CHAOS_EXPERIMENT' | 'DELEGATE';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harnessio/react-notification-service-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Harness React Notification service client - Notification APIs integrated with react hooks",
|
|
5
5
|
"author": "Harness Inc",
|
|
6
6
|
"license": "MIT",
|
|
@@ -27,8 +27,5 @@
|
|
|
27
27
|
"build": "yarn generate && tsc",
|
|
28
28
|
"generate": "oats import --config='./oats.config.ts'",
|
|
29
29
|
"fmt": "prettier --write ./index.ts"
|
|
30
|
-
},
|
|
31
|
-
"engines": {
|
|
32
|
-
"node": "^16"
|
|
33
30
|
}
|
|
34
31
|
}
|