@realtimex/sdk 1.7.17 → 1.7.21
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/{chunk-PEWBG7US.mjs → chunk-Z5GAUBIM.mjs} +170 -0
- package/dist/{errors-DsxB91BA.d.mts → errors-NufsyIZ-.d.mts} +122 -1
- package/dist/{errors-DsxB91BA.d.ts → errors-NufsyIZ-.d.ts} +122 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +169 -0
- package/dist/index.mjs +1 -1
- package/dist/v1/index.d.mts +2 -2
- package/dist/v1/index.d.ts +2 -2
- package/dist/v1/index.js +171 -0
- package/dist/v1/index.mjs +3 -1
- package/package.json +1 -1
- package/skills/realtimex-moderator-sdk/SKILL.md +49 -493
- package/skills/realtimex-moderator-sdk/references/activities.md +14 -0
- package/skills/realtimex-moderator-sdk/references/agents.md +13 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/acpagent.md +105 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/activities.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/agent.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/api.md +17 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/auth.md +36 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/contract.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/core.md +40 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/database.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/index.md +43 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/llm.md +176 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/mcp.md +50 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/port.md +21 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/stt.md +15 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/task.md +62 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/tts.md +18 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpauth.md +21 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-acpcommands.md +15 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-admin.md +48 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-auth.md +18 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-channels.md +78 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-credentials.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-customthemes.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopbrowser.md +39 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopembed.md +24 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-desktopruntimesessions.md +33 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-document.md +39 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-embed.md +27 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-openai.md +21 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-sttapi.md +12 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-system.md +36 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-thread.md +26 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-users.md +15 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/v1-workspace.md +39 -0
- package/skills/realtimex-moderator-sdk/references/api-reference/webhook.md +13 -0
- package/skills/realtimex-moderator-sdk/references/api-reference.md +78 -1
- package/skills/realtimex-moderator-sdk/references/app-concepts.md +148 -0
- package/skills/realtimex-moderator-sdk/references/browser.md +27 -0
- package/skills/realtimex-moderator-sdk/references/channels.md +189 -0
- package/skills/realtimex-moderator-sdk/references/known-issues.md +1 -1
- package/skills/realtimex-moderator-sdk/references/llm.md +13 -0
- package/skills/realtimex-moderator-sdk/references/mcp.md +13 -0
- package/skills/realtimex-moderator-sdk/references/permissions.md +30 -0
- package/skills/realtimex-moderator-sdk/references/quickstart.md +16 -0
- package/skills/realtimex-moderator-sdk/references/terminal-sessions.md +34 -0
- package/skills/realtimex-moderator-sdk/references/workspaces.md +20 -0
- package/skills/realtimex-moderator-sdk/scripts/rtx.js +121 -0
|
@@ -642,6 +642,174 @@ var V1EmbedModule = class {
|
|
|
642
642
|
}
|
|
643
643
|
};
|
|
644
644
|
|
|
645
|
+
// src/v1/modules/v1Channels.ts
|
|
646
|
+
var V1ChannelsModule = class {
|
|
647
|
+
constructor(client) {
|
|
648
|
+
this.client = client;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* List configured channel plugins without exposing encrypted plugin configuration.
|
|
652
|
+
* @see GET /v1/channels/plugins
|
|
653
|
+
*/
|
|
654
|
+
async listPlugins() {
|
|
655
|
+
return this.client.request("GET", `/v1/channels/plugins`);
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Create a channel plugin. The request may include provider credentials in config, but credentials are never returned.
|
|
659
|
+
* @see POST /v1/channels/plugins
|
|
660
|
+
*/
|
|
661
|
+
async createPlugin(body) {
|
|
662
|
+
return this.client.request("POST", `/v1/channels/plugins`, body);
|
|
663
|
+
}
|
|
664
|
+
/**
|
|
665
|
+
* Get editable non-secret channel plugin configuration.
|
|
666
|
+
* @see GET /v1/channels/plugins/{id}/config
|
|
667
|
+
*/
|
|
668
|
+
async getConfig(id) {
|
|
669
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/config`);
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* Update a channel plugin. Config values are encrypted before storage.
|
|
673
|
+
* @see POST /v1/channels/plugins/{id}/update
|
|
674
|
+
*/
|
|
675
|
+
async updatePlugin(id, body) {
|
|
676
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/update`, body);
|
|
677
|
+
}
|
|
678
|
+
/**
|
|
679
|
+
* Delete a channel plugin and stop any running plugin instance.
|
|
680
|
+
* @see DELETE /v1/channels/plugins/{id}
|
|
681
|
+
*/
|
|
682
|
+
async deletePlugin(id) {
|
|
683
|
+
return this.client.request("DELETE", `/v1/channels/plugins/${id}`);
|
|
684
|
+
}
|
|
685
|
+
/**
|
|
686
|
+
* Enable and start a channel plugin.
|
|
687
|
+
* @see POST /v1/channels/plugins/{id}/start
|
|
688
|
+
*/
|
|
689
|
+
async pluginsStart(id) {
|
|
690
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/start`);
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Disable and stop a channel plugin.
|
|
694
|
+
* @see POST /v1/channels/plugins/{id}/stop
|
|
695
|
+
*/
|
|
696
|
+
async pluginsStop(id) {
|
|
697
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/stop`);
|
|
698
|
+
}
|
|
699
|
+
/**
|
|
700
|
+
* Test channel provider credentials without saving a plugin.
|
|
701
|
+
* @see POST /v1/channels/plugins/test
|
|
702
|
+
*/
|
|
703
|
+
async pluginsTest(body) {
|
|
704
|
+
return this.client.request("POST", `/v1/channels/plugins/test`, body);
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Get runtime status for all running channel plugins.
|
|
708
|
+
* @see GET /v1/channels/status
|
|
709
|
+
*/
|
|
710
|
+
async getStatus() {
|
|
711
|
+
return this.client.request("GET", `/v1/channels/status`);
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* Start a QR login flow for Zalo personal or WhatsApp plugins.
|
|
715
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/start
|
|
716
|
+
*/
|
|
717
|
+
async pluginsQrLoginStart(id, body) {
|
|
718
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/start`, body);
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Poll QR login status for Zalo personal or WhatsApp plugins.
|
|
722
|
+
* @see GET /v1/channels/plugins/{id}/qr-login/state
|
|
723
|
+
*/
|
|
724
|
+
async getState(id) {
|
|
725
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/qr-login/state`);
|
|
726
|
+
}
|
|
727
|
+
/**
|
|
728
|
+
* Cancel a QR login flow for Zalo personal or WhatsApp plugins.
|
|
729
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/cancel
|
|
730
|
+
*/
|
|
731
|
+
async pluginsQrLoginCancel(id) {
|
|
732
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/cancel`);
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* Log out a QR-authenticated Zalo personal or WhatsApp plugin and clear stored credentials.
|
|
736
|
+
* @see POST /v1/channels/plugins/{id}/logout
|
|
737
|
+
*/
|
|
738
|
+
async pluginsLogout(id) {
|
|
739
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/logout`);
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* Update safe channel policies for Zalo personal or WhatsApp plugins without overwriting credentials.
|
|
743
|
+
* @see POST /v1/channels/plugins/{id}/policies
|
|
744
|
+
*/
|
|
745
|
+
async pluginsPolicies(id, body) {
|
|
746
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/policies`, body);
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Search a Zalo personal friends directory.
|
|
750
|
+
* @see GET /v1/channels/plugins/{id}/directory/friends
|
|
751
|
+
*/
|
|
752
|
+
async listDirectoryFriends(id) {
|
|
753
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/directory/friends`);
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Search a Zalo personal groups directory.
|
|
757
|
+
* @see GET /v1/channels/plugins/{id}/directory/groups
|
|
758
|
+
*/
|
|
759
|
+
async listDirectoryGroups(id) {
|
|
760
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/directory/groups`);
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* List pending pairing codes for a channel plugin.
|
|
764
|
+
* @see GET /v1/channels/plugins/{id}/pairing-codes
|
|
765
|
+
*/
|
|
766
|
+
async listPluginPairingCodes(id) {
|
|
767
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/pairing-codes`);
|
|
768
|
+
}
|
|
769
|
+
/**
|
|
770
|
+
* Generate a pairing code for a channel plugin.
|
|
771
|
+
* @see POST /v1/channels/plugins/{id}/pairing-codes
|
|
772
|
+
*/
|
|
773
|
+
async pluginsPairingCodes(id, body) {
|
|
774
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/pairing-codes`, body);
|
|
775
|
+
}
|
|
776
|
+
/**
|
|
777
|
+
* Approve a channel pairing code.
|
|
778
|
+
* @see POST /v1/channels/pairing-codes/{id}/approve
|
|
779
|
+
*/
|
|
780
|
+
async pairingCodesApprove(id) {
|
|
781
|
+
return this.client.request("POST", `/v1/channels/pairing-codes/${id}/approve`);
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Reject a channel pairing code.
|
|
785
|
+
* @see POST /v1/channels/pairing-codes/{id}/reject
|
|
786
|
+
*/
|
|
787
|
+
async pairingCodesReject(id) {
|
|
788
|
+
return this.client.request("POST", `/v1/channels/pairing-codes/${id}/reject`);
|
|
789
|
+
}
|
|
790
|
+
/**
|
|
791
|
+
* List channel users for a plugin.
|
|
792
|
+
* @see GET /v1/channels/plugins/{id}/users
|
|
793
|
+
*/
|
|
794
|
+
async listPluginUsers(id) {
|
|
795
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/users`);
|
|
796
|
+
}
|
|
797
|
+
/**
|
|
798
|
+
* Set authorization for a channel user.
|
|
799
|
+
* @see POST /v1/channels/plugins/{id}/users/{userId}/authorization
|
|
800
|
+
*/
|
|
801
|
+
async pluginsUsersAuthorization(id, userId, body) {
|
|
802
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/users/${userId}/authorization`, body);
|
|
803
|
+
}
|
|
804
|
+
/**
|
|
805
|
+
* Remove a channel user from a plugin.
|
|
806
|
+
* @see DELETE /v1/channels/plugins/{id}/users/{userId}
|
|
807
|
+
*/
|
|
808
|
+
async deleteUser(id, userId) {
|
|
809
|
+
return this.client.request("DELETE", `/v1/channels/plugins/${id}/users/${userId}`);
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
|
|
645
813
|
// src/v1/modules/v1DesktopRuntimeSessions.ts
|
|
646
814
|
var V1DesktopRuntimeSessionsModule = class {
|
|
647
815
|
constructor(client) {
|
|
@@ -796,6 +964,7 @@ var V1ApiNamespace = class {
|
|
|
796
964
|
this.users = new V1UsersModule(this._client);
|
|
797
965
|
this.openai = new V1OpenAIModule(this._client);
|
|
798
966
|
this.embed = new V1EmbedModule(this._client);
|
|
967
|
+
this.channels = new V1ChannelsModule(this._client);
|
|
799
968
|
this.desktopRuntimeSessions = new V1DesktopRuntimeSessionsModule(this._client);
|
|
800
969
|
this.desktopBrowser = new V1DesktopBrowserModule(this._client);
|
|
801
970
|
}
|
|
@@ -817,6 +986,7 @@ export {
|
|
|
817
986
|
V1UsersModule,
|
|
818
987
|
V1OpenAIModule,
|
|
819
988
|
V1EmbedModule,
|
|
989
|
+
V1ChannelsModule,
|
|
820
990
|
V1DesktopRuntimeSessionsModule,
|
|
821
991
|
V1DesktopBrowserModule,
|
|
822
992
|
V1ApiNamespace
|
|
@@ -405,6 +405,126 @@ declare class V1EmbedModule {
|
|
|
405
405
|
deleteEmbed(embedUuid: string): Promise<unknown>;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
declare class V1ChannelsModule {
|
|
409
|
+
private readonly client;
|
|
410
|
+
constructor(client: DeveloperApiClient);
|
|
411
|
+
/**
|
|
412
|
+
* List configured channel plugins without exposing encrypted plugin configuration.
|
|
413
|
+
* @see GET /v1/channels/plugins
|
|
414
|
+
*/
|
|
415
|
+
listPlugins(): Promise<unknown>;
|
|
416
|
+
/**
|
|
417
|
+
* Create a channel plugin. The request may include provider credentials in config, but credentials are never returned.
|
|
418
|
+
* @see POST /v1/channels/plugins
|
|
419
|
+
*/
|
|
420
|
+
createPlugin(body?: Record<string, unknown>): Promise<unknown>;
|
|
421
|
+
/**
|
|
422
|
+
* Get editable non-secret channel plugin configuration.
|
|
423
|
+
* @see GET /v1/channels/plugins/{id}/config
|
|
424
|
+
*/
|
|
425
|
+
getConfig(id: string): Promise<unknown>;
|
|
426
|
+
/**
|
|
427
|
+
* Update a channel plugin. Config values are encrypted before storage.
|
|
428
|
+
* @see POST /v1/channels/plugins/{id}/update
|
|
429
|
+
*/
|
|
430
|
+
updatePlugin(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
431
|
+
/**
|
|
432
|
+
* Delete a channel plugin and stop any running plugin instance.
|
|
433
|
+
* @see DELETE /v1/channels/plugins/{id}
|
|
434
|
+
*/
|
|
435
|
+
deletePlugin(id: string): Promise<unknown>;
|
|
436
|
+
/**
|
|
437
|
+
* Enable and start a channel plugin.
|
|
438
|
+
* @see POST /v1/channels/plugins/{id}/start
|
|
439
|
+
*/
|
|
440
|
+
pluginsStart(id: string): Promise<unknown>;
|
|
441
|
+
/**
|
|
442
|
+
* Disable and stop a channel plugin.
|
|
443
|
+
* @see POST /v1/channels/plugins/{id}/stop
|
|
444
|
+
*/
|
|
445
|
+
pluginsStop(id: string): Promise<unknown>;
|
|
446
|
+
/**
|
|
447
|
+
* Test channel provider credentials without saving a plugin.
|
|
448
|
+
* @see POST /v1/channels/plugins/test
|
|
449
|
+
*/
|
|
450
|
+
pluginsTest(body?: Record<string, unknown>): Promise<unknown>;
|
|
451
|
+
/**
|
|
452
|
+
* Get runtime status for all running channel plugins.
|
|
453
|
+
* @see GET /v1/channels/status
|
|
454
|
+
*/
|
|
455
|
+
getStatus(): Promise<unknown>;
|
|
456
|
+
/**
|
|
457
|
+
* Start a QR login flow for Zalo personal or WhatsApp plugins.
|
|
458
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/start
|
|
459
|
+
*/
|
|
460
|
+
pluginsQrLoginStart(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
461
|
+
/**
|
|
462
|
+
* Poll QR login status for Zalo personal or WhatsApp plugins.
|
|
463
|
+
* @see GET /v1/channels/plugins/{id}/qr-login/state
|
|
464
|
+
*/
|
|
465
|
+
getState(id: string): Promise<unknown>;
|
|
466
|
+
/**
|
|
467
|
+
* Cancel a QR login flow for Zalo personal or WhatsApp plugins.
|
|
468
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/cancel
|
|
469
|
+
*/
|
|
470
|
+
pluginsQrLoginCancel(id: string): Promise<unknown>;
|
|
471
|
+
/**
|
|
472
|
+
* Log out a QR-authenticated Zalo personal or WhatsApp plugin and clear stored credentials.
|
|
473
|
+
* @see POST /v1/channels/plugins/{id}/logout
|
|
474
|
+
*/
|
|
475
|
+
pluginsLogout(id: string): Promise<unknown>;
|
|
476
|
+
/**
|
|
477
|
+
* Update safe channel policies for Zalo personal or WhatsApp plugins without overwriting credentials.
|
|
478
|
+
* @see POST /v1/channels/plugins/{id}/policies
|
|
479
|
+
*/
|
|
480
|
+
pluginsPolicies(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
481
|
+
/**
|
|
482
|
+
* Search a Zalo personal friends directory.
|
|
483
|
+
* @see GET /v1/channels/plugins/{id}/directory/friends
|
|
484
|
+
*/
|
|
485
|
+
listDirectoryFriends(id: string): Promise<unknown>;
|
|
486
|
+
/**
|
|
487
|
+
* Search a Zalo personal groups directory.
|
|
488
|
+
* @see GET /v1/channels/plugins/{id}/directory/groups
|
|
489
|
+
*/
|
|
490
|
+
listDirectoryGroups(id: string): Promise<unknown>;
|
|
491
|
+
/**
|
|
492
|
+
* List pending pairing codes for a channel plugin.
|
|
493
|
+
* @see GET /v1/channels/plugins/{id}/pairing-codes
|
|
494
|
+
*/
|
|
495
|
+
listPluginPairingCodes(id: string): Promise<unknown>;
|
|
496
|
+
/**
|
|
497
|
+
* Generate a pairing code for a channel plugin.
|
|
498
|
+
* @see POST /v1/channels/plugins/{id}/pairing-codes
|
|
499
|
+
*/
|
|
500
|
+
pluginsPairingCodes(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
501
|
+
/**
|
|
502
|
+
* Approve a channel pairing code.
|
|
503
|
+
* @see POST /v1/channels/pairing-codes/{id}/approve
|
|
504
|
+
*/
|
|
505
|
+
pairingCodesApprove(id: string): Promise<unknown>;
|
|
506
|
+
/**
|
|
507
|
+
* Reject a channel pairing code.
|
|
508
|
+
* @see POST /v1/channels/pairing-codes/{id}/reject
|
|
509
|
+
*/
|
|
510
|
+
pairingCodesReject(id: string): Promise<unknown>;
|
|
511
|
+
/**
|
|
512
|
+
* List channel users for a plugin.
|
|
513
|
+
* @see GET /v1/channels/plugins/{id}/users
|
|
514
|
+
*/
|
|
515
|
+
listPluginUsers(id: string): Promise<unknown>;
|
|
516
|
+
/**
|
|
517
|
+
* Set authorization for a channel user.
|
|
518
|
+
* @see POST /v1/channels/plugins/{id}/users/{userId}/authorization
|
|
519
|
+
*/
|
|
520
|
+
pluginsUsersAuthorization(id: string, userId: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
521
|
+
/**
|
|
522
|
+
* Remove a channel user from a plugin.
|
|
523
|
+
* @see DELETE /v1/channels/plugins/{id}/users/{userId}
|
|
524
|
+
*/
|
|
525
|
+
deleteUser(id: string, userId: string): Promise<unknown>;
|
|
526
|
+
}
|
|
527
|
+
|
|
408
528
|
declare class V1DesktopRuntimeSessionsModule {
|
|
409
529
|
private readonly client;
|
|
410
530
|
constructor(client: DeveloperApiClient);
|
|
@@ -528,6 +648,7 @@ declare class V1ApiNamespace {
|
|
|
528
648
|
users: V1UsersModule;
|
|
529
649
|
openai: V1OpenAIModule;
|
|
530
650
|
embed: V1EmbedModule;
|
|
651
|
+
channels: V1ChannelsModule;
|
|
531
652
|
desktopRuntimeSessions: V1DesktopRuntimeSessionsModule;
|
|
532
653
|
desktopBrowser: V1DesktopBrowserModule;
|
|
533
654
|
constructor(baseUrl: string, apiKey: string, appId?: string);
|
|
@@ -554,4 +675,4 @@ declare class ServerError extends DeveloperApiError {
|
|
|
554
675
|
constructor(message?: string);
|
|
555
676
|
}
|
|
556
677
|
|
|
557
|
-
export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, V1DesktopRuntimeSessionsModule as a, V1DesktopBrowserModule as b, DeveloperApiError as c, ValidationError as d, V1AuthModule as e, V1AdminModule as f, V1DocumentModule as g, V1WorkspaceModule as h, V1SystemModule as i, V1ThreadModule as j, V1UsersModule as k, V1OpenAIModule as l, V1EmbedModule as m };
|
|
678
|
+
export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, V1DesktopRuntimeSessionsModule as a, V1DesktopBrowserModule as b, DeveloperApiError as c, ValidationError as d, V1AuthModule as e, V1AdminModule as f, V1DocumentModule as g, V1WorkspaceModule as h, V1SystemModule as i, V1ThreadModule as j, V1UsersModule as k, V1OpenAIModule as l, V1EmbedModule as m, V1ChannelsModule as n };
|
|
@@ -405,6 +405,126 @@ declare class V1EmbedModule {
|
|
|
405
405
|
deleteEmbed(embedUuid: string): Promise<unknown>;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
declare class V1ChannelsModule {
|
|
409
|
+
private readonly client;
|
|
410
|
+
constructor(client: DeveloperApiClient);
|
|
411
|
+
/**
|
|
412
|
+
* List configured channel plugins without exposing encrypted plugin configuration.
|
|
413
|
+
* @see GET /v1/channels/plugins
|
|
414
|
+
*/
|
|
415
|
+
listPlugins(): Promise<unknown>;
|
|
416
|
+
/**
|
|
417
|
+
* Create a channel plugin. The request may include provider credentials in config, but credentials are never returned.
|
|
418
|
+
* @see POST /v1/channels/plugins
|
|
419
|
+
*/
|
|
420
|
+
createPlugin(body?: Record<string, unknown>): Promise<unknown>;
|
|
421
|
+
/**
|
|
422
|
+
* Get editable non-secret channel plugin configuration.
|
|
423
|
+
* @see GET /v1/channels/plugins/{id}/config
|
|
424
|
+
*/
|
|
425
|
+
getConfig(id: string): Promise<unknown>;
|
|
426
|
+
/**
|
|
427
|
+
* Update a channel plugin. Config values are encrypted before storage.
|
|
428
|
+
* @see POST /v1/channels/plugins/{id}/update
|
|
429
|
+
*/
|
|
430
|
+
updatePlugin(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
431
|
+
/**
|
|
432
|
+
* Delete a channel plugin and stop any running plugin instance.
|
|
433
|
+
* @see DELETE /v1/channels/plugins/{id}
|
|
434
|
+
*/
|
|
435
|
+
deletePlugin(id: string): Promise<unknown>;
|
|
436
|
+
/**
|
|
437
|
+
* Enable and start a channel plugin.
|
|
438
|
+
* @see POST /v1/channels/plugins/{id}/start
|
|
439
|
+
*/
|
|
440
|
+
pluginsStart(id: string): Promise<unknown>;
|
|
441
|
+
/**
|
|
442
|
+
* Disable and stop a channel plugin.
|
|
443
|
+
* @see POST /v1/channels/plugins/{id}/stop
|
|
444
|
+
*/
|
|
445
|
+
pluginsStop(id: string): Promise<unknown>;
|
|
446
|
+
/**
|
|
447
|
+
* Test channel provider credentials without saving a plugin.
|
|
448
|
+
* @see POST /v1/channels/plugins/test
|
|
449
|
+
*/
|
|
450
|
+
pluginsTest(body?: Record<string, unknown>): Promise<unknown>;
|
|
451
|
+
/**
|
|
452
|
+
* Get runtime status for all running channel plugins.
|
|
453
|
+
* @see GET /v1/channels/status
|
|
454
|
+
*/
|
|
455
|
+
getStatus(): Promise<unknown>;
|
|
456
|
+
/**
|
|
457
|
+
* Start a QR login flow for Zalo personal or WhatsApp plugins.
|
|
458
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/start
|
|
459
|
+
*/
|
|
460
|
+
pluginsQrLoginStart(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
461
|
+
/**
|
|
462
|
+
* Poll QR login status for Zalo personal or WhatsApp plugins.
|
|
463
|
+
* @see GET /v1/channels/plugins/{id}/qr-login/state
|
|
464
|
+
*/
|
|
465
|
+
getState(id: string): Promise<unknown>;
|
|
466
|
+
/**
|
|
467
|
+
* Cancel a QR login flow for Zalo personal or WhatsApp plugins.
|
|
468
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/cancel
|
|
469
|
+
*/
|
|
470
|
+
pluginsQrLoginCancel(id: string): Promise<unknown>;
|
|
471
|
+
/**
|
|
472
|
+
* Log out a QR-authenticated Zalo personal or WhatsApp plugin and clear stored credentials.
|
|
473
|
+
* @see POST /v1/channels/plugins/{id}/logout
|
|
474
|
+
*/
|
|
475
|
+
pluginsLogout(id: string): Promise<unknown>;
|
|
476
|
+
/**
|
|
477
|
+
* Update safe channel policies for Zalo personal or WhatsApp plugins without overwriting credentials.
|
|
478
|
+
* @see POST /v1/channels/plugins/{id}/policies
|
|
479
|
+
*/
|
|
480
|
+
pluginsPolicies(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
481
|
+
/**
|
|
482
|
+
* Search a Zalo personal friends directory.
|
|
483
|
+
* @see GET /v1/channels/plugins/{id}/directory/friends
|
|
484
|
+
*/
|
|
485
|
+
listDirectoryFriends(id: string): Promise<unknown>;
|
|
486
|
+
/**
|
|
487
|
+
* Search a Zalo personal groups directory.
|
|
488
|
+
* @see GET /v1/channels/plugins/{id}/directory/groups
|
|
489
|
+
*/
|
|
490
|
+
listDirectoryGroups(id: string): Promise<unknown>;
|
|
491
|
+
/**
|
|
492
|
+
* List pending pairing codes for a channel plugin.
|
|
493
|
+
* @see GET /v1/channels/plugins/{id}/pairing-codes
|
|
494
|
+
*/
|
|
495
|
+
listPluginPairingCodes(id: string): Promise<unknown>;
|
|
496
|
+
/**
|
|
497
|
+
* Generate a pairing code for a channel plugin.
|
|
498
|
+
* @see POST /v1/channels/plugins/{id}/pairing-codes
|
|
499
|
+
*/
|
|
500
|
+
pluginsPairingCodes(id: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
501
|
+
/**
|
|
502
|
+
* Approve a channel pairing code.
|
|
503
|
+
* @see POST /v1/channels/pairing-codes/{id}/approve
|
|
504
|
+
*/
|
|
505
|
+
pairingCodesApprove(id: string): Promise<unknown>;
|
|
506
|
+
/**
|
|
507
|
+
* Reject a channel pairing code.
|
|
508
|
+
* @see POST /v1/channels/pairing-codes/{id}/reject
|
|
509
|
+
*/
|
|
510
|
+
pairingCodesReject(id: string): Promise<unknown>;
|
|
511
|
+
/**
|
|
512
|
+
* List channel users for a plugin.
|
|
513
|
+
* @see GET /v1/channels/plugins/{id}/users
|
|
514
|
+
*/
|
|
515
|
+
listPluginUsers(id: string): Promise<unknown>;
|
|
516
|
+
/**
|
|
517
|
+
* Set authorization for a channel user.
|
|
518
|
+
* @see POST /v1/channels/plugins/{id}/users/{userId}/authorization
|
|
519
|
+
*/
|
|
520
|
+
pluginsUsersAuthorization(id: string, userId: string, body?: Record<string, unknown>): Promise<unknown>;
|
|
521
|
+
/**
|
|
522
|
+
* Remove a channel user from a plugin.
|
|
523
|
+
* @see DELETE /v1/channels/plugins/{id}/users/{userId}
|
|
524
|
+
*/
|
|
525
|
+
deleteUser(id: string, userId: string): Promise<unknown>;
|
|
526
|
+
}
|
|
527
|
+
|
|
408
528
|
declare class V1DesktopRuntimeSessionsModule {
|
|
409
529
|
private readonly client;
|
|
410
530
|
constructor(client: DeveloperApiClient);
|
|
@@ -528,6 +648,7 @@ declare class V1ApiNamespace {
|
|
|
528
648
|
users: V1UsersModule;
|
|
529
649
|
openai: V1OpenAIModule;
|
|
530
650
|
embed: V1EmbedModule;
|
|
651
|
+
channels: V1ChannelsModule;
|
|
531
652
|
desktopRuntimeSessions: V1DesktopRuntimeSessionsModule;
|
|
532
653
|
desktopBrowser: V1DesktopBrowserModule;
|
|
533
654
|
constructor(baseUrl: string, apiKey: string, appId?: string);
|
|
@@ -554,4 +675,4 @@ declare class ServerError extends DeveloperApiError {
|
|
|
554
675
|
constructor(message?: string);
|
|
555
676
|
}
|
|
556
677
|
|
|
557
|
-
export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, V1DesktopRuntimeSessionsModule as a, V1DesktopBrowserModule as b, DeveloperApiError as c, ValidationError as d, V1AuthModule as e, V1AdminModule as f, V1DocumentModule as g, V1WorkspaceModule as h, V1SystemModule as i, V1ThreadModule as j, V1UsersModule as k, V1OpenAIModule as l, V1EmbedModule as m };
|
|
678
|
+
export { AuthenticationError as A, DeveloperApiClient as D, NotFoundError as N, ServerError as S, V1ApiNamespace as V, V1DesktopRuntimeSessionsModule as a, V1DesktopBrowserModule as b, DeveloperApiError as c, ValidationError as d, V1AuthModule as e, V1AdminModule as f, V1DocumentModule as g, V1WorkspaceModule as h, V1SystemModule as i, V1ThreadModule as j, V1UsersModule as k, V1OpenAIModule as l, V1EmbedModule as m, V1ChannelsModule as n };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as V1ApiNamespace, a as V1DesktopRuntimeSessionsModule, b as V1DesktopBrowserModule } from './errors-
|
|
2
|
-
export { A as AuthenticationError, D as DeveloperApiClient, c as DeveloperApiError, N as NotFoundError, S as ServerError, d as ValidationError } from './errors-
|
|
1
|
+
import { V as V1ApiNamespace, a as V1DesktopRuntimeSessionsModule, b as V1DesktopBrowserModule } from './errors-NufsyIZ-.mjs';
|
|
2
|
+
export { A as AuthenticationError, D as DeveloperApiClient, c as DeveloperApiError, N as NotFoundError, S as ServerError, d as ValidationError } from './errors-NufsyIZ-.mjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* RealtimeX Local App SDK - Types
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as V1ApiNamespace, a as V1DesktopRuntimeSessionsModule, b as V1DesktopBrowserModule } from './errors-
|
|
2
|
-
export { A as AuthenticationError, D as DeveloperApiClient, c as DeveloperApiError, N as NotFoundError, S as ServerError, d as ValidationError } from './errors-
|
|
1
|
+
import { V as V1ApiNamespace, a as V1DesktopRuntimeSessionsModule, b as V1DesktopBrowserModule } from './errors-NufsyIZ-.js';
|
|
2
|
+
export { A as AuthenticationError, D as DeveloperApiClient, c as DeveloperApiError, N as NotFoundError, S as ServerError, d as ValidationError } from './errors-NufsyIZ-.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* RealtimeX Local App SDK - Types
|
package/dist/index.js
CHANGED
|
@@ -3687,6 +3687,174 @@ var V1EmbedModule = class {
|
|
|
3687
3687
|
}
|
|
3688
3688
|
};
|
|
3689
3689
|
|
|
3690
|
+
// src/v1/modules/v1Channels.ts
|
|
3691
|
+
var V1ChannelsModule = class {
|
|
3692
|
+
constructor(client) {
|
|
3693
|
+
this.client = client;
|
|
3694
|
+
}
|
|
3695
|
+
/**
|
|
3696
|
+
* List configured channel plugins without exposing encrypted plugin configuration.
|
|
3697
|
+
* @see GET /v1/channels/plugins
|
|
3698
|
+
*/
|
|
3699
|
+
async listPlugins() {
|
|
3700
|
+
return this.client.request("GET", `/v1/channels/plugins`);
|
|
3701
|
+
}
|
|
3702
|
+
/**
|
|
3703
|
+
* Create a channel plugin. The request may include provider credentials in config, but credentials are never returned.
|
|
3704
|
+
* @see POST /v1/channels/plugins
|
|
3705
|
+
*/
|
|
3706
|
+
async createPlugin(body) {
|
|
3707
|
+
return this.client.request("POST", `/v1/channels/plugins`, body);
|
|
3708
|
+
}
|
|
3709
|
+
/**
|
|
3710
|
+
* Get editable non-secret channel plugin configuration.
|
|
3711
|
+
* @see GET /v1/channels/plugins/{id}/config
|
|
3712
|
+
*/
|
|
3713
|
+
async getConfig(id) {
|
|
3714
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/config`);
|
|
3715
|
+
}
|
|
3716
|
+
/**
|
|
3717
|
+
* Update a channel plugin. Config values are encrypted before storage.
|
|
3718
|
+
* @see POST /v1/channels/plugins/{id}/update
|
|
3719
|
+
*/
|
|
3720
|
+
async updatePlugin(id, body) {
|
|
3721
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/update`, body);
|
|
3722
|
+
}
|
|
3723
|
+
/**
|
|
3724
|
+
* Delete a channel plugin and stop any running plugin instance.
|
|
3725
|
+
* @see DELETE /v1/channels/plugins/{id}
|
|
3726
|
+
*/
|
|
3727
|
+
async deletePlugin(id) {
|
|
3728
|
+
return this.client.request("DELETE", `/v1/channels/plugins/${id}`);
|
|
3729
|
+
}
|
|
3730
|
+
/**
|
|
3731
|
+
* Enable and start a channel plugin.
|
|
3732
|
+
* @see POST /v1/channels/plugins/{id}/start
|
|
3733
|
+
*/
|
|
3734
|
+
async pluginsStart(id) {
|
|
3735
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/start`);
|
|
3736
|
+
}
|
|
3737
|
+
/**
|
|
3738
|
+
* Disable and stop a channel plugin.
|
|
3739
|
+
* @see POST /v1/channels/plugins/{id}/stop
|
|
3740
|
+
*/
|
|
3741
|
+
async pluginsStop(id) {
|
|
3742
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/stop`);
|
|
3743
|
+
}
|
|
3744
|
+
/**
|
|
3745
|
+
* Test channel provider credentials without saving a plugin.
|
|
3746
|
+
* @see POST /v1/channels/plugins/test
|
|
3747
|
+
*/
|
|
3748
|
+
async pluginsTest(body) {
|
|
3749
|
+
return this.client.request("POST", `/v1/channels/plugins/test`, body);
|
|
3750
|
+
}
|
|
3751
|
+
/**
|
|
3752
|
+
* Get runtime status for all running channel plugins.
|
|
3753
|
+
* @see GET /v1/channels/status
|
|
3754
|
+
*/
|
|
3755
|
+
async getStatus() {
|
|
3756
|
+
return this.client.request("GET", `/v1/channels/status`);
|
|
3757
|
+
}
|
|
3758
|
+
/**
|
|
3759
|
+
* Start a QR login flow for Zalo personal or WhatsApp plugins.
|
|
3760
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/start
|
|
3761
|
+
*/
|
|
3762
|
+
async pluginsQrLoginStart(id, body) {
|
|
3763
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/start`, body);
|
|
3764
|
+
}
|
|
3765
|
+
/**
|
|
3766
|
+
* Poll QR login status for Zalo personal or WhatsApp plugins.
|
|
3767
|
+
* @see GET /v1/channels/plugins/{id}/qr-login/state
|
|
3768
|
+
*/
|
|
3769
|
+
async getState(id) {
|
|
3770
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/qr-login/state`);
|
|
3771
|
+
}
|
|
3772
|
+
/**
|
|
3773
|
+
* Cancel a QR login flow for Zalo personal or WhatsApp plugins.
|
|
3774
|
+
* @see POST /v1/channels/plugins/{id}/qr-login/cancel
|
|
3775
|
+
*/
|
|
3776
|
+
async pluginsQrLoginCancel(id) {
|
|
3777
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/qr-login/cancel`);
|
|
3778
|
+
}
|
|
3779
|
+
/**
|
|
3780
|
+
* Log out a QR-authenticated Zalo personal or WhatsApp plugin and clear stored credentials.
|
|
3781
|
+
* @see POST /v1/channels/plugins/{id}/logout
|
|
3782
|
+
*/
|
|
3783
|
+
async pluginsLogout(id) {
|
|
3784
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/logout`);
|
|
3785
|
+
}
|
|
3786
|
+
/**
|
|
3787
|
+
* Update safe channel policies for Zalo personal or WhatsApp plugins without overwriting credentials.
|
|
3788
|
+
* @see POST /v1/channels/plugins/{id}/policies
|
|
3789
|
+
*/
|
|
3790
|
+
async pluginsPolicies(id, body) {
|
|
3791
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/policies`, body);
|
|
3792
|
+
}
|
|
3793
|
+
/**
|
|
3794
|
+
* Search a Zalo personal friends directory.
|
|
3795
|
+
* @see GET /v1/channels/plugins/{id}/directory/friends
|
|
3796
|
+
*/
|
|
3797
|
+
async listDirectoryFriends(id) {
|
|
3798
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/directory/friends`);
|
|
3799
|
+
}
|
|
3800
|
+
/**
|
|
3801
|
+
* Search a Zalo personal groups directory.
|
|
3802
|
+
* @see GET /v1/channels/plugins/{id}/directory/groups
|
|
3803
|
+
*/
|
|
3804
|
+
async listDirectoryGroups(id) {
|
|
3805
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/directory/groups`);
|
|
3806
|
+
}
|
|
3807
|
+
/**
|
|
3808
|
+
* List pending pairing codes for a channel plugin.
|
|
3809
|
+
* @see GET /v1/channels/plugins/{id}/pairing-codes
|
|
3810
|
+
*/
|
|
3811
|
+
async listPluginPairingCodes(id) {
|
|
3812
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/pairing-codes`);
|
|
3813
|
+
}
|
|
3814
|
+
/**
|
|
3815
|
+
* Generate a pairing code for a channel plugin.
|
|
3816
|
+
* @see POST /v1/channels/plugins/{id}/pairing-codes
|
|
3817
|
+
*/
|
|
3818
|
+
async pluginsPairingCodes(id, body) {
|
|
3819
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/pairing-codes`, body);
|
|
3820
|
+
}
|
|
3821
|
+
/**
|
|
3822
|
+
* Approve a channel pairing code.
|
|
3823
|
+
* @see POST /v1/channels/pairing-codes/{id}/approve
|
|
3824
|
+
*/
|
|
3825
|
+
async pairingCodesApprove(id) {
|
|
3826
|
+
return this.client.request("POST", `/v1/channels/pairing-codes/${id}/approve`);
|
|
3827
|
+
}
|
|
3828
|
+
/**
|
|
3829
|
+
* Reject a channel pairing code.
|
|
3830
|
+
* @see POST /v1/channels/pairing-codes/{id}/reject
|
|
3831
|
+
*/
|
|
3832
|
+
async pairingCodesReject(id) {
|
|
3833
|
+
return this.client.request("POST", `/v1/channels/pairing-codes/${id}/reject`);
|
|
3834
|
+
}
|
|
3835
|
+
/**
|
|
3836
|
+
* List channel users for a plugin.
|
|
3837
|
+
* @see GET /v1/channels/plugins/{id}/users
|
|
3838
|
+
*/
|
|
3839
|
+
async listPluginUsers(id) {
|
|
3840
|
+
return this.client.request("GET", `/v1/channels/plugins/${id}/users`);
|
|
3841
|
+
}
|
|
3842
|
+
/**
|
|
3843
|
+
* Set authorization for a channel user.
|
|
3844
|
+
* @see POST /v1/channels/plugins/{id}/users/{userId}/authorization
|
|
3845
|
+
*/
|
|
3846
|
+
async pluginsUsersAuthorization(id, userId, body) {
|
|
3847
|
+
return this.client.request("POST", `/v1/channels/plugins/${id}/users/${userId}/authorization`, body);
|
|
3848
|
+
}
|
|
3849
|
+
/**
|
|
3850
|
+
* Remove a channel user from a plugin.
|
|
3851
|
+
* @see DELETE /v1/channels/plugins/{id}/users/{userId}
|
|
3852
|
+
*/
|
|
3853
|
+
async deleteUser(id, userId) {
|
|
3854
|
+
return this.client.request("DELETE", `/v1/channels/plugins/${id}/users/${userId}`);
|
|
3855
|
+
}
|
|
3856
|
+
};
|
|
3857
|
+
|
|
3690
3858
|
// src/v1/modules/v1DesktopRuntimeSessions.ts
|
|
3691
3859
|
var V1DesktopRuntimeSessionsModule = class {
|
|
3692
3860
|
constructor(client) {
|
|
@@ -3841,6 +4009,7 @@ var V1ApiNamespace = class {
|
|
|
3841
4009
|
this.users = new V1UsersModule(this._client);
|
|
3842
4010
|
this.openai = new V1OpenAIModule(this._client);
|
|
3843
4011
|
this.embed = new V1EmbedModule(this._client);
|
|
4012
|
+
this.channels = new V1ChannelsModule(this._client);
|
|
3844
4013
|
this.desktopRuntimeSessions = new V1DesktopRuntimeSessionsModule(this._client);
|
|
3845
4014
|
this.desktopBrowser = new V1DesktopBrowserModule(this._client);
|
|
3846
4015
|
}
|