@harnessio/react-notification-service-client 0.12.0 → 0.13.1

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.
@@ -0,0 +1,15 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { NotificationsSimulateDto } from '../schemas/NotificationsSimulateDto';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export type SimulateNotificationsRequestBody = NotificationsSimulateDto;
6
+ export type SimulateNotificationsOkResponse = ResponseWithPagination<unknown>;
7
+ export type SimulateNotificationsErrorResponse = unknown;
8
+ export interface SimulateNotificationsProps extends Omit<FetcherOptions<unknown, SimulateNotificationsRequestBody>, 'url'> {
9
+ body: SimulateNotificationsRequestBody;
10
+ }
11
+ export declare function simulateNotifications(props: SimulateNotificationsProps): Promise<SimulateNotificationsOkResponse>;
12
+ /**
13
+ * Simulate Notifications
14
+ */
15
+ export declare function useSimulateNotificationsMutation(options?: Omit<UseMutationOptions<SimulateNotificationsOkResponse, SimulateNotificationsErrorResponse, SimulateNotificationsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<SimulateNotificationsOkResponse, unknown, SimulateNotificationsProps, 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 simulateNotifications(props) {
7
+ return fetcher(Object.assign({ url: `/v1/notification-rules/notifications-simulate`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Simulate Notifications
11
+ */
12
+ export function useSimulateNotificationsMutation(options) {
13
+ return useMutation((mutateProps) => simulateNotifications(mutateProps), options);
14
+ }
@@ -27,6 +27,8 @@ export type { ListNotificationRulesRefAccountErrorResponse, ListNotificationRule
27
27
  export { listNotificationRulesRef, useListNotificationRulesRefQuery, } from './hooks/useListNotificationRulesRefQuery';
28
28
  export type { NotificationResourceListErrorResponse, NotificationResourceListOkResponse, NotificationResourceListProps, } from './hooks/useNotificationResourceListQuery';
29
29
  export { notificationResourceList, useNotificationResourceListQuery, } from './hooks/useNotificationResourceListQuery';
30
+ export type { SimulateNotificationsErrorResponse, SimulateNotificationsOkResponse, SimulateNotificationsProps, SimulateNotificationsRequestBody, } from './hooks/useSimulateNotificationsMutation';
31
+ export { simulateNotifications, useSimulateNotificationsMutation, } from './hooks/useSimulateNotificationsMutation';
30
32
  export type { UpdateNotificationChannelRefAccountErrorResponse, UpdateNotificationChannelRefAccountOKResponse, UpdateNotificationChannelRefAccountPathParams, UpdateNotificationChannelRefAccountRequestBody, UpdateNotificationChannelRefOrgErrorResponse, UpdateNotificationChannelRefOrgOKResponse, UpdateNotificationChannelRefOrgPathParams, UpdateNotificationChannelRefOrgRequestBody, UpdateNotificationChannelRefProjectErrorResponse, UpdateNotificationChannelRefProjectOKResponse, UpdateNotificationChannelRefProjectPathParams, UpdateNotificationChannelRefProjectRequestBody, UpdateNotificationChannelRefProps, } from './hooks/useUpdateNotificationChannelRefMutation';
31
33
  export { updateNotificationChannelRef, useUpdateNotificationChannelRefMutation, } from './hooks/useUpdateNotificationChannelRefMutation';
32
34
  export type { UpdateNotificationRuleRefAccountErrorResponse, UpdateNotificationRuleRefAccountOKResponse, UpdateNotificationRuleRefAccountPathParams, UpdateNotificationRuleRefAccountRequestBody, UpdateNotificationRuleRefOrgErrorResponse, UpdateNotificationRuleRefOrgOKResponse, UpdateNotificationRuleRefOrgPathParams, UpdateNotificationRuleRefOrgRequestBody, UpdateNotificationRuleRefProjectErrorResponse, UpdateNotificationRuleRefProjectOKResponse, UpdateNotificationRuleRefProjectPathParams, UpdateNotificationRuleRefProjectRequestBody, UpdateNotificationRuleRefProps, } from './hooks/useUpdateNotificationRuleRefMutation';
@@ -58,6 +60,8 @@ export type { NotificationEventConfigDto } from './schemas/NotificationEventConf
58
60
  export type { NotificationEventParamsDto } from './schemas/NotificationEventParamsDto';
59
61
  export type { NotificationResourceDto } from './schemas/NotificationResourceDto';
60
62
  export type { NotificationRuleDto } from './schemas/NotificationRuleDto';
63
+ export type { NotificationTemplateInputsDto } from './schemas/NotificationTemplateInputsDto';
64
+ export type { NotificationsSimulateDto } from './schemas/NotificationsSimulateDto';
61
65
  export type { PipelineEventNotificationParamsDto } from './schemas/PipelineEventNotificationParamsDto';
62
66
  export type { ResourceTypeEnum } from './schemas/ResourceTypeEnum';
63
67
  export type { SloEventNotificationParamsDto } from './schemas/SloEventNotificationParamsDto';
@@ -12,6 +12,7 @@ export { getNotificationRule, useGetNotificationRuleQuery, } from './hooks/useGe
12
12
  export { listNotificationChannelsRef, useListNotificationChannelsRefQuery, } from './hooks/useListNotificationChannelsRefQuery';
13
13
  export { listNotificationRulesRef, useListNotificationRulesRefQuery, } from './hooks/useListNotificationRulesRefQuery';
14
14
  export { notificationResourceList, useNotificationResourceListQuery, } from './hooks/useNotificationResourceListQuery';
15
+ export { simulateNotifications, useSimulateNotificationsMutation, } from './hooks/useSimulateNotificationsMutation';
15
16
  export { updateNotificationChannelRef, useUpdateNotificationChannelRefMutation, } from './hooks/useUpdateNotificationChannelRefMutation';
16
17
  export { updateNotificationRuleRef, useUpdateNotificationRuleRefMutation, } from './hooks/useUpdateNotificationRuleRefMutation';
17
18
  export { useValidateNotificationChannelRefMutation, validateNotificationChannelRef, } from './hooks/useValidateNotificationChannelRefMutation';
@@ -1,4 +1,6 @@
1
+ import type { NotificationTemplateInputsDto } from '../schemas/NotificationTemplateInputsDto';
1
2
  export interface CustomNotificationTemplateDto {
2
3
  template_ref?: string;
4
+ variables?: NotificationTemplateInputsDto[];
3
5
  version_label?: string;
4
6
  }
@@ -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 {};
@@ -0,0 +1,5 @@
1
+ export interface NotificationTemplateInputsDto {
2
+ name: string;
3
+ type?: string;
4
+ 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,8 @@
1
+ export interface NotificationsSimulateDto {
2
+ accountId?: string;
3
+ count?: number;
4
+ event?: string;
5
+ orgId?: string;
6
+ pipelineId?: string;
7
+ projectId?: 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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-notification-service-client",
3
- "version": "0.12.0",
3
+ "version": "0.13.1",
4
4
  "description": "Harness React Notification service client - Notification APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",