olos_sdk 1.0.6 copy "olos_sdk: ^1.0.6" to clipboard
olos_sdk: ^1.0.6 copied to clipboard

unlisted

Designed for Dart apps, this middleware links with Olos API. Beyond standard connections, it enables WebSocket for seamless event reception via Olos Easy Connection.

example/olos_sdk_example.dart

import 'dart:developer';

import 'package:olos_sdk/main.dart';
import 'package:olos_sdk/src/Types/common_types.dart';

/// This is the main function of the Olos SDK example.
/// It initializes the Olos SDK with the provided configuration,
/// creates an instance of OlosAgentWS, and performs agent authentication.
void main() {
  // The server URL
  String server = 'http://10.15.10.38';

  // Create an instance of Olos
  Olos olos = Olos();

  AuthorizationCognito cognitoAuth = AuthorizationCognito()
    ..token = TokenType()
    ..token.tokenType = "Bearer";

  // Configure the Olos SDK
  OlosConfig olosConfig = OlosConfig(
    addrs: {
      "wsAgentCmd": '$server/WebAPIAgentControl_Token/AgentCommand/',
      "wsAgentEvt": '$server/WebAPIAgentControl_Token/AgentEvent/',
      "WsAgentCloud": '$server/WebAPIAgentControl_Token/CloudAgent/',
      "wsMailingCmd": '$server/WebAPIMailingControl_Token/MailingCommand/',
      "wsAgentConfig": '$server/WebAPIConfiguration_Token/AgentConfig/',
      "wsVoiceSupport":
          '$server/WsVoiceSupportIntegration/WsVoiceSupportIntegration.asmx',
      "WebAPIAgentControl": '$server/WebAPIAgentControl_Token/',
      "wsSoftphone": '$server/WebAPISoftphone_Token/Softphone/',
      "wsMcx": '$server/WsMcx_Token/wsmcx/Mcx/',
      "wsRecordingRetrieve":
          '$server/WebApiRecordingRetrieve_Token/RecordTextComm/',
    },
    logs: true,
  );

  olos.createOlos(olosConfig, server, cognitoAuth);

  OlosAgentWS ws = OlosAgentWS();
  ws.agentAuthentication('agente1', 'olos', displayAgentID);
}

void displayAgentID(String agentID) => log('Agent ID: $agentID');
1
likes
0
points
75
downloads

Publisher

unverified uploader

Weekly Downloads

Designed for Dart apps, this middleware links with Olos API. Beyond standard connections, it enables WebSocket for seamless event reception via Olos Easy Connection.

Homepage

License

unknown (license)

Dependencies

curl_logger_dio_interceptor, dio, js, json_serializable, jwt_decoder, mockito, phoenix_wings, short_uuids, test

More

Packages that depend on olos_sdk