@harnessio/react-intelligence-service-client 0.14.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/intelligence-service/src/services/hooks/useCreateMemoryMutation.d.ts +20 -0
- package/dist/intelligence-service/src/services/hooks/useCreateMemoryMutation.js +14 -0
- package/dist/intelligence-service/src/services/hooks/useCreateRuleMutation.d.ts +40 -0
- package/dist/intelligence-service/src/services/hooks/useCreateRuleMutation.js +30 -0
- package/dist/intelligence-service/src/services/hooks/useDeleteMemoryMutation.d.ts +19 -0
- package/dist/intelligence-service/src/services/hooks/useDeleteMemoryMutation.js +14 -0
- package/dist/intelligence-service/src/services/hooks/useDeleteRuleMutation.d.ts +30 -11
- package/dist/intelligence-service/src/services/hooks/useDeleteRuleMutation.js +20 -4
- package/dist/intelligence-service/src/services/hooks/useGetMemoryQuery.d.ts +20 -0
- package/dist/intelligence-service/src/services/hooks/useGetMemoryQuery.js +14 -0
- package/dist/intelligence-service/src/services/hooks/useGetRuleQuery.d.ts +30 -11
- package/dist/intelligence-service/src/services/hooks/useGetRuleQuery.js +19 -5
- package/dist/intelligence-service/src/services/hooks/useGetUserSettingQuery.d.ts +20 -0
- package/dist/intelligence-service/src/services/hooks/useGetUserSettingQuery.js +14 -0
- package/dist/intelligence-service/src/services/hooks/useListMemoriesQuery.d.ts +25 -0
- package/dist/intelligence-service/src/services/hooks/useListMemoriesQuery.js +14 -0
- package/dist/intelligence-service/src/services/hooks/useListRulesQuery.d.ts +46 -12
- package/dist/intelligence-service/src/services/hooks/useListRulesQuery.js +20 -4
- package/dist/intelligence-service/src/services/hooks/useListUserSettingsQuery.d.ts +17 -0
- package/dist/intelligence-service/src/services/hooks/useListUserSettingsQuery.js +14 -0
- package/dist/intelligence-service/src/services/hooks/useUpdateMemoryMutation.d.ts +23 -0
- package/dist/intelligence-service/src/services/hooks/useUpdateMemoryMutation.js +14 -0
- package/dist/intelligence-service/src/services/hooks/useUpdateRuleMutation.d.ts +33 -13
- package/dist/intelligence-service/src/services/hooks/useUpdateRuleMutation.js +20 -4
- package/dist/intelligence-service/src/services/hooks/useUpdateUserSettingsMutation.d.ts +20 -0
- package/dist/intelligence-service/src/services/hooks/useUpdateUserSettingsMutation.js +14 -0
- package/dist/intelligence-service/src/services/index.d.ts +32 -26
- package/dist/intelligence-service/src/services/index.js +9 -11
- package/dist/intelligence-service/src/services/schemas/HandlerCreateMemoryRequest.d.ts +6 -0
- package/dist/intelligence-service/src/services/schemas/HandlerCreateMemoryRequest.js +4 -0
- package/dist/intelligence-service/src/services/schemas/HandlerGetMemoryResponse.d.ts +4 -0
- package/dist/intelligence-service/src/services/schemas/HandlerGetMemoryResponse.js +1 -0
- package/dist/intelligence-service/src/services/schemas/HandlerListMemoriesResponse.d.ts +6 -0
- package/dist/intelligence-service/src/services/schemas/HandlerListMemoriesResponse.js +1 -0
- package/dist/intelligence-service/src/services/schemas/HandlerUpdateMemoryRequest.d.ts +6 -0
- package/dist/intelligence-service/src/services/schemas/HandlerUpdateMemoryRequest.js +4 -0
- package/dist/intelligence-service/src/services/schemas/TypesMemory.d.ts +23 -0
- package/dist/intelligence-service/src/services/schemas/TypesMemory.js +1 -0
- package/dist/intelligence-service/src/services/schemas/TypesSettingValueResponse.d.ts +4 -0
- package/dist/intelligence-service/src/services/schemas/TypesSettingValueResponse.js +4 -0
- package/dist/intelligence-service/src/services/schemas/TypesType.d.ts +1 -0
- package/dist/intelligence-service/src/services/schemas/TypesType.js +4 -0
- package/dist/intelligence-service/src/services/schemas/TypesUserSettingRequest.d.ts +6 -0
- package/dist/intelligence-service/src/services/schemas/TypesUserSettingRequest.js +4 -0
- package/dist/intelligence-service/src/services/schemas/TypesUserSettingResponse.d.ts +8 -0
- package/dist/intelligence-service/src/services/schemas/TypesUserSettingResponse.js +4 -0
- package/dist/intelligence-service/src/services/schemas/TypesUserSettingUpdateResponse.d.ts +5 -0
- package/dist/intelligence-service/src/services/schemas/TypesUserSettingUpdateResponse.js +4 -0
- package/package.json +1 -1
- package/dist/intelligence-service/src/services/hooks/useCreateAccountRuleMutation.d.ts +0 -20
- package/dist/intelligence-service/src/services/hooks/useCreateAccountRuleMutation.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useCreateOrgRuleMutation.d.ts +0 -23
- package/dist/intelligence-service/src/services/hooks/useCreateOrgRuleMutation.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useCreateProjectRuleMutation.d.ts +0 -24
- package/dist/intelligence-service/src/services/hooks/useCreateProjectRuleMutation.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useDeleteOrgRuleMutation.d.ts +0 -20
- package/dist/intelligence-service/src/services/hooks/useDeleteOrgRuleMutation.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useDeleteProjectRuleMutation.d.ts +0 -21
- package/dist/intelligence-service/src/services/hooks/useDeleteProjectRuleMutation.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useGetOrgRuleQuery.d.ts +0 -21
- package/dist/intelligence-service/src/services/hooks/useGetOrgRuleQuery.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useGetProjectRuleQuery.d.ts +0 -22
- package/dist/intelligence-service/src/services/hooks/useGetProjectRuleQuery.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useListOrgRulesQuery.d.ts +0 -29
- package/dist/intelligence-service/src/services/hooks/useListOrgRulesQuery.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useListProjectRulesQuery.d.ts +0 -30
- package/dist/intelligence-service/src/services/hooks/useListProjectRulesQuery.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useUpdateOrgRuleMutation.d.ts +0 -24
- package/dist/intelligence-service/src/services/hooks/useUpdateOrgRuleMutation.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useUpdateProjectRuleMutation.d.ts +0 -25
- package/dist/intelligence-service/src/services/hooks/useUpdateProjectRuleMutation.js +0 -14
|
@@ -2,22 +2,42 @@ import { UseMutationOptions } from '@tanstack/react-query';
|
|
|
2
2
|
import type { TypesRule } from '../schemas/TypesRule';
|
|
3
3
|
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
4
|
import type { ControllerRuleInput } from '../schemas/ControllerRuleInput';
|
|
5
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
5
|
+
import type { GetPathParamsType, ResponseWithPagination } from '../helpers';
|
|
6
6
|
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
-
export interface
|
|
7
|
+
export interface UpdateRuleAccountPathParams {
|
|
8
8
|
rule_id: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface UpdateRuleAccountHeaderParams {
|
|
11
11
|
'harness-account': string;
|
|
12
12
|
}
|
|
13
|
-
export type
|
|
14
|
-
export type
|
|
15
|
-
export type
|
|
16
|
-
export interface
|
|
17
|
-
|
|
13
|
+
export type UpdateRuleAccountRequestBody = ControllerRuleInput;
|
|
14
|
+
export type UpdateRuleAccountOKResponse = TypesRule;
|
|
15
|
+
export type UpdateRuleAccountErrorResponse = UsererrorError;
|
|
16
|
+
export interface UpdateRuleOrgPathParams {
|
|
17
|
+
org: string;
|
|
18
|
+
rule_id: string;
|
|
19
|
+
}
|
|
20
|
+
export interface UpdateRuleOrgHeaderParams {
|
|
21
|
+
'harness-account': string;
|
|
22
|
+
}
|
|
23
|
+
export type UpdateRuleOrgRequestBody = ControllerRuleInput;
|
|
24
|
+
export type UpdateRuleOrgOKResponse = TypesRule;
|
|
25
|
+
export type UpdateRuleOrgErrorResponse = UsererrorError;
|
|
26
|
+
export interface UpdateRuleProjectPathParams {
|
|
27
|
+
org: string;
|
|
28
|
+
project: string;
|
|
29
|
+
rule_id: string;
|
|
30
|
+
}
|
|
31
|
+
export interface UpdateRuleProjectHeaderParams {
|
|
32
|
+
'harness-account': string;
|
|
33
|
+
}
|
|
34
|
+
export type UpdateRuleProjectRequestBody = ControllerRuleInput;
|
|
35
|
+
export type UpdateRuleProjectOKResponse = TypesRule;
|
|
36
|
+
export type UpdateRuleProjectErrorResponse = UsererrorError;
|
|
37
|
+
export type UpdateRuleOKResponse<T> = T extends UpdateRuleProjectPathParams ? ResponseWithPagination<UpdateRuleProjectOKResponse> : T extends UpdateRuleOrgPathParams ? ResponseWithPagination<UpdateRuleOrgOKResponse> : ResponseWithPagination<UpdateRuleAccountOKResponse>;
|
|
38
|
+
export type UpdateRuleErrorResponse<T> = T extends UpdateRuleProjectPathParams ? UpdateRuleProjectErrorResponse : T extends UpdateRuleOrgPathParams ? UpdateRuleOrgErrorResponse : UpdateRuleAccountErrorResponse;
|
|
39
|
+
export interface UpdateRuleProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
|
|
40
|
+
pathParams: UpdateRuleAccountPathParams | UpdateRuleOrgPathParams | UpdateRuleProjectPathParams;
|
|
18
41
|
}
|
|
19
|
-
export declare function updateRule(props:
|
|
20
|
-
|
|
21
|
-
* Update an existing rule
|
|
22
|
-
*/
|
|
23
|
-
export declare function useUpdateRuleMutation(options?: Omit<UseMutationOptions<UpdateRuleOkResponse, UpdateRuleErrorResponse, UpdateRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateRuleOkResponse, UsererrorError, UpdateRuleProps, unknown>;
|
|
42
|
+
export declare function updateRule<T extends UpdateRuleProps = UpdateRuleProps>(props: T): Promise<UpdateRuleOKResponse<GetPathParamsType<T>>>;
|
|
43
|
+
export declare function useUpdateRuleMutation(options?: Omit<UseMutationOptions<UpdateRuleOKResponse<unknown>, UpdateRuleErrorResponse<unknown>, UpdateRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ResponseWithPagination<TypesRule>, UsererrorError, UpdateRuleProps, unknown>;
|
|
@@ -3,12 +3,28 @@
|
|
|
3
3
|
// Please do not modify this code directly.
|
|
4
4
|
import { useMutation } from '@tanstack/react-query';
|
|
5
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
|
+
}
|
|
6
14
|
export function updateRule(props) {
|
|
7
|
-
|
|
15
|
+
let url = `/api/v1/rules/${props.pathParams.rule_id}`;
|
|
16
|
+
let method = 'PUT';
|
|
17
|
+
if (isProjectPathParams(props.pathParams)) {
|
|
18
|
+
url = `/api/v1/orgs/${props.pathParams.org}/projects/${props.pathParams.project}/rules/${props.pathParams.rule_id}`;
|
|
19
|
+
method = 'PUT';
|
|
20
|
+
}
|
|
21
|
+
else if (isOrgPathParams(props.pathParams)) {
|
|
22
|
+
url = `/api/v1/orgs/${props.pathParams.org}/rules/${props.pathParams.rule_id}`;
|
|
23
|
+
method = 'PUT';
|
|
24
|
+
}
|
|
25
|
+
return fetcher(Object.assign({ url,
|
|
26
|
+
method }, props));
|
|
8
27
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Update an existing rule
|
|
11
|
-
*/
|
|
12
28
|
export function useUpdateRuleMutation(options) {
|
|
13
29
|
return useMutation((mutateProps) => updateRule(mutateProps), options);
|
|
14
30
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { TypesUserSettingUpdateResponse } from '../schemas/TypesUserSettingUpdateResponse';
|
|
3
|
+
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
|
+
import type { TypesUserSettingRequest } from '../schemas/TypesUserSettingRequest';
|
|
5
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
+
export interface UpdateUserSettingsMutationHeaderParams {
|
|
8
|
+
'harness-account': string;
|
|
9
|
+
}
|
|
10
|
+
export type UpdateUserSettingsRequestBody = TypesUserSettingRequest[];
|
|
11
|
+
export type UpdateUserSettingsOkResponse = ResponseWithPagination<TypesUserSettingUpdateResponse[]>;
|
|
12
|
+
export type UpdateUserSettingsErrorResponse = UsererrorError;
|
|
13
|
+
export interface UpdateUserSettingsProps extends Omit<FetcherOptions<unknown, UpdateUserSettingsRequestBody, UpdateUserSettingsMutationHeaderParams>, 'url'> {
|
|
14
|
+
body: UpdateUserSettingsRequestBody;
|
|
15
|
+
}
|
|
16
|
+
export declare function updateUserSettings(props: UpdateUserSettingsProps): Promise<UpdateUserSettingsOkResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Updates one or more user settings for the authenticated user
|
|
19
|
+
*/
|
|
20
|
+
export declare function useUpdateUserSettingsMutation(options?: Omit<UseMutationOptions<UpdateUserSettingsOkResponse, UpdateUserSettingsErrorResponse, UpdateUserSettingsProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdateUserSettingsOkResponse, UsererrorError, UpdateUserSettingsProps, 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 updateUserSettings(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/api/v1/user-settings`, method: 'PUT' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Updates one or more user settings for the authenticated user
|
|
11
|
+
*/
|
|
12
|
+
export function useUpdateUserSettingsMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => updateUserSettings(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -5,25 +5,21 @@ export type { ChatV2ErrorResponse, ChatV2MutationQueryParams, ChatV2OkResponse,
|
|
|
5
5
|
export { chatV2, useChatV2Mutation } from './hooks/useChatV2Mutation';
|
|
6
6
|
export type { CompleteAttachmentErrorResponse, CompleteAttachmentMutationPathParams, CompleteAttachmentOkResponse, CompleteAttachmentProps, CompleteAttachmentRequestBody, } from './hooks/useCompleteAttachmentMutation';
|
|
7
7
|
export { completeAttachment, useCompleteAttachmentMutation, } from './hooks/useCompleteAttachmentMutation';
|
|
8
|
-
export type { CreateAccountRuleErrorResponse, CreateAccountRuleOkResponse, CreateAccountRuleProps, CreateAccountRuleRequestBody, } from './hooks/useCreateAccountRuleMutation';
|
|
9
|
-
export { createAccountRule, useCreateAccountRuleMutation, } from './hooks/useCreateAccountRuleMutation';
|
|
10
8
|
export type { CreateChatFeedbackErrorResponse, CreateChatFeedbackMutationQueryParams, CreateChatFeedbackOkResponse, CreateChatFeedbackProps, CreateChatFeedbackRequestBody, } from './hooks/useCreateChatFeedbackMutation';
|
|
11
9
|
export { createChatFeedback, useCreateChatFeedbackMutation, } from './hooks/useCreateChatFeedbackMutation';
|
|
12
10
|
export type { CreateEntityErrorResponse, CreateEntityOkResponse, CreateEntityProps, CreateEntityRequestBody, } from './hooks/useCreateEntityMutation';
|
|
13
11
|
export { createEntity, useCreateEntityMutation } from './hooks/useCreateEntityMutation';
|
|
14
|
-
export type {
|
|
15
|
-
export {
|
|
16
|
-
export type {
|
|
17
|
-
export {
|
|
12
|
+
export type { CreateMemoryErrorResponse, CreateMemoryOkResponse, CreateMemoryProps, CreateMemoryRequestBody, } from './hooks/useCreateMemoryMutation';
|
|
13
|
+
export { createMemory, useCreateMemoryMutation } from './hooks/useCreateMemoryMutation';
|
|
14
|
+
export type { CreateRuleAccountErrorResponse, CreateRuleAccountOKResponse, CreateRuleAccountRequestBody, CreateRuleOrgErrorResponse, CreateRuleOrgOKResponse, CreateRuleOrgPathParams, CreateRuleOrgRequestBody, CreateRuleProjectErrorResponse, CreateRuleProjectOKResponse, CreateRuleProjectPathParams, CreateRuleProjectRequestBody, CreateRuleProps, } from './hooks/useCreateRuleMutation';
|
|
15
|
+
export { createRule, useCreateRuleMutation } from './hooks/useCreateRuleMutation';
|
|
18
16
|
export type { CreateUserRuleErrorResponse, CreateUserRuleOkResponse, CreateUserRuleProps, CreateUserRuleRequestBody, } from './hooks/useCreateUserRuleMutation';
|
|
19
17
|
export { createUserRule, useCreateUserRuleMutation } from './hooks/useCreateUserRuleMutation';
|
|
20
18
|
export type { DeleteChatSessionErrorResponse, DeleteChatSessionMutationPathParams, DeleteChatSessionOkResponse, DeleteChatSessionProps, } from './hooks/useDeleteChatSessionMutation';
|
|
21
19
|
export { deleteChatSession, useDeleteChatSessionMutation, } from './hooks/useDeleteChatSessionMutation';
|
|
22
|
-
export type {
|
|
23
|
-
export {
|
|
24
|
-
export type {
|
|
25
|
-
export { deleteProjectRule, useDeleteProjectRuleMutation, } from './hooks/useDeleteProjectRuleMutation';
|
|
26
|
-
export type { DeleteRuleErrorResponse, DeleteRuleMutationPathParams, DeleteRuleOkResponse, DeleteRuleProps, } from './hooks/useDeleteRuleMutation';
|
|
20
|
+
export type { DeleteMemoryErrorResponse, DeleteMemoryMutationPathParams, DeleteMemoryOkResponse, DeleteMemoryProps, } from './hooks/useDeleteMemoryMutation';
|
|
21
|
+
export { deleteMemory, useDeleteMemoryMutation } from './hooks/useDeleteMemoryMutation';
|
|
22
|
+
export type { DeleteRuleAccountErrorResponse, DeleteRuleAccountOKResponse, DeleteRuleAccountPathParams, DeleteRuleOrgErrorResponse, DeleteRuleOrgOKResponse, DeleteRuleOrgPathParams, DeleteRuleProjectErrorResponse, DeleteRuleProjectOKResponse, DeleteRuleProjectPathParams, DeleteRuleProps, } from './hooks/useDeleteRuleMutation';
|
|
27
23
|
export { deleteRule, useDeleteRuleMutation } from './hooks/useDeleteRuleMutation';
|
|
28
24
|
export type { DeleteUserRuleErrorResponse, DeleteUserRuleMutationPathParams, DeleteUserRuleOkResponse, DeleteUserRuleProps, } from './hooks/useDeleteUserRuleMutation';
|
|
29
25
|
export { deleteUserRule, useDeleteUserRuleMutation } from './hooks/useDeleteUserRuleMutation';
|
|
@@ -33,40 +29,40 @@ export type { GetChatSessionMessagesV2ErrorResponse, GetChatSessionMessagesV2OkR
|
|
|
33
29
|
export { getChatSessionMessagesV2, useGetChatSessionMessagesV2Query, } from './hooks/useGetChatSessionMessagesV2Query';
|
|
34
30
|
export type { GetChatSessionErrorResponse, GetChatSessionOkResponse, GetChatSessionProps, GetChatSessionQueryPathParams, GetChatSessionQueryQueryParams, } from './hooks/useGetChatSessionQuery';
|
|
35
31
|
export { getChatSession, useGetChatSessionQuery } from './hooks/useGetChatSessionQuery';
|
|
36
|
-
export type {
|
|
37
|
-
export {
|
|
38
|
-
export type { GetProjectRuleErrorResponse, GetProjectRuleOkResponse, GetProjectRuleProps, GetProjectRuleQueryPathParams, } from './hooks/useGetProjectRuleQuery';
|
|
39
|
-
export { getProjectRule, useGetProjectRuleQuery } from './hooks/useGetProjectRuleQuery';
|
|
32
|
+
export type { GetMemoryErrorResponse, GetMemoryOkResponse, GetMemoryProps, GetMemoryQueryPathParams, } from './hooks/useGetMemoryQuery';
|
|
33
|
+
export { getMemory, useGetMemoryQuery } from './hooks/useGetMemoryQuery';
|
|
40
34
|
export type { GetReadyAttachmentErrorResponse, GetReadyAttachmentOkResponse, GetReadyAttachmentProps, GetReadyAttachmentQueryPathParams, GetReadyAttachmentQueryQueryParams, } from './hooks/useGetReadyAttachmentQuery';
|
|
41
35
|
export { getReadyAttachment, useGetReadyAttachmentQuery } from './hooks/useGetReadyAttachmentQuery';
|
|
42
36
|
export type { GetRuleCategoriesErrorResponse, GetRuleCategoriesOkResponse, GetRuleCategoriesProps, } from './hooks/useGetRuleCategoriesQuery';
|
|
43
37
|
export { getRuleCategories, useGetRuleCategoriesQuery } from './hooks/useGetRuleCategoriesQuery';
|
|
44
|
-
export type {
|
|
38
|
+
export type { GetRuleAccountErrorResponse, GetRuleAccountOKResponse, GetRuleAccountPathParams, GetRuleOrgErrorResponse, GetRuleOrgOKResponse, GetRuleOrgPathParams, GetRuleProjectErrorResponse, GetRuleProjectOKResponse, GetRuleProjectPathParams, GetRuleProps, } from './hooks/useGetRuleQuery';
|
|
45
39
|
export { getRule, useGetRuleQuery } from './hooks/useGetRuleQuery';
|
|
46
40
|
export type { GetUserRuleErrorResponse, GetUserRuleOkResponse, GetUserRuleProps, GetUserRuleQueryPathParams, } from './hooks/useGetUserRuleQuery';
|
|
47
41
|
export { getUserRule, useGetUserRuleQuery } from './hooks/useGetUserRuleQuery';
|
|
42
|
+
export type { GetUserSettingErrorResponse, GetUserSettingOkResponse, GetUserSettingProps, GetUserSettingQueryPathParams, } from './hooks/useGetUserSettingQuery';
|
|
43
|
+
export { getUserSetting, useGetUserSettingQuery } from './hooks/useGetUserSettingQuery';
|
|
48
44
|
export type { InitializeAttachmentErrorResponse, InitializeAttachmentMutationQueryParams, InitializeAttachmentOkResponse, InitializeAttachmentProps, InitializeAttachmentRequestBody, } from './hooks/useInitializeAttachmentMutation';
|
|
49
45
|
export { initializeAttachment, useInitializeAttachmentMutation, } from './hooks/useInitializeAttachmentMutation';
|
|
50
46
|
export type { ListChatSessionsErrorResponse, ListChatSessionsOkResponse, ListChatSessionsProps, ListChatSessionsQueryQueryParams, } from './hooks/useListChatSessionsQuery';
|
|
51
47
|
export { listChatSessions, useListChatSessionsQuery } from './hooks/useListChatSessionsQuery';
|
|
52
|
-
export type {
|
|
53
|
-
export {
|
|
54
|
-
export type {
|
|
55
|
-
export { listProjectRules, useListProjectRulesQuery } from './hooks/useListProjectRulesQuery';
|
|
56
|
-
export type { ListRulesErrorResponse, ListRulesOkResponse, ListRulesProps, ListRulesQueryQueryParams, } from './hooks/useListRulesQuery';
|
|
48
|
+
export type { ListMemoriesErrorResponse, ListMemoriesOkResponse, ListMemoriesProps, ListMemoriesQueryQueryParams, } from './hooks/useListMemoriesQuery';
|
|
49
|
+
export { listMemories, useListMemoriesQuery } from './hooks/useListMemoriesQuery';
|
|
50
|
+
export type { ListRulesAccountErrorResponse, ListRulesAccountOKResponse, ListRulesAccountQueryParams, ListRulesOrgErrorResponse, ListRulesOrgOKResponse, ListRulesOrgPathParams, ListRulesOrgQueryParams, ListRulesProjectErrorResponse, ListRulesProjectOKResponse, ListRulesProjectPathParams, ListRulesProjectQueryParams, ListRulesProps, } from './hooks/useListRulesQuery';
|
|
57
51
|
export { listRules, useListRulesQuery } from './hooks/useListRulesQuery';
|
|
58
52
|
export type { ListUserRulesErrorResponse, ListUserRulesOkResponse, ListUserRulesProps, ListUserRulesQueryQueryParams, } from './hooks/useListUserRulesQuery';
|
|
59
53
|
export { listUserRules, useListUserRulesQuery } from './hooks/useListUserRulesQuery';
|
|
54
|
+
export type { ListUserSettingsErrorResponse, ListUserSettingsOkResponse, ListUserSettingsProps, } from './hooks/useListUserSettingsQuery';
|
|
55
|
+
export { listUserSettings, useListUserSettingsQuery } from './hooks/useListUserSettingsQuery';
|
|
60
56
|
export type { UpdateChatSessionErrorResponse, UpdateChatSessionMutationPathParams, UpdateChatSessionOkResponse, UpdateChatSessionProps, UpdateChatSessionRequestBody, } from './hooks/useUpdateChatSessionMutation';
|
|
61
57
|
export { updateChatSession, useUpdateChatSessionMutation, } from './hooks/useUpdateChatSessionMutation';
|
|
62
|
-
export type {
|
|
63
|
-
export {
|
|
64
|
-
export type {
|
|
65
|
-
export { updateProjectRule, useUpdateProjectRuleMutation, } from './hooks/useUpdateProjectRuleMutation';
|
|
66
|
-
export type { UpdateRuleErrorResponse, UpdateRuleMutationPathParams, UpdateRuleOkResponse, UpdateRuleProps, UpdateRuleRequestBody, } from './hooks/useUpdateRuleMutation';
|
|
58
|
+
export type { UpdateMemoryErrorResponse, UpdateMemoryMutationPathParams, UpdateMemoryOkResponse, UpdateMemoryProps, UpdateMemoryRequestBody, } from './hooks/useUpdateMemoryMutation';
|
|
59
|
+
export { updateMemory, useUpdateMemoryMutation } from './hooks/useUpdateMemoryMutation';
|
|
60
|
+
export type { UpdateRuleAccountErrorResponse, UpdateRuleAccountOKResponse, UpdateRuleAccountPathParams, UpdateRuleAccountRequestBody, UpdateRuleOrgErrorResponse, UpdateRuleOrgOKResponse, UpdateRuleOrgPathParams, UpdateRuleOrgRequestBody, UpdateRuleProjectErrorResponse, UpdateRuleProjectOKResponse, UpdateRuleProjectPathParams, UpdateRuleProjectRequestBody, UpdateRuleProps, } from './hooks/useUpdateRuleMutation';
|
|
67
61
|
export { updateRule, useUpdateRuleMutation } from './hooks/useUpdateRuleMutation';
|
|
68
62
|
export type { UpdateUserRuleErrorResponse, UpdateUserRuleMutationPathParams, UpdateUserRuleOkResponse, UpdateUserRuleProps, UpdateUserRuleRequestBody, } from './hooks/useUpdateUserRuleMutation';
|
|
69
63
|
export { updateUserRule, useUpdateUserRuleMutation } from './hooks/useUpdateUserRuleMutation';
|
|
64
|
+
export type { UpdateUserSettingsErrorResponse, UpdateUserSettingsOkResponse, UpdateUserSettingsProps, UpdateUserSettingsRequestBody, } from './hooks/useUpdateUserSettingsMutation';
|
|
65
|
+
export { updateUserSettings, useUpdateUserSettingsMutation, } from './hooks/useUpdateUserSettingsMutation';
|
|
70
66
|
export type { ControllerCreateRuleInput } from './schemas/ControllerCreateRuleInput';
|
|
71
67
|
export type { ControllerRuleInput } from './schemas/ControllerRuleInput';
|
|
72
68
|
export type { EnumAction } from './schemas/EnumAction';
|
|
@@ -77,7 +73,11 @@ export type { EnumMessageType } from './schemas/EnumMessageType';
|
|
|
77
73
|
export type { EnumRequestAction } from './schemas/EnumRequestAction';
|
|
78
74
|
export type { EnumRole } from './schemas/EnumRole';
|
|
79
75
|
export type { EnumSentiment } from './schemas/EnumSentiment';
|
|
76
|
+
export type { HandlerCreateMemoryRequest } from './schemas/HandlerCreateMemoryRequest';
|
|
77
|
+
export type { HandlerGetMemoryResponse } from './schemas/HandlerGetMemoryResponse';
|
|
80
78
|
export type { HandlerGetSessionResponse } from './schemas/HandlerGetSessionResponse';
|
|
79
|
+
export type { HandlerListMemoriesResponse } from './schemas/HandlerListMemoriesResponse';
|
|
80
|
+
export type { HandlerUpdateMemoryRequest } from './schemas/HandlerUpdateMemoryRequest';
|
|
81
81
|
export type { OpenapiCreateFeedbackRequest } from './schemas/OpenapiCreateFeedbackRequest';
|
|
82
82
|
export type { OpenapiRuleCategoriesResponse } from './schemas/OpenapiRuleCategoriesResponse';
|
|
83
83
|
export type { OpenapiUpdateSessionRequest } from './schemas/OpenapiUpdateSessionRequest';
|
|
@@ -99,6 +99,7 @@ export type { TypesConversation } from './schemas/TypesConversation';
|
|
|
99
99
|
export type { TypesEntityInfo } from './schemas/TypesEntityInfo';
|
|
100
100
|
export type { TypesEntityOperationResponse } from './schemas/TypesEntityOperationResponse';
|
|
101
101
|
export type { TypesHarnessEntity } from './schemas/TypesHarnessEntity';
|
|
102
|
+
export type { TypesMemory } from './schemas/TypesMemory';
|
|
102
103
|
export type { TypesMessage } from './schemas/TypesMessage';
|
|
103
104
|
export type { TypesResponseMessage } from './schemas/TypesResponseMessage';
|
|
104
105
|
export type { TypesRule } from './schemas/TypesRule';
|
|
@@ -106,5 +107,10 @@ export type { TypesRuleCategory } from './schemas/TypesRuleCategory';
|
|
|
106
107
|
export type { TypesRuleScope } from './schemas/TypesRuleScope';
|
|
107
108
|
export type { TypesRuleSource } from './schemas/TypesRuleSource';
|
|
108
109
|
export type { TypesRuleStatus } from './schemas/TypesRuleStatus';
|
|
110
|
+
export type { TypesSettingValueResponse } from './schemas/TypesSettingValueResponse';
|
|
111
|
+
export type { TypesType } from './schemas/TypesType';
|
|
112
|
+
export type { TypesUserSettingRequest } from './schemas/TypesUserSettingRequest';
|
|
113
|
+
export type { TypesUserSettingResponse } from './schemas/TypesUserSettingResponse';
|
|
114
|
+
export type { TypesUserSettingUpdateResponse } from './schemas/TypesUserSettingUpdateResponse';
|
|
109
115
|
export type { UsererrorError } from './schemas/UsererrorError';
|
|
110
116
|
export type { UuidUuid } from './schemas/UuidUuid';
|
|
@@ -1,34 +1,32 @@
|
|
|
1
1
|
export { chat, useChatMutation } from './hooks/useChatMutation';
|
|
2
2
|
export { chatV2, useChatV2Mutation } from './hooks/useChatV2Mutation';
|
|
3
3
|
export { completeAttachment, useCompleteAttachmentMutation, } from './hooks/useCompleteAttachmentMutation';
|
|
4
|
-
export { createAccountRule, useCreateAccountRuleMutation, } from './hooks/useCreateAccountRuleMutation';
|
|
5
4
|
export { createChatFeedback, useCreateChatFeedbackMutation, } from './hooks/useCreateChatFeedbackMutation';
|
|
6
5
|
export { createEntity, useCreateEntityMutation } from './hooks/useCreateEntityMutation';
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
6
|
+
export { createMemory, useCreateMemoryMutation } from './hooks/useCreateMemoryMutation';
|
|
7
|
+
export { createRule, useCreateRuleMutation } from './hooks/useCreateRuleMutation';
|
|
9
8
|
export { createUserRule, useCreateUserRuleMutation } from './hooks/useCreateUserRuleMutation';
|
|
10
9
|
export { deleteChatSession, useDeleteChatSessionMutation, } from './hooks/useDeleteChatSessionMutation';
|
|
11
|
-
export {
|
|
12
|
-
export { deleteProjectRule, useDeleteProjectRuleMutation, } from './hooks/useDeleteProjectRuleMutation';
|
|
10
|
+
export { deleteMemory, useDeleteMemoryMutation } from './hooks/useDeleteMemoryMutation';
|
|
13
11
|
export { deleteRule, useDeleteRuleMutation } from './hooks/useDeleteRuleMutation';
|
|
14
12
|
export { deleteUserRule, useDeleteUserRuleMutation } from './hooks/useDeleteUserRuleMutation';
|
|
15
13
|
export { getChatSessionMessages, useGetChatSessionMessagesQuery, } from './hooks/useGetChatSessionMessagesQuery';
|
|
16
14
|
export { getChatSessionMessagesV2, useGetChatSessionMessagesV2Query, } from './hooks/useGetChatSessionMessagesV2Query';
|
|
17
15
|
export { getChatSession, useGetChatSessionQuery } from './hooks/useGetChatSessionQuery';
|
|
18
|
-
export {
|
|
19
|
-
export { getProjectRule, useGetProjectRuleQuery } from './hooks/useGetProjectRuleQuery';
|
|
16
|
+
export { getMemory, useGetMemoryQuery } from './hooks/useGetMemoryQuery';
|
|
20
17
|
export { getReadyAttachment, useGetReadyAttachmentQuery } from './hooks/useGetReadyAttachmentQuery';
|
|
21
18
|
export { getRuleCategories, useGetRuleCategoriesQuery } from './hooks/useGetRuleCategoriesQuery';
|
|
22
19
|
export { getRule, useGetRuleQuery } from './hooks/useGetRuleQuery';
|
|
23
20
|
export { getUserRule, useGetUserRuleQuery } from './hooks/useGetUserRuleQuery';
|
|
21
|
+
export { getUserSetting, useGetUserSettingQuery } from './hooks/useGetUserSettingQuery';
|
|
24
22
|
export { initializeAttachment, useInitializeAttachmentMutation, } from './hooks/useInitializeAttachmentMutation';
|
|
25
23
|
export { listChatSessions, useListChatSessionsQuery } from './hooks/useListChatSessionsQuery';
|
|
26
|
-
export {
|
|
27
|
-
export { listProjectRules, useListProjectRulesQuery } from './hooks/useListProjectRulesQuery';
|
|
24
|
+
export { listMemories, useListMemoriesQuery } from './hooks/useListMemoriesQuery';
|
|
28
25
|
export { listRules, useListRulesQuery } from './hooks/useListRulesQuery';
|
|
29
26
|
export { listUserRules, useListUserRulesQuery } from './hooks/useListUserRulesQuery';
|
|
27
|
+
export { listUserSettings, useListUserSettingsQuery } from './hooks/useListUserSettingsQuery';
|
|
30
28
|
export { updateChatSession, useUpdateChatSessionMutation, } from './hooks/useUpdateChatSessionMutation';
|
|
31
|
-
export {
|
|
32
|
-
export { updateProjectRule, useUpdateProjectRuleMutation, } from './hooks/useUpdateProjectRuleMutation';
|
|
29
|
+
export { updateMemory, useUpdateMemoryMutation } from './hooks/useUpdateMemoryMutation';
|
|
33
30
|
export { updateRule, useUpdateRuleMutation } from './hooks/useUpdateRuleMutation';
|
|
34
31
|
export { updateUserRule, useUpdateUserRuleMutation } from './hooks/useUpdateUserRuleMutation';
|
|
32
|
+
export { updateUserSettings, useUpdateUserSettingsMutation, } from './hooks/useUpdateUserSettingsMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { TypesType } from '../schemas/TypesType';
|
|
2
|
+
export interface TypesMemory {
|
|
3
|
+
account_id?: string;
|
|
4
|
+
content?: string;
|
|
5
|
+
/**
|
|
6
|
+
* @format date-time
|
|
7
|
+
*/
|
|
8
|
+
created_at?: string;
|
|
9
|
+
document_id?: string;
|
|
10
|
+
embeddings?: number[];
|
|
11
|
+
id?: string;
|
|
12
|
+
org_id?: string;
|
|
13
|
+
project_id?: string;
|
|
14
|
+
tags?: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
type?: TypesType;
|
|
18
|
+
/**
|
|
19
|
+
* @format date-time
|
|
20
|
+
*/
|
|
21
|
+
updated_at?: string;
|
|
22
|
+
user_id?: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type TypesType = string;
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { TypesRule } from '../schemas/TypesRule';
|
|
3
|
-
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
|
-
import type { ControllerCreateRuleInput } from '../schemas/ControllerCreateRuleInput';
|
|
5
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
-
export interface CreateAccountRuleMutationHeaderParams {
|
|
8
|
-
'harness-account': string;
|
|
9
|
-
}
|
|
10
|
-
export type CreateAccountRuleRequestBody = ControllerCreateRuleInput;
|
|
11
|
-
export type CreateAccountRuleOkResponse = ResponseWithPagination<TypesRule>;
|
|
12
|
-
export type CreateAccountRuleErrorResponse = UsererrorError;
|
|
13
|
-
export interface CreateAccountRuleProps extends Omit<FetcherOptions<unknown, CreateAccountRuleRequestBody, CreateAccountRuleMutationHeaderParams>, 'url'> {
|
|
14
|
-
body: CreateAccountRuleRequestBody;
|
|
15
|
-
}
|
|
16
|
-
export declare function createAccountRule(props: CreateAccountRuleProps): Promise<CreateAccountRuleOkResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Create a new account-level rule
|
|
19
|
-
*/
|
|
20
|
-
export declare function useCreateAccountRuleMutation(options?: Omit<UseMutationOptions<CreateAccountRuleOkResponse, CreateAccountRuleErrorResponse, CreateAccountRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateAccountRuleOkResponse, UsererrorError, CreateAccountRuleProps, 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 createAccountRule(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v1/rules`, method: 'POST' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Create a new account-level rule
|
|
11
|
-
*/
|
|
12
|
-
export function useCreateAccountRuleMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => createAccountRule(mutateProps), options);
|
|
14
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { TypesRule } from '../schemas/TypesRule';
|
|
3
|
-
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
|
-
import type { ControllerCreateRuleInput } from '../schemas/ControllerCreateRuleInput';
|
|
5
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
-
export interface CreateOrgRuleMutationPathParams {
|
|
8
|
-
org_id: string;
|
|
9
|
-
}
|
|
10
|
-
export interface CreateOrgRuleMutationHeaderParams {
|
|
11
|
-
'harness-account': string;
|
|
12
|
-
}
|
|
13
|
-
export type CreateOrgRuleRequestBody = ControllerCreateRuleInput;
|
|
14
|
-
export type CreateOrgRuleOkResponse = ResponseWithPagination<TypesRule>;
|
|
15
|
-
export type CreateOrgRuleErrorResponse = UsererrorError;
|
|
16
|
-
export interface CreateOrgRuleProps extends CreateOrgRuleMutationPathParams, Omit<FetcherOptions<unknown, CreateOrgRuleRequestBody, CreateOrgRuleMutationHeaderParams>, 'url'> {
|
|
17
|
-
body: CreateOrgRuleRequestBody;
|
|
18
|
-
}
|
|
19
|
-
export declare function createOrgRule(props: CreateOrgRuleProps): Promise<CreateOrgRuleOkResponse>;
|
|
20
|
-
/**
|
|
21
|
-
* Create a new organization-level rule
|
|
22
|
-
*/
|
|
23
|
-
export declare function useCreateOrgRuleMutation(options?: Omit<UseMutationOptions<CreateOrgRuleOkResponse, CreateOrgRuleErrorResponse, CreateOrgRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateOrgRuleOkResponse, UsererrorError, CreateOrgRuleProps, 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 createOrgRule(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v1/orgs/${props.org_id}/rules`, method: 'POST' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Create a new organization-level rule
|
|
11
|
-
*/
|
|
12
|
-
export function useCreateOrgRuleMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => createOrgRule(mutateProps), options);
|
|
14
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { TypesRule } from '../schemas/TypesRule';
|
|
3
|
-
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
|
-
import type { ControllerCreateRuleInput } from '../schemas/ControllerCreateRuleInput';
|
|
5
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
-
export interface CreateProjectRuleMutationPathParams {
|
|
8
|
-
org_id: string;
|
|
9
|
-
project_id: string;
|
|
10
|
-
}
|
|
11
|
-
export interface CreateProjectRuleMutationHeaderParams {
|
|
12
|
-
'harness-account': string;
|
|
13
|
-
}
|
|
14
|
-
export type CreateProjectRuleRequestBody = ControllerCreateRuleInput;
|
|
15
|
-
export type CreateProjectRuleOkResponse = ResponseWithPagination<TypesRule>;
|
|
16
|
-
export type CreateProjectRuleErrorResponse = UsererrorError;
|
|
17
|
-
export interface CreateProjectRuleProps extends CreateProjectRuleMutationPathParams, Omit<FetcherOptions<unknown, CreateProjectRuleRequestBody, CreateProjectRuleMutationHeaderParams>, 'url'> {
|
|
18
|
-
body: CreateProjectRuleRequestBody;
|
|
19
|
-
}
|
|
20
|
-
export declare function createProjectRule(props: CreateProjectRuleProps): Promise<CreateProjectRuleOkResponse>;
|
|
21
|
-
/**
|
|
22
|
-
* Create a new project-level rule
|
|
23
|
-
*/
|
|
24
|
-
export declare function useCreateProjectRuleMutation(options?: Omit<UseMutationOptions<CreateProjectRuleOkResponse, CreateProjectRuleErrorResponse, CreateProjectRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateProjectRuleOkResponse, UsererrorError, CreateProjectRuleProps, 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 createProjectRule(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v1/orgs/${props.org_id}/projects/${props.project_id}/rules`, method: 'POST' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Create a new project-level rule
|
|
11
|
-
*/
|
|
12
|
-
export function useCreateProjectRuleMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => createProjectRule(mutateProps), options);
|
|
14
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
3
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
4
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
5
|
-
export interface DeleteOrgRuleMutationPathParams {
|
|
6
|
-
org_id: string;
|
|
7
|
-
rule_id: string;
|
|
8
|
-
}
|
|
9
|
-
export interface DeleteOrgRuleMutationHeaderParams {
|
|
10
|
-
'harness-account': string;
|
|
11
|
-
}
|
|
12
|
-
export type DeleteOrgRuleOkResponse = ResponseWithPagination<unknown>;
|
|
13
|
-
export type DeleteOrgRuleErrorResponse = UsererrorError;
|
|
14
|
-
export interface DeleteOrgRuleProps extends DeleteOrgRuleMutationPathParams, Omit<FetcherOptions<unknown, unknown, DeleteOrgRuleMutationHeaderParams>, 'url'> {
|
|
15
|
-
}
|
|
16
|
-
export declare function deleteOrgRule(props: DeleteOrgRuleProps): Promise<DeleteOrgRuleOkResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Delete an organization-level rule
|
|
19
|
-
*/
|
|
20
|
-
export declare function useDeleteOrgRuleMutation(options?: Omit<UseMutationOptions<DeleteOrgRuleOkResponse, DeleteOrgRuleErrorResponse, DeleteOrgRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteOrgRuleOkResponse, UsererrorError, DeleteOrgRuleProps, 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 deleteOrgRule(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v1/orgs/${props.org_id}/rules/${props.rule_id}`, method: 'DELETE' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Delete an organization-level rule
|
|
11
|
-
*/
|
|
12
|
-
export function useDeleteOrgRuleMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => deleteOrgRule(mutateProps), options);
|
|
14
|
-
}
|