@harnessio/react-intelligence-service-client 0.5.0 → 0.5.2-beta.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/useCreateEntityMutation.d.ts +20 -0
- package/dist/intelligence-service/src/services/hooks/useCreateEntityMutation.js +14 -0
- package/dist/intelligence-service/src/services/index.d.ts +5 -10
- package/dist/intelligence-service/src/services/index.js +1 -2
- package/dist/intelligence-service/src/services/schemas/EnumEntityType.d.ts +1 -0
- package/dist/intelligence-service/src/services/schemas/TypesChat.d.ts +6 -3
- package/dist/intelligence-service/src/services/schemas/TypesChatOutput.d.ts +3 -3
- package/dist/intelligence-service/src/services/schemas/TypesChatResponse.d.ts +2 -2
- package/dist/intelligence-service/src/services/schemas/TypesEntityInfo.d.ts +8 -0
- package/dist/intelligence-service/src/services/schemas/TypesHarnessEntity.d.ts +11 -0
- package/dist/intelligence-service/src/services/schemas/TypesMessage.d.ts +2 -2
- package/dist/intelligence-service/src/services/schemas/TypesResponseMessage.d.ts +4 -2
- package/package.json +1 -1
- package/dist/intelligence-service/src/services/hooks/useGeneratePipelineStepMutation.d.ts +0 -20
- package/dist/intelligence-service/src/services/hooks/useGeneratePipelineStepMutation.js +0 -14
- package/dist/intelligence-service/src/services/hooks/useUpdatePipelineStepMutation.d.ts +0 -20
- package/dist/intelligence-service/src/services/hooks/useUpdatePipelineStepMutation.js +0 -14
- package/dist/intelligence-service/src/services/schemas/TypesGeneratePipelineStepInput.d.ts +0 -8
- package/dist/intelligence-service/src/services/schemas/TypesGeneratePipelineStepOutput.d.ts +0 -5
- package/dist/intelligence-service/src/services/schemas/TypesPipelineData.d.ts +0 -3
- package/dist/intelligence-service/src/services/schemas/TypesPipelineStepData.d.ts +0 -3
- package/dist/intelligence-service/src/services/schemas/TypesPipelineStepData.js +0 -4
- package/dist/intelligence-service/src/services/schemas/TypesUpdatePipelineInput.d.ts +0 -4
- package/dist/intelligence-service/src/services/schemas/TypesUpdatePipelineInput.js +0 -4
- package/dist/intelligence-service/src/services/schemas/TypesUpdatePipelineOutput.d.ts +0 -5
- package/dist/intelligence-service/src/services/schemas/TypesUpdatePipelineOutput.js +0 -1
- /package/dist/intelligence-service/src/services/schemas/{TypesPipelineData.js → EnumEntityType.js} +0 -0
- /package/dist/intelligence-service/src/services/schemas/{TypesGeneratePipelineStepInput.js → TypesEntityInfo.js} +0 -0
- /package/dist/intelligence-service/src/services/schemas/{TypesGeneratePipelineStepOutput.js → TypesHarnessEntity.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 { TypesHarnessEntity } from '../schemas/TypesHarnessEntity';
|
|
5
|
+
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
+
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
+
export interface CreateEntityMutationHeaderParams {
|
|
8
|
+
'harness-account': string;
|
|
9
|
+
}
|
|
10
|
+
export type CreateEntityRequestBody = TypesHarnessEntity;
|
|
11
|
+
export type CreateEntityOkResponse = ResponseWithPagination<TypesChatOutput>;
|
|
12
|
+
export type CreateEntityErrorResponse = UsererrorError;
|
|
13
|
+
export interface CreateEntityProps extends Omit<FetcherOptions<unknown, CreateEntityRequestBody, CreateEntityMutationHeaderParams>, 'url'> {
|
|
14
|
+
body: CreateEntityRequestBody;
|
|
15
|
+
}
|
|
16
|
+
export declare function createEntity(props: CreateEntityProps): Promise<CreateEntityOkResponse>;
|
|
17
|
+
/**
|
|
18
|
+
* Create or update Harness entities like secrets and environments
|
|
19
|
+
*/
|
|
20
|
+
export declare function useCreateEntityMutation(options?: Omit<UseMutationOptions<CreateEntityOkResponse, CreateEntityErrorResponse, CreateEntityProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<CreateEntityOkResponse, UsererrorError, CreateEntityProps, 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 createEntity(props) {
|
|
7
|
+
return fetcher(Object.assign({ url: `/api/v1/entity`, method: 'POST' }, props));
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Create or update Harness entities like secrets and environments
|
|
11
|
+
*/
|
|
12
|
+
export function useCreateEntityMutation(options) {
|
|
13
|
+
return useMutation((mutateProps) => createEntity(mutateProps), options);
|
|
14
|
+
}
|
|
@@ -1,24 +1,19 @@
|
|
|
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 {
|
|
5
|
-
export {
|
|
6
|
-
export type { UpdatePipelineStepErrorResponse, UpdatePipelineStepOkResponse, UpdatePipelineStepProps, UpdatePipelineStepRequestBody, } from './hooks/useUpdatePipelineStepMutation';
|
|
7
|
-
export { updatePipelineStep, useUpdatePipelineStepMutation, } from './hooks/useUpdatePipelineStepMutation';
|
|
4
|
+
export type { CreateEntityErrorResponse, CreateEntityOkResponse, CreateEntityProps, CreateEntityRequestBody, } from './hooks/useCreateEntityMutation';
|
|
5
|
+
export { createEntity, useCreateEntityMutation } from './hooks/useCreateEntityMutation';
|
|
8
6
|
export type { EnumAction } from './schemas/EnumAction';
|
|
7
|
+
export type { EnumEntityType } from './schemas/EnumEntityType';
|
|
9
8
|
export type { EnumMessageType } from './schemas/EnumMessageType';
|
|
10
9
|
export type { EnumRole } from './schemas/EnumRole';
|
|
11
10
|
export type { TypesChat } from './schemas/TypesChat';
|
|
12
11
|
export type { TypesChatOutput } from './schemas/TypesChatOutput';
|
|
13
12
|
export type { TypesChatResponse } from './schemas/TypesChatResponse';
|
|
14
13
|
export type { TypesConversation } from './schemas/TypesConversation';
|
|
15
|
-
export type {
|
|
16
|
-
export type {
|
|
14
|
+
export type { TypesEntityInfo } from './schemas/TypesEntityInfo';
|
|
15
|
+
export type { TypesHarnessEntity } from './schemas/TypesHarnessEntity';
|
|
17
16
|
export type { TypesMessage } from './schemas/TypesMessage';
|
|
18
|
-
export type { TypesPipelineData } from './schemas/TypesPipelineData';
|
|
19
|
-
export type { TypesPipelineStepData } from './schemas/TypesPipelineStepData';
|
|
20
17
|
export type { TypesResponseMessage } from './schemas/TypesResponseMessage';
|
|
21
|
-
export type { TypesUpdatePipelineInput } from './schemas/TypesUpdatePipelineInput';
|
|
22
|
-
export type { TypesUpdatePipelineOutput } from './schemas/TypesUpdatePipelineOutput';
|
|
23
18
|
export type { UsererrorError } from './schemas/UsererrorError';
|
|
24
19
|
export type { UuidUuid } from './schemas/UuidUuid';
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export { chat, useChatMutation } from './hooks/useChatMutation';
|
|
2
|
-
export {
|
|
3
|
-
export { updatePipelineStep, useUpdatePipelineStepMutation, } from './hooks/useUpdatePipelineStepMutation';
|
|
2
|
+
export { createEntity, useCreateEntityMutation } from './hooks/useCreateEntityMutation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type EnumEntityType = string;
|
|
@@ -2,9 +2,12 @@ import type { TypesConversation } from '../schemas/TypesConversation';
|
|
|
2
2
|
import type { UuidUuid } from '../schemas/UuidUuid';
|
|
3
3
|
export interface TypesChat {
|
|
4
4
|
conversation?: TypesConversation[] | null;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
conversation_id?: UuidUuid;
|
|
6
|
+
interaction_id?: UuidUuid;
|
|
7
|
+
metadata: {
|
|
7
8
|
[key: string]: string;
|
|
8
9
|
} | null;
|
|
9
|
-
prompt
|
|
10
|
+
prompt: string;
|
|
11
|
+
stream?: boolean;
|
|
12
|
+
valid_prompt_explanation?: string;
|
|
10
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { UuidUuid } from '../schemas/UuidUuid';
|
|
2
2
|
import type { TypesChatResponse } from '../schemas/TypesChatResponse';
|
|
3
3
|
export interface TypesChatOutput {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
response
|
|
4
|
+
conversation_id: UuidUuid;
|
|
5
|
+
interaction_id: UuidUuid;
|
|
6
|
+
response: TypesChatResponse[] | null;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TypesResponseMessage } from '../schemas/TypesResponseMessage';
|
|
2
2
|
import type { EnumRole } from '../schemas/EnumRole';
|
|
3
3
|
export interface TypesChatResponse {
|
|
4
|
-
message
|
|
5
|
-
role
|
|
4
|
+
message: TypesResponseMessage;
|
|
5
|
+
role: EnumRole;
|
|
6
6
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { UuidUuid } from '../schemas/UuidUuid';
|
|
2
|
+
export interface TypesHarnessEntity {
|
|
3
|
+
action_type: string;
|
|
4
|
+
content: string;
|
|
5
|
+
conversation_id?: UuidUuid;
|
|
6
|
+
entity_type: string;
|
|
7
|
+
interaction_id?: UuidUuid;
|
|
8
|
+
metadata: {
|
|
9
|
+
[key: string]: string;
|
|
10
|
+
} | null;
|
|
11
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { EnumAction } from '../schemas/EnumAction';
|
|
2
|
+
import type { TypesEntityInfo } from '../schemas/TypesEntityInfo';
|
|
2
3
|
import type { EnumMessageType } from '../schemas/EnumMessageType';
|
|
3
4
|
export interface TypesResponseMessage {
|
|
4
5
|
actions?: EnumAction[];
|
|
5
|
-
data
|
|
6
|
-
|
|
6
|
+
data: string;
|
|
7
|
+
entity_info?: TypesEntityInfo;
|
|
8
|
+
type: EnumMessageType;
|
|
7
9
|
}
|
package/package.json
CHANGED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { TypesGeneratePipelineStepOutput } from '../schemas/TypesGeneratePipelineStepOutput';
|
|
3
|
-
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
|
-
import type { TypesGeneratePipelineStepInput } from '../schemas/TypesGeneratePipelineStepInput';
|
|
5
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
-
export interface GeneratePipelineStepMutationHeaderParams {
|
|
8
|
-
'harness-account': string;
|
|
9
|
-
}
|
|
10
|
-
export type GeneratePipelineStepRequestBody = TypesGeneratePipelineStepInput;
|
|
11
|
-
export type GeneratePipelineStepOkResponse = ResponseWithPagination<TypesGeneratePipelineStepOutput>;
|
|
12
|
-
export type GeneratePipelineStepErrorResponse = UsererrorError;
|
|
13
|
-
export interface GeneratePipelineStepProps extends Omit<FetcherOptions<unknown, GeneratePipelineStepRequestBody, GeneratePipelineStepMutationHeaderParams>, 'url'> {
|
|
14
|
-
body: GeneratePipelineStepRequestBody;
|
|
15
|
-
}
|
|
16
|
-
export declare function generatePipelineStep(props: GeneratePipelineStepProps): Promise<GeneratePipelineStepOkResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Generate Pipeline Step
|
|
19
|
-
*/
|
|
20
|
-
export declare function useGeneratePipelineStepMutation(options?: Omit<UseMutationOptions<GeneratePipelineStepOkResponse, GeneratePipelineStepErrorResponse, GeneratePipelineStepProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<GeneratePipelineStepOkResponse, UsererrorError, GeneratePipelineStepProps, 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 generatePipelineStep(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v1/pipelinestep/generate`, method: 'POST' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Generate Pipeline Step
|
|
11
|
-
*/
|
|
12
|
-
export function useGeneratePipelineStepMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => generatePipelineStep(mutateProps), options);
|
|
14
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { UseMutationOptions } from '@tanstack/react-query';
|
|
2
|
-
import type { TypesUpdatePipelineOutput } from '../schemas/TypesUpdatePipelineOutput';
|
|
3
|
-
import type { UsererrorError } from '../schemas/UsererrorError';
|
|
4
|
-
import type { TypesUpdatePipelineInput } from '../schemas/TypesUpdatePipelineInput';
|
|
5
|
-
import type { ResponseWithPagination } from '../helpers';
|
|
6
|
-
import { FetcherOptions } from '../../../../fetcher/index.js';
|
|
7
|
-
export interface UpdatePipelineStepMutationHeaderParams {
|
|
8
|
-
'harness-account': string;
|
|
9
|
-
}
|
|
10
|
-
export type UpdatePipelineStepRequestBody = TypesUpdatePipelineInput;
|
|
11
|
-
export type UpdatePipelineStepOkResponse = ResponseWithPagination<TypesUpdatePipelineOutput>;
|
|
12
|
-
export type UpdatePipelineStepErrorResponse = UsererrorError;
|
|
13
|
-
export interface UpdatePipelineStepProps extends Omit<FetcherOptions<unknown, UpdatePipelineStepRequestBody, UpdatePipelineStepMutationHeaderParams>, 'url'> {
|
|
14
|
-
body: UpdatePipelineStepRequestBody;
|
|
15
|
-
}
|
|
16
|
-
export declare function updatePipelineStep(props: UpdatePipelineStepProps): Promise<UpdatePipelineStepOkResponse>;
|
|
17
|
-
/**
|
|
18
|
-
* Update Pipeline Step
|
|
19
|
-
*/
|
|
20
|
-
export declare function useUpdatePipelineStepMutation(options?: Omit<UseMutationOptions<UpdatePipelineStepOkResponse, UpdatePipelineStepErrorResponse, UpdatePipelineStepProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<UpdatePipelineStepOkResponse, UsererrorError, UpdatePipelineStepProps, 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 updatePipelineStep(props) {
|
|
7
|
-
return fetcher(Object.assign({ url: `/api/v1/pipelinestep/update`, method: 'POST' }, props));
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Update Pipeline Step
|
|
11
|
-
*/
|
|
12
|
-
export function useUpdatePipelineStepMutation(options) {
|
|
13
|
-
return useMutation((mutateProps) => updatePipelineStep(mutateProps), options);
|
|
14
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
/package/dist/intelligence-service/src/services/schemas/{TypesPipelineData.js → EnumEntityType.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|