@fencyai/js 0.1.107 → 0.1.108

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 (125) hide show
  1. package/lib/api/createAgentTask.d.ts +2 -1
  2. package/lib/api/createAgentTask.js +4 -4
  3. package/lib/api/createFileDownloadLink.d.ts +2 -1
  4. package/lib/api/createFileDownloadLink.js +5 -3
  5. package/lib/api/createStream.d.ts +1 -1
  6. package/lib/api/createStream.js +20 -4
  7. package/lib/index.d.ts +10 -5
  8. package/lib/index.js +2 -3
  9. package/lib/loadFency.d.ts +2 -1
  10. package/lib/openapi/client/index.d.ts +9 -0
  11. package/lib/openapi/client/index.js +9 -0
  12. package/lib/openapi/{models → client/models}/PubCreateAgentTaskRequest.d.ts +0 -1
  13. package/lib/openapi/client/services/PubService.d.ts +20 -0
  14. package/lib/openapi/client/services/PubService.js +33 -0
  15. package/lib/openapi/stream/core/ApiError.d.ts +10 -0
  16. package/lib/openapi/stream/core/ApiError.js +11 -0
  17. package/lib/openapi/stream/core/ApiRequestOptions.d.ts +13 -0
  18. package/lib/openapi/stream/core/ApiResult.d.ts +7 -0
  19. package/lib/openapi/stream/core/CancelablePromise.d.ts +20 -0
  20. package/lib/openapi/stream/core/CancelablePromise.js +111 -0
  21. package/lib/openapi/stream/core/OpenAPI.d.ts +16 -0
  22. package/lib/openapi/stream/core/OpenAPI.js +11 -0
  23. package/lib/openapi/stream/core/request.d.ts +30 -0
  24. package/lib/openapi/stream/core/request.js +275 -0
  25. package/lib/openapi/{index.d.ts → stream/index.d.ts} +0 -10
  26. package/lib/openapi/{index.js → stream/index.js} +0 -1
  27. package/lib/openapi/{models → stream/models}/StreamDto.d.ts +1 -0
  28. package/lib/openapi/stream/services/PubService.d.ts +24 -0
  29. package/lib/openapi/stream/services/PubService.js +26 -0
  30. package/lib/types/AgentTask.d.ts +1 -1
  31. package/lib/types/Stream.d.ts +1 -0
  32. package/lib/types/index.d.ts +1 -22
  33. package/lib/types/index.js +1 -2
  34. package/lib/utils/version.js +1 -1
  35. package/package.json +3 -3
  36. package/lib/api/listMemoryTypes.d.ts +0 -6
  37. package/lib/api/listMemoryTypes.js +0 -28
  38. package/lib/api/searchMemories.d.ts +0 -8
  39. package/lib/api/searchMemories.js +0 -27
  40. package/lib/openapi/models/ListMemoryTypesResponse.d.ts +0 -6
  41. package/lib/openapi/models/PaginationDto.d.ts +0 -4
  42. package/lib/openapi/models/PubMemoryDto.d.ts +0 -5
  43. package/lib/openapi/models/PubMemoryDto.js +0 -1
  44. package/lib/openapi/models/PubMemoryTypeDto.d.ts +0 -5
  45. package/lib/openapi/models/PubMemoryTypeDto.js +0 -1
  46. package/lib/openapi/models/PubSearchMemoriesRequest.d.ts +0 -4
  47. package/lib/openapi/models/PubSearchMemoriesRequest.js +0 -1
  48. package/lib/openapi/models/PubSearchMemoriesResponse.d.ts +0 -4
  49. package/lib/openapi/models/PubSearchMemoriesResponse.js +0 -1
  50. package/lib/openapi/services/PubService.d.ts +0 -63
  51. package/lib/openapi/services/PubService.js +0 -96
  52. package/lib/types/AnthropicModel.d.ts +0 -1
  53. package/lib/types/AnthropicModel.js +0 -1
  54. package/lib/types/ChatCompletion.d.ts +0 -8
  55. package/lib/types/ChatCompletion.js +0 -7
  56. package/lib/types/ChatCompletionMessage.d.ts +0 -4
  57. package/lib/types/ChatCompletionMessage.js +0 -1
  58. package/lib/types/ClaudeChatCompletionMessage.d.ts +0 -4
  59. package/lib/types/ClaudeChatCompletionMessage.js +0 -1
  60. package/lib/types/CreateChatCompletionRequest.d.ts +0 -10
  61. package/lib/types/CreateChatCompletionRequest.js +0 -1
  62. package/lib/types/CreateChatCompletionResponse.d.ts +0 -9
  63. package/lib/types/CreateChatCompletionResponse.js +0 -1
  64. package/lib/types/CreateClaudeChatCompletionRequestParams.d.ts +0 -10
  65. package/lib/types/CreateClaudeChatCompletionRequestParams.js +0 -1
  66. package/lib/types/CreateGeminiChatCompletionRequestParams.d.ts +0 -11
  67. package/lib/types/CreateGeminiChatCompletionRequestParams.js +0 -1
  68. package/lib/types/CreateOpenAiChatCompletionRequestParams.d.ts +0 -9
  69. package/lib/types/CreateOpenAiChatCompletionRequestParams.js +0 -1
  70. package/lib/types/GeminiChatCompletionMessage.d.ts +0 -4
  71. package/lib/types/GeminiChatCompletionMessage.js +0 -1
  72. package/lib/types/GeminiModel.d.ts +0 -1
  73. package/lib/types/GeminiModel.js +0 -1
  74. package/lib/types/ListMemoryTypesResponse.d.ts +0 -10
  75. package/lib/types/ListMemoryTypesResponse.js +0 -1
  76. package/lib/types/OpenAiModel.d.ts +0 -1
  77. package/lib/types/OpenAiModel.js +0 -1
  78. package/lib/types/SearchMemoriesRequest.d.ts +0 -4
  79. package/lib/types/SearchMemoriesRequest.js +0 -1
  80. package/lib/types/SearchMemoriesResponse.d.ts +0 -9
  81. package/lib/types/SearchMemoriesResponse.js +0 -1
  82. /package/lib/openapi/{core → client/core}/ApiError.d.ts +0 -0
  83. /package/lib/openapi/{core → client/core}/ApiError.js +0 -0
  84. /package/lib/openapi/{core → client/core}/ApiRequestOptions.d.ts +0 -0
  85. /package/lib/openapi/{core → client/core}/ApiRequestOptions.js +0 -0
  86. /package/lib/openapi/{core → client/core}/ApiResult.d.ts +0 -0
  87. /package/lib/openapi/{core → client/core}/ApiResult.js +0 -0
  88. /package/lib/openapi/{core → client/core}/CancelablePromise.d.ts +0 -0
  89. /package/lib/openapi/{core → client/core}/CancelablePromise.js +0 -0
  90. /package/lib/openapi/{core → client/core}/OpenAPI.d.ts +0 -0
  91. /package/lib/openapi/{core → client/core}/OpenAPI.js +0 -0
  92. /package/lib/openapi/{core → client/core}/request.d.ts +0 -0
  93. /package/lib/openapi/{core → client/core}/request.js +0 -0
  94. /package/lib/openapi/{models → client/models}/AgentTaskStatusDto.d.ts +0 -0
  95. /package/lib/openapi/{models → client/models}/AgentTaskStatusDto.js +0 -0
  96. /package/lib/openapi/{models → client/models}/PubAgentTaskDto.d.ts +0 -0
  97. /package/lib/openapi/{models → client/models}/PubAgentTaskDto.js +0 -0
  98. /package/lib/openapi/{models → client/models}/PubCreateAgentTaskRequest.js +0 -0
  99. /package/lib/openapi/{models → client/models}/PubCreateFileDownloadLinkResponse.d.ts +0 -0
  100. /package/lib/openapi/{models → client/models}/PubCreateFileDownloadLinkResponse.js +0 -0
  101. /package/lib/openapi/{models/AgentTaskProgressItemUpdatedEventDto.js → stream/core/ApiRequestOptions.js} +0 -0
  102. /package/lib/openapi/{models/ChatCompletionStreamCompletedEventDto.js → stream/core/ApiResult.js} +0 -0
  103. /package/lib/openapi/{models → stream/models}/AgentTaskProgressItemType.d.ts +0 -0
  104. /package/lib/openapi/{models → stream/models}/AgentTaskProgressItemType.js +0 -0
  105. /package/lib/openapi/{models → stream/models}/AgentTaskProgressItemUpdatedEventDto.d.ts +0 -0
  106. /package/lib/openapi/{models/FileSearchIndexReadyEventDto.js → stream/models/AgentTaskProgressItemUpdatedEventDto.js} +0 -0
  107. /package/lib/openapi/{models → stream/models}/ApiDtoType.d.ts +0 -0
  108. /package/lib/openapi/{models → stream/models}/ApiDtoType.js +0 -0
  109. /package/lib/openapi/{models → stream/models}/ChatCompletionStreamCompletedEventDto.d.ts +0 -0
  110. /package/lib/openapi/{models/FileTextContentReadyEventDto.js → stream/models/ChatCompletionStreamCompletedEventDto.js} +0 -0
  111. /package/lib/openapi/{models → stream/models}/FileSearchIndexReadyEventDto.d.ts +0 -0
  112. /package/lib/openapi/{models/FileUploadCompletedEventDto.js → stream/models/FileSearchIndexReadyEventDto.js} +0 -0
  113. /package/lib/openapi/{models → stream/models}/FileTextContentReadyEventDto.d.ts +0 -0
  114. /package/lib/openapi/{models/ListMemoryTypesResponse.js → stream/models/FileTextContentReadyEventDto.js} +0 -0
  115. /package/lib/openapi/{models → stream/models}/FileUploadCompletedEventDto.d.ts +0 -0
  116. /package/lib/openapi/{models/NewChatCompletionStreamChunkEventDto.js → stream/models/FileUploadCompletedEventDto.js} +0 -0
  117. /package/lib/openapi/{models → stream/models}/NewChatCompletionStreamChunkEventDto.d.ts +0 -0
  118. /package/lib/openapi/{models/PaginationDto.js → stream/models/NewChatCompletionStreamChunkEventDto.js} +0 -0
  119. /package/lib/openapi/{models → stream/models}/StreamDto.js +0 -0
  120. /package/lib/openapi/{models → stream/models}/StreamEventType.d.ts +0 -0
  121. /package/lib/openapi/{models → stream/models}/StreamEventType.js +0 -0
  122. /package/lib/openapi/{models → stream/models}/StreamNotFoundEventDto.d.ts +0 -0
  123. /package/lib/openapi/{models → stream/models}/StreamNotFoundEventDto.js +0 -0
  124. /package/lib/openapi/{models → stream/models}/StreamTimeoutEventDto.d.ts +0 -0
  125. /package/lib/openapi/{models → stream/models}/StreamTimeoutEventDto.js +0 -0
@@ -1,96 +0,0 @@
1
- import { OpenAPI } from '../core/OpenAPI';
2
- import { request as __request } from '../core/request';
3
- export class PubService {
4
- /**
5
- * Create AgentTask
6
- * @param requestBody
7
- * @returns PubAgentTaskDto Created
8
- * @throws ApiError
9
- */
10
- static createAgentTask(requestBody) {
11
- return __request(OpenAPI, {
12
- method: 'POST',
13
- url: '/v1/pub/agent-tasks',
14
- body: requestBody,
15
- mediaType: 'application/json',
16
- });
17
- }
18
- /**
19
- * Create File Download Link
20
- * @param fileId
21
- * @returns PubCreateFileDownloadLinkResponse OK
22
- * @throws ApiError
23
- */
24
- static createFileDownloadLink(fileId) {
25
- return __request(OpenAPI, {
26
- method: 'POST',
27
- url: '/v1/pub/files/{fileId}/download-links',
28
- path: {
29
- 'fileId': fileId,
30
- },
31
- });
32
- }
33
- /**
34
- * Search Memories
35
- * @param requestBody
36
- * @param nextPageToken
37
- * @param previousPageToken
38
- * @param limit
39
- * @returns PubSearchMemoriesResponse OK
40
- * @throws ApiError
41
- */
42
- static searchMemories(requestBody, nextPageToken, previousPageToken, limit) {
43
- return __request(OpenAPI, {
44
- method: 'POST',
45
- url: '/v1/pub/memories/search',
46
- query: {
47
- 'nextPageToken': nextPageToken,
48
- 'previousPageToken': previousPageToken,
49
- 'limit': limit,
50
- },
51
- body: requestBody,
52
- mediaType: 'application/json',
53
- });
54
- }
55
- /**
56
- * List Memory Types
57
- * @param nextPageToken
58
- * @param previousPageToken
59
- * @param limit
60
- * @returns ListMemoryTypesResponse OK
61
- * @throws ApiError
62
- */
63
- static listMemoryTypes(nextPageToken, previousPageToken, limit) {
64
- return __request(OpenAPI, {
65
- method: 'GET',
66
- url: '/v1/pub/memory-types',
67
- query: {
68
- 'nextPageToken': nextPageToken,
69
- 'previousPageToken': previousPageToken,
70
- 'limit': limit,
71
- },
72
- });
73
- }
74
- /**
75
- * Create Chat Completion Stream
76
- * @returns StreamDto Created
77
- * @throws ApiError
78
- */
79
- static createStream() {
80
- return __request(OpenAPI, {
81
- method: 'POST',
82
- url: '/v1/pub/streams',
83
- });
84
- }
85
- /**
86
- * Get pub types
87
- * @returns any OK
88
- * @throws ApiError
89
- */
90
- static getPubTypes() {
91
- return __request(OpenAPI, {
92
- method: 'POST',
93
- url: '/v1/pub/types',
94
- });
95
- }
96
- }
@@ -1 +0,0 @@
1
- export type AnthropicModel = 'claude-opus-4-0' | 'claude-sonnet-4-0';
@@ -1 +0,0 @@
1
- export {};
@@ -1,8 +0,0 @@
1
- export type ChatCompletion = {
2
- id: string;
3
- streamId?: string;
4
- response?: string;
5
- responseIsStructured?: boolean;
6
- createdAt: string;
7
- };
8
- export declare const isChatCompletion: (data: any) => data is ChatCompletion;
@@ -1,7 +0,0 @@
1
- export const isChatCompletion = (data) => {
2
- return (typeof data === 'object' &&
3
- data !== null &&
4
- 'id' in data &&
5
- 'createdAt' in data &&
6
- data.type === 'ChatCompletion');
7
- };
@@ -1,4 +0,0 @@
1
- export type ChatCompletionMessage = {
2
- role: 'user' | 'assistant' | 'system';
3
- content: string;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export type ClaudeChatCompletionMessage = {
2
- role: 'user' | 'assistant';
3
- content: string;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { CreateClaudeChatCompletionRequestParams } from './CreateClaudeChatCompletionRequestParams';
2
- import { CreateGeminiChatCompletionRequestParams } from './CreateGeminiChatCompletionRequestParams';
3
- import { CreateOpenAiChatCompletionRequestParams } from './CreateOpenAiChatCompletionRequestParams';
4
- export interface CreateChatCompletionRequest {
5
- streamId?: string;
6
- sessionClientSecret?: string;
7
- openai?: CreateOpenAiChatCompletionRequestParams;
8
- gemini?: CreateGeminiChatCompletionRequestParams;
9
- claude?: CreateClaudeChatCompletionRequestParams;
10
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { ApiError } from './ApiError';
2
- import { ChatCompletion } from './ChatCompletion';
3
- export type CreateChatCompletionResponse = {
4
- type: 'success';
5
- completion: ChatCompletion;
6
- } | {
7
- type: 'error';
8
- error: ApiError;
9
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { AnthropicModel } from './AnthropicModel';
2
- import { ClaudeChatCompletionMessage } from './ClaudeChatCompletionMessage';
3
- export type CreateClaudeChatCompletionRequestParams = {
4
- model: AnthropicModel;
5
- messages: Array<ClaudeChatCompletionMessage>;
6
- systemPrompt?: string;
7
- temperature?: number;
8
- topP?: number;
9
- topK?: number;
10
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,11 +0,0 @@
1
- import { GeminiChatCompletionMessage } from './GeminiChatCompletionMessage';
2
- import { GeminiModel } from './GeminiModel';
3
- export type CreateGeminiChatCompletionRequestParams = {
4
- model: GeminiModel;
5
- messages: Array<GeminiChatCompletionMessage>;
6
- systemPrompt?: string;
7
- responseJsonSchema?: string;
8
- temperature?: number;
9
- topP?: number;
10
- topK?: number;
11
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { ChatCompletionMessage } from './ChatCompletionMessage';
2
- import { OpenAiModel } from './OpenAiModel';
3
- export type CreateOpenAiChatCompletionRequestParams = {
4
- model: OpenAiModel;
5
- messages: Array<ChatCompletionMessage>;
6
- responseJsonSchema?: string;
7
- temperature?: number;
8
- topP?: number;
9
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export type GeminiChatCompletionMessage = {
2
- role: 'user' | 'model';
3
- content: string;
4
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export type GeminiModel = 'gemini-2.5-pro' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite-preview-06-17';
@@ -1 +0,0 @@
1
- export {};
@@ -1,10 +0,0 @@
1
- import { PaginationDto, PubMemoryTypeDto } from '../openapi';
2
- import { ApiError } from './ApiError';
3
- export type ListMemoryTypesResponse = {
4
- type: 'success';
5
- items: PubMemoryTypeDto[];
6
- pagination: PaginationDto;
7
- } | {
8
- type: 'error';
9
- error: ApiError;
10
- };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export type OpenAiModel = 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4o' | 'gpt-4o-mini';
@@ -1 +0,0 @@
1
- export {};
@@ -1,4 +0,0 @@
1
- export interface SearchMemoriesRequest {
2
- memoryTypeId?: string;
3
- title?: string;
4
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,9 +0,0 @@
1
- import { PubMemoryDto } from '../openapi';
2
- import { ApiError } from './ApiError';
3
- export type SearchMemoriesResponse = {
4
- type: 'success';
5
- items: PubMemoryDto[];
6
- } | {
7
- type: 'error';
8
- error: ApiError;
9
- };
@@ -1 +0,0 @@
1
- export {};
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes