@harnessio/react-intelligence-service-client 0.16.0 → 0.17.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.
@@ -1,25 +1,28 @@
1
1
  import { UseQueryOptions } from '@tanstack/react-query';
2
- import type { HandlerListMemoriesResponse } from '../schemas/HandlerListMemoriesResponse';
2
+ import type { TypesMemory } from '../schemas/TypesMemory';
3
3
  import type { UsererrorError } from '../schemas/UsererrorError';
4
4
  import type { ResponseWithPagination } from '../helpers';
5
5
  import { FetcherOptions } from '../../../../fetcher/index.js';
6
6
  export interface ListMemoriesQueryQueryParams {
7
- cursor?: string;
8
7
  /**
9
- * @default 20
8
+ * @default 0
10
9
  */
11
- limit?: number;
10
+ page?: number;
11
+ /**
12
+ * @default 30
13
+ */
14
+ size?: number;
12
15
  }
13
16
  export interface ListMemoriesQueryHeaderParams {
14
17
  'harness-account': string;
15
18
  }
16
- export type ListMemoriesOkResponse = ResponseWithPagination<HandlerListMemoriesResponse>;
19
+ export type ListMemoriesOkResponse = ResponseWithPagination<TypesMemory[]>;
17
20
  export type ListMemoriesErrorResponse = UsererrorError;
18
21
  export interface ListMemoriesProps extends Omit<FetcherOptions<ListMemoriesQueryQueryParams, unknown, ListMemoriesQueryHeaderParams>, 'url'> {
19
22
  queryParams: ListMemoriesQueryQueryParams;
20
23
  }
21
24
  export declare function listMemories(props: ListMemoriesProps): Promise<ListMemoriesOkResponse>;
22
25
  /**
23
- * Returns a list of memories for the authenticated user with cursor-based pagination
26
+ * Returns a paginated list of memories for the authenticated user. Pagination info is returned in response headers: X-Total-Elements, X-Page-Number, X-Page-Size.
24
27
  */
25
28
  export declare function useListMemoriesQuery(props: ListMemoriesProps, options?: Omit<UseQueryOptions<ListMemoriesOkResponse, ListMemoriesErrorResponse>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<ListMemoriesOkResponse, UsererrorError>;
@@ -7,7 +7,7 @@ export function listMemories(props) {
7
7
  return fetcher(Object.assign({ url: `/api/v1/chat/memory`, method: 'GET' }, props));
8
8
  }
9
9
  /**
10
- * Returns a list of memories for the authenticated user with cursor-based pagination
10
+ * Returns a paginated list of memories for the authenticated user. Pagination info is returned in response headers: X-Total-Elements, X-Page-Number, X-Page-Size.
11
11
  */
12
12
  export function useListMemoriesQuery(props, options) {
13
13
  return useQuery(['listMemories', props.queryParams], ({ signal }) => listMemories(Object.assign(Object.assign({}, props), { signal })), options);
@@ -76,7 +76,6 @@ export type { EnumSentiment } from './schemas/EnumSentiment';
76
76
  export type { HandlerCreateMemoryRequest } from './schemas/HandlerCreateMemoryRequest';
77
77
  export type { HandlerGetMemoryResponse } from './schemas/HandlerGetMemoryResponse';
78
78
  export type { HandlerGetSessionResponse } from './schemas/HandlerGetSessionResponse';
79
- export type { HandlerListMemoriesResponse } from './schemas/HandlerListMemoriesResponse';
80
79
  export type { HandlerUpdateMemoryRequest } from './schemas/HandlerUpdateMemoryRequest';
81
80
  export type { OpenapiCreateFeedbackRequest } from './schemas/OpenapiCreateFeedbackRequest';
82
81
  export type { OpenapiRuleCategoriesResponse } from './schemas/OpenapiRuleCategoriesResponse';
@@ -108,6 +107,7 @@ export type { TypesRuleScope } from './schemas/TypesRuleScope';
108
107
  export type { TypesRuleSource } from './schemas/TypesRuleSource';
109
108
  export type { TypesRuleStatus } from './schemas/TypesRuleStatus';
110
109
  export type { TypesSettingValueResponse } from './schemas/TypesSettingValueResponse';
110
+ export type { TypesSystemEvent } from './schemas/TypesSystemEvent';
111
111
  export type { TypesType } from './schemas/TypesType';
112
112
  export type { TypesUserSettingRequest } from './schemas/TypesUserSettingRequest';
113
113
  export type { TypesUserSettingResponse } from './schemas/TypesUserSettingResponse';
@@ -2,6 +2,7 @@ import type { TypesAttachmentRef } from '../schemas/TypesAttachmentRef';
2
2
  import type { TypesConversation } from '../schemas/TypesConversation';
3
3
  import type { UuidUuid } from '../schemas/UuidUuid';
4
4
  import type { EnumAgentMode } from '../schemas/EnumAgentMode';
5
+ import type { TypesSystemEvent } from '../schemas/TypesSystemEvent';
5
6
  export interface TypesChatV2 {
6
7
  attachments?: TypesAttachmentRef[];
7
8
  context?: {
@@ -14,7 +15,8 @@ export interface TypesChatV2 {
14
15
  [key: string]: string;
15
16
  } | null;
16
17
  mode?: EnumAgentMode;
17
- prompt: string;
18
+ prompt?: string;
18
19
  stream?: boolean;
20
+ system_event?: TypesSystemEvent;
19
21
  valid_prompt_explanation?: string;
20
22
  }
@@ -0,0 +1,7 @@
1
+ export interface TypesSystemEvent {
2
+ capability_id?: string;
3
+ event_type?: string;
4
+ result?: {
5
+ [key: string]: any;
6
+ };
7
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-intelligence-service-client",
3
- "version": "0.16.0",
3
+ "version": "0.17.0",
4
4
  "description": "Harness React Intelligence service client - Intelligence APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",
@@ -1,6 +0,0 @@
1
- import type { TypesMemory } from '../schemas/TypesMemory';
2
- export interface HandlerListMemoriesResponse {
3
- memories?: TypesMemory[] | null;
4
- next_page_offset?: string | null;
5
- total?: number;
6
- }