@harnessio/react-intelligence-service-client 0.8.0 → 0.10.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 (35) hide show
  1. package/dist/fetcher/index.js +1 -1
  2. package/dist/intelligence-service/src/services/hooks/useChatV2Mutation.d.ts +25 -0
  3. package/dist/intelligence-service/src/services/hooks/useChatV2Mutation.js +14 -0
  4. package/dist/intelligence-service/src/services/hooks/useCompleteAttachmentMutation.d.ts +22 -0
  5. package/dist/intelligence-service/src/services/hooks/useCompleteAttachmentMutation.js +14 -0
  6. package/dist/intelligence-service/src/services/hooks/useCreateEntityMutation.d.ts +2 -2
  7. package/dist/intelligence-service/src/services/hooks/useGetChatSessionMessagesV2Query.d.ts +31 -0
  8. package/dist/intelligence-service/src/services/hooks/useGetChatSessionMessagesV2Query.js +14 -0
  9. package/dist/intelligence-service/src/services/hooks/useGetReadyAttachmentQuery.d.ts +26 -0
  10. package/dist/intelligence-service/src/services/hooks/useGetReadyAttachmentQuery.js +14 -0
  11. package/dist/intelligence-service/src/services/hooks/useInitializeAttachmentMutation.d.ts +25 -0
  12. package/dist/intelligence-service/src/services/hooks/useInitializeAttachmentMutation.js +14 -0
  13. package/dist/intelligence-service/src/services/index.d.ts +20 -0
  14. package/dist/intelligence-service/src/services/index.js +5 -0
  15. package/dist/intelligence-service/src/services/schemas/HandlerGetMessagesV2Response.d.ts +7 -0
  16. package/dist/intelligence-service/src/services/schemas/HandlerGetMessagesV2Response.js +1 -0
  17. package/dist/intelligence-service/src/services/schemas/TypesAttachmentCompleteRequest.d.ts +4 -0
  18. package/dist/intelligence-service/src/services/schemas/TypesAttachmentCompleteRequest.js +4 -0
  19. package/dist/intelligence-service/src/services/schemas/TypesAttachmentInitRequest.d.ts +5 -0
  20. package/dist/intelligence-service/src/services/schemas/TypesAttachmentInitRequest.js +4 -0
  21. package/dist/intelligence-service/src/services/schemas/TypesAttachmentInitResponse.d.ts +4 -0
  22. package/dist/intelligence-service/src/services/schemas/TypesAttachmentInitResponse.js +4 -0
  23. package/dist/intelligence-service/src/services/schemas/TypesAttachmentReadyResponse.d.ts +8 -0
  24. package/dist/intelligence-service/src/services/schemas/TypesAttachmentReadyResponse.js +1 -0
  25. package/dist/intelligence-service/src/services/schemas/TypesAttachmentStatus.d.ts +1 -0
  26. package/dist/intelligence-service/src/services/schemas/TypesAttachmentStatus.js +4 -0
  27. package/dist/intelligence-service/src/services/schemas/TypesChatMessageV2.d.ts +17 -0
  28. package/dist/intelligence-service/src/services/schemas/TypesChatMessageV2.js +1 -0
  29. package/dist/intelligence-service/src/services/schemas/TypesChatV2.d.ts +17 -0
  30. package/dist/intelligence-service/src/services/schemas/TypesChatV2.js +1 -0
  31. package/dist/intelligence-service/src/services/schemas/TypesContentItem.d.ts +14 -0
  32. package/dist/intelligence-service/src/services/schemas/TypesContentItem.js +4 -0
  33. package/dist/intelligence-service/src/services/schemas/TypesEntityOperationResponse.d.ts +10 -0
  34. package/dist/intelligence-service/src/services/schemas/TypesEntityOperationResponse.js +1 -0
  35. package/package.json +1 -1
@@ -30,7 +30,7 @@ export function fetcher(options) {
30
30
  if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) {
31
31
  finalUrl = (_a = fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.urlInterceptor) === null || _a === void 0 ? void 0 : _a.call(fetcherCallbacks, finalUrl);
32
32
  }
33
- let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign({ Authorization: `Bearer ${token}` }, headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
33
+ let request = new Request(finalUrl, Object.assign({ headers: Object.assign(Object.assign(Object.assign({}, (token ? { Authorization: `Bearer ${token}` } : {})), headers), customHeaders), body: body ? JSON.stringify(body) : undefined }, rest));
34
34
  if (fetcherCallbacks === null || fetcherCallbacks === void 0 ? void 0 : fetcherCallbacks.requestInterceptor) {
35
35
  request = fetcherCallbacks.requestInterceptor(request.clone());
36
36
  }
@@ -0,0 +1,25 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TypesChatOutput } from '../schemas/TypesChatOutput';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { TypesChatV2 } from '../schemas/TypesChatV2';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface ChatV2MutationQueryParams {
8
+ orgIdentifier?: string;
9
+ projectIdentifier?: string;
10
+ }
11
+ export interface ChatV2MutationHeaderParams {
12
+ 'harness-account': string;
13
+ }
14
+ export type ChatV2RequestBody = TypesChatV2;
15
+ export type ChatV2OkResponse = ResponseWithPagination<TypesChatOutput>;
16
+ export type ChatV2ErrorResponse = UsererrorError;
17
+ export interface ChatV2Props extends Omit<FetcherOptions<ChatV2MutationQueryParams, ChatV2RequestBody, ChatV2MutationHeaderParams>, 'url'> {
18
+ queryParams: ChatV2MutationQueryParams;
19
+ body: ChatV2RequestBody;
20
+ }
21
+ export declare function chatV2(props: ChatV2Props): Promise<ChatV2OkResponse>;
22
+ /**
23
+ * Handles chat requests using the V2 schema which groups messages by role and interaction_id. Only streaming mode is supported. The response is streamed as Server-Sent Events (SSE).
24
+ */
25
+ export declare function useChatV2Mutation(options?: Omit<UseMutationOptions<ChatV2OkResponse, ChatV2ErrorResponse, ChatV2Props>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ChatV2OkResponse, UsererrorError, ChatV2Props, 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 chatV2(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/chat`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Handles chat requests using the V2 schema which groups messages by role and interaction_id. Only streaming mode is supported. The response is streamed as Server-Sent Events (SSE).
11
+ */
12
+ export function useChatV2Mutation(options) {
13
+ return useMutation((mutateProps) => chatV2(mutateProps), options);
14
+ }
@@ -0,0 +1,22 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { UsererrorError } from '../schemas/UsererrorError';
3
+ import type { TypesAttachmentCompleteRequest } from '../schemas/TypesAttachmentCompleteRequest';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface CompleteAttachmentMutationPathParams {
7
+ id: string;
8
+ }
9
+ export interface CompleteAttachmentMutationHeaderParams {
10
+ 'harness-account': string;
11
+ }
12
+ export type CompleteAttachmentRequestBody = TypesAttachmentCompleteRequest;
13
+ export type CompleteAttachmentOkResponse = ResponseWithPagination<unknown>;
14
+ export type CompleteAttachmentErrorResponse = UsererrorError;
15
+ export interface CompleteAttachmentProps extends CompleteAttachmentMutationPathParams, Omit<FetcherOptions<unknown, CompleteAttachmentRequestBody, CompleteAttachmentMutationHeaderParams>, 'url'> {
16
+ body: CompleteAttachmentRequestBody;
17
+ }
18
+ export declare function completeAttachment(props: CompleteAttachmentProps): Promise<CompleteAttachmentOkResponse>;
19
+ /**
20
+ * Complete attachment upload and start processing with SSE streaming
21
+ */
22
+ export declare function useCompleteAttachmentMutation(options?: Omit<UseMutationOptions<CompleteAttachmentOkResponse, CompleteAttachmentErrorResponse, CompleteAttachmentProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CompleteAttachmentOkResponse, UsererrorError, CompleteAttachmentProps, 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 completeAttachment(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/attachments/${props.id}/complete`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Complete attachment upload and start processing with SSE streaming
11
+ */
12
+ export function useCompleteAttachmentMutation(options) {
13
+ return useMutation((mutateProps) => completeAttachment(mutateProps), options);
14
+ }
@@ -1,5 +1,5 @@
1
1
  import { UseMutationOptions } from '@tanstack/react-query';
2
- import type { TypesChatOutput } from '../schemas/TypesChatOutput';
2
+ import type { TypesEntityOperationResponse } from '../schemas/TypesEntityOperationResponse';
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<TypesChatOutput>;
11
+ export type CreateEntityOkResponse = ResponseWithPagination<TypesEntityOperationResponse>;
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,31 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { HandlerGetMessagesV2Response } from '../schemas/HandlerGetMessagesV2Response';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetChatSessionMessagesV2QueryPathParams {
7
+ sessionId: string;
8
+ }
9
+ export interface GetChatSessionMessagesV2QueryQueryParams {
10
+ /**
11
+ * @default 0
12
+ */
13
+ page?: number;
14
+ /**
15
+ * @default 50
16
+ */
17
+ size?: number;
18
+ }
19
+ export interface GetChatSessionMessagesV2QueryHeaderParams {
20
+ 'harness-account': string;
21
+ }
22
+ export type GetChatSessionMessagesV2OkResponse = ResponseWithPagination<HandlerGetMessagesV2Response>;
23
+ export type GetChatSessionMessagesV2ErrorResponse = UsererrorError;
24
+ export interface GetChatSessionMessagesV2Props extends GetChatSessionMessagesV2QueryPathParams, Omit<FetcherOptions<GetChatSessionMessagesV2QueryQueryParams, unknown, GetChatSessionMessagesV2QueryHeaderParams>, 'url'> {
25
+ queryParams: GetChatSessionMessagesV2QueryQueryParams;
26
+ }
27
+ export declare function getChatSessionMessagesV2(props: GetChatSessionMessagesV2Props): Promise<GetChatSessionMessagesV2OkResponse>;
28
+ /**
29
+ * Retrieves grouped messages (V2 schema) for a specific chat session with pagination support. Messages are grouped by consecutive role within the same interaction.
30
+ */
31
+ export declare function useGetChatSessionMessagesV2Query(props: GetChatSessionMessagesV2Props, options?: Omit<UseQueryOptions<GetChatSessionMessagesV2OkResponse, GetChatSessionMessagesV2ErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetChatSessionMessagesV2OkResponse, 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 getChatSessionMessagesV2(props) {
7
+ return fetcher(Object.assign({ url: `/api/v2/chat/sessions/${props.sessionId}/messages`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Retrieves grouped messages (V2 schema) for a specific chat session with pagination support. Messages are grouped by consecutive role within the same interaction.
11
+ */
12
+ export function useGetChatSessionMessagesV2Query(props, options) {
13
+ return useQuery(['getChatSessionMessagesV2', props.sessionId, props.queryParams], ({ signal }) => getChatSessionMessagesV2(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,26 @@
1
+ import { UseQueryOptions } from '@tanstack/react-query';
2
+ import type { TypesAttachmentReadyResponse } from '../schemas/TypesAttachmentReadyResponse';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface GetReadyAttachmentQueryPathParams {
7
+ id: string;
8
+ }
9
+ export interface GetReadyAttachmentQueryQueryParams {
10
+ conversation_id: string;
11
+ orgIdentifier?: string;
12
+ projectIdentifier?: string;
13
+ }
14
+ export interface GetReadyAttachmentQueryHeaderParams {
15
+ 'harness-account': string;
16
+ }
17
+ export type GetReadyAttachmentOkResponse = ResponseWithPagination<TypesAttachmentReadyResponse>;
18
+ export type GetReadyAttachmentErrorResponse = UsererrorError | TypesAttachmentReadyResponse;
19
+ export interface GetReadyAttachmentProps extends GetReadyAttachmentQueryPathParams, Omit<FetcherOptions<GetReadyAttachmentQueryQueryParams, unknown, GetReadyAttachmentQueryHeaderParams>, 'url'> {
20
+ queryParams: GetReadyAttachmentQueryQueryParams;
21
+ }
22
+ export declare function getReadyAttachment(props: GetReadyAttachmentProps): Promise<GetReadyAttachmentOkResponse>;
23
+ /**
24
+ * Get the status and content of a ready attachment
25
+ */
26
+ export declare function useGetReadyAttachmentQuery(props: GetReadyAttachmentProps, options?: Omit<UseQueryOptions<GetReadyAttachmentOkResponse, GetReadyAttachmentErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<GetReadyAttachmentOkResponse, GetReadyAttachmentErrorResponse>;
@@ -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 getReadyAttachment(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/attachments/${props.id}/ready`, method: 'GET' }, props));
8
+ }
9
+ /**
10
+ * Get the status and content of a ready attachment
11
+ */
12
+ export function useGetReadyAttachmentQuery(props, options) {
13
+ return useQuery(['getReadyAttachment', props.id, props.queryParams], ({ signal }) => getReadyAttachment(Object.assign(Object.assign({}, props), { signal })), options);
14
+ }
@@ -0,0 +1,25 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { TypesAttachmentInitResponse } from '../schemas/TypesAttachmentInitResponse';
3
+ import type { UsererrorError } from '../schemas/UsererrorError';
4
+ import type { TypesAttachmentInitRequest } from '../schemas/TypesAttachmentInitRequest';
5
+ import type { ResponseWithPagination } from '../helpers';
6
+ import { FetcherOptions } from '../../../../fetcher/index.js';
7
+ export interface InitializeAttachmentMutationQueryParams {
8
+ orgIdentifier?: string;
9
+ projectIdentifier?: string;
10
+ }
11
+ export interface InitializeAttachmentMutationHeaderParams {
12
+ 'harness-account': string;
13
+ }
14
+ export type InitializeAttachmentRequestBody = TypesAttachmentInitRequest;
15
+ export type InitializeAttachmentOkResponse = ResponseWithPagination<TypesAttachmentInitResponse>;
16
+ export type InitializeAttachmentErrorResponse = UsererrorError;
17
+ export interface InitializeAttachmentProps extends Omit<FetcherOptions<InitializeAttachmentMutationQueryParams, InitializeAttachmentRequestBody, InitializeAttachmentMutationHeaderParams>, 'url'> {
18
+ queryParams: InitializeAttachmentMutationQueryParams;
19
+ body: InitializeAttachmentRequestBody;
20
+ }
21
+ export declare function initializeAttachment(props: InitializeAttachmentProps): Promise<InitializeAttachmentOkResponse>;
22
+ /**
23
+ * Initialize a new attachment upload and get a signed URL for uploading
24
+ */
25
+ export declare function useInitializeAttachmentMutation(options?: Omit<UseMutationOptions<InitializeAttachmentOkResponse, InitializeAttachmentErrorResponse, InitializeAttachmentProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<InitializeAttachmentOkResponse, UsererrorError, InitializeAttachmentProps, 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 initializeAttachment(props) {
7
+ return fetcher(Object.assign({ url: `/api/v1/attachments/init`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * Initialize a new attachment upload and get a signed URL for uploading
11
+ */
12
+ export function useInitializeAttachmentMutation(options) {
13
+ return useMutation((mutateProps) => initializeAttachment(mutateProps), options);
14
+ }
@@ -1,6 +1,10 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
2
  export type { ChatErrorResponse, ChatOkResponse, ChatProps, ChatRequestBody, } from './hooks/useChatMutation';
3
3
  export { chat, useChatMutation } from './hooks/useChatMutation';
4
+ export type { ChatV2ErrorResponse, ChatV2MutationQueryParams, ChatV2OkResponse, ChatV2Props, ChatV2RequestBody, } from './hooks/useChatV2Mutation';
5
+ export { chatV2, useChatV2Mutation } from './hooks/useChatV2Mutation';
6
+ export type { CompleteAttachmentErrorResponse, CompleteAttachmentMutationPathParams, CompleteAttachmentOkResponse, CompleteAttachmentProps, CompleteAttachmentRequestBody, } from './hooks/useCompleteAttachmentMutation';
7
+ export { completeAttachment, useCompleteAttachmentMutation, } from './hooks/useCompleteAttachmentMutation';
4
8
  export type { CreateAccountRuleErrorResponse, CreateAccountRuleOkResponse, CreateAccountRuleProps, CreateAccountRuleRequestBody, } from './hooks/useCreateAccountRuleMutation';
5
9
  export { createAccountRule, useCreateAccountRuleMutation, } from './hooks/useCreateAccountRuleMutation';
6
10
  export type { CreateEntityErrorResponse, CreateEntityOkResponse, CreateEntityProps, CreateEntityRequestBody, } from './hooks/useCreateEntityMutation';
@@ -23,18 +27,24 @@ export type { DeleteUserRuleErrorResponse, DeleteUserRuleMutationPathParams, Del
23
27
  export { deleteUserRule, useDeleteUserRuleMutation } from './hooks/useDeleteUserRuleMutation';
24
28
  export type { GetChatSessionMessagesErrorResponse, GetChatSessionMessagesOkResponse, GetChatSessionMessagesProps, GetChatSessionMessagesQueryPathParams, GetChatSessionMessagesQueryQueryParams, } from './hooks/useGetChatSessionMessagesQuery';
25
29
  export { getChatSessionMessages, useGetChatSessionMessagesQuery, } from './hooks/useGetChatSessionMessagesQuery';
30
+ export type { GetChatSessionMessagesV2ErrorResponse, GetChatSessionMessagesV2OkResponse, GetChatSessionMessagesV2Props, GetChatSessionMessagesV2QueryPathParams, GetChatSessionMessagesV2QueryQueryParams, } from './hooks/useGetChatSessionMessagesV2Query';
31
+ export { getChatSessionMessagesV2, useGetChatSessionMessagesV2Query, } from './hooks/useGetChatSessionMessagesV2Query';
26
32
  export type { GetChatSessionErrorResponse, GetChatSessionOkResponse, GetChatSessionProps, GetChatSessionQueryPathParams, GetChatSessionQueryQueryParams, } from './hooks/useGetChatSessionQuery';
27
33
  export { getChatSession, useGetChatSessionQuery } from './hooks/useGetChatSessionQuery';
28
34
  export type { GetOrgRuleErrorResponse, GetOrgRuleOkResponse, GetOrgRuleProps, GetOrgRuleQueryPathParams, } from './hooks/useGetOrgRuleQuery';
29
35
  export { getOrgRule, useGetOrgRuleQuery } from './hooks/useGetOrgRuleQuery';
30
36
  export type { GetProjectRuleErrorResponse, GetProjectRuleOkResponse, GetProjectRuleProps, GetProjectRuleQueryPathParams, } from './hooks/useGetProjectRuleQuery';
31
37
  export { getProjectRule, useGetProjectRuleQuery } from './hooks/useGetProjectRuleQuery';
38
+ export type { GetReadyAttachmentErrorResponse, GetReadyAttachmentOkResponse, GetReadyAttachmentProps, GetReadyAttachmentQueryPathParams, GetReadyAttachmentQueryQueryParams, } from './hooks/useGetReadyAttachmentQuery';
39
+ export { getReadyAttachment, useGetReadyAttachmentQuery } from './hooks/useGetReadyAttachmentQuery';
32
40
  export type { GetRuleCategoriesErrorResponse, GetRuleCategoriesOkResponse, GetRuleCategoriesProps, } from './hooks/useGetRuleCategoriesQuery';
33
41
  export { getRuleCategories, useGetRuleCategoriesQuery } from './hooks/useGetRuleCategoriesQuery';
34
42
  export type { GetRuleErrorResponse, GetRuleOkResponse, GetRuleProps, GetRuleQueryPathParams, } from './hooks/useGetRuleQuery';
35
43
  export { getRule, useGetRuleQuery } from './hooks/useGetRuleQuery';
36
44
  export type { GetUserRuleErrorResponse, GetUserRuleOkResponse, GetUserRuleProps, GetUserRuleQueryPathParams, } from './hooks/useGetUserRuleQuery';
37
45
  export { getUserRule, useGetUserRuleQuery } from './hooks/useGetUserRuleQuery';
46
+ export type { InitializeAttachmentErrorResponse, InitializeAttachmentMutationQueryParams, InitializeAttachmentOkResponse, InitializeAttachmentProps, InitializeAttachmentRequestBody, } from './hooks/useInitializeAttachmentMutation';
47
+ export { initializeAttachment, useInitializeAttachmentMutation, } from './hooks/useInitializeAttachmentMutation';
38
48
  export type { ListChatSessionsErrorResponse, ListChatSessionsOkResponse, ListChatSessionsProps, ListChatSessionsQueryQueryParams, } from './hooks/useListChatSessionsQuery';
39
49
  export { listChatSessions, useListChatSessionsQuery } from './hooks/useListChatSessionsQuery';
40
50
  export type { ListOrgRulesErrorResponse, ListOrgRulesOkResponse, ListOrgRulesProps, ListOrgRulesQueryPathParams, ListOrgRulesQueryQueryParams, } from './hooks/useListOrgRulesQuery';
@@ -60,16 +70,26 @@ export type { EnumEntityType } from './schemas/EnumEntityType';
60
70
  export type { EnumMessageType } from './schemas/EnumMessageType';
61
71
  export type { EnumRequestAction } from './schemas/EnumRequestAction';
62
72
  export type { EnumRole } from './schemas/EnumRole';
73
+ export type { HandlerGetMessagesV2Response } from './schemas/HandlerGetMessagesV2Response';
63
74
  export type { HandlerGetSessionResponse } from './schemas/HandlerGetSessionResponse';
64
75
  export type { OpenapiRuleCategoriesResponse } from './schemas/OpenapiRuleCategoriesResponse';
76
+ export type { TypesAttachmentCompleteRequest } from './schemas/TypesAttachmentCompleteRequest';
77
+ export type { TypesAttachmentInitRequest } from './schemas/TypesAttachmentInitRequest';
78
+ export type { TypesAttachmentInitResponse } from './schemas/TypesAttachmentInitResponse';
79
+ export type { TypesAttachmentReadyResponse } from './schemas/TypesAttachmentReadyResponse';
65
80
  export type { TypesAttachmentRef } from './schemas/TypesAttachmentRef';
81
+ export type { TypesAttachmentStatus } from './schemas/TypesAttachmentStatus';
66
82
  export type { TypesChat } from './schemas/TypesChat';
67
83
  export type { TypesChatMessage } from './schemas/TypesChatMessage';
84
+ export type { TypesChatMessageV2 } from './schemas/TypesChatMessageV2';
68
85
  export type { TypesChatOutput } from './schemas/TypesChatOutput';
69
86
  export type { TypesChatResponse } from './schemas/TypesChatResponse';
70
87
  export type { TypesChatSession } from './schemas/TypesChatSession';
88
+ export type { TypesChatV2 } from './schemas/TypesChatV2';
89
+ export type { TypesContentItem } from './schemas/TypesContentItem';
71
90
  export type { TypesConversation } from './schemas/TypesConversation';
72
91
  export type { TypesEntityInfo } from './schemas/TypesEntityInfo';
92
+ export type { TypesEntityOperationResponse } from './schemas/TypesEntityOperationResponse';
73
93
  export type { TypesHarnessEntity } from './schemas/TypesHarnessEntity';
74
94
  export type { TypesMessage } from './schemas/TypesMessage';
75
95
  export type { TypesResponseMessage } from './schemas/TypesResponseMessage';
@@ -1,4 +1,6 @@
1
1
  export { chat, useChatMutation } from './hooks/useChatMutation';
2
+ export { chatV2, useChatV2Mutation } from './hooks/useChatV2Mutation';
3
+ export { completeAttachment, useCompleteAttachmentMutation, } from './hooks/useCompleteAttachmentMutation';
2
4
  export { createAccountRule, useCreateAccountRuleMutation, } from './hooks/useCreateAccountRuleMutation';
3
5
  export { createEntity, useCreateEntityMutation } from './hooks/useCreateEntityMutation';
4
6
  export { createOrgRule, useCreateOrgRuleMutation } from './hooks/useCreateOrgRuleMutation';
@@ -10,12 +12,15 @@ export { deleteProjectRule, useDeleteProjectRuleMutation, } from './hooks/useDel
10
12
  export { deleteRule, useDeleteRuleMutation } from './hooks/useDeleteRuleMutation';
11
13
  export { deleteUserRule, useDeleteUserRuleMutation } from './hooks/useDeleteUserRuleMutation';
12
14
  export { getChatSessionMessages, useGetChatSessionMessagesQuery, } from './hooks/useGetChatSessionMessagesQuery';
15
+ export { getChatSessionMessagesV2, useGetChatSessionMessagesV2Query, } from './hooks/useGetChatSessionMessagesV2Query';
13
16
  export { getChatSession, useGetChatSessionQuery } from './hooks/useGetChatSessionQuery';
14
17
  export { getOrgRule, useGetOrgRuleQuery } from './hooks/useGetOrgRuleQuery';
15
18
  export { getProjectRule, useGetProjectRuleQuery } from './hooks/useGetProjectRuleQuery';
19
+ export { getReadyAttachment, useGetReadyAttachmentQuery } from './hooks/useGetReadyAttachmentQuery';
16
20
  export { getRuleCategories, useGetRuleCategoriesQuery } from './hooks/useGetRuleCategoriesQuery';
17
21
  export { getRule, useGetRuleQuery } from './hooks/useGetRuleQuery';
18
22
  export { getUserRule, useGetUserRuleQuery } from './hooks/useGetUserRuleQuery';
23
+ export { initializeAttachment, useInitializeAttachmentMutation, } from './hooks/useInitializeAttachmentMutation';
19
24
  export { listChatSessions, useListChatSessionsQuery } from './hooks/useListChatSessionsQuery';
20
25
  export { listOrgRules, useListOrgRulesQuery } from './hooks/useListOrgRulesQuery';
21
26
  export { listProjectRules, useListProjectRulesQuery } from './hooks/useListProjectRulesQuery';
@@ -0,0 +1,7 @@
1
+ import type { TypesChatMessageV2 } from '../schemas/TypesChatMessageV2';
2
+ export interface HandlerGetMessagesV2Response {
3
+ count?: number;
4
+ limit?: number;
5
+ messages?: TypesChatMessageV2[] | null;
6
+ offset?: number;
7
+ }
@@ -0,0 +1,4 @@
1
+ export interface TypesAttachmentCompleteRequest {
2
+ conversation_id?: string;
3
+ file_name?: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,5 @@
1
+ export interface TypesAttachmentInitRequest {
2
+ conversation_id?: string;
3
+ file_name?: string;
4
+ size_bytes?: number;
5
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,4 @@
1
+ export interface TypesAttachmentInitResponse {
2
+ attachment_id?: string;
3
+ upload_url?: string;
4
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { TypesAttachmentStatus } from '../schemas/TypesAttachmentStatus';
2
+ export interface TypesAttachmentReadyResponse {
3
+ attachment_id?: string;
4
+ error?: string;
5
+ status?: TypesAttachmentStatus;
6
+ text?: string;
7
+ token_estimate?: number;
8
+ }
@@ -0,0 +1 @@
1
+ export type TypesAttachmentStatus = string;
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { TypesContentItem } from '../schemas/TypesContentItem';
2
+ export interface TypesChatMessageV2 {
3
+ content?: TypesContentItem[] | null;
4
+ /**
5
+ * @format date-time
6
+ */
7
+ created_at?: string;
8
+ id?: string;
9
+ interaction_id?: string;
10
+ read_only?: boolean;
11
+ role?: string;
12
+ session_id?: string;
13
+ /**
14
+ * @format date-time
15
+ */
16
+ updated_at?: string;
17
+ }
@@ -0,0 +1,17 @@
1
+ import type { TypesAttachmentRef } from '../schemas/TypesAttachmentRef';
2
+ import type { TypesConversation } from '../schemas/TypesConversation';
3
+ import type { UuidUuid } from '../schemas/UuidUuid';
4
+ import type { EnumAgentMode } from '../schemas/EnumAgentMode';
5
+ export interface TypesChatV2 {
6
+ attachments?: TypesAttachmentRef[];
7
+ conversation?: TypesConversation[] | null;
8
+ conversation_id?: UuidUuid;
9
+ interaction_id?: UuidUuid;
10
+ metadata: {
11
+ [key: string]: string;
12
+ } | null;
13
+ mode?: EnumAgentMode;
14
+ prompt: string;
15
+ stream?: boolean;
16
+ valid_prompt_explanation?: string;
17
+ }
@@ -0,0 +1,14 @@
1
+ export interface TypesContentItem {
2
+ /**
3
+ * @format date-time
4
+ */
5
+ created_at?: string;
6
+ data?: {
7
+ [key: string]: any;
8
+ } | null;
9
+ metadata?: {
10
+ [key: string]: any;
11
+ };
12
+ token_count?: number;
13
+ type?: string;
14
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { TypesEntityInfo } from '../schemas/TypesEntityInfo';
2
+ import type { EnumEntityType } from '../schemas/EnumEntityType';
3
+ export interface TypesEntityOperationResponse {
4
+ entity_info?: TypesEntityInfo;
5
+ entity_type?: EnumEntityType;
6
+ error?: string;
7
+ status_code?: number;
8
+ status_message?: string;
9
+ success?: boolean;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-intelligence-service-client",
3
- "version": "0.8.0",
3
+ "version": "0.10.0",
4
4
  "description": "Harness React Intelligence service client - Intelligence APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",