@fencyai/js 0.1.108 → 0.1.110

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 (73) hide show
  1. package/lib/api/createAgentTask.js +1 -1
  2. package/lib/api/createFileDownloadLink.js +1 -1
  3. package/lib/api/createStream.js +2 -2
  4. package/lib/index.d.ts +4 -8
  5. package/lib/index.js +1 -1
  6. package/lib/openapi/{stream → ct}/index.d.ts +0 -5
  7. package/lib/openapi/{stream → ct}/models/AgentTaskProgressItemUpdatedEventDto.d.ts +1 -2
  8. package/lib/openapi/ct/models/StreamEventType.d.ts +6 -0
  9. package/lib/openapi/ct/models/StreamEventType.js +11 -0
  10. package/lib/openapi/{stream → ct}/services/PubService.d.ts +1 -6
  11. package/lib/openapi/{stream → ct}/services/PubService.js +2 -2
  12. package/lib/openapi/{client → ct-st}/services/PubService.js +2 -2
  13. package/lib/types/AgentTask.d.ts +1 -1
  14. package/package.json +3 -3
  15. package/lib/openapi/stream/models/ChatCompletionStreamCompletedEventDto.d.ts +0 -7
  16. package/lib/openapi/stream/models/ChatCompletionStreamCompletedEventDto.js +0 -1
  17. package/lib/openapi/stream/models/FileSearchIndexReadyEventDto.d.ts +0 -7
  18. package/lib/openapi/stream/models/FileSearchIndexReadyEventDto.js +0 -1
  19. package/lib/openapi/stream/models/FileTextContentReadyEventDto.d.ts +0 -8
  20. package/lib/openapi/stream/models/FileTextContentReadyEventDto.js +0 -1
  21. package/lib/openapi/stream/models/FileUploadCompletedEventDto.d.ts +0 -7
  22. package/lib/openapi/stream/models/FileUploadCompletedEventDto.js +0 -1
  23. package/lib/openapi/stream/models/NewChatCompletionStreamChunkEventDto.d.ts +0 -8
  24. package/lib/openapi/stream/models/NewChatCompletionStreamChunkEventDto.js +0 -1
  25. package/lib/openapi/stream/models/StreamEventType.d.ts +0 -12
  26. package/lib/openapi/stream/models/StreamEventType.js +0 -17
  27. /package/lib/openapi/{stream → ct}/core/ApiError.d.ts +0 -0
  28. /package/lib/openapi/{stream → ct}/core/ApiError.js +0 -0
  29. /package/lib/openapi/{stream → ct}/core/ApiRequestOptions.d.ts +0 -0
  30. /package/lib/openapi/{stream → ct}/core/ApiRequestOptions.js +0 -0
  31. /package/lib/openapi/{stream → ct}/core/ApiResult.d.ts +0 -0
  32. /package/lib/openapi/{stream → ct}/core/ApiResult.js +0 -0
  33. /package/lib/openapi/{stream → ct}/core/CancelablePromise.d.ts +0 -0
  34. /package/lib/openapi/{stream → ct}/core/CancelablePromise.js +0 -0
  35. /package/lib/openapi/{stream → ct}/core/OpenAPI.d.ts +0 -0
  36. /package/lib/openapi/{stream → ct}/core/OpenAPI.js +0 -0
  37. /package/lib/openapi/{stream → ct}/core/request.d.ts +0 -0
  38. /package/lib/openapi/{stream → ct}/core/request.js +0 -0
  39. /package/lib/openapi/{stream → ct}/index.js +0 -0
  40. /package/lib/openapi/{stream → ct}/models/AgentTaskProgressItemType.d.ts +0 -0
  41. /package/lib/openapi/{stream → ct}/models/AgentTaskProgressItemType.js +0 -0
  42. /package/lib/openapi/{stream → ct}/models/AgentTaskProgressItemUpdatedEventDto.js +0 -0
  43. /package/lib/openapi/{stream → ct}/models/ApiDtoType.d.ts +0 -0
  44. /package/lib/openapi/{stream → ct}/models/ApiDtoType.js +0 -0
  45. /package/lib/openapi/{stream → ct}/models/StreamDto.d.ts +0 -0
  46. /package/lib/openapi/{stream → ct}/models/StreamDto.js +0 -0
  47. /package/lib/openapi/{stream → ct}/models/StreamNotFoundEventDto.d.ts +0 -0
  48. /package/lib/openapi/{stream → ct}/models/StreamNotFoundEventDto.js +0 -0
  49. /package/lib/openapi/{stream → ct}/models/StreamTimeoutEventDto.d.ts +0 -0
  50. /package/lib/openapi/{stream → ct}/models/StreamTimeoutEventDto.js +0 -0
  51. /package/lib/openapi/{client → ct-st}/core/ApiError.d.ts +0 -0
  52. /package/lib/openapi/{client → ct-st}/core/ApiError.js +0 -0
  53. /package/lib/openapi/{client → ct-st}/core/ApiRequestOptions.d.ts +0 -0
  54. /package/lib/openapi/{client → ct-st}/core/ApiRequestOptions.js +0 -0
  55. /package/lib/openapi/{client → ct-st}/core/ApiResult.d.ts +0 -0
  56. /package/lib/openapi/{client → ct-st}/core/ApiResult.js +0 -0
  57. /package/lib/openapi/{client → ct-st}/core/CancelablePromise.d.ts +0 -0
  58. /package/lib/openapi/{client → ct-st}/core/CancelablePromise.js +0 -0
  59. /package/lib/openapi/{client → ct-st}/core/OpenAPI.d.ts +0 -0
  60. /package/lib/openapi/{client → ct-st}/core/OpenAPI.js +0 -0
  61. /package/lib/openapi/{client → ct-st}/core/request.d.ts +0 -0
  62. /package/lib/openapi/{client → ct-st}/core/request.js +0 -0
  63. /package/lib/openapi/{client → ct-st}/index.d.ts +0 -0
  64. /package/lib/openapi/{client → ct-st}/index.js +0 -0
  65. /package/lib/openapi/{client → ct-st}/models/AgentTaskStatusDto.d.ts +0 -0
  66. /package/lib/openapi/{client → ct-st}/models/AgentTaskStatusDto.js +0 -0
  67. /package/lib/openapi/{client → ct-st}/models/PubAgentTaskDto.d.ts +0 -0
  68. /package/lib/openapi/{client → ct-st}/models/PubAgentTaskDto.js +0 -0
  69. /package/lib/openapi/{client → ct-st}/models/PubCreateAgentTaskRequest.d.ts +0 -0
  70. /package/lib/openapi/{client → ct-st}/models/PubCreateAgentTaskRequest.js +0 -0
  71. /package/lib/openapi/{client → ct-st}/models/PubCreateFileDownloadLinkResponse.d.ts +0 -0
  72. /package/lib/openapi/{client → ct-st}/models/PubCreateFileDownloadLinkResponse.js +0 -0
  73. /package/lib/openapi/{client → ct-st}/services/PubService.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { OpenAPI, PubService } from '../openapi/client';
1
+ import { OpenAPI, PubService } from '../openapi/ct-st';
2
2
  import { getPackageVersion } from '../utils/version';
3
3
  export async function createAgentTask(params) {
4
4
  try {
@@ -18,7 +18,7 @@ export async function createFileDownloadLink(params) {
18
18
  }
19
19
  }
20
20
  async function createFileDownloadLinkApi(params) {
21
- const response = await fetch(`${params.baseUrl}/v1/pub/files/${encodeURIComponent(params.fileId)}/download-links`, {
21
+ const response = await fetch(`${params.baseUrl}/v1/ct-st/files/${encodeURIComponent(params.fileId)}/download-links`, {
22
22
  method: 'POST',
23
23
  headers: {
24
24
  'Content-Type': 'application/json',
@@ -1,4 +1,4 @@
1
- import { OpenAPI } from '../openapi/stream';
1
+ import { OpenAPI } from '../openapi/ct';
2
2
  import { getPackageVersion } from '../utils/version';
3
3
  export async function createStream(params) {
4
4
  try {
@@ -30,7 +30,7 @@ export async function createStream(params) {
30
30
  }
31
31
  }
32
32
  const createStreamApi = async (params) => {
33
- const response = await fetch(`${params.baseUrl}/pub/stream/streams`, {
33
+ const response = await fetch(`${params.baseUrl}/pub/ct/streams`, {
34
34
  method: 'POST',
35
35
  headers: {
36
36
  'Content-Type': 'application/json',
package/lib/index.d.ts CHANGED
@@ -2,14 +2,10 @@ export { loadFency } from './loadFency';
2
2
  export type { FencyInstance } from './types/FencyInstance';
3
3
  export type { FencyOptions } from './types/FencyOptions';
4
4
  export * from './types/index';
5
- export { AgentTaskProgressItemType } from './openapi/stream/models/AgentTaskProgressItemType';
6
- export type { AgentTaskProgressItemUpdatedEventDto } from './openapi/stream/models/AgentTaskProgressItemUpdatedEventDto';
7
- export type { ChatCompletionStreamCompletedEventDto } from './openapi/stream/models/ChatCompletionStreamCompletedEventDto';
8
- export type { FileTextContentReadyEventDto } from './openapi/stream/models/FileTextContentReadyEventDto';
9
- export type { FileUploadCompletedEventDto } from './openapi/stream/models/FileUploadCompletedEventDto';
10
- export type { NewChatCompletionStreamChunkEventDto } from './openapi/stream/models/NewChatCompletionStreamChunkEventDto';
11
- export type { StreamNotFoundEventDto } from './openapi/stream/models/StreamNotFoundEventDto';
12
- export type { StreamTimeoutEventDto } from './openapi/stream/models/StreamTimeoutEventDto';
5
+ export { AgentTaskProgressItemType } from './openapi/ct/models/AgentTaskProgressItemType';
6
+ export type { AgentTaskProgressItemUpdatedEventDto } from './openapi/ct/models/AgentTaskProgressItemUpdatedEventDto';
7
+ export type { StreamNotFoundEventDto } from './openapi/ct/models/StreamNotFoundEventDto';
8
+ export type { StreamTimeoutEventDto } from './openapi/ct/models/StreamTimeoutEventDto';
13
9
  export { createAgentTask } from './api/createAgentTask';
14
10
  export { createStream } from './api/createStream';
15
11
  export { createFileDownloadLink } from './api/createFileDownloadLink';
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { loadFency } from './loadFency';
2
2
  export * from './types/index';
3
3
  // stream event types
4
- export { AgentTaskProgressItemType } from './openapi/stream/models/AgentTaskProgressItemType';
4
+ export { AgentTaskProgressItemType } from './openapi/ct/models/AgentTaskProgressItemType';
5
5
  // api
6
6
  export { createAgentTask } from './api/createAgentTask';
7
7
  export { createStream } from './api/createStream';
@@ -5,11 +5,6 @@ export type { OpenAPIConfig } from './core/OpenAPI';
5
5
  export { AgentTaskProgressItemType } from './models/AgentTaskProgressItemType';
6
6
  export type { AgentTaskProgressItemUpdatedEventDto } from './models/AgentTaskProgressItemUpdatedEventDto';
7
7
  export { ApiDtoType } from './models/ApiDtoType';
8
- export type { ChatCompletionStreamCompletedEventDto } from './models/ChatCompletionStreamCompletedEventDto';
9
- export type { FileSearchIndexReadyEventDto } from './models/FileSearchIndexReadyEventDto';
10
- export type { FileTextContentReadyEventDto } from './models/FileTextContentReadyEventDto';
11
- export type { FileUploadCompletedEventDto } from './models/FileUploadCompletedEventDto';
12
- export type { NewChatCompletionStreamChunkEventDto } from './models/NewChatCompletionStreamChunkEventDto';
13
8
  export type { StreamDto } from './models/StreamDto';
14
9
  export { StreamEventType } from './models/StreamEventType';
15
10
  export type { StreamNotFoundEventDto } from './models/StreamNotFoundEventDto';
@@ -4,11 +4,10 @@ export type AgentTaskProgressItemUpdatedEventDto = {
4
4
  type: StreamEventType;
5
5
  streamId: string;
6
6
  timestamp: string;
7
+ createdAt: string;
7
8
  agentTaskId: string;
8
9
  progressItemId: string;
9
10
  title: string;
10
11
  progressItemType: AgentTaskProgressItemType;
11
- startedAt: string;
12
- completedAt?: string | null;
13
12
  response: string;
14
13
  };
@@ -0,0 +1,6 @@
1
+ export declare enum StreamEventType {
2
+ STREAM_TIMEOUT = "StreamTimeout",
3
+ STREAM_NOT_FOUND = "StreamNotFound",
4
+ STREAM_UNAUTHORIZED = "StreamUnauthorized",
5
+ AGENT_TASK_PROGRESS_ITEM_UPDATED = "AgentTaskProgressItemUpdated"
6
+ }
@@ -0,0 +1,11 @@
1
+ /* generated using openapi-typescript-codegen -- do not edit */
2
+ /* istanbul ignore file */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ export var StreamEventType;
6
+ (function (StreamEventType) {
7
+ StreamEventType["STREAM_TIMEOUT"] = "StreamTimeout";
8
+ StreamEventType["STREAM_NOT_FOUND"] = "StreamNotFound";
9
+ StreamEventType["STREAM_UNAUTHORIZED"] = "StreamUnauthorized";
10
+ StreamEventType["AGENT_TASK_PROGRESS_ITEM_UPDATED"] = "AgentTaskProgressItemUpdated";
11
+ })(StreamEventType || (StreamEventType = {}));
@@ -1,9 +1,4 @@
1
1
  import type { AgentTaskProgressItemUpdatedEventDto } from '../models/AgentTaskProgressItemUpdatedEventDto';
2
- import type { ChatCompletionStreamCompletedEventDto } from '../models/ChatCompletionStreamCompletedEventDto';
3
- import type { FileSearchIndexReadyEventDto } from '../models/FileSearchIndexReadyEventDto';
4
- import type { FileTextContentReadyEventDto } from '../models/FileTextContentReadyEventDto';
5
- import type { FileUploadCompletedEventDto } from '../models/FileUploadCompletedEventDto';
6
- import type { NewChatCompletionStreamChunkEventDto } from '../models/NewChatCompletionStreamChunkEventDto';
7
2
  import type { StreamDto } from '../models/StreamDto';
8
3
  import type { StreamNotFoundEventDto } from '../models/StreamNotFoundEventDto';
9
4
  import type { StreamTimeoutEventDto } from '../models/StreamTimeoutEventDto';
@@ -20,5 +15,5 @@ export declare class PubService {
20
15
  * @returns any OK
21
16
  * @throws ApiError
22
17
  */
23
- static getPubTypes(): CancelablePromise<(StreamTimeoutEventDto | StreamNotFoundEventDto | NewChatCompletionStreamChunkEventDto | ChatCompletionStreamCompletedEventDto | FileUploadCompletedEventDto | FileTextContentReadyEventDto | FileSearchIndexReadyEventDto | AgentTaskProgressItemUpdatedEventDto)>;
18
+ static getPubTypes(): CancelablePromise<(StreamTimeoutEventDto | StreamNotFoundEventDto | AgentTaskProgressItemUpdatedEventDto)>;
24
19
  }
@@ -9,7 +9,7 @@ export class PubService {
9
9
  static createStream() {
10
10
  return __request(OpenAPI, {
11
11
  method: 'POST',
12
- url: '/pub/stream/streams',
12
+ url: '/pub/ct/streams',
13
13
  });
14
14
  }
15
15
  /**
@@ -20,7 +20,7 @@ export class PubService {
20
20
  static getPubTypes() {
21
21
  return __request(OpenAPI, {
22
22
  method: 'POST',
23
- url: '/pub/stream/types',
23
+ url: '/pub/ct/types',
24
24
  });
25
25
  }
26
26
  }
@@ -10,7 +10,7 @@ export class PubService {
10
10
  static createAgentTask(requestBody) {
11
11
  return __request(OpenAPI, {
12
12
  method: 'POST',
13
- url: '/pub/client/agent-tasks',
13
+ url: '/pub/ct-st/agent-tasks',
14
14
  body: requestBody,
15
15
  mediaType: 'application/json',
16
16
  });
@@ -24,7 +24,7 @@ export class PubService {
24
24
  static createFileDownloadLink(fileId) {
25
25
  return __request(OpenAPI, {
26
26
  method: 'POST',
27
- url: '/pub/client/files/{fileId}/download-links',
27
+ url: '/pub/ct-st/files/{fileId}/download-links',
28
28
  path: {
29
29
  'fileId': fileId,
30
30
  },
@@ -1,4 +1,4 @@
1
- import { AgentTaskStatusDto } from "../openapi/client";
1
+ import { AgentTaskStatusDto } from "../openapi/ct-st";
2
2
  export type AgentTask = {
3
3
  id: string;
4
4
  status: AgentTaskStatusDto;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fencyai/js",
3
- "version": "0.1.108",
3
+ "version": "0.1.110",
4
4
  "description": "> TODO: description",
5
5
  "author": "staklau <steinaageklaussen@gmail.com>",
6
6
  "homepage": "",
@@ -32,7 +32,7 @@
32
32
  "test:watch": "jest --watch",
33
33
  "dev": "tsc --watch",
34
34
  "prepublishOnly": "npm run build",
35
- "codegen": "openapi --input http://localhost:8080/pub/client/swagger.json --output ./src/openapi/client && openapi --input http://localhost:8080/pub/stream/swagger.json --output ./src/openapi/stream"
35
+ "codegen": "openapi --input http://localhost:8080/pub/ct-st/swagger.json --output ./src/openapi/ct-st && openapi --input http://localhost:8080/pub/ct/swagger.json --output ./src/openapi/ct"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/jest": "^29.5.11",
@@ -42,5 +42,5 @@
42
42
  "ts-jest": "^29.1.1",
43
43
  "typescript": "^5.3.3"
44
44
  },
45
- "gitHead": "b6e2b8dfa4bb130b0f57dc2d4decbb08c5f91850"
45
+ "gitHead": "9836dad9a8577fb445a3a378490071c0522fbca7"
46
46
  }
@@ -1,7 +0,0 @@
1
- import type { StreamEventType } from './StreamEventType';
2
- export type ChatCompletionStreamCompletedEventDto = {
3
- type: StreamEventType;
4
- streamId: string;
5
- chatCompletionId: string;
6
- timestamp: string;
7
- };
@@ -1,7 +0,0 @@
1
- import type { StreamEventType } from './StreamEventType';
2
- export type FileSearchIndexReadyEventDto = {
3
- type: StreamEventType;
4
- streamId: string;
5
- fileId: string;
6
- timestamp: string;
7
- };
@@ -1,8 +0,0 @@
1
- import type { StreamEventType } from './StreamEventType';
2
- export type FileTextContentReadyEventDto = {
3
- type: StreamEventType;
4
- streamId: string;
5
- fileId: string;
6
- textContent: string;
7
- timestamp: string;
8
- };
@@ -1,7 +0,0 @@
1
- import type { StreamEventType } from './StreamEventType';
2
- export type FileUploadCompletedEventDto = {
3
- type: StreamEventType;
4
- streamId: string;
5
- fileId: string;
6
- timestamp: string;
7
- };
@@ -1,8 +0,0 @@
1
- import type { StreamEventType } from './StreamEventType';
2
- export type NewChatCompletionStreamChunkEventDto = {
3
- type: StreamEventType;
4
- streamId: string;
5
- chatCompletionId: string;
6
- timestamp: string;
7
- content: string;
8
- };
@@ -1,12 +0,0 @@
1
- export declare enum StreamEventType {
2
- NEW_CHAT_COMPLETION_STREAM_CHUNK = "NewChatCompletionStreamChunk",
3
- CHAT_COMPLETION_STREAM_COMPLETED = "ChatCompletionStreamCompleted",
4
- STREAM_TIMEOUT = "StreamTimeout",
5
- STREAM_NOT_FOUND = "StreamNotFound",
6
- FILE_UPLOAD_COMPLETED = "FileUploadCompleted",
7
- FILE_TEXT_CONTENT_READY = "FileTextContentReady",
8
- WEBSITE_HTML_CONTENT_READY = "WebsiteHtmlContentReady",
9
- WEBSITE_TEXT_CONTENT_READY = "WebsiteTextContentReady",
10
- FILE_SEARCH_INDEX_READY = "FileSearchIndexReady",
11
- AGENT_TASK_PROGRESS_ITEM_UPDATED = "AgentTaskProgressItemUpdated"
12
- }
@@ -1,17 +0,0 @@
1
- /* generated using openapi-typescript-codegen -- do not edit */
2
- /* istanbul ignore file */
3
- /* tslint:disable */
4
- /* eslint-disable */
5
- export var StreamEventType;
6
- (function (StreamEventType) {
7
- StreamEventType["NEW_CHAT_COMPLETION_STREAM_CHUNK"] = "NewChatCompletionStreamChunk";
8
- StreamEventType["CHAT_COMPLETION_STREAM_COMPLETED"] = "ChatCompletionStreamCompleted";
9
- StreamEventType["STREAM_TIMEOUT"] = "StreamTimeout";
10
- StreamEventType["STREAM_NOT_FOUND"] = "StreamNotFound";
11
- StreamEventType["FILE_UPLOAD_COMPLETED"] = "FileUploadCompleted";
12
- StreamEventType["FILE_TEXT_CONTENT_READY"] = "FileTextContentReady";
13
- StreamEventType["WEBSITE_HTML_CONTENT_READY"] = "WebsiteHtmlContentReady";
14
- StreamEventType["WEBSITE_TEXT_CONTENT_READY"] = "WebsiteTextContentReady";
15
- StreamEventType["FILE_SEARCH_INDEX_READY"] = "FileSearchIndexReady";
16
- StreamEventType["AGENT_TASK_PROGRESS_ITEM_UPDATED"] = "AgentTaskProgressItemUpdated";
17
- })(StreamEventType || (StreamEventType = {}));
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes