@harnessio/react-notification-service-client 0.1.0 → 0.2.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/useCreateNotificationChannelRefQuery.d.ts +39 -0
- package/dist/notification-service/src/services/hooks/useCreateNotificationChannelRefQuery.js +30 -0
- package/dist/notification-service/src/services/hooks/useCreateNotificationRuleRefQuery.d.ts +39 -0
- package/dist/notification-service/src/services/hooks/useCreateNotificationRuleRefQuery.js +30 -0
- package/dist/notification-service/src/services/hooks/useDeleteNotificationChannelRefQuery.d.ts +37 -0
- package/dist/notification-service/src/services/hooks/useDeleteNotificationChannelRefQuery.js +30 -0
- package/dist/notification-service/src/services/hooks/useDeleteNotificationRuleRefQuery.d.ts +37 -0
- package/dist/notification-service/src/services/hooks/useDeleteNotificationRuleRefQuery.js +30 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelAccountQuery.d.ts +19 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelAccountQuery.js +14 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelOrgQuery.d.ts +20 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelOrgQuery.js +14 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelQuery.d.ts +5 -14
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelQuery.js +3 -3
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleAccountQuery.d.ts +19 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleAccountQuery.js +14 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleOrgQuery.d.ts +20 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleOrgQuery.js +14 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleQuery.d.ts +21 -0
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleQuery.js +14 -0
- package/dist/notification-service/src/services/hooks/useListNotificationChannelsRefQuery.d.ts +65 -0
- package/dist/notification-service/src/services/hooks/useListNotificationChannelsRefQuery.js +30 -0
- package/dist/notification-service/src/services/hooks/useListNotificationRulesRefQuery.d.ts +74 -0
- package/dist/notification-service/src/services/hooks/useListNotificationRulesRefQuery.js +30 -0
- package/dist/notification-service/src/services/hooks/useUpdateNotificationChannelRefQuery.d.ts +42 -0
- package/dist/notification-service/src/services/hooks/useUpdateNotificationChannelRefQuery.js +30 -0
- package/dist/notification-service/src/services/hooks/useUpdateNotificationRuleRefMutation.d.ts +42 -0
- package/dist/notification-service/src/services/hooks/useUpdateNotificationRuleRefMutation.js +30 -0
- package/dist/notification-service/src/services/index.d.ts +31 -19
- package/dist/notification-service/src/services/index.js +13 -9
- package/dist/notification-service/src/services/schemas/ChannelDto.d.ts +8 -0
- package/dist/notification-service/src/services/schemas/ChannelDto.js +4 -0
- package/dist/notification-service/src/services/schemas/ChannelType.d.ts +5 -0
- package/dist/notification-service/src/services/schemas/ChannelType.js +4 -0
- package/dist/notification-service/src/services/schemas/NotificationChannelDto.d.ts +8 -10
- package/dist/notification-service/src/services/schemas/NotificationChannelDto.js +0 -3
- package/dist/notification-service/src/services/schemas/NotificationRuleDto.d.ts +9 -20
- package/dist/notification-service/src/services/schemas/NotificationRuleDto.js +0 -3
- package/dist/notification-service/src/services/schemas/Status.d.ts +5 -0
- package/dist/notification-service/src/services/schemas/Status.js +4 -0
- package/dist/notification-service/src/services/schemas/UserGroup.d.ts +5 -0
- package/dist/notification-service/src/services/schemas/UserGroup.js +4 -0
- package/package.json +1 -1
- package/dist/notification-service/src/services/hooks/useDeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutation.d.ts +0 -20
- package/dist/notification-service/src/services/hooks/useDeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutation.js +0 -14
- package/dist/notification-service/src/services/hooks/useDeletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutation.d.ts +0 -20
- package/dist/notification-service/src/services/hooks/useDeletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutation.js +0 -14
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelsNotificationChannelQuery.d.ts +0 -21
- package/dist/notification-service/src/services/hooks/useGetNotificationChannelsNotificationChannelQuery.js +0 -19
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleListQuery.d.ts +0 -33
- package/dist/notification-service/src/services/hooks/useGetNotificationRuleListQuery.js +0 -14
- package/dist/notification-service/src/services/hooks/useGetV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleQuery.d.ts +0 -21
- package/dist/notification-service/src/services/hooks/useGetV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleQuery.js +0 -19
- package/dist/notification-service/src/services/hooks/usePostNotificationChannelMutation.d.ts +0 -23
- package/dist/notification-service/src/services/hooks/usePostNotificationChannelMutation.js +0 -14
- package/dist/notification-service/src/services/hooks/usePostNotificationRuleMutation.d.ts +0 -23
- package/dist/notification-service/src/services/hooks/usePostNotificationRuleMutation.js +0 -14
- package/dist/notification-service/src/services/hooks/usePutV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutation.d.ts +0 -24
- package/dist/notification-service/src/services/hooks/usePutV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutation.js +0 -14
- package/dist/notification-service/src/services/hooks/usePutv1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutation.d.ts +0 -24
- package/dist/notification-service/src/services/hooks/usePutv1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutation.js +0 -14
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { NotificationRuleListResponseResponse } from '../responses/NotificationRuleListResponseResponse';
|
|
3
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
4
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
+
export interface ListNotificationRulesRefAccountPathParams {
|
|
6
|
+
}
|
|
7
|
+
export interface ListNotificationRulesRefAccountQueryParams {
|
|
8
|
+
/**
|
|
9
|
+
* @default 0
|
|
10
|
+
*/
|
|
11
|
+
page?: number;
|
|
12
|
+
/**
|
|
13
|
+
* @default 30
|
|
14
|
+
*/
|
|
15
|
+
limit?: number;
|
|
16
|
+
sort?: 'created' | 'identifier' | 'name' | 'updated';
|
|
17
|
+
order?: 'ASC' | 'DESC';
|
|
18
|
+
search_term?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ListNotificationRulesRefAccountHeaderParams {
|
|
21
|
+
'Harness-Account'?: string;
|
|
22
|
+
}
|
|
23
|
+
export type ListNotificationRulesRefAccountOKResponse = NotificationRuleListResponseResponse;
|
|
24
|
+
export type ListNotificationRulesRefAccountErrorResponse = unknown;
|
|
25
|
+
export interface ListNotificationRulesRefOrgPathParams {
|
|
26
|
+
org: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ListNotificationRulesRefOrgQueryParams {
|
|
29
|
+
/**
|
|
30
|
+
* @default 0
|
|
31
|
+
*/
|
|
32
|
+
page?: number;
|
|
33
|
+
/**
|
|
34
|
+
* @default 30
|
|
35
|
+
*/
|
|
36
|
+
limit?: number;
|
|
37
|
+
sort?: 'created' | 'identifier' | 'name' | 'updated';
|
|
38
|
+
order?: 'ASC' | 'DESC';
|
|
39
|
+
search_term?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ListNotificationRulesRefOrgHeaderParams {
|
|
42
|
+
'Harness-Account'?: string;
|
|
43
|
+
}
|
|
44
|
+
export type ListNotificationRulesRefOrgOKResponse = NotificationRuleListResponseResponse;
|
|
45
|
+
export type ListNotificationRulesRefOrgErrorResponse = unknown;
|
|
46
|
+
export interface ListNotificationRulesRefProjectPathParams {
|
|
47
|
+
org: string;
|
|
48
|
+
project: string;
|
|
49
|
+
}
|
|
50
|
+
export interface ListNotificationRulesRefProjectQueryParams {
|
|
51
|
+
/**
|
|
52
|
+
* @default 0
|
|
53
|
+
*/
|
|
54
|
+
page?: number;
|
|
55
|
+
/**
|
|
56
|
+
* @default 30
|
|
57
|
+
*/
|
|
58
|
+
limit?: number;
|
|
59
|
+
sort?: 'created' | 'identifier' | 'name' | 'updated';
|
|
60
|
+
order?: 'ASC' | 'DESC';
|
|
61
|
+
search_term?: string;
|
|
62
|
+
}
|
|
63
|
+
export interface ListNotificationRulesRefProjectHeaderParams {
|
|
64
|
+
'Harness-Account'?: string;
|
|
65
|
+
}
|
|
66
|
+
export type ListNotificationRulesRefProjectOKResponse = NotificationRuleListResponseResponse;
|
|
67
|
+
export type ListNotificationRulesRefProjectErrorResponse = unknown;
|
|
68
|
+
export type ListNotificationRulesRefOKResponse<T> = T extends ListNotificationRulesRefProjectPathParams ? ResponseWithPagination<ListNotificationRulesRefProjectOKResponse> : T extends ListNotificationRulesRefOrgPathParams ? ResponseWithPagination<ListNotificationRulesRefOrgOKResponse> : ResponseWithPagination<ListNotificationRulesRefAccountOKResponse>;
|
|
69
|
+
export type ListNotificationRulesRefErrorResponse<T> = T extends ListNotificationRulesRefProjectPathParams ? ListNotificationRulesRefProjectErrorResponse : T extends ListNotificationRulesRefOrgPathParams ? ListNotificationRulesRefOrgErrorResponse : ListNotificationRulesRefAccountErrorResponse;
|
|
70
|
+
export interface ListNotificationRulesRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
71
|
+
pathParams: ListNotificationRulesRefAccountPathParams | ListNotificationRulesRefOrgPathParams | ListNotificationRulesRefProjectPathParams;
|
|
72
|
+
}
|
|
73
|
+
export declare function listNotificationRulesRef<T extends ListNotificationRulesRefProps = ListNotificationRulesRefProps>(props: T): Promise<ListNotificationRulesRefOKResponse<GetPathParamsType<T>>>;
|
|
74
|
+
export declare function useListNotificationRulesRefQuery<T extends ListNotificationRulesRefProps = ListNotificationRulesRefProps>(props: T, options?: Omit<UseQueryOptions<ListNotificationRulesRefOKResponse<GetPathParamsType<T>>, ListNotificationRulesRefErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListNotificationRulesRefOKResponse<GetPathParamsType<T>>, ListNotificationRulesRefErrorResponse<GetPathParamsType<T>>>;
|
|
@@ -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 { useQuery } 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 listNotificationRulesRef(props) {
|
|
15
|
+
let url = `/v1/notification-rules`;
|
|
16
|
+
let method = 'GET';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/notification-rules`;
|
|
19
|
+
method = 'GET';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/notification-rules`;
|
|
23
|
+
method = 'GET';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useListNotificationRulesRefQuery(props, options) {
|
|
29
|
+
return useQuery(['listNotificationRulesRef', props.queryParams], ({ signal }) => listNotificationRulesRef(Object.assign(Object.assign({}, props), { signal })), options);
|
|
30
|
+
}
|
package/dist/notification-service/src/services/hooks/useUpdateNotificationChannelRefQuery.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { UseQueryOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { NotificationChannelResponseResponse } from '../responses/NotificationChannelResponseResponse';
|
|
3
|
+
import type { NotificationChannelRequestRequestBody } from '../requestBodies/NotificationChannelRequestRequestBody';
|
|
4
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface UpdateNotificationChannelRefAccountPathParams {
|
|
7
|
+
'notification-channel': string;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateNotificationChannelRefAccountHeaderParams {
|
|
10
|
+
'Harness-Account'?: string;
|
|
11
|
+
}
|
|
12
|
+
export type UpdateNotificationChannelRefAccountRequestBody = NotificationChannelRequestRequestBody;
|
|
13
|
+
export type UpdateNotificationChannelRefAccountOKResponse = NotificationChannelResponseResponse;
|
|
14
|
+
export type UpdateNotificationChannelRefAccountErrorResponse = unknown;
|
|
15
|
+
export interface UpdateNotificationChannelRefOrgPathParams {
|
|
16
|
+
'notification-channel': string;
|
|
17
|
+
org: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UpdateNotificationChannelRefOrgHeaderParams {
|
|
20
|
+
'Harness-Account'?: string;
|
|
21
|
+
}
|
|
22
|
+
export type UpdateNotificationChannelRefOrgRequestBody = NotificationChannelRequestRequestBody;
|
|
23
|
+
export type UpdateNotificationChannelRefOrgOKResponse = NotificationChannelResponseResponse;
|
|
24
|
+
export type UpdateNotificationChannelRefOrgErrorResponse = unknown;
|
|
25
|
+
export interface UpdateNotificationChannelRefProjectPathParams {
|
|
26
|
+
'notification-channel': string;
|
|
27
|
+
org: string;
|
|
28
|
+
project: string;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdateNotificationChannelRefProjectHeaderParams {
|
|
31
|
+
'Harness-Account'?: string;
|
|
32
|
+
}
|
|
33
|
+
export type UpdateNotificationChannelRefProjectRequestBody = NotificationChannelRequestRequestBody;
|
|
34
|
+
export type UpdateNotificationChannelRefProjectOKResponse = NotificationChannelResponseResponse;
|
|
35
|
+
export type UpdateNotificationChannelRefProjectErrorResponse = unknown;
|
|
36
|
+
export type UpdateNotificationChannelRefOKResponse<T> = T extends UpdateNotificationChannelRefProjectPathParams ? ResponseWithPagination<UpdateNotificationChannelRefProjectOKResponse> : T extends UpdateNotificationChannelRefOrgPathParams ? ResponseWithPagination<UpdateNotificationChannelRefOrgOKResponse> : ResponseWithPagination<UpdateNotificationChannelRefAccountOKResponse>;
|
|
37
|
+
export type UpdateNotificationChannelRefErrorResponse<T> = T extends UpdateNotificationChannelRefProjectPathParams ? UpdateNotificationChannelRefProjectErrorResponse : T extends UpdateNotificationChannelRefOrgPathParams ? UpdateNotificationChannelRefOrgErrorResponse : UpdateNotificationChannelRefAccountErrorResponse;
|
|
38
|
+
export interface UpdateNotificationChannelRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
39
|
+
pathParams: UpdateNotificationChannelRefAccountPathParams | UpdateNotificationChannelRefOrgPathParams | UpdateNotificationChannelRefProjectPathParams;
|
|
40
|
+
}
|
|
41
|
+
export declare function updateNotificationChannelRef<T extends UpdateNotificationChannelRefProps = UpdateNotificationChannelRefProps>(props: T): Promise<UpdateNotificationChannelRefOKResponse<GetPathParamsType<T>>>;
|
|
42
|
+
export declare function useUpdateNotificationChannelRefQuery<T extends UpdateNotificationChannelRefProps = UpdateNotificationChannelRefProps>(props: T, options?: Omit<UseQueryOptions<UpdateNotificationChannelRefOKResponse<GetPathParamsType<T>>, UpdateNotificationChannelRefErrorResponse<GetPathParamsType<T>>>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<UpdateNotificationChannelRefOKResponse<GetPathParamsType<T>>, UpdateNotificationChannelRefErrorResponse<GetPathParamsType<T>>>;
|
|
@@ -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 { useQuery } 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 updateNotificationChannelRef(props) {
|
|
15
|
+
let url = `/v1/notification-channels/${props.pathParams['notification-channel']}`;
|
|
16
|
+
let method = 'PUT';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/notification-channels/${props.pathParams['notification-channel']}`;
|
|
19
|
+
method = 'PUT';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/notification-channels/${props.pathParams['notification-channel']}`;
|
|
23
|
+
method = 'PUT';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useUpdateNotificationChannelRefQuery(props, options) {
|
|
29
|
+
return useQuery(['updateNotificationChannelRef'], ({ signal }) => updateNotificationChannelRef(Object.assign(Object.assign({}, props), { signal })), options);
|
|
30
|
+
}
|
package/dist/notification-service/src/services/hooks/useUpdateNotificationRuleRefMutation.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { NotificationRuleResponseResponse } from '../responses/NotificationRuleResponseResponse';
|
|
3
|
+
import type { NotificationRuleRequestRequestBody } from '../requestBodies/NotificationRuleRequestRequestBody';
|
|
4
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
5
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
6
|
+
export interface UpdateNotificationRuleRefAccountPathParams {
|
|
7
|
+
'notification-rule': string;
|
|
8
|
+
}
|
|
9
|
+
export interface UpdateNotificationRuleRefAccountHeaderParams {
|
|
10
|
+
'Harness-Account'?: string;
|
|
11
|
+
}
|
|
12
|
+
export type UpdateNotificationRuleRefAccountRequestBody = NotificationRuleRequestRequestBody;
|
|
13
|
+
export type UpdateNotificationRuleRefAccountOKResponse = NotificationRuleResponseResponse;
|
|
14
|
+
export type UpdateNotificationRuleRefAccountErrorResponse = unknown;
|
|
15
|
+
export interface UpdateNotificationRuleRefOrgPathParams {
|
|
16
|
+
org: string;
|
|
17
|
+
'notification-rule': string;
|
|
18
|
+
}
|
|
19
|
+
export interface UpdateNotificationRuleRefOrgHeaderParams {
|
|
20
|
+
'Harness-Account'?: string;
|
|
21
|
+
}
|
|
22
|
+
export type UpdateNotificationRuleRefOrgRequestBody = NotificationRuleRequestRequestBody;
|
|
23
|
+
export type UpdateNotificationRuleRefOrgOKResponse = NotificationRuleResponseResponse;
|
|
24
|
+
export type UpdateNotificationRuleRefOrgErrorResponse = unknown;
|
|
25
|
+
export interface UpdateNotificationRuleRefProjectPathParams {
|
|
26
|
+
org: string;
|
|
27
|
+
project: string;
|
|
28
|
+
'notification-rule': string;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdateNotificationRuleRefProjectHeaderParams {
|
|
31
|
+
'Harness-Account'?: string;
|
|
32
|
+
}
|
|
33
|
+
export type UpdateNotificationRuleRefProjectRequestBody = NotificationRuleRequestRequestBody;
|
|
34
|
+
export type UpdateNotificationRuleRefProjectOKResponse = NotificationRuleResponseResponse;
|
|
35
|
+
export type UpdateNotificationRuleRefProjectErrorResponse = unknown;
|
|
36
|
+
export type UpdateNotificationRuleRefOKResponse<T> = T extends UpdateNotificationRuleRefProjectPathParams ? ResponseWithPagination<UpdateNotificationRuleRefProjectOKResponse> : T extends UpdateNotificationRuleRefOrgPathParams ? ResponseWithPagination<UpdateNotificationRuleRefOrgOKResponse> : ResponseWithPagination<UpdateNotificationRuleRefAccountOKResponse>;
|
|
37
|
+
export type UpdateNotificationRuleRefErrorResponse<T> = T extends UpdateNotificationRuleRefProjectPathParams ? UpdateNotificationRuleRefProjectErrorResponse : T extends UpdateNotificationRuleRefOrgPathParams ? UpdateNotificationRuleRefOrgErrorResponse : UpdateNotificationRuleRefAccountErrorResponse;
|
|
38
|
+
export interface UpdateNotificationRuleRefProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
39
|
+
pathParams: UpdateNotificationRuleRefAccountPathParams | UpdateNotificationRuleRefOrgPathParams | UpdateNotificationRuleRefProjectPathParams;
|
|
40
|
+
}
|
|
41
|
+
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>, unknown, UpdateNotificationRuleRefProps, 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 updateNotificationRuleRef(props) {
|
|
15
|
+
let url = `/v1/notification-rules/${props.pathParams['notification-rule']}`;
|
|
16
|
+
let method = 'PUT';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/notification-rules/${props.pathParams['notification-rule']}`;
|
|
19
|
+
method = 'PUT';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/v1/orgs/${props.pathParams.org}/notification-rules/${props.pathParams['notification-rule']}`;
|
|
23
|
+
method = 'PUT';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
27
|
+
}
|
|
28
|
+
export function useUpdateNotificationRuleRefMutation(options) {
|
|
29
|
+
return useMutation((mutateProps) => updateNotificationRuleRef(mutateProps), options);
|
|
30
|
+
}
|
|
@@ -1,29 +1,41 @@
|
|
|
1
1
|
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
|
-
export type {
|
|
3
|
-
export {
|
|
4
|
-
export type {
|
|
5
|
-
export {
|
|
6
|
-
export type {
|
|
2
|
+
export type { CreateNotificationChannelRefAccountErrorResponse, CreateNotificationChannelRefAccountOKResponse, CreateNotificationChannelRefAccountRequestBody, CreateNotificationChannelRefOrgErrorResponse, CreateNotificationChannelRefOrgOKResponse, CreateNotificationChannelRefOrgPathParams, CreateNotificationChannelRefOrgRequestBody, CreateNotificationChannelRefProjectErrorResponse, CreateNotificationChannelRefProjectOKResponse, CreateNotificationChannelRefProjectPathParams, CreateNotificationChannelRefProjectRequestBody, CreateNotificationChannelRefProps, } from './hooks/useCreateNotificationChannelRefQuery';
|
|
3
|
+
export { createNotificationChannelRef, useCreateNotificationChannelRefQuery, } from './hooks/useCreateNotificationChannelRefQuery';
|
|
4
|
+
export type { CreateNotificationRuleRefAccountErrorResponse, CreateNotificationRuleRefAccountOKResponse, CreateNotificationRuleRefAccountRequestBody, CreateNotificationRuleRefOrgErrorResponse, CreateNotificationRuleRefOrgOKResponse, CreateNotificationRuleRefOrgPathParams, CreateNotificationRuleRefOrgRequestBody, CreateNotificationRuleRefProjectErrorResponse, CreateNotificationRuleRefProjectOKResponse, CreateNotificationRuleRefProjectPathParams, CreateNotificationRuleRefProjectRequestBody, CreateNotificationRuleRefProps, } from './hooks/useCreateNotificationRuleRefQuery';
|
|
5
|
+
export { createNotificationRuleRef, useCreateNotificationRuleRefQuery, } from './hooks/useCreateNotificationRuleRefQuery';
|
|
6
|
+
export type { DeleteNotificationChannelRefAccountErrorResponse, DeleteNotificationChannelRefAccountOKResponse, DeleteNotificationChannelRefAccountPathParams, DeleteNotificationChannelRefOrgErrorResponse, DeleteNotificationChannelRefOrgOKResponse, DeleteNotificationChannelRefOrgPathParams, DeleteNotificationChannelRefProjectErrorResponse, DeleteNotificationChannelRefProjectOKResponse, DeleteNotificationChannelRefProjectPathParams, DeleteNotificationChannelRefProps, } from './hooks/useDeleteNotificationChannelRefQuery';
|
|
7
|
+
export { deleteNotificationChannelRef, useDeleteNotificationChannelRefQuery, } from './hooks/useDeleteNotificationChannelRefQuery';
|
|
8
|
+
export type { DeleteNotificationRuleRefAccountErrorResponse, DeleteNotificationRuleRefAccountOKResponse, DeleteNotificationRuleRefAccountPathParams, DeleteNotificationRuleRefOrgErrorResponse, DeleteNotificationRuleRefOrgOKResponse, DeleteNotificationRuleRefOrgPathParams, DeleteNotificationRuleRefProjectErrorResponse, DeleteNotificationRuleRefProjectOKResponse, DeleteNotificationRuleRefProjectPathParams, DeleteNotificationRuleRefProps, } from './hooks/useDeleteNotificationRuleRefQuery';
|
|
9
|
+
export { deleteNotificationRuleRef, useDeleteNotificationRuleRefQuery, } from './hooks/useDeleteNotificationRuleRefQuery';
|
|
10
|
+
export type { GetNotificationChannelAccountErrorResponse, GetNotificationChannelAccountOkResponse, GetNotificationChannelAccountProps, GetNotificationChannelAccountQueryPathParams, } from './hooks/useGetNotificationChannelAccountQuery';
|
|
11
|
+
export { getNotificationChannelAccount, useGetNotificationChannelAccountQuery, } from './hooks/useGetNotificationChannelAccountQuery';
|
|
12
|
+
export type { GetNotificationChannelOrgErrorResponse, GetNotificationChannelOrgOkResponse, GetNotificationChannelOrgProps, GetNotificationChannelOrgQueryPathParams, } from './hooks/useGetNotificationChannelOrgQuery';
|
|
13
|
+
export { getNotificationChannelOrg, useGetNotificationChannelOrgQuery, } from './hooks/useGetNotificationChannelOrgQuery';
|
|
14
|
+
export type { GetNotificationChannelErrorResponse, GetNotificationChannelOkResponse, GetNotificationChannelProps, GetNotificationChannelQueryPathParams, } from './hooks/useGetNotificationChannelQuery';
|
|
7
15
|
export { getNotificationChannel, useGetNotificationChannelQuery, } from './hooks/useGetNotificationChannelQuery';
|
|
8
|
-
export type {
|
|
9
|
-
export {
|
|
10
|
-
export type {
|
|
11
|
-
export {
|
|
12
|
-
export type {
|
|
13
|
-
export {
|
|
14
|
-
export type {
|
|
15
|
-
export {
|
|
16
|
-
export type {
|
|
17
|
-
export {
|
|
18
|
-
export type {
|
|
19
|
-
export {
|
|
20
|
-
export type {
|
|
21
|
-
export {
|
|
16
|
+
export type { GetNotificationRuleAccountErrorResponse, GetNotificationRuleAccountOkResponse, GetNotificationRuleAccountProps, GetNotificationRuleAccountQueryPathParams, } from './hooks/useGetNotificationRuleAccountQuery';
|
|
17
|
+
export { getNotificationRuleAccount, useGetNotificationRuleAccountQuery, } from './hooks/useGetNotificationRuleAccountQuery';
|
|
18
|
+
export type { GetNotificationRuleOrgErrorResponse, GetNotificationRuleOrgOkResponse, GetNotificationRuleOrgProps, GetNotificationRuleOrgQueryPathParams, } from './hooks/useGetNotificationRuleOrgQuery';
|
|
19
|
+
export { getNotificationRuleOrg, useGetNotificationRuleOrgQuery, } from './hooks/useGetNotificationRuleOrgQuery';
|
|
20
|
+
export type { GetNotificationRuleErrorResponse, GetNotificationRuleOkResponse, GetNotificationRuleProps, GetNotificationRuleQueryPathParams, } from './hooks/useGetNotificationRuleQuery';
|
|
21
|
+
export { getNotificationRule, useGetNotificationRuleQuery, } from './hooks/useGetNotificationRuleQuery';
|
|
22
|
+
export type { ListNotificationChannelsRefAccountErrorResponse, ListNotificationChannelsRefAccountOKResponse, ListNotificationChannelsRefAccountQueryParams, ListNotificationChannelsRefOrgErrorResponse, ListNotificationChannelsRefOrgOKResponse, ListNotificationChannelsRefOrgPathParams, ListNotificationChannelsRefOrgQueryParams, ListNotificationChannelsRefProjectErrorResponse, ListNotificationChannelsRefProjectOKResponse, ListNotificationChannelsRefProjectPathParams, ListNotificationChannelsRefProjectQueryParams, ListNotificationChannelsRefProps, } from './hooks/useListNotificationChannelsRefQuery';
|
|
23
|
+
export { listNotificationChannelsRef, useListNotificationChannelsRefQuery, } from './hooks/useListNotificationChannelsRefQuery';
|
|
24
|
+
export type { ListNotificationRulesRefAccountErrorResponse, ListNotificationRulesRefAccountOKResponse, ListNotificationRulesRefAccountQueryParams, ListNotificationRulesRefOrgErrorResponse, ListNotificationRulesRefOrgOKResponse, ListNotificationRulesRefOrgPathParams, ListNotificationRulesRefOrgQueryParams, ListNotificationRulesRefProjectErrorResponse, ListNotificationRulesRefProjectOKResponse, ListNotificationRulesRefProjectPathParams, ListNotificationRulesRefProjectQueryParams, ListNotificationRulesRefProps, } from './hooks/useListNotificationRulesRefQuery';
|
|
25
|
+
export { listNotificationRulesRef, useListNotificationRulesRefQuery, } from './hooks/useListNotificationRulesRefQuery';
|
|
26
|
+
export type { UpdateNotificationChannelRefAccountErrorResponse, UpdateNotificationChannelRefAccountOKResponse, UpdateNotificationChannelRefAccountPathParams, UpdateNotificationChannelRefAccountRequestBody, UpdateNotificationChannelRefOrgErrorResponse, UpdateNotificationChannelRefOrgOKResponse, UpdateNotificationChannelRefOrgPathParams, UpdateNotificationChannelRefOrgRequestBody, UpdateNotificationChannelRefProjectErrorResponse, UpdateNotificationChannelRefProjectOKResponse, UpdateNotificationChannelRefProjectPathParams, UpdateNotificationChannelRefProjectRequestBody, UpdateNotificationChannelRefProps, } from './hooks/useUpdateNotificationChannelRefQuery';
|
|
27
|
+
export { updateNotificationChannelRef, useUpdateNotificationChannelRefQuery, } from './hooks/useUpdateNotificationChannelRefQuery';
|
|
28
|
+
export type { UpdateNotificationRuleRefAccountErrorResponse, UpdateNotificationRuleRefAccountOKResponse, UpdateNotificationRuleRefAccountPathParams, UpdateNotificationRuleRefAccountRequestBody, UpdateNotificationRuleRefOrgErrorResponse, UpdateNotificationRuleRefOrgOKResponse, UpdateNotificationRuleRefOrgPathParams, UpdateNotificationRuleRefOrgRequestBody, UpdateNotificationRuleRefProjectErrorResponse, UpdateNotificationRuleRefProjectOKResponse, UpdateNotificationRuleRefProjectPathParams, UpdateNotificationRuleRefProjectRequestBody, UpdateNotificationRuleRefProps, } from './hooks/useUpdateNotificationRuleRefMutation';
|
|
29
|
+
export { updateNotificationRuleRef, useUpdateNotificationRuleRefMutation, } from './hooks/useUpdateNotificationRuleRefMutation';
|
|
22
30
|
export type { NotificationChannelRequestRequestBody } from './requestBodies/NotificationChannelRequestRequestBody';
|
|
23
31
|
export type { NotificationRuleRequestRequestBody } from './requestBodies/NotificationRuleRequestRequestBody';
|
|
24
32
|
export type { NotificationChannelListResponseResponse } from './responses/NotificationChannelListResponseResponse';
|
|
25
33
|
export type { NotificationChannelResponseResponse } from './responses/NotificationChannelResponseResponse';
|
|
26
34
|
export type { NotificationRuleListResponseResponse } from './responses/NotificationRuleListResponseResponse';
|
|
27
35
|
export type { NotificationRuleResponseResponse } from './responses/NotificationRuleResponseResponse';
|
|
36
|
+
export type { ChannelDto } from './schemas/ChannelDto';
|
|
37
|
+
export type { ChannelType } from './schemas/ChannelType';
|
|
28
38
|
export type { NotificationChannelDto } from './schemas/NotificationChannelDto';
|
|
29
39
|
export type { NotificationRuleDto } from './schemas/NotificationRuleDto';
|
|
40
|
+
export type { Status } from './schemas/Status';
|
|
41
|
+
export type { UserGroup } from './schemas/UserGroup';
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { createNotificationChannelRef, useCreateNotificationChannelRefQuery, } from './hooks/useCreateNotificationChannelRefQuery';
|
|
2
|
+
export { createNotificationRuleRef, useCreateNotificationRuleRefQuery, } from './hooks/useCreateNotificationRuleRefQuery';
|
|
3
|
+
export { deleteNotificationChannelRef, useDeleteNotificationChannelRefQuery, } from './hooks/useDeleteNotificationChannelRefQuery';
|
|
4
|
+
export { deleteNotificationRuleRef, useDeleteNotificationRuleRefQuery, } from './hooks/useDeleteNotificationRuleRefQuery';
|
|
5
|
+
export { getNotificationChannelAccount, useGetNotificationChannelAccountQuery, } from './hooks/useGetNotificationChannelAccountQuery';
|
|
6
|
+
export { getNotificationChannelOrg, useGetNotificationChannelOrgQuery, } from './hooks/useGetNotificationChannelOrgQuery';
|
|
3
7
|
export { getNotificationChannel, useGetNotificationChannelQuery, } from './hooks/useGetNotificationChannelQuery';
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
8
|
+
export { getNotificationRuleAccount, useGetNotificationRuleAccountQuery, } from './hooks/useGetNotificationRuleAccountQuery';
|
|
9
|
+
export { getNotificationRuleOrg, useGetNotificationRuleOrgQuery, } from './hooks/useGetNotificationRuleOrgQuery';
|
|
10
|
+
export { getNotificationRule, useGetNotificationRuleQuery, } from './hooks/useGetNotificationRuleQuery';
|
|
11
|
+
export { listNotificationChannelsRef, useListNotificationChannelsRefQuery, } from './hooks/useListNotificationChannelsRefQuery';
|
|
12
|
+
export { listNotificationRulesRef, useListNotificationRulesRefQuery, } from './hooks/useListNotificationRulesRefQuery';
|
|
13
|
+
export { updateNotificationChannelRef, useUpdateNotificationChannelRefQuery, } from './hooks/useUpdateNotificationChannelRefQuery';
|
|
14
|
+
export { updateNotificationRuleRef, useUpdateNotificationRuleRefMutation, } from './hooks/useUpdateNotificationRuleRefMutation';
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
+
import type { ChannelDto } from '../schemas/ChannelDto';
|
|
2
|
+
import type { ChannelType } from '../schemas/ChannelType';
|
|
3
|
+
import type { Status } from '../schemas/Status';
|
|
1
4
|
/**
|
|
2
5
|
* Notification Channel DTO
|
|
3
6
|
*/
|
|
4
7
|
export interface NotificationChannelDto {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}>;
|
|
9
|
-
user_groups?: Array<{
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}>;
|
|
12
|
-
};
|
|
8
|
+
account?: string;
|
|
9
|
+
channel?: ChannelDto;
|
|
13
10
|
created?: number;
|
|
14
11
|
created_by?: {
|
|
15
12
|
[key: string]: any;
|
|
16
13
|
};
|
|
17
14
|
identifier?: string;
|
|
18
|
-
|
|
15
|
+
name?: string;
|
|
16
|
+
notification_channel_type?: ChannelType;
|
|
19
17
|
org?: string;
|
|
20
18
|
project?: string;
|
|
21
|
-
status?:
|
|
19
|
+
status?: Status;
|
|
22
20
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { NotificationChannelDto } from '../schemas/NotificationChannelDto';
|
|
2
|
+
import type { Status } from '../schemas/Status';
|
|
1
3
|
/**
|
|
2
4
|
* Notification Rule DTO
|
|
3
5
|
*/
|
|
@@ -8,33 +10,20 @@ export interface NotificationRuleDto {
|
|
|
8
10
|
[key: string]: any;
|
|
9
11
|
};
|
|
10
12
|
identifier?: string;
|
|
13
|
+
name?: string;
|
|
11
14
|
notification_conditions?: Array<{
|
|
12
15
|
condition_name?: string;
|
|
13
16
|
notification_event_configs?: Array<{
|
|
14
|
-
notification_channels?:
|
|
15
|
-
|
|
16
|
-
pager_duty_integration_keys?: Array<{
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}>;
|
|
19
|
-
user_groups?: Array<{
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}>;
|
|
22
|
-
};
|
|
23
|
-
created?: number;
|
|
24
|
-
created_by?: {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
};
|
|
27
|
-
name?: string;
|
|
28
|
-
notification_channel_type?: string;
|
|
29
|
-
org?: string;
|
|
30
|
-
project?: string;
|
|
31
|
-
status?: string;
|
|
32
|
-
}>;
|
|
17
|
+
notification_channels?: NotificationChannelDto[];
|
|
18
|
+
notification_entity?: string;
|
|
33
19
|
notification_event?: string;
|
|
20
|
+
notification_event_data?: {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
};
|
|
34
23
|
}>;
|
|
35
24
|
}>;
|
|
36
25
|
notification_entity?: string;
|
|
37
26
|
org?: string;
|
|
38
27
|
project?: string;
|
|
39
|
-
status?:
|
|
28
|
+
status?: Status;
|
|
40
29
|
}
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
3
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
|
-
export interface DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutationPathParams {
|
|
5
|
-
org: string;
|
|
6
|
-
project: string;
|
|
7
|
-
'notification-rule': string;
|
|
8
|
-
}
|
|
9
|
-
export interface DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutationHeaderParams {
|
|
10
|
-
'Harness-Account'?: string;
|
|
11
|
-
}
|
|
12
|
-
export type DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleOkResponse = ResponseWithPagination<unknown>;
|
|
13
|
-
export type DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleErrorResponse = unknown;
|
|
14
|
-
export interface DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleProps extends DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutationPathParams, Omit<FetcherOptions<unknown, unknown, DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutationHeaderParams>, 'url'> {
|
|
15
|
-
}
|
|
16
|
-
export declare function deleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRule(props: DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleProps): Promise<DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleOkResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Delete notification rule
|
|
19
|
-
*/
|
|
20
|
-
export declare function useDeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutation(options?: Omit<UseMutationOptions<DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleOkResponse, DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleErrorResponse, DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleOkResponse, unknown, DeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleProps, unknown>;
|
|
@@ -1,14 +0,0 @@
|
|
|
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 deleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRule(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/notification-rule/${props['notification-rule']}`, method: 'DELETE' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Delete notification rule
|
|
11
|
-
*/
|
|
12
|
-
export function useDeleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRuleMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => deleteV1OrgsOrgProjectsProjectNotificationRuleNotificationRule(mutateProps), options);
|
|
14
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
3
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
4
|
-
export interface Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutationPathParams {
|
|
5
|
-
'notification-channel': string;
|
|
6
|
-
org: string;
|
|
7
|
-
project: string;
|
|
8
|
-
}
|
|
9
|
-
export interface Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutationHeaderParams {
|
|
10
|
-
'Harness-Account'?: string;
|
|
11
|
-
}
|
|
12
|
-
export type Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelOkResponse = ResponseWithPagination<unknown>;
|
|
13
|
-
export type Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelErrorResponse = unknown;
|
|
14
|
-
export interface Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelProps extends Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutationPathParams, Omit<FetcherOptions<unknown, unknown, Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutationHeaderParams>, 'url'> {
|
|
15
|
-
}
|
|
16
|
-
export declare function deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannel(props: Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelProps): Promise<Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelOkResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Delete notificatation channel
|
|
19
|
-
*/
|
|
20
|
-
export declare function useDeletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutation(options?: Omit<UseMutationOptions<Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelOkResponse, Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelErrorResponse, Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelOkResponse, unknown, Deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelProps, unknown>;
|
|
@@ -1,14 +0,0 @@
|
|
|
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 deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannel(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/v1/orgs/${props.org}/projects/${props.project}/notification-channels/${props['notification-channel']}`, method: 'DELETE' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Delete notificatation channel
|
|
11
|
-
*/
|
|
12
|
-
export function useDeletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannelMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => deletev1OrgsOrgProjectsProjectNotificationChannelsNotificationChannel(mutateProps), options);
|
|
14
|
-
}
|