@amaster.ai/client 1.1.24 → 1.1.26
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.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +11 -11
- package/types/entity.d.ts +22 -1
- package/types/index.d.ts +1 -0
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthClient } from '@amaster.ai/auth-client';
|
|
2
2
|
export { LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, User } from '@amaster.ai/auth-client';
|
|
3
3
|
import { EntityClient } from '@amaster.ai/entity-client';
|
|
4
|
-
export { EntityListResponse, EntityQueryParams, FilterGroup, FilterItem, FilterOperator } from '@amaster.ai/entity-client';
|
|
4
|
+
export { EntityGetParams, EntityListResponse, EntityQueryParams, FilterGroup, FilterItem, FilterOperator } from '@amaster.ai/entity-client';
|
|
5
5
|
import { BpmClient } from '@amaster.ai/bpm-client';
|
|
6
6
|
export { ActivityInstanceTree, CamundaVariable, HistoryActivityInstance, HistoryProcessInstance, HistoryTask, ProcessInstance, ProcessVariable, Task, TaskFormSchema, TaskQueryParams, UserOperationLog } from '@amaster.ai/bpm-client';
|
|
7
7
|
import { WorkflowClient } from '@amaster.ai/workflow-client';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthClient } from '@amaster.ai/auth-client';
|
|
2
2
|
export { LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, User } from '@amaster.ai/auth-client';
|
|
3
3
|
import { EntityClient } from '@amaster.ai/entity-client';
|
|
4
|
-
export { EntityListResponse, EntityQueryParams, FilterGroup, FilterItem, FilterOperator } from '@amaster.ai/entity-client';
|
|
4
|
+
export { EntityGetParams, EntityListResponse, EntityQueryParams, FilterGroup, FilterItem, FilterOperator } from '@amaster.ai/entity-client';
|
|
5
5
|
import { BpmClient } from '@amaster.ai/bpm-client';
|
|
6
6
|
export { ActivityInstanceTree, CamundaVariable, HistoryActivityInstance, HistoryProcessInstance, HistoryTask, ProcessInstance, ProcessVariable, Task, TaskFormSchema, TaskQueryParams, UserOperationLog } from '@amaster.ai/bpm-client';
|
|
7
7
|
import { WorkflowClient } from '@amaster.ai/workflow-client';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amaster.ai/client",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
4
4
|
"description": "Unified API client for Amaster platform - All services in one package",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -72,16 +72,16 @@
|
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@amaster.ai/asr-client": "1.1.
|
|
76
|
-
"@amaster.ai/auth-client": "1.1.
|
|
77
|
-
"@amaster.ai/bpm-client": "1.1.
|
|
78
|
-
"@amaster.ai/copilot-client": "1.1.
|
|
79
|
-
"@amaster.ai/entity-client": "1.1.
|
|
80
|
-
"@amaster.ai/function-client": "1.1.
|
|
81
|
-
"@amaster.ai/http-client": "1.1.
|
|
82
|
-
"@amaster.ai/s3-client": "1.1.
|
|
83
|
-
"@amaster.ai/
|
|
84
|
-
"@amaster.ai/
|
|
75
|
+
"@amaster.ai/asr-client": "1.1.26",
|
|
76
|
+
"@amaster.ai/auth-client": "1.1.26",
|
|
77
|
+
"@amaster.ai/bpm-client": "1.1.26",
|
|
78
|
+
"@amaster.ai/copilot-client": "1.1.26",
|
|
79
|
+
"@amaster.ai/entity-client": "1.1.26",
|
|
80
|
+
"@amaster.ai/function-client": "1.1.26",
|
|
81
|
+
"@amaster.ai/http-client": "1.1.26",
|
|
82
|
+
"@amaster.ai/s3-client": "1.1.26",
|
|
83
|
+
"@amaster.ai/workflow-client": "1.1.26",
|
|
84
|
+
"@amaster.ai/tts-client": "1.1.26"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"axios": "^1.11.0"
|
package/types/entity.d.ts
CHANGED
|
@@ -176,6 +176,19 @@ export interface EntityQueryParams {
|
|
|
176
176
|
[key: string]: unknown;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
/**
|
|
180
|
+
* Entity detail query parameters.
|
|
181
|
+
*
|
|
182
|
+
* `get()` locates the record by path id. These params only control projection.
|
|
183
|
+
*/
|
|
184
|
+
export interface EntityGetParams {
|
|
185
|
+
/** Relations to load */
|
|
186
|
+
__relations?: string[];
|
|
187
|
+
|
|
188
|
+
/** Fields to select */
|
|
189
|
+
__fields?: string[];
|
|
190
|
+
}
|
|
191
|
+
|
|
179
192
|
// ==================== Response Types ====================
|
|
180
193
|
|
|
181
194
|
/**
|
|
@@ -262,6 +275,7 @@ export interface EntityClientAPI {
|
|
|
262
275
|
* @param source - Data source name
|
|
263
276
|
* @param entity - Entity name
|
|
264
277
|
* @param id - Entity ID
|
|
278
|
+
* @param params - Projection parameters, including explicit relation loading
|
|
265
279
|
* @returns The entity data
|
|
266
280
|
*
|
|
267
281
|
* @example
|
|
@@ -274,13 +288,20 @@ export interface EntityClientAPI {
|
|
|
274
288
|
* // With type safety
|
|
275
289
|
* type User = { id: number; name: string };
|
|
276
290
|
* const result = await client.entity.get<User>('default', 'users', 123);
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* // Load explicit relations
|
|
294
|
+
* const result = await client.entity.get('default', 'orders', 123, {
|
|
295
|
+
* __relations: ['order_customer']
|
|
296
|
+
* });
|
|
277
297
|
*
|
|
278
298
|
* @since 1.0.0
|
|
279
299
|
*/
|
|
280
300
|
get<T = Record<string, unknown>>(
|
|
281
301
|
source: string,
|
|
282
302
|
entity: string,
|
|
283
|
-
id: string | number
|
|
303
|
+
id: string | number,
|
|
304
|
+
params?: EntityGetParams
|
|
284
305
|
): Promise<ClientResult<T>>;
|
|
285
306
|
|
|
286
307
|
/**
|