@amaster.ai/client 1.1.71 → 1.1.73
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/README.md +63 -0
- package/dist/index.cjs +910 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -4
- package/dist/index.d.ts +25 -4
- package/dist/index.js +903 -30
- package/dist/index.js.map +1 -1
- package/package.json +12 -11
- package/types/auth/index.d.ts +7 -0
- package/types/common.d.ts +3 -0
- package/types/http.d.ts +8 -130
- package/types/index.d.ts +38 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuthClient } from '@amaster.ai/auth-client';
|
|
2
|
-
export { DepartmentPosition, LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, User } from '@amaster.ai/auth-client';
|
|
1
|
+
import { StorageAdapter, AuthClient, BrowserAuthClient } from '@amaster.ai/auth-client';
|
|
2
|
+
export { BrowserAuthClient, BrowserAuthClientOptions, DepartmentPosition, LoginParams, LoginResponse, OAuthProvider, Permission, RegisterParams, Role, Session, StorageAdapter, User, completeOAuthPopup, createMemoryStorage } from '@amaster.ai/auth-client';
|
|
3
3
|
import { EntityClient } from '@amaster.ai/entity-client';
|
|
4
4
|
export { EntityGetParams, EntityListResponse, EntityQueryParams, EntityUpdateWhereParams, EntityUpdateWhereResponse, FilterGroup, FilterItem, FilterOperator } from '@amaster.ai/entity-client';
|
|
5
5
|
import { BpmClient } from '@amaster.ai/bpm-client';
|
|
@@ -7,7 +7,7 @@ export { ActivityInstanceTree, AssignmentPerson, CamundaVariable, HistoryActivit
|
|
|
7
7
|
import { WorkflowClient, ChatflowClient } from '@amaster.ai/workflow-client';
|
|
8
8
|
export { ChatflowBlockingResponse, ChatflowClient, ChatflowClientOptions, ChatflowEvent, ChatflowRunRequest, ChatflowStopRequest, ChatflowStopResponse, ChatflowStreamError, ChatflowStreamOptions, WorkflowAsyncRunDetailResponse, WorkflowAsyncRunResponse, WorkflowAsyncRunStatus, WorkflowCallbackConfig, WorkflowFile, WorkflowInputValue, WorkflowNodeUsage, WorkflowRunDetailOptions, WorkflowRunRequest, WorkflowRunResponse, WorkflowRunUsage, WorkflowUsageSummary } from '@amaster.ai/workflow-client';
|
|
9
9
|
import { ClientResult, MiniProgramRuntime, HttpClient } from '@amaster.ai/http-client';
|
|
10
|
-
export { ClientError, ClientResult, HttpClient, RequestConfig } from '@amaster.ai/http-client';
|
|
10
|
+
export { ClientError, ClientResult, HttpClient, RequestConfig, RequestScopeCapture, RequestScopeOptions, RequestSubject } from '@amaster.ai/http-client';
|
|
11
11
|
import { ASRClientConfig, ASRClient, ASRHttpClientConfig, ASRHttpClient } from '@amaster.ai/asr-client';
|
|
12
12
|
export { ASRClient, ASRClientConfig, ASRHttpClient, ASRHttpClientConfig, ASRLanguage } from '@amaster.ai/asr-client';
|
|
13
13
|
import { CopilotClient } from '@amaster.ai/copilot-client';
|
|
@@ -18,6 +18,8 @@ import { TTSClientConfig, TTSClient } from '@amaster.ai/tts-client';
|
|
|
18
18
|
export { TTSClient, TTSClientConfig, TTSRuntime, TTSSnapshot, TTSSpeakController, TTSSpeakControllerOptions, TTSSpeakOptions, TTSStorageAdapter, createTTSSpeakController, preprocessTTSContent, splitTextIntoFragments } from '@amaster.ai/tts-client';
|
|
19
19
|
import { S3Client } from '@amaster.ai/s3-client';
|
|
20
20
|
export { S3Client, S3Metadata, S3UploadOptions, S3UploadProgress, S3UploadProgressPhase, UploadRes } from '@amaster.ai/s3-client';
|
|
21
|
+
import { TenancyClient } from '@amaster.ai/auth-client/tenancy';
|
|
22
|
+
export { TenancyAccount, TenancyCapabilityError, TenancyClient, TenancyCurrent, TenancyDecision, TenancyDepartmentScope, TenancyNode } from '@amaster.ai/auth-client/tenancy';
|
|
21
23
|
|
|
22
24
|
type KnowledgeDocumentStatus = "completed" | "indexing" | "error" | "paused";
|
|
23
25
|
type KnowledgeDocumentListStatus = KnowledgeDocumentStatus | "all";
|
|
@@ -251,6 +253,8 @@ type KnowledgeClient = {
|
|
|
251
253
|
* Amaster Client Configuration Options
|
|
252
254
|
*/
|
|
253
255
|
interface AmasterClientOptions {
|
|
256
|
+
storage?: StorageAdapter;
|
|
257
|
+
withCredentials?: boolean;
|
|
254
258
|
/**
|
|
255
259
|
* Base URL for the Amaster API (optional)
|
|
256
260
|
*
|
|
@@ -313,12 +317,21 @@ interface AmasterClientOptions {
|
|
|
313
317
|
*/
|
|
314
318
|
runtime?: Partial<MiniProgramRuntime>;
|
|
315
319
|
}
|
|
320
|
+
type BrowserAmasterClientOptions = AmasterClientOptions & ({
|
|
321
|
+
storage: StorageAdapter;
|
|
322
|
+
} | {
|
|
323
|
+
withCredentials: boolean;
|
|
324
|
+
});
|
|
316
325
|
/**
|
|
317
326
|
* Unified Amaster Client
|
|
318
327
|
*
|
|
319
328
|
* Provides a simplified, Supabase-style API to access all Amaster services
|
|
320
329
|
*/
|
|
321
330
|
interface AmasterClient {
|
|
331
|
+
/** Wait for authoritative application mode; API and instance execution wait automatically. Local UI hints/factory construction remain synchronous. */
|
|
332
|
+
ready(): Promise<void>;
|
|
333
|
+
/** Automatic clients expose enabled=null until discovery, then the backend mode; identity comes from account(). */
|
|
334
|
+
tenancy?: TenancyClient;
|
|
322
335
|
/**
|
|
323
336
|
* Authentication module
|
|
324
337
|
*
|
|
@@ -609,6 +622,12 @@ interface AmasterClient {
|
|
|
609
622
|
*/
|
|
610
623
|
clearAuth(): void;
|
|
611
624
|
}
|
|
625
|
+
interface TenancyAmasterClient extends AmasterClient {
|
|
626
|
+
tenancy: TenancyClient;
|
|
627
|
+
}
|
|
628
|
+
interface BrowserAmasterClient extends AmasterClient {
|
|
629
|
+
auth: BrowserAuthClient;
|
|
630
|
+
}
|
|
612
631
|
|
|
613
632
|
/**
|
|
614
633
|
* ============================================================================
|
|
@@ -681,6 +700,8 @@ interface AmasterClient {
|
|
|
681
700
|
* const tasks = await client.bpm.getTasks({ assignee: 'currentUserId' });
|
|
682
701
|
* ```
|
|
683
702
|
*/
|
|
703
|
+
declare function createClient(options: BrowserAmasterClientOptions): BrowserAmasterClient & TenancyAmasterClient;
|
|
704
|
+
declare function createClient(options?: AmasterClientOptions): TenancyAmasterClient;
|
|
684
705
|
declare function createClient(options?: AmasterClientOptions): AmasterClient;
|
|
685
706
|
|
|
686
|
-
export { type AmasterClient, type AmasterClientOptions, type KnowledgeChildChunk, type KnowledgeClient, type KnowledgeCreateSegmentOptions, type KnowledgeDatasetIdResponse, type KnowledgeDeleteDocumentOptions, type KnowledgeDeleteSegmentOptions, type KnowledgeDocument, type KnowledgeDocumentListResponse, type KnowledgeDocumentListStatus, type KnowledgeDocumentStatus, type KnowledgeGetDatasetIdOptions, type KnowledgeGetDocumentOptions, type KnowledgeIndexingStatus, type KnowledgeIndexingStatusOptions, type KnowledgeIndexingStatusResponse, type KnowledgeListDocumentsOptions, type KnowledgeListSegmentsOptions, type KnowledgeMetadataField, type KnowledgeMetadataOperation, type KnowledgeMetadataUpdateRequest, type KnowledgeResolveOptions, type KnowledgeRoles, type KnowledgeSegment, type KnowledgeSegmentAttachment, type KnowledgeSegmentAttachmentUploadResponse, type KnowledgeSegmentListResponse, type KnowledgeSegmentMutationResponse, type KnowledgeUpdateDocumentsMetadataOptions, type KnowledgeUpdateSegmentOptions, type KnowledgeUploadDocumentOptions, type KnowledgeUploadResponse, type KnowledgeUploadSegmentAttachmentOptions, type KnowledgeWaitForIndexingOptions, createClient };
|
|
707
|
+
export { type AmasterClient, type AmasterClientOptions, type BrowserAmasterClient, type BrowserAmasterClientOptions, type KnowledgeChildChunk, type KnowledgeClient, type KnowledgeCreateSegmentOptions, type KnowledgeDatasetIdResponse, type KnowledgeDeleteDocumentOptions, type KnowledgeDeleteSegmentOptions, type KnowledgeDocument, type KnowledgeDocumentListResponse, type KnowledgeDocumentListStatus, type KnowledgeDocumentStatus, type KnowledgeGetDatasetIdOptions, type KnowledgeGetDocumentOptions, type KnowledgeIndexingStatus, type KnowledgeIndexingStatusOptions, type KnowledgeIndexingStatusResponse, type KnowledgeListDocumentsOptions, type KnowledgeListSegmentsOptions, type KnowledgeMetadataField, type KnowledgeMetadataOperation, type KnowledgeMetadataUpdateRequest, type KnowledgeResolveOptions, type KnowledgeRoles, type KnowledgeSegment, type KnowledgeSegmentAttachment, type KnowledgeSegmentAttachmentUploadResponse, type KnowledgeSegmentListResponse, type KnowledgeSegmentMutationResponse, type KnowledgeUpdateDocumentsMetadataOptions, type KnowledgeUpdateSegmentOptions, type KnowledgeUploadDocumentOptions, type KnowledgeUploadResponse, type KnowledgeUploadSegmentAttachmentOptions, type KnowledgeWaitForIndexingOptions, type TenancyAmasterClient, createClient };
|