Evo Voice

<back to all web services

ListAutoCompleteValues

Requires Authentication
The following routes are available for this service:
All Verbs/ui/autocomplete/values
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class AutoCompleteValue implements IConvertible
{
    /**
    * Display name
    */
    // @ApiMember(Description="Display name")
    String? displayName;

    /**
    * Value
    */
    // @ApiMember(Description="Value")
    String? value;

    AutoCompleteValue({this.displayName,this.value});
    AutoCompleteValue.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        displayName = json['displayName'];
        value = json['value'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'displayName': displayName,
        'value': value
    };

    getTypeName() => "AutoCompleteValue";
    TypeContext? context = _ctx;
}

class ListAutoCompleteValuesResponse implements IConvertible
{
    List<AutoCompleteValue>? values;

    ListAutoCompleteValuesResponse({this.values});
    ListAutoCompleteValuesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        values = JsonConverters.fromJson(json['values'],'List<AutoCompleteValue>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'values': JsonConverters.toJson(values,'List<AutoCompleteValue>',context!)
    };

    getTypeName() => "ListAutoCompleteValuesResponse";
    TypeContext? context = _ctx;
}

enum ValueTypes
{
    NotSpecified,
    String,
    Boolean,
    Number,
    List,
    Struct,
    Transition,
    Custom,
    Date,
    AudioFile,
    TimeZoneId,
    PhoneNumber,
    User,
    Endpoint,
    Time,
    File,
    FaxNumber,
    EmailAccount,
    Customer,
    Flow,
    Team,
    FlowReference,
    Integration,
}

class ListAutoCompleteValues implements IConvertible
{
    /**
    * Account ID
    */
    // @ApiMember(Description="Account ID")
    String? accountId;

    /**
    * Filter by customer ID
    */
    // @ApiMember(Description="Filter by customer ID")
    String? customerId;

    /**
    * The type of value
    */
    // @ApiMember(Description="The type of value")
    ValueTypes? type;

    /**
    * The query text to search for
    */
    // @ApiMember(Description="The query text to search for")
    String? query;

    /**
    * Type specific filter
    */
    // @ApiMember(Description="Type specific filter")
    String? typeSpecificFilter;

    /**
    * The value to search for (will only return one result)
    */
    // @ApiMember(Description="The value to search for (will only return one result)")
    String? value;

    /**
    * Should the results be sent back in plain text or with embedded HTML?
    */
    // @ApiMember(Description="Should the results be sent back in plain text or with embedded HTML?")
    bool? plainText;

    /**
    * Include full info?
    */
    // @ApiMember(Description="Include full info?")
    bool? fullInfo;

    /**
    * List all values, only use for small lists.
    */
    // @ApiMember(Description="List all values, only use for small lists.")
    bool? all;

    ListAutoCompleteValues({this.accountId,this.customerId,this.type,this.query,this.typeSpecificFilter,this.value,this.plainText,this.fullInfo,this.all});
    ListAutoCompleteValues.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accountId = json['accountId'];
        customerId = json['customerId'];
        type = JsonConverters.fromJson(json['type'],'ValueTypes',context!);
        query = json['query'];
        typeSpecificFilter = json['typeSpecificFilter'];
        value = json['value'];
        plainText = json['plainText'];
        fullInfo = json['fullInfo'];
        all = json['all'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'accountId': accountId,
        'customerId': customerId,
        'type': JsonConverters.toJson(type,'ValueTypes',context!),
        'query': query,
        'typeSpecificFilter': typeSpecificFilter,
        'value': value,
        'plainText': plainText,
        'fullInfo': fullInfo,
        'all': all
    };

    getTypeName() => "ListAutoCompleteValues";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'AutoCompleteValue': TypeInfo(TypeOf.Class, create:() => AutoCompleteValue()),
    'ListAutoCompleteValuesResponse': TypeInfo(TypeOf.Class, create:() => ListAutoCompleteValuesResponse()),
    'List<AutoCompleteValue>': TypeInfo(TypeOf.Class, create:() => <AutoCompleteValue>[]),
    'ValueTypes': TypeInfo(TypeOf.Enum, enumValues:ValueTypes.values),
    'ListAutoCompleteValues': TypeInfo(TypeOf.Class, create:() => ListAutoCompleteValues()),
});

Dart ListAutoCompleteValues DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /ui/autocomplete/values HTTP/1.1 
Host: evovoice.io 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	accountId: String,
	customerId: String,
	type: NotSpecified,
	query: String,
	typeSpecificFilter: String,
	value: String,
	plainText: False,
	fullInfo: False,
	all: False
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	values: 
	[
		{
			displayName: String,
			value: String
		}
	]
}