@harnessio/react-intelligence-service-client 0.6.0 → 0.8.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.
Files changed (80) hide show
  1. package/dist/intelligence-service/src/services/hooks/useCreateAccountRuleMutation.d.ts +20 -0
  2. package/dist/intelligence-service/src/services/hooks/useCreateAccountRuleMutation.js +14 -0
  3. package/dist/intelligence-service/src/services/hooks/useCreateEntityMutation.d.ts +2 -2
  4. package/dist/intelligence-service/src/services/hooks/useCreateOrgRuleMutation.d.ts +23 -0
  5. package/dist/intelligence-service/src/services/hooks/useCreateOrgRuleMutation.js +14 -0
  6. package/dist/intelligence-service/src/services/hooks/useCreateProjectRuleMutation.d.ts +24 -0
  7. package/dist/intelligence-service/src/services/hooks/useCreateProjectRuleMutation.js +14 -0
  8. package/dist/intelligence-service/src/services/hooks/useCreateUserRuleMutation.d.ts +20 -0
  9. package/dist/intelligence-service/src/services/hooks/useCreateUserRuleMutation.js +14 -0
  10. package/dist/intelligence-service/src/services/hooks/useDeleteChatSessionMutation.d.ts +21 -0
  11. package/dist/intelligence-service/src/services/hooks/useDeleteChatSessionMutation.js +14 -0
  12. package/dist/intelligence-service/src/services/hooks/useDeleteOrgRuleMutation.d.ts +20 -0
  13. package/dist/intelligence-service/src/services/hooks/useDeleteOrgRuleMutation.js +14 -0
  14. package/dist/intelligence-service/src/services/hooks/useDeleteProjectRuleMutation.d.ts +21 -0
  15. package/dist/intelligence-service/src/services/hooks/useDeleteProjectRuleMutation.js +14 -0
  16. package/dist/intelligence-service/src/services/hooks/useDeleteRuleMutation.d.ts +16 -0
  17. package/dist/intelligence-service/src/services/hooks/useDeleteRuleMutation.js +14 -0
  18. package/dist/intelligence-service/src/services/hooks/useDeleteUserRuleMutation.d.ts +19 -0
  19. package/dist/intelligence-service/src/services/hooks/useDeleteUserRuleMutation.js +14 -0
  20. package/dist/intelligence-service/src/services/hooks/useGetChatSessionMessagesQuery.d.ts +31 -0
  21. package/dist/intelligence-service/src/services/hooks/useGetChatSessionMessagesQuery.js +14 -0
  22. package/dist/intelligence-service/src/services/hooks/useGetChatSessionQuery.d.ts +28 -0
  23. package/dist/intelligence-service/src/services/hooks/useGetChatSessionQuery.js +14 -0
  24. package/dist/intelligence-service/src/services/hooks/useGetOrgRuleQuery.d.ts +21 -0
  25. package/dist/intelligence-service/src/services/hooks/useGetOrgRuleQuery.js +14 -0
  26. package/dist/intelligence-service/src/services/hooks/useGetProjectRuleQuery.d.ts +22 -0
  27. package/dist/intelligence-service/src/services/hooks/useGetProjectRuleQuery.js +14 -0
  28. package/dist/intelligence-service/src/services/hooks/useGetRuleCategoriesQuery.d.ts +13 -0
  29. package/dist/intelligence-service/src/services/hooks/useGetRuleCategoriesQuery.js +14 -0
  30. package/dist/intelligence-service/src/services/hooks/useGetRuleQuery.d.ts +17 -0
  31. package/dist/intelligence-service/src/services/hooks/useGetRuleQuery.js +14 -0
  32. package/dist/intelligence-service/src/services/hooks/useGetUserRuleQuery.d.ts +20 -0
  33. package/dist/intelligence-service/src/services/hooks/useGetUserRuleQuery.js +14 -0
  34. package/dist/intelligence-service/src/services/hooks/useListChatSessionsQuery.d.ts +31 -0
  35. package/dist/intelligence-service/src/services/hooks/useListChatSessionsQuery.js +14 -0
  36. package/dist/intelligence-service/src/services/hooks/useListOrgRulesQuery.d.ts +27 -0
  37. package/dist/intelligence-service/src/services/hooks/useListOrgRulesQuery.js +14 -0
  38. package/dist/intelligence-service/src/services/hooks/useListProjectRulesQuery.d.ts +28 -0
  39. package/dist/intelligence-service/src/services/hooks/useListProjectRulesQuery.js +14 -0
  40. package/dist/intelligence-service/src/services/hooks/useListRulesQuery.d.ts +18 -0
  41. package/dist/intelligence-service/src/services/hooks/useListRulesQuery.js +14 -0
  42. package/dist/intelligence-service/src/services/hooks/useListUserRulesQuery.d.ts +24 -0
  43. package/dist/intelligence-service/src/services/hooks/useListUserRulesQuery.js +14 -0
  44. package/dist/intelligence-service/src/services/hooks/useUpdateOrgRuleMutation.d.ts +24 -0
  45. package/dist/intelligence-service/src/services/hooks/useUpdateOrgRuleMutation.js +14 -0
  46. package/dist/intelligence-service/src/services/hooks/useUpdateProjectRuleMutation.d.ts +25 -0
  47. package/dist/intelligence-service/src/services/hooks/useUpdateProjectRuleMutation.js +14 -0
  48. package/dist/intelligence-service/src/services/hooks/useUpdateRuleMutation.d.ts +20 -0
  49. package/dist/intelligence-service/src/services/hooks/useUpdateRuleMutation.js +14 -0
  50. package/dist/intelligence-service/src/services/hooks/useUpdateUserRuleMutation.d.ts +23 -0
  51. package/dist/intelligence-service/src/services/hooks/useUpdateUserRuleMutation.js +14 -0
  52. package/dist/intelligence-service/src/services/index.d.ts +62 -1
  53. package/dist/intelligence-service/src/services/index.js +25 -0
  54. package/dist/intelligence-service/src/services/schemas/ControllerRuleInput.d.ts +13 -0
  55. package/dist/intelligence-service/src/services/schemas/EnumAgentMode.d.ts +1 -0
  56. package/dist/intelligence-service/src/services/schemas/EnumAgentMode.js +4 -0
  57. package/dist/intelligence-service/src/services/schemas/HandlerGetSessionResponse.d.ts +8 -0
  58. package/dist/intelligence-service/src/services/schemas/HandlerGetSessionResponse.js +1 -0
  59. package/dist/intelligence-service/src/services/schemas/OpenapiRuleCategoriesResponse.d.ts +3 -0
  60. package/dist/intelligence-service/src/services/schemas/OpenapiRuleCategoriesResponse.js +4 -0
  61. package/dist/intelligence-service/src/services/schemas/TypesAttachmentRef.d.ts +5 -0
  62. package/dist/intelligence-service/src/services/schemas/TypesAttachmentRef.js +4 -0
  63. package/dist/intelligence-service/src/services/schemas/TypesChat.d.ts +4 -0
  64. package/dist/intelligence-service/src/services/schemas/TypesChatMessage.d.ts +21 -0
  65. package/dist/intelligence-service/src/services/schemas/TypesChatMessage.js +1 -0
  66. package/dist/intelligence-service/src/services/schemas/TypesChatSession.d.ts +21 -0
  67. package/dist/intelligence-service/src/services/schemas/TypesChatSession.js +4 -0
  68. package/dist/intelligence-service/src/services/schemas/TypesRule.d.ts +26 -0
  69. package/dist/intelligence-service/src/services/schemas/TypesRule.js +1 -0
  70. package/dist/intelligence-service/src/services/schemas/TypesRuleCategory.d.ts +1 -0
  71. package/dist/intelligence-service/src/services/schemas/TypesRuleCategory.js +4 -0
  72. package/dist/intelligence-service/src/services/schemas/TypesRuleScope.d.ts +1 -0
  73. package/dist/intelligence-service/src/services/schemas/TypesRuleScope.js +4 -0
  74. package/dist/intelligence-service/src/services/schemas/TypesRuleSource.d.ts +1 -0
  75. package/dist/intelligence-service/src/services/schemas/TypesRuleSource.js +4 -0
  76. package/dist/intelligence-service/src/services/schemas/TypesRuleStatus.d.ts +1 -0
  77. package/dist/intelligence-service/src/services/schemas/TypesRuleStatus.js +4 -0
  78. package/package.json +1 -1
  79. package/dist/intelligence-service/src/services/schemas/TypesEntityOperationResponse.d.ts +0 -10
  80. /package/dist/intelligence-service/src/services/schemas/{TypesEntityOperationResponse.js → ControllerRuleInput.js} +0 -0
@@ -0,0 +1,20 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ControllerRuleInput } from '../schemas/ControllerRuleInput';
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 = ControllerRuleInput;
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>;
@@ -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 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,5 +1,5 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { TypesEntityOperationResponse } from '../schemas/TypesEntityOperationResponse';
2
+ import type { TypesChatOutput } from '../schemas/TypesChatOutput';
3
3
  import type { UsererrorError } from '../schemas/UsererrorError';
4
4
  import type { TypesHarnessEntity } from '../schemas/TypesHarnessEntity';
5
5
  import type { ResponseWithPagination } from '../helpers';
@@ -8,7 +8,7 @@ export interface CreateEntityMutationHeaderParams {
8
8
  'harness-account': string;
9
9
  }
10
10
  export type CreateEntityRequestBody = TypesHarnessEntity;
11
- export type CreateEntityOkResponse = ResponseWithPagination<TypesEntityOperationResponse>;
11
+ export type CreateEntityOkResponse = ResponseWithPagination<TypesChatOutput>;
12
12
  export type CreateEntityErrorResponse = UsererrorError;
13
13
  export interface CreateEntityProps extends Omit<FetcherOptions<unknown, CreateEntityRequestBody, CreateEntityMutationHeaderParams>, 'url'> {
14
14
  body: CreateEntityRequestBody;
@@ -0,0 +1,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ControllerRuleInput } from '../schemas/ControllerRuleInput';
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 = ControllerRuleInput;
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>;
@@ -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 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
+ }
@@ -0,0 +1,24 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ControllerRuleInput } from '../schemas/ControllerRuleInput';
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 = ControllerRuleInput;
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>;
@@ -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 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
+ }
@@ -0,0 +1,20 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ControllerRuleInput } from '../schemas/ControllerRuleInput';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface CreateUserRuleMutationHeaderParams {
8
+ 'harness-account': string;
9
+ }
10
+ export type CreateUserRuleRequestBody = ControllerRuleInput;
11
+ export type CreateUserRuleOkResponse = ResponseWithPagination<TypesRule>;
12
+ export type CreateUserRuleErrorResponse = UsererrorError;
13
+ export interface CreateUserRuleProps extends Omit<FetcherOptions<unknown, CreateUserRuleRequestBody, CreateUserRuleMutationHeaderParams>, 'url'> {
14
+ body: CreateUserRuleRequestBody;
15
+ }
16
+ export declare function createUserRule(props: CreateUserRuleProps): Promise<CreateUserRuleOkResponse>;
17
+ /**
18
+ * Create a new user-specific rule
19
+ */
20
+ export declare function useCreateUserRuleMutation(options?: Omit<UseMutationOptions<CreateUserRuleOkResponse, CreateUserRuleErrorResponse, CreateUserRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateUserRuleOkResponse, UsererrorError, CreateUserRuleProps, 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 createUserRule(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/me/rules`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Create a new user-specific rule
11
+ */
12
+ export function useCreateUserRuleMutation(options) {
13
+ return useMutation((mutateProps) => createUserRule(mutateProps), options);
14
+ }
@@ -0,0 +1,21 @@
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 DeleteChatSessionMutationPathParams {
6
+ sessionId: string;
7
+ }
8
+ export interface DeleteChatSessionMutationHeaderParams {
9
+ 'harness-account': string;
10
+ }
11
+ export type DeleteChatSessionOkResponse = ResponseWithPagination<{
12
+ [key: string]: string;
13
+ }>;
14
+ export type DeleteChatSessionErrorResponse = UsererrorError;
15
+ export interface DeleteChatSessionProps extends DeleteChatSessionMutationPathParams, Omit<FetcherOptions<unknown, unknown, DeleteChatSessionMutationHeaderParams>, 'url'> {
16
+ }
17
+ export declare function deleteChatSession(props: DeleteChatSessionProps): Promise<DeleteChatSessionOkResponse>;
18
+ /**
19
+ * Deletes a chat session and all its associated messages
20
+ */
21
+ export declare function useDeleteChatSessionMutation(options?: Omit<UseMutationOptions<DeleteChatSessionOkResponse, DeleteChatSessionErrorResponse, DeleteChatSessionProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteChatSessionOkResponse, UsererrorError, DeleteChatSessionProps, 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 deleteChatSession(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/chat/sessions/${props.sessionId}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Deletes a chat session and all its associated messages
11
+ */
12
+ export function useDeleteChatSessionMutation(options) {
13
+ return useMutation((mutateProps) => deleteChatSession(mutateProps), options);
14
+ }
@@ -0,0 +1,20 @@
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>;
@@ -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 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
+ }
@@ -0,0 +1,21 @@
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 DeleteProjectRuleMutationPathParams {
6
+ org_id: string;
7
+ project_id: string;
8
+ rule_id: string;
9
+ }
10
+ export interface DeleteProjectRuleMutationHeaderParams {
11
+ 'harness-account': string;
12
+ }
13
+ export type DeleteProjectRuleOkResponse = ResponseWithPagination<unknown>;
14
+ export type DeleteProjectRuleErrorResponse = UsererrorError;
15
+ export interface DeleteProjectRuleProps extends DeleteProjectRuleMutationPathParams, Omit<FetcherOptions<unknown, unknown, DeleteProjectRuleMutationHeaderParams>, 'url'> {
16
+ }
17
+ export declare function deleteProjectRule(props: DeleteProjectRuleProps): Promise<DeleteProjectRuleOkResponse>;
18
+ /**
19
+ * Delete a project-level rule
20
+ */
21
+ export declare function useDeleteProjectRuleMutation(options?: Omit<UseMutationOptions<DeleteProjectRuleOkResponse, DeleteProjectRuleErrorResponse, DeleteProjectRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteProjectRuleOkResponse, UsererrorError, DeleteProjectRuleProps, 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 deleteProjectRule(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/orgs/${props.org_id}/projects/${props.project_id}/rules/${props.rule_id}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete a project-level rule
11
+ */
12
+ export function useDeleteProjectRuleMutation(options) {
13
+ return useMutation((mutateProps) => deleteProjectRule(mutateProps), options);
14
+ }
@@ -0,0 +1,16 @@
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 DeleteRuleMutationPathParams {
6
+ rule_id: string;
7
+ }
8
+ export type DeleteRuleOkResponse = ResponseWithPagination<unknown>;
9
+ export type DeleteRuleErrorResponse = UsererrorError;
10
+ export interface DeleteRuleProps extends DeleteRuleMutationPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
11
+ }
12
+ export declare function deleteRule(props: DeleteRuleProps): Promise<DeleteRuleOkResponse>;
13
+ /**
14
+ * Delete a rule
15
+ */
16
+ export declare function useDeleteRuleMutation(options?: Omit<UseMutationOptions<DeleteRuleOkResponse, DeleteRuleErrorResponse, DeleteRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteRuleOkResponse, UsererrorError, DeleteRuleProps, 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 deleteRule(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/rules/${props.rule_id}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete a rule
11
+ */
12
+ export function useDeleteRuleMutation(options) {
13
+ return useMutation((mutateProps) => deleteRule(mutateProps), options);
14
+ }
@@ -0,0 +1,19 @@
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 DeleteUserRuleMutationPathParams {
6
+ rule_id: string;
7
+ }
8
+ export interface DeleteUserRuleMutationHeaderParams {
9
+ 'harness-account': string;
10
+ }
11
+ export type DeleteUserRuleOkResponse = ResponseWithPagination<unknown>;
12
+ export type DeleteUserRuleErrorResponse = UsererrorError;
13
+ export interface DeleteUserRuleProps extends DeleteUserRuleMutationPathParams, Omit<FetcherOptions<unknown, unknown, DeleteUserRuleMutationHeaderParams>, 'url'> {
14
+ }
15
+ export declare function deleteUserRule(props: DeleteUserRuleProps): Promise<DeleteUserRuleOkResponse>;
16
+ /**
17
+ * Delete a user-specific rule
18
+ */
19
+ export declare function useDeleteUserRuleMutation(options?: Omit<UseMutationOptions<DeleteUserRuleOkResponse, DeleteUserRuleErrorResponse, DeleteUserRuleProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<DeleteUserRuleOkResponse, UsererrorError, DeleteUserRuleProps, 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 deleteUserRule(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/me/rules/${props.rule_id}`, method: 'DELETE' }, props));
8
+ }
9
+ /**
10
+ * Delete a user-specific rule
11
+ */
12
+ export function useDeleteUserRuleMutation(options) {
13
+ return useMutation((mutateProps) => deleteUserRule(mutateProps), options);
14
+ }
@@ -0,0 +1,31 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TypesChatMessage } from '../schemas/TypesChatMessage';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetChatSessionMessagesQueryPathParams {
7
+ sessionId: string;
8
+ }
9
+ export interface GetChatSessionMessagesQueryQueryParams {
10
+ /**
11
+ * @default 0
12
+ */
13
+ page?: number;
14
+ /**
15
+ * @default 50
16
+ */
17
+ size?: number;
18
+ }
19
+ export interface GetChatSessionMessagesQueryHeaderParams {
20
+ 'harness-account': string;
21
+ }
22
+ export type GetChatSessionMessagesOkResponse = ResponseWithPagination<TypesChatMessage[]>;
23
+ export type GetChatSessionMessagesErrorResponse = UsererrorError;
24
+ export interface GetChatSessionMessagesProps extends GetChatSessionMessagesQueryPathParams, Omit<FetcherOptions<GetChatSessionMessagesQueryQueryParams, unknown, GetChatSessionMessagesQueryHeaderParams>, 'url'> {
25
+ queryParams: GetChatSessionMessagesQueryQueryParams;
26
+ }
27
+ export declare function getChatSessionMessages(props: GetChatSessionMessagesProps): Promise<GetChatSessionMessagesOkResponse>;
28
+ /**
29
+ * Retrieves messages for a specific chat session with pagination support
30
+ */
31
+ export declare function useGetChatSessionMessagesQuery(props: GetChatSessionMessagesProps, options?: Omit<UseQueryOptions<GetChatSessionMessagesOkResponse, GetChatSessionMessagesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetChatSessionMessagesOkResponse, UsererrorError>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getChatSessionMessages(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/chat/sessions/${props.sessionId}/messages`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Retrieves messages for a specific chat session with pagination support
11
+ */
12
+ export function useGetChatSessionMessagesQuery(props, options) {
13
+ return useQuery(['getChatSessionMessages', props.sessionId, props.queryParams], ({ signal }) => getChatSessionMessages(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,28 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { HandlerGetSessionResponse } from '../schemas/HandlerGetSessionResponse';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetChatSessionQueryPathParams {
7
+ sessionId: string;
8
+ }
9
+ export interface GetChatSessionQueryQueryParams {
10
+ includeMessages?: boolean;
11
+ /**
12
+ * @default 10
13
+ */
14
+ messageLimit?: number;
15
+ }
16
+ export interface GetChatSessionQueryHeaderParams {
17
+ 'harness-account': string;
18
+ }
19
+ export type GetChatSessionOkResponse = ResponseWithPagination<HandlerGetSessionResponse>;
20
+ export type GetChatSessionErrorResponse = UsererrorError;
21
+ export interface GetChatSessionProps extends GetChatSessionQueryPathParams, Omit<FetcherOptions<GetChatSessionQueryQueryParams, unknown, GetChatSessionQueryHeaderParams>, 'url'> {
22
+ queryParams: GetChatSessionQueryQueryParams;
23
+ }
24
+ export declare function getChatSession(props: GetChatSessionProps): Promise<GetChatSessionOkResponse>;
25
+ /**
26
+ * Retrieves a specific chat session by ID with optional recent messages
27
+ */
28
+ export declare function useGetChatSessionQuery(props: GetChatSessionProps, options?: Omit<UseQueryOptions<GetChatSessionOkResponse, GetChatSessionErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetChatSessionOkResponse, UsererrorError>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getChatSession(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/chat/sessions/${props.sessionId}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Retrieves a specific chat session by ID with optional recent messages
11
+ */
12
+ export function useGetChatSessionQuery(props, options) {
13
+ return useQuery(['getChatSession', props.sessionId, props.queryParams], ({ signal }) => getChatSession(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,21 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetOrgRuleQueryPathParams {
7
+ org_id: string;
8
+ rule_id: string;
9
+ }
10
+ export interface GetOrgRuleQueryHeaderParams {
11
+ 'harness-account': string;
12
+ }
13
+ export type GetOrgRuleOkResponse = ResponseWithPagination<TypesRule>;
14
+ export type GetOrgRuleErrorResponse = UsererrorError;
15
+ export interface GetOrgRuleProps extends GetOrgRuleQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetOrgRuleQueryHeaderParams>, 'url'> {
16
+ }
17
+ export declare function getOrgRule(props: GetOrgRuleProps): Promise<GetOrgRuleOkResponse>;
18
+ /**
19
+ * Get an organization-level rule by ID
20
+ */
21
+ export declare function useGetOrgRuleQuery(props: GetOrgRuleProps, options?: Omit<UseQueryOptions<GetOrgRuleOkResponse, GetOrgRuleErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetOrgRuleOkResponse, UsererrorError>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getOrgRule(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/orgs/${props.org_id}/rules/${props.rule_id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get an organization-level rule by ID
11
+ */
12
+ export function useGetOrgRuleQuery(props, options) {
13
+ return useQuery(['getOrgRule', props.org_id, props.rule_id], ({ signal }) => getOrgRule(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,22 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetProjectRuleQueryPathParams {
7
+ org_id: string;
8
+ project_id: string;
9
+ rule_id: string;
10
+ }
11
+ export interface GetProjectRuleQueryHeaderParams {
12
+ 'harness-account': string;
13
+ }
14
+ export type GetProjectRuleOkResponse = ResponseWithPagination<TypesRule>;
15
+ export type GetProjectRuleErrorResponse = UsererrorError;
16
+ export interface GetProjectRuleProps extends GetProjectRuleQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetProjectRuleQueryHeaderParams>, 'url'> {
17
+ }
18
+ export declare function getProjectRule(props: GetProjectRuleProps): Promise<GetProjectRuleOkResponse>;
19
+ /**
20
+ * Get a project-level rule by ID
21
+ */
22
+ export declare function useGetProjectRuleQuery(props: GetProjectRuleProps, options?: Omit<UseQueryOptions<GetProjectRuleOkResponse, GetProjectRuleErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetProjectRuleOkResponse, UsererrorError>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getProjectRule(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/orgs/${props.org_id}/projects/${props.project_id}/rules/${props.rule_id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get a project-level rule by ID
11
+ */
12
+ export function useGetProjectRuleQuery(props, options) {
13
+ return useQuery(['getProjectRule', props.org_id, props.project_id, props.rule_id], ({ signal }) => getProjectRule(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,13 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { OpenapiRuleCategoriesResponse } from '../schemas/OpenapiRuleCategoriesResponse';
3
+ import type { ResponseWithPagination } from '../helpers';
4
+ import { FetcherOptions } from '../../../../fetcher/index.js';
5
+ export type GetRuleCategoriesOkResponse = ResponseWithPagination<OpenapiRuleCategoriesResponse>;
6
+ export type GetRuleCategoriesErrorResponse = unknown;
7
+ export interface GetRuleCategoriesProps extends Omit<FetcherOptions<unknown, unknown>, 'url'> {
8
+ }
9
+ export declare function getRuleCategories(props: GetRuleCategoriesProps): Promise<GetRuleCategoriesOkResponse>;
10
+ /**
11
+ * Returns a list of all available rule categories that can be used when creating or updating rules
12
+ */
13
+ export declare function useGetRuleCategoriesQuery(props: GetRuleCategoriesProps, options?: Omit<UseQueryOptions<GetRuleCategoriesOkResponse, GetRuleCategoriesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetRuleCategoriesOkResponse, 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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getRuleCategories(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/rules/categories`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Returns a list of all available rule categories that can be used when creating or updating rules
11
+ */
12
+ export function useGetRuleCategoriesQuery(props, options) {
13
+ return useQuery(['getRuleCategories'], ({ signal }) => getRuleCategories(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,17 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetRuleQueryPathParams {
7
+ rule_id: string;
8
+ }
9
+ export type GetRuleOkResponse = ResponseWithPagination<TypesRule>;
10
+ export type GetRuleErrorResponse = UsererrorError;
11
+ export interface GetRuleProps extends GetRuleQueryPathParams, Omit<FetcherOptions<unknown, unknown>, 'url'> {
12
+ }
13
+ export declare function getRule(props: GetRuleProps): Promise<GetRuleOkResponse>;
14
+ /**
15
+ * Get a rule by ID
16
+ */
17
+ export declare function useGetRuleQuery(props: GetRuleProps, options?: Omit<UseQueryOptions<GetRuleOkResponse, GetRuleErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetRuleOkResponse, UsererrorError>;
@@ -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 { useQuery } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function getRule(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/rules/${props.rule_id}`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get a rule by ID
11
+ */
12
+ export function useGetRuleQuery(props, options) {
13
+ return useQuery(['getRule', props.rule_id], ({ signal }) => getRule(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,20 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TypesRule } from '../schemas/TypesRule';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetUserRuleQueryPathParams {
7
+ rule_id: string;
8
+ }
9
+ export interface GetUserRuleQueryHeaderParams {
10
+ 'harness-account': string;
11
+ }
12
+ export type GetUserRuleOkResponse = ResponseWithPagination<TypesRule>;
13
+ export type GetUserRuleErrorResponse = UsererrorError;
14
+ export interface GetUserRuleProps extends GetUserRuleQueryPathParams, Omit<FetcherOptions<unknown, unknown, GetUserRuleQueryHeaderParams>, 'url'> {
15
+ }
16
+ export declare function getUserRule(props: GetUserRuleProps): Promise<GetUserRuleOkResponse>;
17
+ /**
18
+ * Get a user-specific rule by ID
19
+ */
20
+ export declare function useGetUserRuleQuery(props: GetUserRuleProps, options?: Omit<UseQueryOptions<GetUserRuleOkResponse, GetUserRuleErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetUserRuleOkResponse, UsererrorError>;