@amaster.ai/client 1.1.52-beta.2 → 1.1.52
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/index.cjs +0 -349
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -141
- package/dist/index.d.ts +3 -141
- package/dist/index.js +0 -349
- package/dist/index.js.map +1 -1
- package/package.json +11 -14
- package/types/index.d.ts +0 -36
- package/types/knowledge.d.ts +0 -166
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amaster.ai/client",
|
|
3
|
-
"version": "1.1.52
|
|
3
|
+
"version": "1.1.52",
|
|
4
4
|
"description": "Unified API client for Amaster platform - All services in one package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -26,9 +26,6 @@
|
|
|
26
26
|
"workflow": [
|
|
27
27
|
"./types/workflow.d.ts"
|
|
28
28
|
],
|
|
29
|
-
"knowledge": [
|
|
30
|
-
"./types/knowledge.d.ts"
|
|
31
|
-
],
|
|
32
29
|
"asr": [
|
|
33
30
|
"./types/asr.d.ts"
|
|
34
31
|
],
|
|
@@ -75,16 +72,16 @@
|
|
|
75
72
|
"registry": "https://registry.npmjs.org/"
|
|
76
73
|
},
|
|
77
74
|
"dependencies": {
|
|
78
|
-
"@amaster.ai/
|
|
79
|
-
"@amaster.ai/
|
|
80
|
-
"@amaster.ai/
|
|
81
|
-
"@amaster.ai/
|
|
82
|
-
"@amaster.ai/
|
|
83
|
-
"@amaster.ai/
|
|
84
|
-
"@amaster.ai/
|
|
85
|
-
"@amaster.ai/
|
|
86
|
-
"@amaster.ai/tts-client": "1.1.52
|
|
87
|
-
"@amaster.ai/
|
|
75
|
+
"@amaster.ai/auth-client": "1.1.52",
|
|
76
|
+
"@amaster.ai/bpm-client": "1.1.52",
|
|
77
|
+
"@amaster.ai/copilot-client": "1.1.52",
|
|
78
|
+
"@amaster.ai/function-client": "1.1.52",
|
|
79
|
+
"@amaster.ai/entity-client": "1.1.52",
|
|
80
|
+
"@amaster.ai/asr-client": "1.1.52",
|
|
81
|
+
"@amaster.ai/http-client": "1.1.52",
|
|
82
|
+
"@amaster.ai/s3-client": "1.1.52",
|
|
83
|
+
"@amaster.ai/tts-client": "1.1.52",
|
|
84
|
+
"@amaster.ai/workflow-client": "1.1.52"
|
|
88
85
|
},
|
|
89
86
|
"peerDependencies": {
|
|
90
87
|
"axios": "^1.11.0"
|
package/types/index.d.ts
CHANGED
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
* - **Entity Operations**: {@link ./entity.d.ts}
|
|
31
31
|
* - **BPM (Business Process)**: {@link ./bpm.d.ts}
|
|
32
32
|
* - **Workflow Execution**: {@link ./workflow.d.ts}
|
|
33
|
-
* - **Knowledge Base**: {@link ./knowledge.d.ts}
|
|
34
33
|
*
|
|
35
34
|
* ## AI-Friendly Type Structure
|
|
36
35
|
* This package provides modular type definitions optimized for AI tools and large language models.
|
|
@@ -49,7 +48,6 @@ import type { AuthClientAPI } from "./auth/index";
|
|
|
49
48
|
import type { EntityClientAPI } from "./entity";
|
|
50
49
|
import type { BpmClientAPI } from "./bpm";
|
|
51
50
|
import type { WorkflowClientAPI } from "./workflow";
|
|
52
|
-
import type { KnowledgeClientAPI } from "./knowledge";
|
|
53
51
|
import type { ASRClientConfig, ASRClient, ASRHttpClientConfig, ASRHttpClient } from "./asr";
|
|
54
52
|
import type { CopilotClientAPI } from "./copilot";
|
|
55
53
|
import type { FunctionClientAPI } from "./function";
|
|
@@ -208,16 +206,6 @@ export interface AmasterClient {
|
|
|
208
206
|
*/
|
|
209
207
|
workflow: WorkflowClientAPI;
|
|
210
208
|
|
|
211
|
-
/**
|
|
212
|
-
* Knowledge base document management module
|
|
213
|
-
*
|
|
214
|
-
* Provides methods for resolving the current organization knowledge base,
|
|
215
|
-
* listing documents, uploading documents, polling indexing status, and deleting documents.
|
|
216
|
-
*
|
|
217
|
-
* For detailed documentation, see {@link ./knowledge.d.ts}
|
|
218
|
-
*/
|
|
219
|
-
knowledge: KnowledgeClientAPI;
|
|
220
|
-
|
|
221
209
|
/**
|
|
222
210
|
* ASR (Automatic Speech Recognition) module
|
|
223
211
|
*
|
|
@@ -426,30 +414,6 @@ export type {
|
|
|
426
414
|
WorkflowInputValue,
|
|
427
415
|
WorkflowFile,
|
|
428
416
|
} from "./workflow";
|
|
429
|
-
export type {
|
|
430
|
-
KnowledgeClientAPI,
|
|
431
|
-
KnowledgeClientAPI as KnowledgeClient,
|
|
432
|
-
KnowledgeDatasetIdResponse,
|
|
433
|
-
KnowledgeDeleteDocumentOptions,
|
|
434
|
-
KnowledgeDocument,
|
|
435
|
-
KnowledgeDocumentListResponse,
|
|
436
|
-
KnowledgeDocumentListStatus,
|
|
437
|
-
KnowledgeDocumentStatus,
|
|
438
|
-
KnowledgeGetDatasetIdOptions,
|
|
439
|
-
KnowledgeIndexingStatus,
|
|
440
|
-
KnowledgeIndexingStatusOptions,
|
|
441
|
-
KnowledgeIndexingStatusResponse,
|
|
442
|
-
KnowledgeListDocumentsOptions,
|
|
443
|
-
KnowledgeMetadataField,
|
|
444
|
-
KnowledgeMetadataOperation,
|
|
445
|
-
KnowledgeMetadataUpdateRequest,
|
|
446
|
-
KnowledgeResolveOptions,
|
|
447
|
-
KnowledgeRoles,
|
|
448
|
-
KnowledgeUpdateDocumentsMetadataOptions,
|
|
449
|
-
KnowledgeUploadDocumentOptions,
|
|
450
|
-
KnowledgeUploadResponse,
|
|
451
|
-
KnowledgeWaitForIndexingOptions,
|
|
452
|
-
} from "./knowledge";
|
|
453
417
|
export type {
|
|
454
418
|
ASRClient,
|
|
455
419
|
ASRClientConfig,
|
package/types/knowledge.d.ts
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Knowledge base document management types.
|
|
3
|
-
*
|
|
4
|
-
* @module knowledge
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { ClientResult } from "./common";
|
|
8
|
-
|
|
9
|
-
export type KnowledgeDocumentStatus = "completed" | "indexing" | "error" | "paused";
|
|
10
|
-
export type KnowledgeDocumentListStatus = KnowledgeDocumentStatus | "all";
|
|
11
|
-
export type KnowledgeRoles = string | string[];
|
|
12
|
-
|
|
13
|
-
export interface KnowledgeDatasetIdResponse {
|
|
14
|
-
dataset_id: string;
|
|
15
|
-
tenant_id?: string;
|
|
16
|
-
workspace_id?: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface KnowledgeDocument {
|
|
20
|
-
id: string;
|
|
21
|
-
name: string;
|
|
22
|
-
data_source_type?: string;
|
|
23
|
-
doc_type?: string | null;
|
|
24
|
-
doc_form?: string | null;
|
|
25
|
-
indexing_status?: string;
|
|
26
|
-
display_status?: string;
|
|
27
|
-
enabled?: boolean;
|
|
28
|
-
archived?: boolean;
|
|
29
|
-
word_count?: number;
|
|
30
|
-
hit_count?: number;
|
|
31
|
-
position?: number;
|
|
32
|
-
created_at?: number;
|
|
33
|
-
updated_at?: number;
|
|
34
|
-
completed_segments?: number;
|
|
35
|
-
total_segments?: number;
|
|
36
|
-
[key: string]: unknown;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export interface KnowledgeDocumentListResponse {
|
|
40
|
-
data: KnowledgeDocument[];
|
|
41
|
-
total: number;
|
|
42
|
-
page: number;
|
|
43
|
-
limit: number;
|
|
44
|
-
has_more: boolean;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export interface KnowledgeIndexingStatus {
|
|
48
|
-
id: string;
|
|
49
|
-
name?: string;
|
|
50
|
-
indexing_status?: string;
|
|
51
|
-
processing_started_at?: number | null;
|
|
52
|
-
parsing_completed_at?: number | null;
|
|
53
|
-
cleaning_completed_at?: number | null;
|
|
54
|
-
splitting_completed_at?: number | null;
|
|
55
|
-
completed_at?: number | null;
|
|
56
|
-
paused_at?: number | null;
|
|
57
|
-
stopped_at?: number | null;
|
|
58
|
-
completed_segments?: number;
|
|
59
|
-
total_segments?: number;
|
|
60
|
-
error?: string | null;
|
|
61
|
-
[key: string]: unknown;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export interface KnowledgeIndexingStatusResponse {
|
|
65
|
-
data: KnowledgeIndexingStatus[];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface KnowledgeUploadResponse {
|
|
69
|
-
document: KnowledgeDocument;
|
|
70
|
-
batch: string;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export interface KnowledgeMetadataField {
|
|
74
|
-
id: string;
|
|
75
|
-
name: string;
|
|
76
|
-
type?: "string" | "number" | "time" | string;
|
|
77
|
-
value: unknown;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface KnowledgeMetadataOperation {
|
|
81
|
-
document_id: string;
|
|
82
|
-
metadata_list: KnowledgeMetadataField[];
|
|
83
|
-
partial_update?: boolean;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export interface KnowledgeMetadataUpdateRequest {
|
|
87
|
-
operation_data: KnowledgeMetadataOperation[];
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export type KnowledgeResolveOptions =
|
|
91
|
-
| {
|
|
92
|
-
datasetId: string;
|
|
93
|
-
orgCode?: string;
|
|
94
|
-
refresh?: boolean;
|
|
95
|
-
workspaceId?: string;
|
|
96
|
-
tenantId?: string;
|
|
97
|
-
}
|
|
98
|
-
| {
|
|
99
|
-
datasetId?: string;
|
|
100
|
-
orgCode: string;
|
|
101
|
-
refresh?: boolean;
|
|
102
|
-
workspaceId?: string;
|
|
103
|
-
tenantId?: string;
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
export interface KnowledgeGetDatasetIdOptions {
|
|
107
|
-
orgCode: string;
|
|
108
|
-
refresh?: boolean;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
export type KnowledgeListDocumentsOptions = KnowledgeResolveOptions & {
|
|
112
|
-
page?: number;
|
|
113
|
-
limit?: number;
|
|
114
|
-
keyword?: string;
|
|
115
|
-
status?: KnowledgeDocumentListStatus;
|
|
116
|
-
sort?: string;
|
|
117
|
-
fetch?: boolean | string;
|
|
118
|
-
appCode?: string;
|
|
119
|
-
roles?: KnowledgeRoles;
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
export type KnowledgeUploadDocumentOptions = KnowledgeResolveOptions & {
|
|
123
|
-
file: File | Blob;
|
|
124
|
-
fileName?: string;
|
|
125
|
-
appCode?: string;
|
|
126
|
-
config?: Record<string, unknown>;
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
export type KnowledgeIndexingStatusOptions = KnowledgeResolveOptions & {
|
|
130
|
-
batch: string;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export type KnowledgeWaitForIndexingOptions = KnowledgeIndexingStatusOptions & {
|
|
134
|
-
intervalMs?: number;
|
|
135
|
-
timeoutMs?: number;
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
export type KnowledgeDeleteDocumentOptions = KnowledgeResolveOptions & {
|
|
139
|
-
documentId: string;
|
|
140
|
-
appCode?: string;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
export type KnowledgeUpdateDocumentsMetadataOptions = KnowledgeResolveOptions &
|
|
144
|
-
KnowledgeMetadataUpdateRequest;
|
|
145
|
-
|
|
146
|
-
export interface KnowledgeClientAPI {
|
|
147
|
-
getDatasetId(
|
|
148
|
-
options: KnowledgeGetDatasetIdOptions
|
|
149
|
-
): Promise<ClientResult<KnowledgeDatasetIdResponse>>;
|
|
150
|
-
listDocuments(
|
|
151
|
-
options: KnowledgeListDocumentsOptions
|
|
152
|
-
): Promise<ClientResult<KnowledgeDocumentListResponse>>;
|
|
153
|
-
uploadDocument(
|
|
154
|
-
options: KnowledgeUploadDocumentOptions
|
|
155
|
-
): Promise<ClientResult<KnowledgeUploadResponse>>;
|
|
156
|
-
getIndexingStatus(
|
|
157
|
-
options: KnowledgeIndexingStatusOptions
|
|
158
|
-
): Promise<ClientResult<KnowledgeIndexingStatusResponse>>;
|
|
159
|
-
waitForIndexing(
|
|
160
|
-
options: KnowledgeWaitForIndexingOptions
|
|
161
|
-
): Promise<ClientResult<KnowledgeIndexingStatusResponse>>;
|
|
162
|
-
deleteDocument(options: KnowledgeDeleteDocumentOptions): Promise<ClientResult<null>>;
|
|
163
|
-
updateDocumentsMetadata(
|
|
164
|
-
options: KnowledgeUpdateDocumentsMetadataOptions
|
|
165
|
-
): Promise<ClientResult<{ result: string }>>;
|
|
166
|
-
}
|