Skip to content

Commit 6ca327d

Browse files
committed
feat: added api for assistant authentication and deployment log
1 parent 07447dd commit 6ca327d

33 files changed

Lines changed: 4962 additions & 187 deletions

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@rapidaai/react",
3-
"version": "1.1.69",
3+
"version": "1.1.70",
44
"description": "An easy to use react client for building generative ai application using Rapida platform.",
55
"repository": {
66
"type": "git",

src/clients/assistant.ts

Lines changed: 270 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ import {
5858
CreateAssistantTelemetryProviderRequest,
5959
UpdateAssistantTelemetryProviderRequest,
6060
DeleteAssistantTelemetryProviderRequest,
61+
CreateAssistantAuthenticationRequest,
62+
GetAssistantAuthenticationRequest,
63+
DisableAssistantAuthenticationRequest,
64+
GetAssistantAuthenticationResponse,
6165
} from "@/rapida/clients/protos/assistant-api_pb";
6266

6367
import {
@@ -124,10 +128,16 @@ import {
124128
import { GetAllAssistantConversationRequest } from "@/rapida/clients/protos/common_pb";
125129
import {
126130
CreateAssistantDeploymentRequest,
131+
GetAllAssistantDeploymentRequest,
127132
GetAssistantApiDeploymentResponse,
133+
GetAllAssistantApiDeploymentResponse,
128134
GetAssistantPhoneDeploymentResponse,
135+
GetAllAssistantPhoneDeploymentResponse,
129136
GetAssistantWebpluginDeploymentResponse,
137+
GetAllAssistantWebpluginDeploymentResponse,
130138
GetAssistantDeploymentRequest,
139+
GetAllAssistantWhatsappDeploymentResponse,
140+
GetAllAssistantDebuggerDeploymentResponse,
131141
} from "@/rapida/clients/protos/assistant-deployment_pb";
132142
import { GetAssistantWhatsappDeploymentResponse } from "./protos/assistant-deployment_pb";
133143
import { GetAssistantDebuggerDeploymentResponse } from "@/rapida/clients/protos/assistant-deployment_pb";
@@ -795,6 +805,266 @@ export function GetAssistantWhatsappDeployment(
795805
});
796806
}
797807

808+
export function GetAllAssistantApiDeployment(
809+
clientCfg: ConnectionConfig,
810+
req: GetAllAssistantDeploymentRequest,
811+
auth?: ClientAuthInfo | UserAuthInfo
812+
): Promise<GetAllAssistantApiDeploymentResponse> {
813+
return new Promise((resolve, reject) => {
814+
clientCfg.assistantDeploymentClient.getAllAssistantApiDeployment(
815+
req,
816+
WithAuthContext(clientCfg.auth || auth),
817+
(
818+
err: ServiceError | null,
819+
response: GetAllAssistantApiDeploymentResponse | null
820+
) => {
821+
if (err) reject(err);
822+
else resolve(response!);
823+
}
824+
);
825+
});
826+
}
827+
828+
export function DisableAssistantApiDeployment(
829+
clientCfg: ConnectionConfig,
830+
req: GetAssistantDeploymentRequest,
831+
auth?: ClientAuthInfo | UserAuthInfo
832+
): Promise<GetAssistantApiDeploymentResponse> {
833+
return new Promise((resolve, reject) => {
834+
clientCfg.assistantDeploymentClient.disableAssistantApiDeployment(
835+
req,
836+
WithAuthContext(clientCfg.auth || auth),
837+
(
838+
err: ServiceError | null,
839+
response: GetAssistantApiDeploymentResponse | null
840+
) => {
841+
if (err) reject(err);
842+
else resolve(response!);
843+
}
844+
);
845+
});
846+
}
847+
848+
export function GetAllAssistantWebpluginDeployment(
849+
clientCfg: ConnectionConfig,
850+
req: GetAllAssistantDeploymentRequest,
851+
auth?: ClientAuthInfo | UserAuthInfo
852+
): Promise<GetAllAssistantWebpluginDeploymentResponse> {
853+
return new Promise((resolve, reject) => {
854+
clientCfg.assistantDeploymentClient.getAllAssistantWebpluginDeployment(
855+
req,
856+
WithAuthContext(clientCfg.auth || auth),
857+
(
858+
err: ServiceError | null,
859+
response: GetAllAssistantWebpluginDeploymentResponse | null
860+
) => {
861+
if (err) reject(err);
862+
else resolve(response!);
863+
}
864+
);
865+
});
866+
}
867+
868+
export function DisableAssistantWebpluginDeployment(
869+
clientCfg: ConnectionConfig,
870+
req: GetAssistantDeploymentRequest,
871+
auth?: ClientAuthInfo | UserAuthInfo
872+
): Promise<GetAssistantWebpluginDeploymentResponse> {
873+
return new Promise((resolve, reject) => {
874+
clientCfg.assistantDeploymentClient.disableAssistantWebpluginDeployment(
875+
req,
876+
WithAuthContext(clientCfg.auth || auth),
877+
(
878+
err: ServiceError | null,
879+
response: GetAssistantWebpluginDeploymentResponse | null
880+
) => {
881+
if (err) reject(err);
882+
else resolve(response!);
883+
}
884+
);
885+
});
886+
}
887+
888+
export function GetAllAssistantDebuggerDeployment(
889+
clientCfg: ConnectionConfig,
890+
req: GetAllAssistantDeploymentRequest,
891+
auth?: ClientAuthInfo | UserAuthInfo
892+
): Promise<GetAllAssistantDebuggerDeploymentResponse> {
893+
return new Promise((resolve, reject) => {
894+
clientCfg.assistantDeploymentClient.getAllAssistantDebuggerDeployment(
895+
req,
896+
WithAuthContext(clientCfg.auth || auth),
897+
(
898+
err: ServiceError | null,
899+
response: GetAllAssistantDebuggerDeploymentResponse | null
900+
) => {
901+
if (err) reject(err);
902+
else resolve(response!);
903+
}
904+
);
905+
});
906+
}
907+
908+
export function DisableAssistantDebuggerDeployment(
909+
clientCfg: ConnectionConfig,
910+
req: GetAssistantDeploymentRequest,
911+
auth?: ClientAuthInfo | UserAuthInfo
912+
): Promise<GetAssistantDebuggerDeploymentResponse> {
913+
return new Promise((resolve, reject) => {
914+
clientCfg.assistantDeploymentClient.disableAssistantDebuggerDeployment(
915+
req,
916+
WithAuthContext(clientCfg.auth || auth),
917+
(
918+
err: ServiceError | null,
919+
response: GetAssistantDebuggerDeploymentResponse | null
920+
) => {
921+
if (err) reject(err);
922+
else resolve(response!);
923+
}
924+
);
925+
});
926+
}
927+
928+
export function GetAllAssistantWhatsappDeployment(
929+
clientCfg: ConnectionConfig,
930+
req: GetAllAssistantDeploymentRequest,
931+
auth?: ClientAuthInfo | UserAuthInfo
932+
): Promise<GetAllAssistantWhatsappDeploymentResponse> {
933+
return new Promise((resolve, reject) => {
934+
clientCfg.assistantDeploymentClient.getAllAssistantWhatsappDeployment(
935+
req,
936+
WithAuthContext(clientCfg.auth || auth),
937+
(
938+
err: ServiceError | null,
939+
response: GetAllAssistantWhatsappDeploymentResponse | null
940+
) => {
941+
if (err) reject(err);
942+
else resolve(response!);
943+
}
944+
);
945+
});
946+
}
947+
948+
export function DisableAssistantWhatsappDeployment(
949+
clientCfg: ConnectionConfig,
950+
req: GetAssistantDeploymentRequest,
951+
auth?: ClientAuthInfo | UserAuthInfo
952+
): Promise<GetAssistantWhatsappDeploymentResponse> {
953+
return new Promise((resolve, reject) => {
954+
clientCfg.assistantDeploymentClient.disableAssistantWhatsappDeployment(
955+
req,
956+
WithAuthContext(clientCfg.auth || auth),
957+
(
958+
err: ServiceError | null,
959+
response: GetAssistantWhatsappDeploymentResponse | null
960+
) => {
961+
if (err) reject(err);
962+
else resolve(response!);
963+
}
964+
);
965+
});
966+
}
967+
968+
export function GetAllAssistantPhoneDeployment(
969+
clientCfg: ConnectionConfig,
970+
req: GetAllAssistantDeploymentRequest,
971+
auth?: ClientAuthInfo | UserAuthInfo
972+
): Promise<GetAllAssistantPhoneDeploymentResponse> {
973+
return new Promise((resolve, reject) => {
974+
clientCfg.assistantDeploymentClient.getAllAssistantPhoneDeployment(
975+
req,
976+
WithAuthContext(clientCfg.auth || auth),
977+
(
978+
err: ServiceError | null,
979+
response: GetAllAssistantPhoneDeploymentResponse | null
980+
) => {
981+
if (err) reject(err);
982+
else resolve(response!);
983+
}
984+
);
985+
});
986+
}
987+
988+
export function DisableAssistantPhoneDeployment(
989+
clientCfg: ConnectionConfig,
990+
req: GetAssistantDeploymentRequest,
991+
auth?: ClientAuthInfo | UserAuthInfo
992+
): Promise<GetAssistantPhoneDeploymentResponse> {
993+
return new Promise((resolve, reject) => {
994+
clientCfg.assistantDeploymentClient.disableAssistantPhoneDeployment(
995+
req,
996+
WithAuthContext(clientCfg.auth || auth),
997+
(
998+
err: ServiceError | null,
999+
response: GetAssistantPhoneDeploymentResponse | null
1000+
) => {
1001+
if (err) reject(err);
1002+
else resolve(response!);
1003+
}
1004+
);
1005+
});
1006+
}
1007+
1008+
export function CreateAssistantAuthentication(
1009+
clientCfg: ConnectionConfig,
1010+
req: CreateAssistantAuthenticationRequest,
1011+
auth?: ClientAuthInfo | UserAuthInfo
1012+
): Promise<GetAssistantAuthenticationResponse> {
1013+
return new Promise((resolve, reject) => {
1014+
clientCfg.assistantClient.createAssistantAuthentication(
1015+
req,
1016+
WithAuthContext(clientCfg.auth || auth),
1017+
(
1018+
err: ServiceError | null,
1019+
response: GetAssistantAuthenticationResponse | null
1020+
) => {
1021+
if (err) reject(err);
1022+
else resolve(response!);
1023+
}
1024+
);
1025+
});
1026+
}
1027+
1028+
export function GetAssistantAuthentication(
1029+
clientCfg: ConnectionConfig,
1030+
req: GetAssistantAuthenticationRequest,
1031+
auth?: ClientAuthInfo | UserAuthInfo
1032+
): Promise<GetAssistantAuthenticationResponse> {
1033+
return new Promise((resolve, reject) => {
1034+
clientCfg.assistantClient.getAssistantAuthentication(
1035+
req,
1036+
WithAuthContext(clientCfg.auth || auth),
1037+
(
1038+
err: ServiceError | null,
1039+
response: GetAssistantAuthenticationResponse | null
1040+
) => {
1041+
if (err) reject(err);
1042+
else resolve(response!);
1043+
}
1044+
);
1045+
});
1046+
}
1047+
1048+
export function DisableAssistantAuthentication(
1049+
clientCfg: ConnectionConfig,
1050+
req: DisableAssistantAuthenticationRequest,
1051+
auth?: ClientAuthInfo | UserAuthInfo
1052+
): Promise<GetAssistantAuthenticationResponse> {
1053+
return new Promise((resolve, reject) => {
1054+
clientCfg.assistantClient.disableAssistantAuthentication(
1055+
req,
1056+
WithAuthContext(clientCfg.auth || auth),
1057+
(
1058+
err: ServiceError | null,
1059+
response: GetAssistantAuthenticationResponse | null
1060+
) => {
1061+
if (err) reject(err);
1062+
else resolve(response!);
1063+
}
1064+
);
1065+
});
1066+
}
1067+
7981068
export function GetAllAssistantWebhook(
7991069
connectionConfig: ConnectionConfig,
8001070
assistantId: string,

src/clients/protos/agentkit_pb.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@
1313

1414
var jspb = require('google-protobuf');
1515
var goog = jspb;
16-
var global = (function() {
17-
if (this) { return this; }
18-
if (typeof window !== 'undefined') { return window; }
19-
if (typeof global !== 'undefined') { return global; }
20-
if (typeof self !== 'undefined') { return self; }
21-
return Function('return this')();
22-
}.call(null));
16+
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
2317

2418
var common_pb = require('./common_pb.js');
2519
goog.object.extend(proto, common_pb);

src/clients/protos/artifacts

src/clients/protos/assistant-analysis_pb.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@
1313

1414
var jspb = require('google-protobuf');
1515
var goog = jspb;
16-
var global = (function() {
17-
if (this) { return this; }
18-
if (typeof window !== 'undefined') { return window; }
19-
if (typeof global !== 'undefined') { return global; }
20-
if (typeof self !== 'undefined') { return self; }
21-
return Function('return this')();
22-
}.call(null));
16+
var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
2317

2418
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
2519
goog.object.extend(proto, google_protobuf_timestamp_pb);

0 commit comments

Comments
 (0)