@amaster.ai/client 1.1.0-beta.70 → 1.1.0-beta.71

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 CHANGED
@@ -161,6 +161,8 @@ interface AmasterClient {
161
161
  * @example
162
162
  * ```typescript
163
163
  * // Real-time streaming recognition
164
+ * import { createClient } from "@amaster.ai/client";
165
+ * export const client = createClient({});
164
166
  * const asrClient = client.asr({
165
167
  * onReady() {
166
168
  * console.log('ASR Ready');
@@ -194,6 +196,8 @@ interface AmasterClient {
194
196
  * @example
195
197
  * ```typescript
196
198
  * // Press-to-talk recognition
199
+ * import { createClient } from "@amaster.ai/client";
200
+ * export const client = createClient({});
197
201
  * const asrHttpClient = client.asrHttp({
198
202
  * onRecordingStart() {
199
203
  * console.log('Recording started');
@@ -247,6 +251,8 @@ interface AmasterClient {
247
251
  * @example
248
252
  * ```typescript
249
253
  * // Connect and speak
254
+ * import { createClient } from "@amaster.ai/client";
255
+ * export const client = createClient({});
250
256
  * const ttsClient = client.tts({
251
257
  * voice: 'Cherry',
252
258
  * autoPlay: true,
package/dist/index.d.ts CHANGED
@@ -161,6 +161,8 @@ interface AmasterClient {
161
161
  * @example
162
162
  * ```typescript
163
163
  * // Real-time streaming recognition
164
+ * import { createClient } from "@amaster.ai/client";
165
+ * export const client = createClient({});
164
166
  * const asrClient = client.asr({
165
167
  * onReady() {
166
168
  * console.log('ASR Ready');
@@ -194,6 +196,8 @@ interface AmasterClient {
194
196
  * @example
195
197
  * ```typescript
196
198
  * // Press-to-talk recognition
199
+ * import { createClient } from "@amaster.ai/client";
200
+ * export const client = createClient({});
197
201
  * const asrHttpClient = client.asrHttp({
198
202
  * onRecordingStart() {
199
203
  * console.log('Recording started');
@@ -247,6 +251,8 @@ interface AmasterClient {
247
251
  * @example
248
252
  * ```typescript
249
253
  * // Connect and speak
254
+ * import { createClient } from "@amaster.ai/client";
255
+ * export const client = createClient({});
250
256
  * const ttsClient = client.tts({
251
257
  * voice: 'Cherry',
252
258
  * autoPlay: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amaster.ai/client",
3
- "version": "1.1.0-beta.70",
3
+ "version": "1.1.0-beta.71",
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.0-beta.70",
76
- "@amaster.ai/entity-client": "1.1.0-beta.70",
77
- "@amaster.ai/copilot-client": "1.1.0-beta.70",
78
- "@amaster.ai/function-client": "1.1.0-beta.70",
79
- "@amaster.ai/bpm-client": "1.1.0-beta.70",
80
- "@amaster.ai/auth-client": "1.1.0-beta.70",
81
- "@amaster.ai/s3-client": "1.1.0-beta.70",
82
- "@amaster.ai/http-client": "1.1.0-beta.70",
83
- "@amaster.ai/workflow-client": "1.1.0-beta.70",
84
- "@amaster.ai/tts-client": "1.1.0-beta.70"
75
+ "@amaster.ai/entity-client": "1.1.0-beta.71",
76
+ "@amaster.ai/asr-client": "1.1.0-beta.71",
77
+ "@amaster.ai/copilot-client": "1.1.0-beta.71",
78
+ "@amaster.ai/http-client": "1.1.0-beta.71",
79
+ "@amaster.ai/bpm-client": "1.1.0-beta.71",
80
+ "@amaster.ai/function-client": "1.1.0-beta.71",
81
+ "@amaster.ai/s3-client": "1.1.0-beta.71",
82
+ "@amaster.ai/tts-client": "1.1.0-beta.71",
83
+ "@amaster.ai/workflow-client": "1.1.0-beta.71",
84
+ "@amaster.ai/auth-client": "1.1.0-beta.71"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "axios": "^1.11.0"
package/types/asr.d.ts CHANGED
@@ -7,6 +7,8 @@ import type{ HttpClient } from "./http";
7
7
  *
8
8
  * @example
9
9
  * ```typescript
10
+ * import { createClient } from "@amaster.ai/client";
11
+ * export const client = createClient({});
10
12
  * const asrClient = client.asr({
11
13
  * language: "zh",
12
14
  * enableVAD: true,
package/types/bpm.d.ts CHANGED
@@ -228,6 +228,46 @@ export interface TaskCount {
228
228
  count: number;
229
229
  }
230
230
 
231
+ /**
232
+ * Task form field metadata
233
+ */
234
+ export interface TaskFormField {
235
+ id: string;
236
+ label?: string;
237
+ type?: string;
238
+ defaultValue?: CamundaVariableValue;
239
+ properties?: Record<string, unknown>;
240
+ validationConstraints?: Array<{
241
+ name: string;
242
+ config?: unknown;
243
+ }>;
244
+ [key: string]: unknown;
245
+ }
246
+
247
+ /**
248
+ * Task form schema metadata
249
+ */
250
+ export interface TaskFormSchema {
251
+ key?: string;
252
+ contextPath?: string;
253
+ fields?: TaskFormField[];
254
+ [key: string]: unknown;
255
+ }
256
+
257
+ /**
258
+ * Task form variable value
259
+ */
260
+ export interface TaskFormVariable {
261
+ type: string;
262
+ value: CamundaVariableValue;
263
+ valueInfo?: Record<string, unknown>;
264
+ }
265
+
266
+ /**
267
+ * Task form variables keyed by variable name
268
+ */
269
+ export type TaskFormVariables = Record<string, TaskFormVariable>;
270
+
231
271
  /**
232
272
  * Historical task information
233
273
  */
@@ -502,6 +542,19 @@ export interface BpmClientAPI {
502
542
  */
503
543
  getTask(taskId: string): Promise<ClientResult<Task>>;
504
544
 
545
+ /**
546
+ * Get task form schema metadata
547
+ */
548
+ getTaskFormSchema(
549
+ taskId: string,
550
+ opts?: { redirect?: string }
551
+ ): Promise<ClientResult<TaskFormSchema>>;
552
+
553
+ /**
554
+ * Get task form variables
555
+ */
556
+ getTaskFormVariables(taskId: string): Promise<ClientResult<TaskFormVariables>>;
557
+
505
558
  /**
506
559
  * Complete a user task
507
560
  *
@@ -531,6 +584,20 @@ export interface BpmClientAPI {
531
584
  inputs: Record<string, CamundaVariableValue> | VariableSubmission
532
585
  ): Promise<ClientResult<null>>;
533
586
 
587
+ /**
588
+ * Query historical tasks
589
+ */
590
+ getHistoryTasks(
591
+ params?: HistoryTaskQueryParams
592
+ ): Promise<ClientResult<HistoryTask[]>>;
593
+
594
+ /**
595
+ * Get historical task count
596
+ */
597
+ getHistoryTaskCount(
598
+ params?: HistoryTaskQueryParams
599
+ ): Promise<ClientResult<TaskCount>>;
600
+
534
601
  // ==================== History & Reporting ====================
535
602
 
536
603
  /**
@@ -572,6 +639,13 @@ export interface BpmClientAPI {
572
639
  getHistoryProcessInstanceCount(
573
640
  params?: HistoryProcessInstanceQueryParams
574
641
  ): Promise<ClientResult<{ count: number }>>;
642
+
643
+ /**
644
+ * Get deployed Camunda form definition for a task
645
+ */
646
+ getTaskDeployedForm(
647
+ taskId: string
648
+ ): Promise<ClientResult<CamundaFormDefinition>>;
575
649
  }
576
650
 
577
651
  /**
@@ -619,3 +693,52 @@ export interface HistoryProcessInstanceQueryParams {
619
693
  /** Pagination: max results to return */
620
694
  maxResults?: number;
621
695
  }
696
+
697
+ /**
698
+ * Historical task query parameters
699
+ */
700
+ export interface HistoryTaskQueryParams {
701
+ /** Filter by task assignee */
702
+ taskAssignee?: string;
703
+ /** Filter by process instance ID */
704
+ processInstanceId?: string;
705
+ /** Filter finished tasks */
706
+ finished?: boolean;
707
+ /** Filter unfinished tasks */
708
+ unfinished?: boolean;
709
+ /** Pagination: first result index */
710
+ firstResult?: number;
711
+ /** Pagination: max results to return */
712
+ maxResults?: number;
713
+ /** Sort field */
714
+ sortBy?: string;
715
+ /** Sort order */
716
+ sortOrder?: "asc" | "desc";
717
+ [key: string]: string | number | boolean | undefined;
718
+ }
719
+
720
+ /**
721
+ * Camunda deployed form definition
722
+ */
723
+ export interface CamundaFormDefinition {
724
+ components?: CamundaFormComponent[];
725
+ type?: string;
726
+ id?: string;
727
+ schemaVersion?: number;
728
+ }
729
+
730
+ /**
731
+ * Camunda form component definition
732
+ */
733
+ export interface CamundaFormComponent {
734
+ key: string;
735
+ label?: string;
736
+ type: string;
737
+ validate?: {
738
+ required?: boolean;
739
+ readonly?: boolean;
740
+ };
741
+ defaultValue?: CamundaVariableValue;
742
+ values?: Array<{ label: string; value: string }>;
743
+ properties?: Record<string, unknown>;
744
+ }