@stack-spot/portal-network 0.202.0 → 0.203.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/CHANGELOG.md +14 -0
- package/dist/api/dataIntegration.d.ts +291 -1
- package/dist/api/dataIntegration.d.ts.map +1 -1
- package/dist/api/dataIntegration.js +254 -0
- package/dist/api/dataIntegration.js.map +1 -1
- package/dist/api/discover.d.ts +72 -0
- package/dist/api/discover.d.ts.map +1 -1
- package/dist/api/discover.js +68 -2
- package/dist/api/discover.js.map +1 -1
- package/dist/client/data-integration.d.ts +30 -0
- package/dist/client/data-integration.d.ts.map +1 -1
- package/dist/client/data-integration.js +22 -2
- package/dist/client/data-integration.js.map +1 -1
- package/dist/client/discover.d.ts +14 -0
- package/dist/client/discover.d.ts.map +1 -1
- package/dist/client/discover.js +28 -1
- package/dist/client/discover.js.map +1 -1
- package/package.json +1 -1
- package/src/api/dataIntegration.ts +635 -1
- package/src/api/discover.ts +145 -2
- package/src/client/data-integration.ts +15 -1
- package/src/client/discover.ts +14 -1
|
@@ -25,6 +25,7 @@ export type SearchKnowledgeObjectRequest = {
|
|
|
25
25
|
post_processing?: SearchPostProcessing | null;
|
|
26
26
|
strategy?: SearchStrategy;
|
|
27
27
|
method?: SearchMethod;
|
|
28
|
+
deep_search_ks?: boolean;
|
|
28
29
|
};
|
|
29
30
|
export type SearchKnowledgeObjectResponse = {
|
|
30
31
|
id: string;
|
|
@@ -102,7 +103,7 @@ export type KnowledgeSourceItemResponse = {
|
|
|
102
103
|
object_count: number;
|
|
103
104
|
use_only: boolean;
|
|
104
105
|
};
|
|
105
|
-
export type ExceptionType = "DATAINTEGRATION_1000_INVALID_JWT" | "DATAINTEGRATION_1001_DECODE_JWT_ERROR" | "DATAINTEGRATION_1002_KNOWLEDGE_SOURCE_DOES_NOT_EXISTS" | "DATAINTEGRATION_1003_KNOWLEDGE_SOURCE_WRONG_TYPE" | "DATAINTEGRATION_1004_UNSUPPORTED_KNOWLEDGE_SOURCE_TYPE_FOR_UPLOAD" | "DATAINTEGRATION_1005_KNOWLEDGE_OBJECT_NOT_FOUND" | "DATAINTEGRATION_1006_UNSUPPORTED_FILE_TYPE" | "DATAINTEGRATION_1007_KNOWLEDGE_SOURCE_SLUG_ALREADY_EXISTS" | "DATAINTEGRATION_1008_KNOWLEDGE_SOURCE_NOT_FOUND" | "DATAINTEGRATION_1009_KNOWLEDGE_SOURCE_CANNOT_BE_ASSOCIATED" | "DATAINTEGRATION_1010_KNOWLEDGE_SOURCE_NOT_ACCOUNT_VISIBLE" | "DATAINTEGRATION_1011_ACCOUNT_SETTINGS_NOT_FOUND" | "DATAINTEGRATION_1012_SECRET_NOT_FOUND" | "DATAINTEGRATION_1013_STRATEGY_NOT_FOUND" | "DATAINTEGRATION_1014_EMBEDDING_INTEGRATION_ERROR" | "DATAINTEGRATION_1015_KNOWLEDGE_OBJECT_UNEXPECTED_ERROR" | "DATAINTEGRATION_1016_FILE_UPLOAD_DOES_NOT_EXISTS" | "DATAINTEGRATION_1017_INVALID_VISIBILITY_CHANGE" | "DATAINTEGRATION_1018_TOKENS_USAGE_LIMIT_REACHED" | "DATAINTEGRATION_1019_KNOWLEDGE_SOURCE_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1020_FILE_UPLOAD_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1021_FILE_UPLOAD_INDEXED_OR_NOT_SPLITTED" | "DATAINTEGRATION_1022_KNOWLEDGE_GROUP_NOT_FOUND" | "DATAINTEGRATION_1023_FILE_UPLOAD_UNSUPPORTED_TARGET" | "DATAINTEGRATION_2000_LLM_INTEGRATION_ERROR" | "DATAINTEGRATION_2001_LLM_RATE_LIMIT_ERROR" | "DATAINTEGRATION_2002_LLM_PROMPT_TOO_LARGE_ERROR" | "DATAINTEGRATION_2003_LLM_FILE_TOO_LARGE_ERROR" | "DATAINTEGRATION_3000_FEATURE_DISABLED_ERROR" | "DATAINTEGRATION_5000_UNEXPECTED_ERROR" | "DATAINTEGRATION_6000_FORBIDDEN" | "DATAINTEGRATION_8001_ACCOUNT_API_ERROR" | "DATAINTEGRATION_4001_FAVORITE_ALREADY_EXISTS" | "DATAINTEGRATION_4002_FAVORITE_NOT_FOUND";
|
|
106
|
+
export type ExceptionType = "DATAINTEGRATION_1000_INVALID_JWT" | "DATAINTEGRATION_1001_DECODE_JWT_ERROR" | "DATAINTEGRATION_1002_KNOWLEDGE_SOURCE_DOES_NOT_EXISTS" | "DATAINTEGRATION_1003_KNOWLEDGE_SOURCE_WRONG_TYPE" | "DATAINTEGRATION_1004_UNSUPPORTED_KNOWLEDGE_SOURCE_TYPE_FOR_UPLOAD" | "DATAINTEGRATION_1005_KNOWLEDGE_OBJECT_NOT_FOUND" | "DATAINTEGRATION_1006_UNSUPPORTED_FILE_TYPE" | "DATAINTEGRATION_1007_KNOWLEDGE_SOURCE_SLUG_ALREADY_EXISTS" | "DATAINTEGRATION_1008_KNOWLEDGE_SOURCE_NOT_FOUND" | "DATAINTEGRATION_1009_KNOWLEDGE_SOURCE_CANNOT_BE_ASSOCIATED" | "DATAINTEGRATION_1010_KNOWLEDGE_SOURCE_NOT_ACCOUNT_VISIBLE" | "DATAINTEGRATION_1011_ACCOUNT_SETTINGS_NOT_FOUND" | "DATAINTEGRATION_1012_SECRET_NOT_FOUND" | "DATAINTEGRATION_1013_STRATEGY_NOT_FOUND" | "DATAINTEGRATION_1014_EMBEDDING_INTEGRATION_ERROR" | "DATAINTEGRATION_1015_KNOWLEDGE_OBJECT_UNEXPECTED_ERROR" | "DATAINTEGRATION_1016_FILE_UPLOAD_DOES_NOT_EXISTS" | "DATAINTEGRATION_1017_INVALID_VISIBILITY_CHANGE" | "DATAINTEGRATION_1018_TOKENS_USAGE_LIMIT_REACHED" | "DATAINTEGRATION_1019_KNOWLEDGE_SOURCE_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1020_FILE_UPLOAD_INVALID_SPLIT_STRATEGY" | "DATAINTEGRATION_1021_FILE_UPLOAD_INDEXED_OR_NOT_SPLITTED" | "DATAINTEGRATION_1022_KNOWLEDGE_GROUP_NOT_FOUND" | "DATAINTEGRATION_1023_FILE_UPLOAD_UNSUPPORTED_TARGET" | "DATAINTEGRATION_1024_FILE_UPLOAD_OPENAPI_SPEC_ERROR" | "DATAINTEGRATION_1025_FILE_UPLOAD_INVALID_SCRIPT_CONTENT" | "DATAINTEGRATION_1026_FILE_UPLOAD_EMPTY_SCRIPT_CONTENT" | "DATAINTEGRATION_1027_FILE_UPLOAD_INVALID_SCRIPT_EXECUTION_STATE_ID" | "DATAINTEGRATION_2000_LLM_INTEGRATION_ERROR" | "DATAINTEGRATION_2001_LLM_RATE_LIMIT_ERROR" | "DATAINTEGRATION_2002_LLM_PROMPT_TOO_LARGE_ERROR" | "DATAINTEGRATION_2003_LLM_FILE_TOO_LARGE_ERROR" | "DATAINTEGRATION_3000_FEATURE_DISABLED_ERROR" | "DATAINTEGRATION_5000_UNEXPECTED_ERROR" | "DATAINTEGRATION_6000_FORBIDDEN" | "DATAINTEGRATION_8001_ACCOUNT_API_ERROR" | "DATAINTEGRATION_4001_FAVORITE_ALREADY_EXISTS" | "DATAINTEGRATION_4002_FAVORITE_NOT_FOUND" | "DATAINTEGRATION_5001_DEFAULT_MODEL_NAME_NOT_FOUND" | "DATAINTEGRATION_9001_CONVERSATION_NOT_FOUND" | "DATAINTEGRATION_9002_INVALID_ID";
|
|
106
107
|
export type HttpErrorResponse = {
|
|
107
108
|
"type"?: string;
|
|
108
109
|
status: string;
|
|
@@ -295,6 +296,124 @@ export type CreateKnowledgeObjectsBatchRequest = {
|
|
|
295
296
|
[key: string]: any;
|
|
296
297
|
} | null;
|
|
297
298
|
};
|
|
299
|
+
export type InternalEmbedTextResponse = {
|
|
300
|
+
vector: number[];
|
|
301
|
+
};
|
|
302
|
+
export type MinimalConversationResponse = {
|
|
303
|
+
id: string;
|
|
304
|
+
title: string;
|
|
305
|
+
created_at: string;
|
|
306
|
+
updated_at?: string | null;
|
|
307
|
+
agents?: {
|
|
308
|
+
[key: string]: any;
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
export type CreateConversationRequest = {
|
|
312
|
+
title: string;
|
|
313
|
+
conversation_id?: string | null;
|
|
314
|
+
ai_stack_id?: string | null;
|
|
315
|
+
workspace_id?: string | null;
|
|
316
|
+
agents?: string[];
|
|
317
|
+
};
|
|
318
|
+
export type ConversationHistoryResponse = {
|
|
319
|
+
id: string;
|
|
320
|
+
conversation_id: string;
|
|
321
|
+
user_input: string | null;
|
|
322
|
+
ai_response: string | null;
|
|
323
|
+
agent_id: string | null;
|
|
324
|
+
tools: {
|
|
325
|
+
[key: string]: any;
|
|
326
|
+
} | null;
|
|
327
|
+
agent_info: {
|
|
328
|
+
[key: string]: any;
|
|
329
|
+
} | null;
|
|
330
|
+
llm_response: {
|
|
331
|
+
[key: string]: any;
|
|
332
|
+
} | null;
|
|
333
|
+
updated: string | null;
|
|
334
|
+
};
|
|
335
|
+
export type ConversationResponse = {
|
|
336
|
+
id: string;
|
|
337
|
+
title: string;
|
|
338
|
+
ai_stack_id: string | null;
|
|
339
|
+
workspace_id: string | null;
|
|
340
|
+
username: string | null;
|
|
341
|
+
agents?: {
|
|
342
|
+
[key: string]: any;
|
|
343
|
+
};
|
|
344
|
+
history?: ConversationHistoryResponse[];
|
|
345
|
+
};
|
|
346
|
+
export type ConversationUpdateTitleRequest = {
|
|
347
|
+
title: string;
|
|
348
|
+
};
|
|
349
|
+
export type ConversationHistoryRequest = {
|
|
350
|
+
agent_id: string;
|
|
351
|
+
built_in: boolean;
|
|
352
|
+
user_input: string;
|
|
353
|
+
ai_response: string;
|
|
354
|
+
tools?: {
|
|
355
|
+
[key: string]: any;
|
|
356
|
+
};
|
|
357
|
+
agent_info?: {
|
|
358
|
+
[key: string]: any;
|
|
359
|
+
};
|
|
360
|
+
llm_response?: {
|
|
361
|
+
[key: string]: any;
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
export type SearchConversationHistoryRequest = {
|
|
365
|
+
query: string;
|
|
366
|
+
conversation_ids: string[];
|
|
367
|
+
limit?: number;
|
|
368
|
+
threshold?: number | null;
|
|
369
|
+
strategy?: SearchStrategy;
|
|
370
|
+
method?: SearchMethod;
|
|
371
|
+
};
|
|
372
|
+
export type SearchConversationHistoryResponse = {
|
|
373
|
+
id: string;
|
|
374
|
+
score: number;
|
|
375
|
+
conversation_id: string;
|
|
376
|
+
user_input: string | null;
|
|
377
|
+
ai_response: string | null;
|
|
378
|
+
agent_id: string | null;
|
|
379
|
+
tools: {
|
|
380
|
+
[key: string]: any;
|
|
381
|
+
} | null;
|
|
382
|
+
agent_info: {
|
|
383
|
+
[key: string]: any;
|
|
384
|
+
} | null;
|
|
385
|
+
created: string | null;
|
|
386
|
+
updated: string | null;
|
|
387
|
+
};
|
|
388
|
+
export type PaginatedResponseKnowledgeSourceItemResponse = {
|
|
389
|
+
total_pages: number;
|
|
390
|
+
items: KnowledgeSourceItemResponse[];
|
|
391
|
+
};
|
|
392
|
+
export type PaginatedResponseKnowledgeObjectResponse = {
|
|
393
|
+
total_pages: number;
|
|
394
|
+
items: KnowledgeObjectResponse[];
|
|
395
|
+
};
|
|
396
|
+
export type UploadScriptRequest = {
|
|
397
|
+
content: string;
|
|
398
|
+
};
|
|
399
|
+
export type UploadScriptResponse = {
|
|
400
|
+
id: string;
|
|
401
|
+
};
|
|
402
|
+
export type GetScriptResponse = {
|
|
403
|
+
id: string;
|
|
404
|
+
content: string;
|
|
405
|
+
};
|
|
406
|
+
export type GetPresignedUrlResponse = {
|
|
407
|
+
url: string;
|
|
408
|
+
};
|
|
409
|
+
export type CreateScriptExecutionRequest = {
|
|
410
|
+
state: {
|
|
411
|
+
[key: string]: any;
|
|
412
|
+
};
|
|
413
|
+
};
|
|
414
|
+
export type CreateScriptExecutionResponse = {
|
|
415
|
+
id: string;
|
|
416
|
+
};
|
|
298
417
|
/**
|
|
299
418
|
* Health Check
|
|
300
419
|
*/
|
|
@@ -1655,3 +1774,518 @@ export function internalCreateKnowledgeObjectsBatchV1KnowledgeObjectsBatchPost({
|
|
|
1655
1774
|
})
|
|
1656
1775
|
})));
|
|
1657
1776
|
}
|
|
1777
|
+
/**
|
|
1778
|
+
* Create Embedding
|
|
1779
|
+
*/
|
|
1780
|
+
export function createEmbeddingV1EmbeddingsPost({ xAccountId, xUsername, authorization, body }: {
|
|
1781
|
+
xAccountId?: string | null;
|
|
1782
|
+
xUsername?: string | null;
|
|
1783
|
+
authorization: string;
|
|
1784
|
+
body: string;
|
|
1785
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1786
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1787
|
+
status: 200;
|
|
1788
|
+
data: InternalEmbedTextResponse;
|
|
1789
|
+
} | {
|
|
1790
|
+
status: 422;
|
|
1791
|
+
data: HttpValidationError;
|
|
1792
|
+
}>("/v1/embeddings", {
|
|
1793
|
+
...opts,
|
|
1794
|
+
method: "POST",
|
|
1795
|
+
body,
|
|
1796
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1797
|
+
"x-account-id": xAccountId,
|
|
1798
|
+
"x-username": xUsername,
|
|
1799
|
+
authorization
|
|
1800
|
+
})
|
|
1801
|
+
}));
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* List Conversations
|
|
1805
|
+
*/
|
|
1806
|
+
export function listConversationsV1ConversationsGet({ size, page, xAccountId, xUsername, authorization }: {
|
|
1807
|
+
size?: number;
|
|
1808
|
+
page?: number;
|
|
1809
|
+
xAccountId?: string | null;
|
|
1810
|
+
xUsername?: string | null;
|
|
1811
|
+
authorization: string;
|
|
1812
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1813
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1814
|
+
status: 200;
|
|
1815
|
+
data: MinimalConversationResponse[];
|
|
1816
|
+
} | {
|
|
1817
|
+
status: 404;
|
|
1818
|
+
} | {
|
|
1819
|
+
status: 422;
|
|
1820
|
+
data: HttpErrorResponse;
|
|
1821
|
+
} | {
|
|
1822
|
+
status: 500;
|
|
1823
|
+
data: HttpErrorResponse;
|
|
1824
|
+
}>(`/v1/conversations${QS.query(QS.explode({
|
|
1825
|
+
size,
|
|
1826
|
+
page
|
|
1827
|
+
}))}`, {
|
|
1828
|
+
...opts,
|
|
1829
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1830
|
+
"x-account-id": xAccountId,
|
|
1831
|
+
"x-username": xUsername,
|
|
1832
|
+
authorization
|
|
1833
|
+
})
|
|
1834
|
+
}));
|
|
1835
|
+
}
|
|
1836
|
+
/**
|
|
1837
|
+
* Create Conversation
|
|
1838
|
+
*/
|
|
1839
|
+
export function createConversationV1ConversationsPost({ xAccountId, xUsername, authorization, createConversationRequest }: {
|
|
1840
|
+
xAccountId?: string | null;
|
|
1841
|
+
xUsername?: string | null;
|
|
1842
|
+
authorization: string;
|
|
1843
|
+
createConversationRequest: CreateConversationRequest;
|
|
1844
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1845
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1846
|
+
status: 201;
|
|
1847
|
+
data: MinimalConversationResponse;
|
|
1848
|
+
} | {
|
|
1849
|
+
status: 404;
|
|
1850
|
+
} | {
|
|
1851
|
+
status: 422;
|
|
1852
|
+
data: HttpErrorResponse;
|
|
1853
|
+
} | {
|
|
1854
|
+
status: 500;
|
|
1855
|
+
data: HttpErrorResponse;
|
|
1856
|
+
}>("/v1/conversations", oazapfts.json({
|
|
1857
|
+
...opts,
|
|
1858
|
+
method: "POST",
|
|
1859
|
+
body: createConversationRequest,
|
|
1860
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1861
|
+
"x-account-id": xAccountId,
|
|
1862
|
+
"x-username": xUsername,
|
|
1863
|
+
authorization
|
|
1864
|
+
})
|
|
1865
|
+
})));
|
|
1866
|
+
}
|
|
1867
|
+
/**
|
|
1868
|
+
* Get Conversation With History
|
|
1869
|
+
*/
|
|
1870
|
+
export function getConversationWithHistoryV1ConversationsConversationIdGet({ conversationId, xAccountId, xUsername, authorization }: {
|
|
1871
|
+
conversationId: string;
|
|
1872
|
+
xAccountId?: string | null;
|
|
1873
|
+
xUsername?: string | null;
|
|
1874
|
+
authorization: string;
|
|
1875
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1876
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1877
|
+
status: 200;
|
|
1878
|
+
data: ConversationResponse;
|
|
1879
|
+
} | {
|
|
1880
|
+
status: 404;
|
|
1881
|
+
} | {
|
|
1882
|
+
status: 422;
|
|
1883
|
+
data: HttpErrorResponse;
|
|
1884
|
+
} | {
|
|
1885
|
+
status: 500;
|
|
1886
|
+
data: HttpErrorResponse;
|
|
1887
|
+
}>(`/v1/conversations/${encodeURIComponent(conversationId)}`, {
|
|
1888
|
+
...opts,
|
|
1889
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1890
|
+
"x-account-id": xAccountId,
|
|
1891
|
+
"x-username": xUsername,
|
|
1892
|
+
authorization
|
|
1893
|
+
})
|
|
1894
|
+
}));
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* Update Title
|
|
1898
|
+
*/
|
|
1899
|
+
export function updateTitleV1ConversationsConversationIdPatch({ conversationId, xAccountId, xUsername, authorization, conversationUpdateTitleRequest }: {
|
|
1900
|
+
conversationId: string;
|
|
1901
|
+
xAccountId?: string | null;
|
|
1902
|
+
xUsername?: string | null;
|
|
1903
|
+
authorization: string;
|
|
1904
|
+
conversationUpdateTitleRequest: ConversationUpdateTitleRequest;
|
|
1905
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1906
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1907
|
+
status: 200;
|
|
1908
|
+
data: ConversationResponse;
|
|
1909
|
+
} | {
|
|
1910
|
+
status: 404;
|
|
1911
|
+
} | {
|
|
1912
|
+
status: 422;
|
|
1913
|
+
data: HttpErrorResponse;
|
|
1914
|
+
} | {
|
|
1915
|
+
status: 500;
|
|
1916
|
+
data: HttpErrorResponse;
|
|
1917
|
+
}>(`/v1/conversations/${encodeURIComponent(conversationId)}`, oazapfts.json({
|
|
1918
|
+
...opts,
|
|
1919
|
+
method: "PATCH",
|
|
1920
|
+
body: conversationUpdateTitleRequest,
|
|
1921
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1922
|
+
"x-account-id": xAccountId,
|
|
1923
|
+
"x-username": xUsername,
|
|
1924
|
+
authorization
|
|
1925
|
+
})
|
|
1926
|
+
})));
|
|
1927
|
+
}
|
|
1928
|
+
/**
|
|
1929
|
+
* Delete Conversation
|
|
1930
|
+
*/
|
|
1931
|
+
export function deleteConversationV1ConversationsConversationIdDelete({ conversationId, xAccountId, xUsername, authorization }: {
|
|
1932
|
+
conversationId: string;
|
|
1933
|
+
xAccountId?: string | null;
|
|
1934
|
+
xUsername?: string | null;
|
|
1935
|
+
authorization: string;
|
|
1936
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1937
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1938
|
+
status: 204;
|
|
1939
|
+
} | {
|
|
1940
|
+
status: 404;
|
|
1941
|
+
} | {
|
|
1942
|
+
status: 422;
|
|
1943
|
+
data: HttpErrorResponse;
|
|
1944
|
+
} | {
|
|
1945
|
+
status: 500;
|
|
1946
|
+
data: HttpErrorResponse;
|
|
1947
|
+
}>(`/v1/conversations/${encodeURIComponent(conversationId)}`, {
|
|
1948
|
+
...opts,
|
|
1949
|
+
method: "DELETE",
|
|
1950
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1951
|
+
"x-account-id": xAccountId,
|
|
1952
|
+
"x-username": xUsername,
|
|
1953
|
+
authorization
|
|
1954
|
+
})
|
|
1955
|
+
}));
|
|
1956
|
+
}
|
|
1957
|
+
/**
|
|
1958
|
+
* Download Conversation
|
|
1959
|
+
*/
|
|
1960
|
+
export function downloadConversationV1ConversationsConversationIdDownloadGet({ conversationId, xAccountId, xUsername, authorization }: {
|
|
1961
|
+
conversationId: string;
|
|
1962
|
+
xAccountId?: string | null;
|
|
1963
|
+
xUsername?: string | null;
|
|
1964
|
+
authorization: string;
|
|
1965
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1966
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1967
|
+
status: 200;
|
|
1968
|
+
data: any;
|
|
1969
|
+
} | {
|
|
1970
|
+
status: 404;
|
|
1971
|
+
} | {
|
|
1972
|
+
status: 422;
|
|
1973
|
+
data: HttpErrorResponse;
|
|
1974
|
+
} | {
|
|
1975
|
+
status: 500;
|
|
1976
|
+
data: HttpErrorResponse;
|
|
1977
|
+
}>(`/v1/conversations/${encodeURIComponent(conversationId)}/download`, {
|
|
1978
|
+
...opts,
|
|
1979
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1980
|
+
"x-account-id": xAccountId,
|
|
1981
|
+
"x-username": xUsername,
|
|
1982
|
+
authorization
|
|
1983
|
+
})
|
|
1984
|
+
}));
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* Add Conversation History
|
|
1988
|
+
*/
|
|
1989
|
+
export function addConversationHistoryV1ConversationsConversationIdMessagesPost({ conversationId, xAccountId, xUsername, authorization, conversationHistoryRequest }: {
|
|
1990
|
+
conversationId: string;
|
|
1991
|
+
xAccountId?: string | null;
|
|
1992
|
+
xUsername?: string | null;
|
|
1993
|
+
authorization: string;
|
|
1994
|
+
conversationHistoryRequest: ConversationHistoryRequest;
|
|
1995
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1996
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1997
|
+
status: 201;
|
|
1998
|
+
data: any;
|
|
1999
|
+
} | {
|
|
2000
|
+
status: 404;
|
|
2001
|
+
} | {
|
|
2002
|
+
status: 422;
|
|
2003
|
+
data: HttpErrorResponse;
|
|
2004
|
+
} | {
|
|
2005
|
+
status: 500;
|
|
2006
|
+
data: HttpErrorResponse;
|
|
2007
|
+
}>(`/v1/conversations/${encodeURIComponent(conversationId)}/messages`, oazapfts.json({
|
|
2008
|
+
...opts,
|
|
2009
|
+
method: "POST",
|
|
2010
|
+
body: conversationHistoryRequest,
|
|
2011
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2012
|
+
"x-account-id": xAccountId,
|
|
2013
|
+
"x-username": xUsername,
|
|
2014
|
+
authorization
|
|
2015
|
+
})
|
|
2016
|
+
})));
|
|
2017
|
+
}
|
|
2018
|
+
/**
|
|
2019
|
+
* Get Last History
|
|
2020
|
+
*/
|
|
2021
|
+
export function getLastHistoryV1ConversationsConversationIdMessagesLastGet({ conversationId, xAccountId, xUsername, authorization }: {
|
|
2022
|
+
conversationId: string;
|
|
2023
|
+
xAccountId?: string | null;
|
|
2024
|
+
xUsername?: string | null;
|
|
2025
|
+
authorization: string;
|
|
2026
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2027
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2028
|
+
status: 200;
|
|
2029
|
+
data: ConversationHistoryResponse | null;
|
|
2030
|
+
} | {
|
|
2031
|
+
status: 404;
|
|
2032
|
+
} | {
|
|
2033
|
+
status: 422;
|
|
2034
|
+
data: HttpErrorResponse;
|
|
2035
|
+
} | {
|
|
2036
|
+
status: 500;
|
|
2037
|
+
data: HttpErrorResponse;
|
|
2038
|
+
}>(`/v1/conversations/${encodeURIComponent(conversationId)}/messages/last`, {
|
|
2039
|
+
...opts,
|
|
2040
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2041
|
+
"x-account-id": xAccountId,
|
|
2042
|
+
"x-username": xUsername,
|
|
2043
|
+
authorization
|
|
2044
|
+
})
|
|
2045
|
+
}));
|
|
2046
|
+
}
|
|
2047
|
+
/**
|
|
2048
|
+
* Search
|
|
2049
|
+
*/
|
|
2050
|
+
export function searchV1ConversationsMessagesSearchPost({ xAccountId, xUsername, authorization, searchConversationHistoryRequest }: {
|
|
2051
|
+
xAccountId?: string | null;
|
|
2052
|
+
xUsername?: string | null;
|
|
2053
|
+
authorization: string;
|
|
2054
|
+
searchConversationHistoryRequest: SearchConversationHistoryRequest;
|
|
2055
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2056
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2057
|
+
status: 200;
|
|
2058
|
+
data: SearchConversationHistoryResponse[];
|
|
2059
|
+
} | {
|
|
2060
|
+
status: 404;
|
|
2061
|
+
} | {
|
|
2062
|
+
status: 422;
|
|
2063
|
+
data: HttpValidationError;
|
|
2064
|
+
}>("/v1/conversations/messages/search", oazapfts.json({
|
|
2065
|
+
...opts,
|
|
2066
|
+
method: "POST",
|
|
2067
|
+
body: searchConversationHistoryRequest,
|
|
2068
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2069
|
+
"x-account-id": xAccountId,
|
|
2070
|
+
"x-username": xUsername,
|
|
2071
|
+
authorization
|
|
2072
|
+
})
|
|
2073
|
+
})));
|
|
2074
|
+
}
|
|
2075
|
+
/**
|
|
2076
|
+
* List Ks
|
|
2077
|
+
*/
|
|
2078
|
+
export function listKsV2KnowledgeSourcesGet({ name, slug, size, page, visibilityList, order, types, xAccountId, xUsername, authorization }: {
|
|
2079
|
+
name?: string | null;
|
|
2080
|
+
slug?: string | null;
|
|
2081
|
+
size?: number;
|
|
2082
|
+
page?: number;
|
|
2083
|
+
visibilityList?: VisibilityLevelEnum[] | null;
|
|
2084
|
+
order?: OrderEnum | null;
|
|
2085
|
+
types?: KnowledgeSourceTypeEnum[];
|
|
2086
|
+
xAccountId?: string | null;
|
|
2087
|
+
xUsername?: string | null;
|
|
2088
|
+
authorization: string;
|
|
2089
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2090
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2091
|
+
status: 200;
|
|
2092
|
+
data: PaginatedResponseKnowledgeSourceItemResponse;
|
|
2093
|
+
} | {
|
|
2094
|
+
status: 404;
|
|
2095
|
+
} | {
|
|
2096
|
+
status: 422;
|
|
2097
|
+
data: HttpValidationError;
|
|
2098
|
+
}>(`/v2/knowledge-sources${QS.query(QS.explode({
|
|
2099
|
+
name,
|
|
2100
|
+
slug,
|
|
2101
|
+
size,
|
|
2102
|
+
page,
|
|
2103
|
+
visibility_list: visibilityList,
|
|
2104
|
+
order,
|
|
2105
|
+
types
|
|
2106
|
+
}))}`, {
|
|
2107
|
+
...opts,
|
|
2108
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2109
|
+
"x-account-id": xAccountId,
|
|
2110
|
+
"x-username": xUsername,
|
|
2111
|
+
authorization
|
|
2112
|
+
})
|
|
2113
|
+
}));
|
|
2114
|
+
}
|
|
2115
|
+
/**
|
|
2116
|
+
* List Kos
|
|
2117
|
+
*/
|
|
2118
|
+
export function listKosV2KnowledgeSourcesKsSlugObjectsGet({ ksSlug, size, page, order, standalone, filePath, contentLimit, xAccountId, xUsername, authorization }: {
|
|
2119
|
+
ksSlug: string;
|
|
2120
|
+
size?: number;
|
|
2121
|
+
page?: number;
|
|
2122
|
+
order?: OrderEnum | null;
|
|
2123
|
+
standalone?: boolean | null;
|
|
2124
|
+
filePath?: string[];
|
|
2125
|
+
contentLimit?: number | null;
|
|
2126
|
+
xAccountId?: string | null;
|
|
2127
|
+
xUsername?: string | null;
|
|
2128
|
+
authorization: string;
|
|
2129
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2130
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2131
|
+
status: 200;
|
|
2132
|
+
data: PaginatedResponseKnowledgeObjectResponse;
|
|
2133
|
+
} | {
|
|
2134
|
+
status: 404;
|
|
2135
|
+
data: HttpErrorResponse;
|
|
2136
|
+
} | {
|
|
2137
|
+
status: 422;
|
|
2138
|
+
data: HttpValidationError;
|
|
2139
|
+
}>(`/v2/knowledge-sources/${encodeURIComponent(ksSlug)}/objects${QS.query(QS.explode({
|
|
2140
|
+
size,
|
|
2141
|
+
page,
|
|
2142
|
+
order,
|
|
2143
|
+
standalone,
|
|
2144
|
+
file_path: filePath,
|
|
2145
|
+
content_limit: contentLimit
|
|
2146
|
+
}))}`, {
|
|
2147
|
+
...opts,
|
|
2148
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2149
|
+
"x-account-id": xAccountId,
|
|
2150
|
+
"x-username": xUsername,
|
|
2151
|
+
authorization
|
|
2152
|
+
})
|
|
2153
|
+
}));
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2156
|
+
* Upload Script
|
|
2157
|
+
*/
|
|
2158
|
+
export function uploadScriptV1ScriptUploadPost({ xAccountId, xUsername, authorization, uploadScriptRequest }: {
|
|
2159
|
+
xAccountId?: string | null;
|
|
2160
|
+
xUsername?: string | null;
|
|
2161
|
+
authorization: string;
|
|
2162
|
+
uploadScriptRequest: UploadScriptRequest;
|
|
2163
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2164
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2165
|
+
status: 201;
|
|
2166
|
+
data: UploadScriptResponse;
|
|
2167
|
+
} | {
|
|
2168
|
+
status: 404;
|
|
2169
|
+
} | {
|
|
2170
|
+
status: 422;
|
|
2171
|
+
data: HttpValidationError;
|
|
2172
|
+
}>("/v1/script-upload", oazapfts.json({
|
|
2173
|
+
...opts,
|
|
2174
|
+
method: "POST",
|
|
2175
|
+
body: uploadScriptRequest,
|
|
2176
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2177
|
+
"x-account-id": xAccountId,
|
|
2178
|
+
"x-username": xUsername,
|
|
2179
|
+
authorization
|
|
2180
|
+
})
|
|
2181
|
+
})));
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* Get Script Content
|
|
2185
|
+
*/
|
|
2186
|
+
export function getScriptContentV1ScriptUploadScriptIdGet({ scriptId, xAccountId, xUsername, authorization }: {
|
|
2187
|
+
scriptId: string;
|
|
2188
|
+
xAccountId?: string | null;
|
|
2189
|
+
xUsername?: string | null;
|
|
2190
|
+
authorization: string;
|
|
2191
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2192
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2193
|
+
status: 200;
|
|
2194
|
+
data: GetScriptResponse;
|
|
2195
|
+
} | {
|
|
2196
|
+
status: 404;
|
|
2197
|
+
} | {
|
|
2198
|
+
status: 422;
|
|
2199
|
+
data: HttpValidationError;
|
|
2200
|
+
}>(`/v1/script-upload/${encodeURIComponent(scriptId)}`, {
|
|
2201
|
+
...opts,
|
|
2202
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2203
|
+
"x-account-id": xAccountId,
|
|
2204
|
+
"x-username": xUsername,
|
|
2205
|
+
authorization
|
|
2206
|
+
})
|
|
2207
|
+
}));
|
|
2208
|
+
}
|
|
2209
|
+
/**
|
|
2210
|
+
* Get Script Presigned Url
|
|
2211
|
+
*/
|
|
2212
|
+
export function getScriptPresignedUrlV1ScriptUploadScriptIdPresignedUrlGet({ scriptId, xAccountId, xUsername, authorization }: {
|
|
2213
|
+
scriptId: string;
|
|
2214
|
+
xAccountId?: string | null;
|
|
2215
|
+
xUsername?: string | null;
|
|
2216
|
+
authorization: string;
|
|
2217
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2218
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2219
|
+
status: 200;
|
|
2220
|
+
data: GetPresignedUrlResponse;
|
|
2221
|
+
} | {
|
|
2222
|
+
status: 404;
|
|
2223
|
+
} | {
|
|
2224
|
+
status: 422;
|
|
2225
|
+
data: HttpValidationError;
|
|
2226
|
+
}>(`/v1/script-upload/${encodeURIComponent(scriptId)}/presigned/url`, {
|
|
2227
|
+
...opts,
|
|
2228
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2229
|
+
"x-account-id": xAccountId,
|
|
2230
|
+
"x-username": xUsername,
|
|
2231
|
+
authorization
|
|
2232
|
+
})
|
|
2233
|
+
}));
|
|
2234
|
+
}
|
|
2235
|
+
/**
|
|
2236
|
+
* Create Script Execution State
|
|
2237
|
+
*/
|
|
2238
|
+
export function createScriptExecutionStateV1ScriptExecutionExecutionIdStepSlugAttemptPut({ executionId, stepSlug, attempt, xAccountId, xUsername, authorization, createScriptExecutionRequest }: {
|
|
2239
|
+
executionId: string;
|
|
2240
|
+
stepSlug: string;
|
|
2241
|
+
attempt: number;
|
|
2242
|
+
xAccountId?: string | null;
|
|
2243
|
+
xUsername?: string | null;
|
|
2244
|
+
authorization: string;
|
|
2245
|
+
createScriptExecutionRequest: CreateScriptExecutionRequest;
|
|
2246
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2247
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2248
|
+
status: 201;
|
|
2249
|
+
data: CreateScriptExecutionResponse;
|
|
2250
|
+
} | {
|
|
2251
|
+
status: 404;
|
|
2252
|
+
} | {
|
|
2253
|
+
status: 422;
|
|
2254
|
+
data: HttpValidationError;
|
|
2255
|
+
}>(`/v1/script-execution/${encodeURIComponent(executionId)}/${encodeURIComponent(stepSlug)}/${encodeURIComponent(attempt)}`, oazapfts.json({
|
|
2256
|
+
...opts,
|
|
2257
|
+
method: "PUT",
|
|
2258
|
+
body: createScriptExecutionRequest,
|
|
2259
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2260
|
+
"x-account-id": xAccountId,
|
|
2261
|
+
"x-username": xUsername,
|
|
2262
|
+
authorization
|
|
2263
|
+
})
|
|
2264
|
+
})));
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* Get Script Execution State Presigned Url
|
|
2268
|
+
*/
|
|
2269
|
+
export function getScriptExecutionStatePresignedUrlV1ScriptExecutionIdPresignedUrlGet({ id, xAccountId, xUsername, authorization }: {
|
|
2270
|
+
id: string;
|
|
2271
|
+
xAccountId?: string | null;
|
|
2272
|
+
xUsername?: string | null;
|
|
2273
|
+
authorization: string;
|
|
2274
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2275
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2276
|
+
status: 200;
|
|
2277
|
+
data: GetPresignedUrlResponse;
|
|
2278
|
+
} | {
|
|
2279
|
+
status: 404;
|
|
2280
|
+
} | {
|
|
2281
|
+
status: 422;
|
|
2282
|
+
data: HttpValidationError;
|
|
2283
|
+
}>(`/v1/script-execution/${encodeURIComponent(id)}/presigned/url`, {
|
|
2284
|
+
...opts,
|
|
2285
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
2286
|
+
"x-account-id": xAccountId,
|
|
2287
|
+
"x-username": xUsername,
|
|
2288
|
+
authorization
|
|
2289
|
+
})
|
|
2290
|
+
}));
|
|
2291
|
+
}
|