@harnessio/react-notification-service-client 0.6.0 → 0.6.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.
@@ -1,4 +1,5 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ValidateIdentifierResponseResponse } from '../responses/ValidateIdentifierResponseResponse';
2
3
  import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
3
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
4
5
  export interface ValidateNotificationChannelRefAccountPathParams {
@@ -7,7 +8,7 @@ export interface ValidateNotificationChannelRefAccountPathParams {
7
8
  export interface ValidateNotificationChannelRefAccountHeaderParams {
8
9
  'Harness-Account'?: string;
9
10
  }
10
- export type ValidateNotificationChannelRefAccountOKResponse = unknown;
11
+ export type ValidateNotificationChannelRefAccountOKResponse = ValidateIdentifierResponseResponse;
11
12
  export type ValidateNotificationChannelRefAccountErrorResponse = unknown;
12
13
  export interface ValidateNotificationChannelRefOrgPathParams {
13
14
  org: string;
@@ -16,7 +17,7 @@ export interface ValidateNotificationChannelRefOrgPathParams {
16
17
  export interface ValidateNotificationChannelRefOrgHeaderParams {
17
18
  'Harness-Account'?: string;
18
19
  }
19
- export type ValidateNotificationChannelRefOrgOKResponse = unknown;
20
+ export type ValidateNotificationChannelRefOrgOKResponse = ValidateIdentifierResponseResponse;
20
21
  export type ValidateNotificationChannelRefOrgErrorResponse = unknown;
21
22
  export interface ValidateNotificationChannelRefProjectPathParams {
22
23
  org: string;
@@ -26,7 +27,7 @@ export interface ValidateNotificationChannelRefProjectPathParams {
26
27
  export interface ValidateNotificationChannelRefProjectHeaderParams {
27
28
  'Harness-Account'?: string;
28
29
  }
29
- export type ValidateNotificationChannelRefProjectOKResponse = unknown;
30
+ export type ValidateNotificationChannelRefProjectOKResponse = ValidateIdentifierResponseResponse;
30
31
  export type ValidateNotificationChannelRefProjectErrorResponse = unknown;
31
32
  export type ValidateNotificationChannelRefOKResponse<T> = T extends ValidateNotificationChannelRefProjectPathParams ? ResponseWithPagination<ValidateNotificationChannelRefProjectOKResponse> : T extends ValidateNotificationChannelRefOrgPathParams ? ResponseWithPagination<ValidateNotificationChannelRefOrgOKResponse> : ResponseWithPagination<ValidateNotificationChannelRefAccountOKResponse>;
32
33
  export type ValidateNotificationChannelRefErrorResponse<T> = T extends ValidateNotificationChannelRefProjectPathParams ? ValidateNotificationChannelRefProjectErrorResponse : T extends ValidateNotificationChannelRefOrgPathParams ? ValidateNotificationChannelRefOrgErrorResponse : ValidateNotificationChannelRefAccountErrorResponse;
@@ -34,4 +35,4 @@ export interface ValidateNotificationChannelRefProps extends Omit<FetcherOptions
34
35
  pathParams: ValidateNotificationChannelRefAccountPathParams | ValidateNotificationChannelRefOrgPathParams | ValidateNotificationChannelRefProjectPathParams;
35
36
  }
36
37
  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>;
38
+ export declare function useValidateNotificationChannelRefMutation(options?: Omit<UseMutationOptions<ValidateNotificationChannelRefOKResponse<unknown>, ValidateNotificationChannelRefErrorResponse<unknown>, ValidateNotificationChannelRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<import("..").ValidateIdentifierDto>, unknown, ValidateNotificationChannelRefProps, unknown>;
@@ -1,4 +1,5 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { ValidateIdentifierResponseResponse } from '../responses/ValidateIdentifierResponseResponse';
2
3
  import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
3
4
  import { FetcherOptions } from '../../../../fetcher/index.js';
4
5
  export interface ValidateNotificationRuleRefAccountPathParams {
@@ -7,7 +8,7 @@ export interface ValidateNotificationRuleRefAccountPathParams {
7
8
  export interface ValidateNotificationRuleRefAccountHeaderParams {
8
9
  'Harness-Account'?: string;
9
10
  }
10
- export type ValidateNotificationRuleRefAccountOKResponse = unknown;
11
+ export type ValidateNotificationRuleRefAccountOKResponse = ValidateIdentifierResponseResponse;
11
12
  export type ValidateNotificationRuleRefAccountErrorResponse = unknown;
12
13
  export interface ValidateNotificationRuleRefOrgPathParams {
13
14
  org: string;
@@ -16,7 +17,7 @@ export interface ValidateNotificationRuleRefOrgPathParams {
16
17
  export interface ValidateNotificationRuleRefOrgHeaderParams {
17
18
  'Harness-Account'?: string;
18
19
  }
19
- export type ValidateNotificationRuleRefOrgOKResponse = unknown;
20
+ export type ValidateNotificationRuleRefOrgOKResponse = ValidateIdentifierResponseResponse;
20
21
  export type ValidateNotificationRuleRefOrgErrorResponse = unknown;
21
22
  export interface ValidateNotificationRuleRefProjectPathParams {
22
23
  org: string;
@@ -26,7 +27,7 @@ export interface ValidateNotificationRuleRefProjectPathParams {
26
27
  export interface ValidateNotificationRuleRefProjectHeaderParams {
27
28
  'Harness-Account'?: string;
28
29
  }
29
- export type ValidateNotificationRuleRefProjectOKResponse = unknown;
30
+ export type ValidateNotificationRuleRefProjectOKResponse = ValidateIdentifierResponseResponse;
30
31
  export type ValidateNotificationRuleRefProjectErrorResponse = unknown;
31
32
  export type ValidateNotificationRuleRefOKResponse<T> = T extends ValidateNotificationRuleRefProjectPathParams ? ResponseWithPagination<ValidateNotificationRuleRefProjectOKResponse> : T extends ValidateNotificationRuleRefOrgPathParams ? ResponseWithPagination<ValidateNotificationRuleRefOrgOKResponse> : ResponseWithPagination<ValidateNotificationRuleRefAccountOKResponse>;
32
33
  export type ValidateNotificationRuleRefErrorResponse<T> = T extends ValidateNotificationRuleRefProjectPathParams ? ValidateNotificationRuleRefProjectErrorResponse : T extends ValidateNotificationRuleRefOrgPathParams ? ValidateNotificationRuleRefOrgErrorResponse : ValidateNotificationRuleRefAccountErrorResponse;
@@ -34,4 +35,4 @@ export interface ValidateNotificationRuleRefProps extends Omit<FetcherOptions<un
34
35
  pathParams: ValidateNotificationRuleRefAccountPathParams | ValidateNotificationRuleRefOrgPathParams | ValidateNotificationRuleRefProjectPathParams;
35
36
  }
36
37
  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>;
38
+ export declare function useValidateNotificationRuleRefMutation(options?: Omit<UseMutationOptions<ValidateNotificationRuleRefOKResponse<unknown>, ValidateNotificationRuleRefErrorResponse<unknown>, ValidateNotificationRuleRefProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<import("..").ValidateIdentifierDto>, unknown, ValidateNotificationRuleRefProps, unknown>;
@@ -15,7 +15,7 @@ export function validateNotificationRuleRef(props) {
15
15
  let url = `/v1/validate-rules/${props.pathParams['notification-rule']}`;
16
16
  let method = 'GET';
17
17
  if (isProjectPathParams(props.pathParams)) {
18
- url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/notification-rules/validate/${props.pathParams['notification-rule']}`;
18
+ url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/notification-rules/validate-rules/${props.pathParams['notification-rule']}`;
19
19
  method = 'GET';
20
20
  }
21
21
  else if (isOrgPathParams(props.pathParams)) {
@@ -40,7 +40,7 @@ export type { NotificationChannelResponseResponse } from './responses/Notificati
40
40
  export type { NotificationResourceListResponse } from './responses/NotificationResourceListResponse';
41
41
  export type { NotificationRuleListResponseResponse } from './responses/NotificationRuleListResponseResponse';
42
42
  export type { NotificationRuleResponseResponse } from './responses/NotificationRuleResponseResponse';
43
- export type { ValidateRuleIdentifierResponseResponse } from './responses/ValidateRuleIdentifierResponseResponse';
43
+ export type { ValidateIdentifierResponseResponse } from './responses/ValidateIdentifierResponseResponse';
44
44
  export type { ChannelDto } from './schemas/ChannelDto';
45
45
  export type { ChannelType } from './schemas/ChannelType';
46
46
  export type { DelegateEventNotificationParamsDto } from './schemas/DelegateEventNotificationParamsDto';
@@ -54,4 +54,5 @@ export type { NotificationRuleDto } from './schemas/NotificationRuleDto';
54
54
  export type { ResourceTypeEnum } from './schemas/ResourceTypeEnum';
55
55
  export type { Status } from './schemas/Status';
56
56
  export type { UserGroupDto } from './schemas/UserGroupDto';
57
+ export type { ValidateIdentifierDto } from './schemas/ValidateIdentifierDto';
57
58
  export type { WebHookHeaders } from './schemas/WebHookHeaders';
@@ -0,0 +1,2 @@
1
+ import type { ValidateIdentifierDto } from '../schemas/ValidateIdentifierDto';
2
+ export type ValidateIdentifierResponseResponse = ValidateIdentifierDto;
@@ -2,7 +2,7 @@ import type { WebHookHeaders } from '../schemas/WebHookHeaders';
2
2
  import type { UserGroupDto } from '../schemas/UserGroupDto';
3
3
  export interface ChannelDto {
4
4
  email_ids?: string[];
5
- headers?: WebHookHeaders;
5
+ headers?: WebHookHeaders[];
6
6
  ms_team_keys?: string[];
7
7
  pager_duty_integration_keys?: string[];
8
8
  slack_webhook_urls?: string[];
@@ -0,0 +1,3 @@
1
+ export interface ValidateIdentifierDto {
2
+ exists?: 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 {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-notification-service-client",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Harness React Notification service client - Notification APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- export type ValidateRuleIdentifierResponseResponse = unknown;