@harnessio/react-intelligence-service-client 0.4.0 → 0.5.1
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/useChatMutation.d.ts +20 -0
- package/dist/intelligence-service/src/services/hooks/useChatMutation.js +14 -0
- package/dist/intelligence-service/src/services/index.d.ts +10 -2
- package/dist/intelligence-service/src/services/index.js +1 -0
- package/dist/intelligence-service/src/services/schemas/EnumAction.d.ts +1 -0
- package/dist/intelligence-service/src/services/schemas/EnumMessageType.d.ts +1 -0
- package/dist/intelligence-service/src/services/schemas/EnumRole.d.ts +1 -0
- package/dist/intelligence-service/src/services/schemas/EnumRole.js +4 -0
- package/dist/intelligence-service/src/services/schemas/TypesChat.d.ts +10 -0
- package/dist/intelligence-service/src/services/schemas/TypesChat.js +1 -0
- package/dist/intelligence-service/src/services/schemas/TypesChatOutput.d.ts +7 -0
- package/dist/intelligence-service/src/services/schemas/TypesChatOutput.js +1 -0
- package/dist/intelligence-service/src/services/schemas/TypesChatResponse.d.ts +6 -0
- package/dist/intelligence-service/src/services/schemas/TypesChatResponse.js +1 -0
- package/dist/intelligence-service/src/services/schemas/TypesConversation.d.ts +2 -2
- package/dist/intelligence-service/src/services/schemas/TypesMessage.d.ts +2 -2
- package/dist/intelligence-service/src/services/schemas/TypesResponseMessage.d.ts +7 -0
- package/dist/intelligence-service/src/services/schemas/TypesResponseMessage.js +1 -0
- package/dist/intelligence-service/src/services/schemas/UuidUuid.d.ts +1 -0
- package/dist/intelligence-service/src/services/schemas/UuidUuid.js +4 -0
- package/package.json +1 -1
- package/dist/intelligence-service/src/services/schemas/TypesMessageType.d.ts +0 -1
- package/dist/intelligence-service/src/services/schemas/TypesRole.d.ts +0 -1
- /package/dist/intelligence-service/src/services/schemas/{TypesMessageType.js → EnumAction.js} +0 -0
- /package/dist/intelligence-service/src/services/schemas/{TypesRole.js → EnumMessageType.js} +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
+
import type { TypesChatOutput } from '../schemas/TypesChatOutput';
|
|
3
|
+
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
|
+
import type { TypesChat } from '../schemas/TypesChat';
|
|
5
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
+
export interface ChatMutationHeaderParams {
|
|
8
|
+
'harness-account': string;
|
|
9
|
+
}
|
|
10
|
+
export type ChatRequestBody = TypesChat;
|
|
11
|
+
export type ChatOkResponse = ResponseWithPagination<TypesChatOutput>;
|
|
12
|
+
export type ChatErrorResponse = UsererrorError;
|
|
13
|
+
export interface ChatProps extends Omit<FetcherOptions<unknown, ChatRequestBody, ChatMutationHeaderParams>, 'url'> {
|
|
14
|
+
body: ChatRequestBody;
|
|
15
|
+
}
|
|
16
|
+
export declare function chat(props: ChatProps): Promise<ChatOkResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Chat Request to generate or update pipeline , stage and step
|
|
19
|
+
*/
|
|
20
|
+
export declare function useChatMutation(options?: Omit<UseMutationOptions<ChatOkResponse, ChatErrorResponse, ChatProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ChatOkResponse, UsererrorError, ChatProps, 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 chat(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/api/v1/chat`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Chat Request to generate or update pipeline , stage and step
|
|
11
|
+
*/
|
|
12
|
+
export function useChatMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => chat(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
export type { GetPathParamsType, ResponseWithPagination } from './helpers';
|
|
2
|
+
export type { ChatErrorResponse, ChatOkResponse, ChatProps, ChatRequestBody, } from './hooks/useChatMutation';
|
|
3
|
+
export { chat, useChatMutation } from './hooks/useChatMutation';
|
|
2
4
|
export type { GeneratePipelineStepErrorResponse, GeneratePipelineStepOkResponse, GeneratePipelineStepProps, GeneratePipelineStepRequestBody, } from './hooks/useGeneratePipelineStepMutation';
|
|
3
5
|
export { generatePipelineStep, useGeneratePipelineStepMutation, } from './hooks/useGeneratePipelineStepMutation';
|
|
4
6
|
export type { UpdatePipelineStepErrorResponse, UpdatePipelineStepOkResponse, UpdatePipelineStepProps, UpdatePipelineStepRequestBody, } from './hooks/useUpdatePipelineStepMutation';
|
|
5
7
|
export { updatePipelineStep, useUpdatePipelineStepMutation, } from './hooks/useUpdatePipelineStepMutation';
|
|
8
|
+
export type { EnumAction } from './schemas/EnumAction';
|
|
9
|
+
export type { EnumMessageType } from './schemas/EnumMessageType';
|
|
10
|
+
export type { EnumRole } from './schemas/EnumRole';
|
|
11
|
+
export type { TypesChat } from './schemas/TypesChat';
|
|
12
|
+
export type { TypesChatOutput } from './schemas/TypesChatOutput';
|
|
13
|
+
export type { TypesChatResponse } from './schemas/TypesChatResponse';
|
|
6
14
|
export type { TypesConversation } from './schemas/TypesConversation';
|
|
7
15
|
export type { TypesGeneratePipelineStepInput } from './schemas/TypesGeneratePipelineStepInput';
|
|
8
16
|
export type { TypesGeneratePipelineStepOutput } from './schemas/TypesGeneratePipelineStepOutput';
|
|
9
17
|
export type { TypesMessage } from './schemas/TypesMessage';
|
|
10
|
-
export type { TypesMessageType } from './schemas/TypesMessageType';
|
|
11
18
|
export type { TypesPipelineData } from './schemas/TypesPipelineData';
|
|
12
19
|
export type { TypesPipelineStepData } from './schemas/TypesPipelineStepData';
|
|
13
|
-
export type {
|
|
20
|
+
export type { TypesResponseMessage } from './schemas/TypesResponseMessage';
|
|
14
21
|
export type { TypesUpdatePipelineInput } from './schemas/TypesUpdatePipelineInput';
|
|
15
22
|
export type { TypesUpdatePipelineOutput } from './schemas/TypesUpdatePipelineOutput';
|
|
16
23
|
export type { UsererrorError } from './schemas/UsererrorError';
|
|
24
|
+
export type { UuidUuid } from './schemas/UuidUuid';
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
export { chat, useChatMutation } from './hooks/useChatMutation';
|
|
1
2
|
export { generatePipelineStep, useGeneratePipelineStepMutation, } from './hooks/useGeneratePipelineStepMutation';
|
|
2
3
|
export { updatePipelineStep, useUpdatePipelineStepMutation, } from './hooks/useUpdatePipelineStepMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type EnumAction = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type EnumMessageType = string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type EnumRole = string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TypesConversation } from '../schemas/TypesConversation';
|
|
2
|
+
import type { UuidUuid } from '../schemas/UuidUuid';
|
|
3
|
+
export interface TypesChat {
|
|
4
|
+
conversation?: TypesConversation[] | null;
|
|
5
|
+
conversation_id?: UuidUuid;
|
|
6
|
+
metadata: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
} | null;
|
|
9
|
+
prompt: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypesMessage } from '../schemas/TypesMessage';
|
|
2
|
-
import type {
|
|
2
|
+
import type { EnumRole } from '../schemas/EnumRole';
|
|
3
3
|
export interface TypesConversation {
|
|
4
4
|
message?: TypesMessage;
|
|
5
|
-
role?:
|
|
5
|
+
role?: EnumRole;
|
|
6
6
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type UuidUuid = string;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type TypesMessageType = string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type TypesRole = string;
|
/package/dist/intelligence-service/src/services/schemas/{TypesMessageType.js → EnumAction.js}
RENAMED
|
File without changes
|
|
File without changes
|