@tier0/sdk-v2 0.8.0 → 0.9.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/NOTICE.md +3 -1
- package/README.md +45 -11
- package/dist/cjs/capabilities.d.ts +8 -17
- package/dist/cjs/capabilities.js +14 -27
- package/dist/cjs/capabilities.js.map +1 -1
- package/dist/cjs/client.d.ts +524 -3
- package/dist/cjs/client.js +29 -6
- package/dist/cjs/client.js.map +1 -1
- package/dist/cjs/cloud-transport.d.ts +4 -2
- package/dist/cjs/cloud-transport.js +27 -18
- package/dist/cjs/cloud-transport.js.map +1 -1
- package/dist/cjs/files.d.ts +26 -6
- package/dist/cjs/files.js +151 -28
- package/dist/cjs/files.js.map +1 -1
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/openapi/api.generated.d.ts +1 -1
- package/dist/cjs/openapi/codecs.generated.d.ts +30 -161
- package/dist/cjs/openapi/codecs.generated.js +1 -1
- package/dist/cjs/openapi/codecs.generated.js.map +1 -1
- package/dist/cjs/openapi/types.generated.d.ts +33 -85
- package/dist/cjs/openapi/types.generated.js.map +1 -1
- package/dist/cjs/runtime.d.ts +13 -0
- package/dist/cjs/runtime.js +51 -0
- package/dist/cjs/runtime.js.map +1 -0
- package/dist/cjs/streams/capabilities.d.ts +8 -0
- package/dist/cjs/streams/capabilities.js +19 -0
- package/dist/cjs/streams/capabilities.js.map +1 -0
- package/dist/cjs/streams/contract.generated.d.ts +802 -0
- package/dist/cjs/streams/contract.generated.js +7 -0
- package/dist/cjs/streams/contract.generated.js.map +1 -0
- package/dist/cjs/streams/index.d.ts +3 -0
- package/dist/cjs/streams/index.js +20 -0
- package/dist/cjs/streams/index.js.map +1 -0
- package/dist/cjs/streams/messages.d.ts +42 -0
- package/dist/cjs/streams/messages.js +514 -0
- package/dist/cjs/streams/messages.js.map +1 -0
- package/dist/cjs/streams/requests.d.ts +93 -0
- package/dist/cjs/streams/requests.js +167 -0
- package/dist/cjs/streams/requests.js.map +1 -0
- package/dist/cjs/streams/transport.d.ts +16 -0
- package/dist/cjs/streams/transport.js +24 -0
- package/dist/cjs/streams/transport.js.map +1 -0
- package/dist/cjs/uns-v2/generated.d.ts +87 -22
- package/dist/cjs/uns-v2/generated.js +43 -8
- package/dist/cjs/uns-v2/generated.js.map +1 -1
- package/dist/esm/capabilities.d.ts +8 -17
- package/dist/esm/capabilities.js +14 -27
- package/dist/esm/capabilities.js.map +1 -1
- package/dist/esm/client.d.ts +524 -3
- package/dist/esm/client.js +27 -5
- package/dist/esm/client.js.map +1 -1
- package/dist/esm/cloud-transport.d.ts +4 -2
- package/dist/esm/cloud-transport.js +27 -18
- package/dist/esm/cloud-transport.js.map +1 -1
- package/dist/esm/files.d.ts +26 -6
- package/dist/esm/files.js +151 -28
- package/dist/esm/files.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/openapi/api.generated.d.ts +1 -1
- package/dist/esm/openapi/codecs.generated.d.ts +30 -161
- package/dist/esm/openapi/codecs.generated.js +1 -1
- package/dist/esm/openapi/codecs.generated.js.map +1 -1
- package/dist/esm/openapi/types.generated.d.ts +33 -85
- package/dist/esm/openapi/types.generated.js.map +1 -1
- package/dist/esm/runtime.d.ts +13 -0
- package/dist/esm/runtime.js +46 -0
- package/dist/esm/runtime.js.map +1 -0
- package/dist/esm/streams/capabilities.d.ts +8 -0
- package/dist/esm/streams/capabilities.js +15 -0
- package/dist/esm/streams/capabilities.js.map +1 -0
- package/dist/esm/streams/contract.generated.d.ts +802 -0
- package/dist/esm/streams/contract.generated.js +6 -0
- package/dist/esm/streams/contract.generated.js.map +1 -0
- package/dist/esm/streams/index.d.ts +3 -0
- package/dist/esm/streams/index.js +4 -0
- package/dist/esm/streams/index.js.map +1 -0
- package/dist/esm/streams/messages.d.ts +42 -0
- package/dist/esm/streams/messages.js +475 -0
- package/dist/esm/streams/messages.js.map +1 -0
- package/dist/esm/streams/requests.d.ts +93 -0
- package/dist/esm/streams/requests.js +161 -0
- package/dist/esm/streams/requests.js.map +1 -0
- package/dist/esm/streams/transport.d.ts +16 -0
- package/dist/esm/streams/transport.js +20 -0
- package/dist/esm/streams/transport.js.map +1 -0
- package/dist/esm/uns-v2/generated.d.ts +87 -22
- package/dist/esm/uns-v2/generated.js +43 -8
- package/dist/esm/uns-v2/generated.js.map +1 -1
- package/package.json +46 -12
- package/skills/tier0-sdk-v2/SKILL.md +3 -2
- package/skills/tier0-sdk-v2/tier0-sdk-v2-files/references/multipart.md +23 -8
- package/skills/tier0-sdk-v2/tier0-sdk-v2-source/SKILL.md +3 -3
- package/skills/tier0-sdk-v2/tier0-sdk-v2-source/references/create.md +9 -3
- package/skills/tier0-sdk-v2/tier0-sdk-v2-source/references/state.md +1 -1
- package/skills/tier0-sdk-v2/tier0-sdk-v2-source/references/update.md +1 -1
- package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/SKILL.md +2 -1
- package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/references/create.md +13 -4
- package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/references/deploy.md +1 -1
- package/skills/tier0-sdk-v2/tier0-sdk-v2-stream/references/update.md +1 -1
- package/skills/tier0-sdk-v2/tier0-sdk-v2-streams/SKILL.md +67 -0
- package/skills/tier0-sdk-v2/tier0-sdk-v2-system/SKILL.md +5 -9
- package/skills/tier0-sdk-v2/tier0-sdk-v2-system/references/info.md +1 -1
package/dist/esm/client.d.ts
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
|
+
import { StreamRequestsClient } from './streams/requests.js';
|
|
2
|
+
import { StreamMessagesClient } from './streams/messages.js';
|
|
3
|
+
import { StreamCapabilitiesClient } from './streams/capabilities.js';
|
|
1
4
|
import { type ClientConfig } from './openapi/client.js';
|
|
2
5
|
import { CapabilitiesClient } from './capabilities.js';
|
|
3
6
|
import { FilesClient } from './files.js';
|
|
4
7
|
import type { CloudTransportConfig } from './cloud-transport.js';
|
|
5
8
|
export interface Tier0ClientConfig extends ClientConfig, CloudTransportConfig {
|
|
6
9
|
}
|
|
7
|
-
|
|
10
|
+
export type Tier0Client = ReturnType<typeof createClient>;
|
|
11
|
+
/** 现役服务端和数据客户端保留独立配置;浏览器交互仅使用受信宿主。 */
|
|
8
12
|
export declare function createClient(config?: Tier0ClientConfig): Readonly<{
|
|
13
|
+
streams: {
|
|
14
|
+
requests: StreamRequestsClient;
|
|
15
|
+
messages: StreamMessagesClient;
|
|
16
|
+
capabilities: StreamCapabilitiesClient;
|
|
17
|
+
};
|
|
18
|
+
dispose: () => Promise<void>;
|
|
9
19
|
system: {
|
|
10
20
|
info: (options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
11
21
|
capabilities: string[];
|
|
@@ -375,7 +385,519 @@ export declare function createClient(config?: Tier0ClientConfig): Readonly<{
|
|
|
375
385
|
discover: (options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
376
386
|
product: "cloud" | "enterprise";
|
|
377
387
|
productVersion?: string;
|
|
378
|
-
contractVersion: "
|
|
388
|
+
contractVersion: "2.0";
|
|
389
|
+
apiContractVersions: string[];
|
|
390
|
+
sdkContractVersions: string[];
|
|
391
|
+
capabilities: import("./index.js").components["schemas"]["CapabilityDiscoverycapability"][] & (unknown & unknown & unknown & unknown & unknown);
|
|
392
|
+
deprecations: {
|
|
393
|
+
contract: string;
|
|
394
|
+
replacement?: string;
|
|
395
|
+
sunsetAt?: string;
|
|
396
|
+
}[];
|
|
397
|
+
}>;
|
|
398
|
+
};
|
|
399
|
+
agent: {
|
|
400
|
+
cards: {
|
|
401
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentCardsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
402
|
+
canvasId: string;
|
|
403
|
+
cardId: string;
|
|
404
|
+
cardKey: string;
|
|
405
|
+
cardSpec: unknown;
|
|
406
|
+
updatedAt: number | bigint;
|
|
407
|
+
}>;
|
|
408
|
+
update: (body: import("./index.js").components["schemas"]["SdkagentCardsUpdateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
409
|
+
cardId: string;
|
|
410
|
+
}>;
|
|
411
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentCardsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
412
|
+
list: import("./index.js").components["schemas"]["AgentCardGetResp"][];
|
|
413
|
+
page: number | bigint;
|
|
414
|
+
size: number | bigint;
|
|
415
|
+
total: number | bigint;
|
|
416
|
+
}>;
|
|
417
|
+
delete: (body: import("./index.js").components["schemas"]["SdkagentCardsDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
418
|
+
cardId: string;
|
|
419
|
+
}>;
|
|
420
|
+
};
|
|
421
|
+
results: {
|
|
422
|
+
create: (body: import("./index.js").components["schemas"]["SdkagentResultsCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
423
|
+
jobRunId: string;
|
|
424
|
+
resultId: string;
|
|
425
|
+
}>;
|
|
426
|
+
get: (body?: import("./index.js").components["schemas"]["SdkagentResultsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
427
|
+
result: import("./index.js").components["schemas"]["AgentStoredResult"];
|
|
428
|
+
}>;
|
|
429
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentResultsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
430
|
+
list: import("./index.js").components["schemas"]["AgentStoredResult"][];
|
|
431
|
+
page: number | bigint;
|
|
432
|
+
size: number | bigint;
|
|
433
|
+
total: number | bigint;
|
|
434
|
+
}>;
|
|
435
|
+
pin: (body: import("./index.js").components["schemas"]["SdkagentResultsPinRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
436
|
+
cardId: string;
|
|
437
|
+
}>;
|
|
438
|
+
};
|
|
439
|
+
jobs: {
|
|
440
|
+
create: (body: import("./index.js").components["schemas"]["SdkagentJobsCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
441
|
+
jobId: string;
|
|
442
|
+
}>;
|
|
443
|
+
update: (body: import("./index.js").components["schemas"]["SdkagentJobsUpdateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
444
|
+
jobId: string;
|
|
445
|
+
}>;
|
|
446
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentJobsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
447
|
+
job: import("./index.js").components["schemas"]["AgentJobRecord"];
|
|
448
|
+
}>;
|
|
449
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentJobsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
450
|
+
list: import("./index.js").components["schemas"]["AgentJobRecord"][];
|
|
451
|
+
page: number | bigint;
|
|
452
|
+
size: number | bigint;
|
|
453
|
+
total: number | bigint;
|
|
454
|
+
}>;
|
|
455
|
+
pause: (body: import("./index.js").components["schemas"]["SdkagentJobsPauseRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
456
|
+
jobId: string;
|
|
457
|
+
}>;
|
|
458
|
+
resume: (body: import("./index.js").components["schemas"]["SdkagentJobsResumeRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
459
|
+
jobId: string;
|
|
460
|
+
}>;
|
|
461
|
+
delete: (body: import("./index.js").components["schemas"]["SdkagentJobsDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
462
|
+
jobId: string;
|
|
463
|
+
}>;
|
|
464
|
+
trigger: (body: import("./index.js").components["schemas"]["SdkagentJobsTriggerRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
465
|
+
dispatchState: string;
|
|
466
|
+
jobId: string;
|
|
467
|
+
jobRunId: string;
|
|
468
|
+
}>;
|
|
469
|
+
};
|
|
470
|
+
jobRuns: {
|
|
471
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentJobRunsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
472
|
+
run: import("./index.js").components["schemas"]["AgentJobRunRecord"];
|
|
473
|
+
}>;
|
|
474
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentJobRunsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
475
|
+
list: import("./index.js").components["schemas"]["AgentJobRunRecord"][];
|
|
476
|
+
page: number | bigint;
|
|
477
|
+
size: number | bigint;
|
|
478
|
+
total: number | bigint;
|
|
479
|
+
}>;
|
|
480
|
+
};
|
|
481
|
+
canvases: {
|
|
482
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentCanvasesListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
483
|
+
list: import("./index.js").components["schemas"]["AgentCanvasRecord"][];
|
|
484
|
+
page: number | bigint;
|
|
485
|
+
size: number | bigint;
|
|
486
|
+
total: number | bigint;
|
|
487
|
+
}>;
|
|
488
|
+
};
|
|
489
|
+
library: {
|
|
490
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentLibraryListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
491
|
+
list: import("./index.js").components["schemas"]["AgentLibraryItem"][];
|
|
492
|
+
page: number | bigint;
|
|
493
|
+
size: number | bigint;
|
|
494
|
+
total: number | bigint;
|
|
495
|
+
}>;
|
|
496
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentLibraryGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
497
|
+
item: import("./index.js").components["schemas"]["AgentLibraryItem"];
|
|
498
|
+
}>;
|
|
499
|
+
create: (body: import("./index.js").components["schemas"]["SdkagentLibraryCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
500
|
+
libraryItemId: string;
|
|
501
|
+
}>;
|
|
502
|
+
update: (body: import("./index.js").components["schemas"]["SdkagentLibraryUpdateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
503
|
+
libraryItemId: string;
|
|
504
|
+
}>;
|
|
505
|
+
delete: (body: import("./index.js").components["schemas"]["SdkagentLibraryDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
506
|
+
libraryItemId: string;
|
|
507
|
+
}>;
|
|
508
|
+
};
|
|
509
|
+
analyses: {
|
|
510
|
+
dispatch: (body: import("./index.js").components["schemas"]["SdkagentAnalysesDispatchRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
511
|
+
dispatchState: string;
|
|
512
|
+
errorCode: string;
|
|
513
|
+
errorMessage: string;
|
|
514
|
+
runId: string;
|
|
515
|
+
}>;
|
|
516
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentAnalysesGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
517
|
+
run: import("./index.js").components["schemas"]["AgentJobRunRecord"];
|
|
518
|
+
}>;
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
}>;
|
|
523
|
+
/** App 默认交互客户端在调用时解析宿主,无需在浏览器配置密钥。 */
|
|
524
|
+
export declare const client: Readonly<{
|
|
525
|
+
streams: {
|
|
526
|
+
requests: StreamRequestsClient;
|
|
527
|
+
messages: StreamMessagesClient;
|
|
528
|
+
capabilities: StreamCapabilitiesClient;
|
|
529
|
+
};
|
|
530
|
+
dispose: () => Promise<void>;
|
|
531
|
+
system: {
|
|
532
|
+
info: (options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
533
|
+
capabilities: string[];
|
|
534
|
+
mqttBroker: string;
|
|
535
|
+
name: string;
|
|
536
|
+
version: string;
|
|
537
|
+
}>;
|
|
538
|
+
whoami: (options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
539
|
+
apiKeyName: string;
|
|
540
|
+
email: string;
|
|
541
|
+
keyPrefix: string;
|
|
542
|
+
keyType: string;
|
|
543
|
+
permissions: string[];
|
|
544
|
+
roles: string[];
|
|
545
|
+
userID: number | bigint;
|
|
546
|
+
userName: string;
|
|
547
|
+
workspaceID: number | bigint;
|
|
548
|
+
workspaceName: string;
|
|
549
|
+
}>;
|
|
550
|
+
};
|
|
551
|
+
members: {
|
|
552
|
+
listWorkspace: (body?: import("./index.js").components["schemas"]["SdkmembersListWorkspaceRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
553
|
+
list: import("./index.js").components["schemas"]["PlatformMemberResp"][];
|
|
554
|
+
page: number | bigint;
|
|
555
|
+
size: number | bigint;
|
|
556
|
+
total: number | bigint;
|
|
557
|
+
}>;
|
|
558
|
+
listApp: (body: import("./index.js").components["schemas"]["SdkmembersListAppRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
559
|
+
allActiveMembers: number | bigint;
|
|
560
|
+
appId: string;
|
|
561
|
+
list: import("./index.js").components["schemas"]["AppAccessMemberResp"][];
|
|
562
|
+
page: number | bigint;
|
|
563
|
+
productionVersionId?: string;
|
|
564
|
+
published: number | bigint;
|
|
565
|
+
roles: import("./index.js").components["schemas"]["AppAccessRoleResp"][];
|
|
566
|
+
size: number | bigint;
|
|
567
|
+
total: number | bigint;
|
|
568
|
+
}>;
|
|
569
|
+
};
|
|
570
|
+
notifications: {
|
|
571
|
+
send: (body: import("./index.js").components["schemas"]["SdknotificationsSendRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
572
|
+
createdAt: string;
|
|
573
|
+
messageId: string;
|
|
574
|
+
status: string;
|
|
575
|
+
}>;
|
|
576
|
+
get: (body: import("./index.js").components["schemas"]["SdknotificationsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
577
|
+
completedAt?: string;
|
|
578
|
+
createdAt: string;
|
|
579
|
+
errorCode?: string;
|
|
580
|
+
message?: string;
|
|
581
|
+
messageId: string;
|
|
582
|
+
status: string;
|
|
583
|
+
type: string;
|
|
584
|
+
}>;
|
|
585
|
+
};
|
|
586
|
+
mqttAuth: {
|
|
587
|
+
create: (body: import("./index.js").components["schemas"]["SdkmqttAuthCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
588
|
+
clientID: string;
|
|
589
|
+
clientIDRandomSuffixEnabled: boolean;
|
|
590
|
+
id: number | bigint;
|
|
591
|
+
name: string;
|
|
592
|
+
password: string;
|
|
593
|
+
username: string;
|
|
594
|
+
}>;
|
|
595
|
+
delete: (body: import("./index.js").components["schemas"]["SdkmqttAuthDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
596
|
+
success: boolean;
|
|
597
|
+
}>;
|
|
598
|
+
};
|
|
599
|
+
agent: {
|
|
600
|
+
cards: {
|
|
601
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentCardsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
602
|
+
canvasId: string;
|
|
603
|
+
cardId: string;
|
|
604
|
+
cardKey: string;
|
|
605
|
+
cardSpec: unknown;
|
|
606
|
+
updatedAt: number | bigint;
|
|
607
|
+
}>;
|
|
608
|
+
update: (body: import("./index.js").components["schemas"]["SdkagentCardsUpdateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
609
|
+
cardId: string;
|
|
610
|
+
}>;
|
|
611
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentCardsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
612
|
+
list: import("./index.js").components["schemas"]["AgentCardGetResp"][];
|
|
613
|
+
page: number | bigint;
|
|
614
|
+
size: number | bigint;
|
|
615
|
+
total: number | bigint;
|
|
616
|
+
}>;
|
|
617
|
+
delete: (body: import("./index.js").components["schemas"]["SdkagentCardsDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
618
|
+
cardId: string;
|
|
619
|
+
}>;
|
|
620
|
+
};
|
|
621
|
+
results: {
|
|
622
|
+
create: (body: import("./index.js").components["schemas"]["SdkagentResultsCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
623
|
+
jobRunId: string;
|
|
624
|
+
resultId: string;
|
|
625
|
+
}>;
|
|
626
|
+
get: (body?: import("./index.js").components["schemas"]["SdkagentResultsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
627
|
+
result: import("./index.js").components["schemas"]["AgentStoredResult"];
|
|
628
|
+
}>;
|
|
629
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentResultsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
630
|
+
list: import("./index.js").components["schemas"]["AgentStoredResult"][];
|
|
631
|
+
page: number | bigint;
|
|
632
|
+
size: number | bigint;
|
|
633
|
+
total: number | bigint;
|
|
634
|
+
}>;
|
|
635
|
+
pin: (body: import("./index.js").components["schemas"]["SdkagentResultsPinRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
636
|
+
cardId: string;
|
|
637
|
+
}>;
|
|
638
|
+
};
|
|
639
|
+
jobs: {
|
|
640
|
+
create: (body: import("./index.js").components["schemas"]["SdkagentJobsCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
641
|
+
jobId: string;
|
|
642
|
+
}>;
|
|
643
|
+
update: (body: import("./index.js").components["schemas"]["SdkagentJobsUpdateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
644
|
+
jobId: string;
|
|
645
|
+
}>;
|
|
646
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentJobsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
647
|
+
job: import("./index.js").components["schemas"]["AgentJobRecord"];
|
|
648
|
+
}>;
|
|
649
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentJobsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
650
|
+
list: import("./index.js").components["schemas"]["AgentJobRecord"][];
|
|
651
|
+
page: number | bigint;
|
|
652
|
+
size: number | bigint;
|
|
653
|
+
total: number | bigint;
|
|
654
|
+
}>;
|
|
655
|
+
pause: (body: import("./index.js").components["schemas"]["SdkagentJobsPauseRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
656
|
+
jobId: string;
|
|
657
|
+
}>;
|
|
658
|
+
resume: (body: import("./index.js").components["schemas"]["SdkagentJobsResumeRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
659
|
+
jobId: string;
|
|
660
|
+
}>;
|
|
661
|
+
delete: (body: import("./index.js").components["schemas"]["SdkagentJobsDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
662
|
+
jobId: string;
|
|
663
|
+
}>;
|
|
664
|
+
trigger: (body: import("./index.js").components["schemas"]["SdkagentJobsTriggerRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
665
|
+
dispatchState: string;
|
|
666
|
+
jobId: string;
|
|
667
|
+
jobRunId: string;
|
|
668
|
+
}>;
|
|
669
|
+
};
|
|
670
|
+
jobRuns: {
|
|
671
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentJobRunsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
672
|
+
run: import("./index.js").components["schemas"]["AgentJobRunRecord"];
|
|
673
|
+
}>;
|
|
674
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentJobRunsListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
675
|
+
list: import("./index.js").components["schemas"]["AgentJobRunRecord"][];
|
|
676
|
+
page: number | bigint;
|
|
677
|
+
size: number | bigint;
|
|
678
|
+
total: number | bigint;
|
|
679
|
+
}>;
|
|
680
|
+
};
|
|
681
|
+
canvases: {
|
|
682
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentCanvasesListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
683
|
+
list: import("./index.js").components["schemas"]["AgentCanvasRecord"][];
|
|
684
|
+
page: number | bigint;
|
|
685
|
+
size: number | bigint;
|
|
686
|
+
total: number | bigint;
|
|
687
|
+
}>;
|
|
688
|
+
};
|
|
689
|
+
library: {
|
|
690
|
+
list: (body: import("./index.js").components["schemas"]["SdkagentLibraryListRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
691
|
+
list: import("./index.js").components["schemas"]["AgentLibraryItem"][];
|
|
692
|
+
page: number | bigint;
|
|
693
|
+
size: number | bigint;
|
|
694
|
+
total: number | bigint;
|
|
695
|
+
}>;
|
|
696
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentLibraryGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
697
|
+
item: import("./index.js").components["schemas"]["AgentLibraryItem"];
|
|
698
|
+
}>;
|
|
699
|
+
create: (body: import("./index.js").components["schemas"]["SdkagentLibraryCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
700
|
+
libraryItemId: string;
|
|
701
|
+
}>;
|
|
702
|
+
update: (body: import("./index.js").components["schemas"]["SdkagentLibraryUpdateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
703
|
+
libraryItemId: string;
|
|
704
|
+
}>;
|
|
705
|
+
delete: (body: import("./index.js").components["schemas"]["SdkagentLibraryDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
706
|
+
libraryItemId: string;
|
|
707
|
+
}>;
|
|
708
|
+
};
|
|
709
|
+
analyses: {
|
|
710
|
+
dispatch: (body: import("./index.js").components["schemas"]["SdkagentAnalysesDispatchRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
711
|
+
dispatchState: string;
|
|
712
|
+
errorCode: string;
|
|
713
|
+
errorMessage: string;
|
|
714
|
+
runId: string;
|
|
715
|
+
}>;
|
|
716
|
+
get: (body: import("./index.js").components["schemas"]["SdkagentAnalysesGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
717
|
+
run: import("./index.js").components["schemas"]["AgentJobRunRecord"];
|
|
718
|
+
}>;
|
|
719
|
+
};
|
|
720
|
+
};
|
|
721
|
+
files: FilesClient;
|
|
722
|
+
capabilities: CapabilitiesClient;
|
|
723
|
+
source: Readonly<{
|
|
724
|
+
delete: (request: import("./index.js").CloudSourceDeleteReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceDeleteResponse>;
|
|
725
|
+
validate: (request: import("./index.js").UnsV2SourceValidateReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2SourceValidateResponse>;
|
|
726
|
+
probe: (request: import("./index.js").UnsV2SourceProbeReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2SourceProbeResponse>;
|
|
727
|
+
discover: (request: import("./index.js").CloudSourceDiscoverReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceDiscoverResponse>;
|
|
728
|
+
impact: (request: import("./index.js").CloudSourceImpactReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceImpactResponse>;
|
|
729
|
+
history: (request: import("./index.js").CloudSourceHistoryReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceHistoryResponse>;
|
|
730
|
+
protocols: Readonly<{
|
|
731
|
+
list: (request: import("./index.js").UnsV2SourceProtocolsListReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2SourceProtocolsListResponse>;
|
|
732
|
+
}>;
|
|
733
|
+
state: Readonly<{
|
|
734
|
+
update: (request: import("./index.js").UnsV2SourceStateUpdateReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2SourceStateUpdateResponse>;
|
|
735
|
+
}>;
|
|
736
|
+
runtime: Readonly<{
|
|
737
|
+
get: (request: import("./index.js").UnsV2SourceRuntimeGetReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2SourceRuntimeGetResponse>;
|
|
738
|
+
}>;
|
|
739
|
+
observations: Readonly<{
|
|
740
|
+
get: (request: import("./index.js").CloudSourceObservationsGetReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceObservationsGetResponse>;
|
|
741
|
+
}>;
|
|
742
|
+
documents: Readonly<{
|
|
743
|
+
list: (request: import("./index.js").CloudSourceDocumentListReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceDocumentListResponse>;
|
|
744
|
+
get: (request: import("./index.js").CloudSourceDocumentGetReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceDocumentGetResponse>;
|
|
745
|
+
create: (request: import("./index.js").CloudSourceDocumentCreateReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceDocumentCreateResponse>;
|
|
746
|
+
update: (request: import("./index.js").CloudSourceDocumentUpdateReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudSourceDocumentUpdateResponse>;
|
|
747
|
+
}>;
|
|
748
|
+
}>;
|
|
749
|
+
stream: Readonly<{
|
|
750
|
+
programs: Readonly<{
|
|
751
|
+
list: (request: import("./index.js").CloudStreamProgramListReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamProgramListResponse>;
|
|
752
|
+
delete: (request: import("./index.js").CloudStreamProgramDeleteReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamProgramDeleteResponse>;
|
|
753
|
+
deploy: (request: import("./index.js").UnsV2StreamProgramDeployReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2StreamProgramDeployResponse>;
|
|
754
|
+
rollback: (request: import("./index.js").UnsV2StreamProgramRollbackReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2StreamProgramRollbackResponse>;
|
|
755
|
+
versions: Readonly<{
|
|
756
|
+
list: (request: import("./index.js").UnsV2StreamProgramVersionsListReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").UnsV2StreamProgramVersionsListResponse>;
|
|
757
|
+
}>;
|
|
758
|
+
}>;
|
|
759
|
+
documents: Readonly<{
|
|
760
|
+
get: (request: import("./index.js").CloudStreamDocumentGetReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamDocumentGetResponse>;
|
|
761
|
+
create: (request: import("./index.js").CloudStreamDocumentCreateReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamDocumentCreateResponse>;
|
|
762
|
+
update: (request: import("./index.js").CloudStreamDocumentUpdateReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamDocumentUpdateResponse>;
|
|
763
|
+
validate: (request: import("./index.js").CloudStreamDocumentValidateReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamDocumentValidateResponse>;
|
|
764
|
+
disable: (request: import("./index.js").CloudStreamDocumentDisableReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamDocumentDisableResponse>;
|
|
765
|
+
}>;
|
|
766
|
+
observations: Readonly<{
|
|
767
|
+
get: (request: import("./index.js").CloudStreamObservationGetReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamObservationGetResponse>;
|
|
768
|
+
}>;
|
|
769
|
+
runs: Readonly<{
|
|
770
|
+
list: (request: import("./index.js").CloudStreamRunsListReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamRunsListResponse>;
|
|
771
|
+
}>;
|
|
772
|
+
sampleTest: (request: import("./index.js").CloudStreamSampleTestReq, options?: import("./openapi/client.js").RequestOptions) => Promise<import("./index.js").CloudStreamSampleTestResponse>;
|
|
773
|
+
}>;
|
|
774
|
+
uns: Readonly<Pick<import("./index.js").UnsV2Operations, import("./uns-v2/data-client.js").UnsDataOperationName>>;
|
|
775
|
+
api: {
|
|
776
|
+
system: {
|
|
777
|
+
info: (options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
778
|
+
capabilities: string[];
|
|
779
|
+
mqttBroker: string;
|
|
780
|
+
name: string;
|
|
781
|
+
version: string;
|
|
782
|
+
}>;
|
|
783
|
+
whoami: (options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
784
|
+
apiKeyName: string;
|
|
785
|
+
email: string;
|
|
786
|
+
keyPrefix: string;
|
|
787
|
+
keyType: string;
|
|
788
|
+
permissions: string[];
|
|
789
|
+
roles: string[];
|
|
790
|
+
userID: number | bigint;
|
|
791
|
+
userName: string;
|
|
792
|
+
workspaceID: number | bigint;
|
|
793
|
+
workspaceName: string;
|
|
794
|
+
}>;
|
|
795
|
+
};
|
|
796
|
+
assets: {
|
|
797
|
+
files: {
|
|
798
|
+
prepareUpload: (body: import("./index.js").components["schemas"]["SdkassetsFilesPrepareUploadRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
799
|
+
expiresAt?: number | bigint;
|
|
800
|
+
fileId?: number | bigint;
|
|
801
|
+
filePath: string;
|
|
802
|
+
fileUrl?: string;
|
|
803
|
+
postFields: {
|
|
804
|
+
[key: string]: string;
|
|
805
|
+
};
|
|
806
|
+
postUrl: string;
|
|
807
|
+
}>;
|
|
808
|
+
download: (query: import("./index.js").components["schemas"]["SdkassetsFilesDownloadQuery"], options?: import("./openapi/client.js").RequestOptions) => Promise<Response>;
|
|
809
|
+
url: (query: import("./index.js").components["schemas"]["SdkassetsFilesUrlQuery"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
810
|
+
expiresAt?: number | bigint;
|
|
811
|
+
fileUrl: string;
|
|
812
|
+
}>;
|
|
813
|
+
delete: (body: import("./index.js").components["schemas"]["SdkassetsFilesDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
814
|
+
deleted: boolean;
|
|
815
|
+
}>;
|
|
816
|
+
multipart: {
|
|
817
|
+
init: (body: import("./index.js").components["schemas"]["SdkassetsFilesMultipartInitRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
818
|
+
expiresAt: number | bigint;
|
|
819
|
+
fileKey: string;
|
|
820
|
+
filePath: string;
|
|
821
|
+
partCount: number | bigint;
|
|
822
|
+
partSize: number | bigint;
|
|
823
|
+
uploadId: string;
|
|
824
|
+
}>;
|
|
825
|
+
partUrls: (body: import("./index.js").components["schemas"]["SdkassetsFilesMultipartPartUrlsRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
826
|
+
partUrls: import("./index.js").components["schemas"]["AssetFileMultipartPartUrl"][];
|
|
827
|
+
}>;
|
|
828
|
+
complete: (body: import("./index.js").components["schemas"]["SdkassetsFilesMultipartCompleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
829
|
+
expiresAt?: number | bigint;
|
|
830
|
+
filePath: string;
|
|
831
|
+
fileUrl?: string;
|
|
832
|
+
sizeBytes: number | bigint;
|
|
833
|
+
}>;
|
|
834
|
+
abort: (body: import("./index.js").components["schemas"]["SdkassetsFilesMultipartAbortRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
835
|
+
aborted: number | bigint;
|
|
836
|
+
}>;
|
|
837
|
+
};
|
|
838
|
+
};
|
|
839
|
+
upload: (body: import("./index.js").components["schemas"]["SdkassetsUploadRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
840
|
+
filePath: string;
|
|
841
|
+
fileUrl?: string;
|
|
842
|
+
postFields: {
|
|
843
|
+
[key: string]: string;
|
|
844
|
+
};
|
|
845
|
+
postUrl: string;
|
|
846
|
+
}>;
|
|
847
|
+
};
|
|
848
|
+
notifications: {
|
|
849
|
+
send: (body: import("./index.js").components["schemas"]["SdknotificationsSendRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
850
|
+
createdAt: string;
|
|
851
|
+
messageId: string;
|
|
852
|
+
status: string;
|
|
853
|
+
}>;
|
|
854
|
+
get: (body: import("./index.js").components["schemas"]["SdknotificationsGetRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
855
|
+
completedAt?: string;
|
|
856
|
+
createdAt: string;
|
|
857
|
+
errorCode?: string;
|
|
858
|
+
message?: string;
|
|
859
|
+
messageId: string;
|
|
860
|
+
status: string;
|
|
861
|
+
type: string;
|
|
862
|
+
}>;
|
|
863
|
+
};
|
|
864
|
+
members: {
|
|
865
|
+
listWorkspace: (body?: import("./index.js").components["schemas"]["SdkmembersListWorkspaceRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
866
|
+
list: import("./index.js").components["schemas"]["PlatformMemberResp"][];
|
|
867
|
+
page: number | bigint;
|
|
868
|
+
size: number | bigint;
|
|
869
|
+
total: number | bigint;
|
|
870
|
+
}>;
|
|
871
|
+
listApp: (body: import("./index.js").components["schemas"]["SdkmembersListAppRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
872
|
+
allActiveMembers: number | bigint;
|
|
873
|
+
appId: string;
|
|
874
|
+
list: import("./index.js").components["schemas"]["AppAccessMemberResp"][];
|
|
875
|
+
page: number | bigint;
|
|
876
|
+
productionVersionId?: string;
|
|
877
|
+
published: number | bigint;
|
|
878
|
+
roles: import("./index.js").components["schemas"]["AppAccessRoleResp"][];
|
|
879
|
+
size: number | bigint;
|
|
880
|
+
total: number | bigint;
|
|
881
|
+
}>;
|
|
882
|
+
};
|
|
883
|
+
mqttAuth: {
|
|
884
|
+
create: (body: import("./index.js").components["schemas"]["SdkmqttAuthCreateRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
885
|
+
clientID: string;
|
|
886
|
+
clientIDRandomSuffixEnabled: boolean;
|
|
887
|
+
id: number | bigint;
|
|
888
|
+
name: string;
|
|
889
|
+
password: string;
|
|
890
|
+
username: string;
|
|
891
|
+
}>;
|
|
892
|
+
delete: (body: import("./index.js").components["schemas"]["SdkmqttAuthDeleteRequest"], options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
893
|
+
success: boolean;
|
|
894
|
+
}>;
|
|
895
|
+
};
|
|
896
|
+
capabilities: {
|
|
897
|
+
discover: (options?: import("./openapi/client.js").RequestOptions) => Promise<{
|
|
898
|
+
product: "cloud" | "enterprise";
|
|
899
|
+
productVersion?: string;
|
|
900
|
+
contractVersion: "2.0";
|
|
379
901
|
apiContractVersions: string[];
|
|
380
902
|
sdkContractVersions: string[];
|
|
381
903
|
capabilities: import("./index.js").components["schemas"]["CapabilityDiscoverycapability"][] & (unknown & unknown & unknown & unknown & unknown);
|
|
@@ -510,4 +1032,3 @@ export declare function createClient(config?: Tier0ClientConfig): Readonly<{
|
|
|
510
1032
|
};
|
|
511
1033
|
};
|
|
512
1034
|
}>;
|
|
513
|
-
export type Tier0Client = ReturnType<typeof createClient>;
|
package/dist/esm/client.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StreamRequestsClient } from './streams/requests.js';
|
|
2
|
+
import { StreamMessagesClient } from './streams/messages.js';
|
|
3
|
+
import { StreamTransport } from './streams/transport.js';
|
|
4
|
+
import { StreamCapabilitiesClient } from './streams/capabilities.js';
|
|
5
|
+
import { getClient, HttpClient } from './openapi/client.js';
|
|
2
6
|
import { createOpenAPI } from './openapi/api.generated.js';
|
|
3
7
|
import { createUnsV2Client } from './uns-v2/client.js';
|
|
4
8
|
import { bindUnsDataClient } from './uns-v2/data-client.js';
|
|
@@ -7,13 +11,15 @@ import { bindStreamClient } from './stream.js';
|
|
|
7
11
|
import { CapabilitiesClient } from './capabilities.js';
|
|
8
12
|
import { FilesClient } from './files.js';
|
|
9
13
|
/** Use a fresh instance per incoming request when supplying employee data delegation. */
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
const http = new HttpClient(snapshot);
|
|
14
|
+
function assemble(resolve, snapshot) {
|
|
15
|
+
const http = resolve();
|
|
13
16
|
const api = createOpenAPI(http);
|
|
14
|
-
const
|
|
17
|
+
const transport = new StreamTransport(resolve, snapshot);
|
|
18
|
+
const messages = new StreamMessagesClient(transport);
|
|
15
19
|
const raw = createUnsV2Client(resolve, snapshot);
|
|
16
20
|
return Object.freeze({
|
|
21
|
+
streams: { requests: new StreamRequestsClient(transport), messages, capabilities: new StreamCapabilitiesClient(resolve, snapshot) },
|
|
22
|
+
dispose: () => messages.dispose(),
|
|
17
23
|
system: api.system,
|
|
18
24
|
members: api.members,
|
|
19
25
|
notifications: api.notifications,
|
|
@@ -27,4 +33,20 @@ export function createClient(config = {}) {
|
|
|
27
33
|
api,
|
|
28
34
|
});
|
|
29
35
|
}
|
|
36
|
+
/** 现役服务端和数据客户端保留独立配置;浏览器交互仅使用受信宿主。 */
|
|
37
|
+
export function createClient(config = {}) {
|
|
38
|
+
const snapshot = Object.freeze({ ...config });
|
|
39
|
+
const http = new HttpClient(snapshot);
|
|
40
|
+
return assemble(() => http, snapshot);
|
|
41
|
+
}
|
|
42
|
+
// 全局兼容入口也在调用时读取 configureClient,不固化模块导入时的配置。
|
|
43
|
+
const defaultHttp = new Proxy(new HttpClient(), {
|
|
44
|
+
get(_target, key) {
|
|
45
|
+
const current = getClient();
|
|
46
|
+
const value = Reflect.get(current, key);
|
|
47
|
+
return typeof value === 'function' ? value.bind(current) : value;
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
/** App 默认交互客户端在调用时解析宿主,无需在浏览器配置密钥。 */
|
|
51
|
+
export const client = assemble(() => defaultHttp, {});
|
|
30
52
|
//# sourceMappingURL=client.js.map
|
package/dist/esm/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAqB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/client.ts"],"names":[],"mappings":"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","sourcesContent":["import { StreamRequestsClient } from './streams/requests.js';\nimport { StreamMessagesClient } from './streams/messages.js';\nimport { StreamTransport } from './streams/transport.js';\nimport { StreamCapabilitiesClient } from './streams/capabilities.js';\nimport { getClient, HttpClient, type ClientConfig } from './openapi/client.js';\nimport { createOpenAPI } from './openapi/api.generated.js';\nimport { createUnsV2Client } from './uns-v2/client.js';\nimport { bindUnsDataClient } from './uns-v2/data-client.js';\nimport { bindSourceClient } from './source.js';\nimport { bindStreamClient } from './stream.js';\nimport { CapabilitiesClient } from './capabilities.js';\nimport { FilesClient } from './files.js';\nimport type { CloudTransportConfig } from './cloud-transport.js';\n\nexport interface Tier0ClientConfig extends ClientConfig, CloudTransportConfig {}\n/** Use a fresh instance per incoming request when supplying employee data delegation. */\nfunction assemble(resolve: () => HttpClient, snapshot: Tier0ClientConfig) {\n const http = resolve();\n const api = createOpenAPI(http);\n const transport = new StreamTransport(resolve, snapshot);\n const messages = new StreamMessagesClient(transport);\n const raw = createUnsV2Client(resolve, snapshot);\n return Object.freeze({\n streams: { requests: new StreamRequestsClient(transport), messages, capabilities: new StreamCapabilitiesClient(resolve, snapshot) },\n dispose: () => messages.dispose(),\n system: api.system,\n members: api.members,\n notifications: api.notifications,\n mqttAuth: api.mqttAuth,\n agent: api.agent,\n files: new FilesClient(http),\n capabilities: new CapabilitiesClient(resolve, snapshot),\n source: bindSourceClient(raw),\n stream: bindStreamClient(raw),\n uns: bindUnsDataClient(raw),\n api,\n });\n}\nexport type Tier0Client = ReturnType<typeof createClient>;\n\n/** 现役服务端和数据客户端保留独立配置;浏览器交互仅使用受信宿主。 */\nexport function createClient(config: Tier0ClientConfig = {}) {\n const snapshot = Object.freeze({ ...config });\n const http = new HttpClient(snapshot);\n return assemble(() => http, snapshot);\n}\n\n// 全局兼容入口也在调用时读取 configureClient,不固化模块导入时的配置。\nconst defaultHttp = new Proxy(new HttpClient(), {\n get(_target, key) {\n const current = getClient();\n const value: unknown = Reflect.get(current, key);\n return typeof value === 'function' ? value.bind(current) : value;\n },\n});\n/** App 默认交互客户端在调用时解析宿主,无需在浏览器配置密钥。 */\nexport const client = assemble(() => defaultHttp, {});\n"]}
|