PATCH | /portal/system-settings |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
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,
Assistant,
}
enum UIHints
{
None,
LargeText,
InlineForm,
Password,
InlineStruct,
}
class DataType implements IConvertible
{
String? typeName;
List<DataField>? fields;
DataType({this.typeName,this.fields});
DataType.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
typeName = json['typeName'];
fields = JsonConverters.fromJson(json['fields'],'List<DataField>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'typeName': typeName,
'fields': JsonConverters.toJson(fields,'List<DataField>',context!)
};
getTypeName() => "DataType";
TypeContext? context = _ctx;
}
class Struct extends Map<String,Value?> implements IConvertible
{
Struct();
Struct.fromJson(Map<String, dynamic> json) : super.fromJson(json);
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
return this;
}
Map<String, dynamic> toJson() => super.toJson();
getTypeName() => "Struct";
TypeContext? context = _ctx;
}
class Value implements IConvertible
{
bool? boolValue;
String? stringValue;
double? numberValue;
List<Struct>? listValue;
Struct? structValue;
Value({this.boolValue,this.stringValue,this.numberValue,this.listValue,this.structValue});
Value.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
boolValue = json['boolValue'];
stringValue = json['stringValue'];
numberValue = JsonConverters.toDouble(json['numberValue']);
listValue = JsonConverters.fromJson(json['listValue'],'List<Struct>',context!);
structValue = JsonConverters.fromJson(json['structValue'],'Struct',context!);
return this;
}
Map<String, dynamic> toJson() => {
'boolValue': boolValue,
'stringValue': stringValue,
'numberValue': numberValue,
'listValue': JsonConverters.toJson(listValue,'List<Struct>',context!),
'structValue': JsonConverters.toJson(structValue,'Struct',context!)
};
getTypeName() => "Value";
TypeContext? context = _ctx;
}
enum DataFieldUniqueness
{
NotUnique,
Unique,
UniqueToCustomer,
}
enum UserDataFieldModes
{
Hidden,
ReadOnly,
ReadWrite,
}
class DataField implements IConvertible
{
String? id;
String? name;
ValueTypes? type;
UIHints? uiHint;
String? uiTab;
bool? isAsync;
bool? disableBinding;
DataType? structType;
DataType? listType;
String? description;
List<String>? possibleValues;
bool? isOutput;
String? customFieldValuesUrl;
Value? defaultValue;
String? transitionNameFormat;
DataFieldUniqueness? uniqueness;
bool? voiceOnly;
String? conditionalVisibilityField;
String? conditionalVisibilityValue;
bool? noEvalTemplate;
UserDataFieldModes? userMode;
bool? anyValueType;
DataField({this.id,this.name,this.type,this.uiHint,this.uiTab,this.isAsync,this.disableBinding,this.structType,this.listType,this.description,this.possibleValues,this.isOutput,this.customFieldValuesUrl,this.defaultValue,this.transitionNameFormat,this.uniqueness,this.voiceOnly,this.conditionalVisibilityField,this.conditionalVisibilityValue,this.noEvalTemplate,this.userMode,this.anyValueType});
DataField.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
type = JsonConverters.fromJson(json['type'],'ValueTypes',context!);
uiHint = JsonConverters.fromJson(json['uiHint'],'UIHints',context!);
uiTab = json['uiTab'];
isAsync = json['isAsync'];
disableBinding = json['disableBinding'];
structType = JsonConverters.fromJson(json['structType'],'DataType',context!);
listType = JsonConverters.fromJson(json['listType'],'DataType',context!);
description = json['description'];
possibleValues = JsonConverters.fromJson(json['possibleValues'],'List<String>',context!);
isOutput = json['isOutput'];
customFieldValuesUrl = json['customFieldValuesUrl'];
defaultValue = JsonConverters.fromJson(json['defaultValue'],'Value',context!);
transitionNameFormat = json['transitionNameFormat'];
uniqueness = JsonConverters.fromJson(json['uniqueness'],'DataFieldUniqueness',context!);
voiceOnly = json['voiceOnly'];
conditionalVisibilityField = json['conditionalVisibilityField'];
conditionalVisibilityValue = json['conditionalVisibilityValue'];
noEvalTemplate = json['noEvalTemplate'];
userMode = JsonConverters.fromJson(json['userMode'],'UserDataFieldModes',context!);
anyValueType = json['anyValueType'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'type': JsonConverters.toJson(type,'ValueTypes',context!),
'uiHint': JsonConverters.toJson(uiHint,'UIHints',context!),
'uiTab': uiTab,
'isAsync': isAsync,
'disableBinding': disableBinding,
'structType': JsonConverters.toJson(structType,'DataType',context!),
'listType': JsonConverters.toJson(listType,'DataType',context!),
'description': description,
'possibleValues': JsonConverters.toJson(possibleValues,'List<String>',context!),
'isOutput': isOutput,
'customFieldValuesUrl': customFieldValuesUrl,
'defaultValue': JsonConverters.toJson(defaultValue,'Value',context!),
'transitionNameFormat': transitionNameFormat,
'uniqueness': JsonConverters.toJson(uniqueness,'DataFieldUniqueness',context!),
'voiceOnly': voiceOnly,
'conditionalVisibilityField': conditionalVisibilityField,
'conditionalVisibilityValue': conditionalVisibilityValue,
'noEvalTemplate': noEvalTemplate,
'userMode': JsonConverters.toJson(userMode,'UserDataFieldModes',context!),
'anyValueType': anyValueType
};
getTypeName() => "DataField";
TypeContext? context = _ctx;
}
enum EndpointTypes
{
PhoneNumber,
User,
FaxNumber,
EmailAddress,
Unused_1,
Unused_2,
Unused_3,
Unused_4,
Unused_5,
Team,
Assistant,
}
class EndpointDataField extends DataField implements IConvertible
{
bool? showInSearch;
bool? showInLists;
EndpointTypes? endpointType;
bool? isCallerId;
bool? isKnob;
EndpointDataField({this.showInSearch,this.showInLists,this.endpointType,this.isCallerId,this.isKnob});
EndpointDataField.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
showInSearch = json['showInSearch'];
showInLists = json['showInLists'];
endpointType = JsonConverters.fromJson(json['endpointType'],'EndpointTypes',context!);
isCallerId = json['isCallerId'];
isKnob = json['isKnob'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'showInSearch': showInSearch,
'showInLists': showInLists,
'endpointType': JsonConverters.toJson(endpointType,'EndpointTypes',context!),
'isCallerId': isCallerId,
'isKnob': isKnob
});
getTypeName() => "EndpointDataField";
TypeContext? context = _ctx;
}
class AppSystemSettingsInfo implements IConvertible
{
List<EndpointDataField>? endpointFields;
/**
* Is this customer a HostedSuite customer?
*/
// @ApiMember(Description="Is this customer a HostedSuite customer?")
bool? isHostedSuiteCustomer;
/**
* The customer's time zone
*/
// @ApiMember(Description="The customer's time zone")
String? customerTimeZoneId;
AppSystemSettingsInfo({this.endpointFields,this.isHostedSuiteCustomer,this.customerTimeZoneId});
AppSystemSettingsInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
endpointFields = JsonConverters.fromJson(json['endpointFields'],'List<EndpointDataField>',context!);
isHostedSuiteCustomer = json['isHostedSuiteCustomer'];
customerTimeZoneId = json['customerTimeZoneId'];
return this;
}
Map<String, dynamic> toJson() => {
'endpointFields': JsonConverters.toJson(endpointFields,'List<EndpointDataField>',context!),
'isHostedSuiteCustomer': isHostedSuiteCustomer,
'customerTimeZoneId': customerTimeZoneId
};
getTypeName() => "AppSystemSettingsInfo";
TypeContext? context = _ctx;
}
class AppUpdateSystemSettings implements IConvertible
{
String? accountId;
String? customerId;
String? customerTimeZoneId;
AppUpdateSystemSettings({this.accountId,this.customerId,this.customerTimeZoneId});
AppUpdateSystemSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
accountId = json['accountId'];
customerId = json['customerId'];
customerTimeZoneId = json['customerTimeZoneId'];
return this;
}
Map<String, dynamic> toJson() => {
'accountId': accountId,
'customerId': customerId,
'customerTimeZoneId': customerTimeZoneId
};
getTypeName() => "AppUpdateSystemSettings";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: <String, TypeInfo> {
'ValueTypes': TypeInfo(TypeOf.Enum, enumValues:ValueTypes.values),
'UIHints': TypeInfo(TypeOf.Enum, enumValues:UIHints.values),
'DataType': TypeInfo(TypeOf.Class, create:() => DataType()),
'List<DataField>': TypeInfo(TypeOf.Class, create:() => <DataField>[]),
'DataField': TypeInfo(TypeOf.Class, create:() => DataField()),
'Struct': TypeInfo(TypeOf.Class, create:() => Struct()),
'Value': TypeInfo(TypeOf.Class, create:() => Value()),
'List<Struct>': TypeInfo(TypeOf.Class, create:() => <Struct>[]),
'DataFieldUniqueness': TypeInfo(TypeOf.Enum, enumValues:DataFieldUniqueness.values),
'UserDataFieldModes': TypeInfo(TypeOf.Enum, enumValues:UserDataFieldModes.values),
'EndpointTypes': TypeInfo(TypeOf.Enum, enumValues:EndpointTypes.values),
'EndpointDataField': TypeInfo(TypeOf.Class, create:() => EndpointDataField()),
'AppSystemSettingsInfo': TypeInfo(TypeOf.Class, create:() => AppSystemSettingsInfo()),
'List<EndpointDataField>': TypeInfo(TypeOf.Class, create:() => <EndpointDataField>[]),
'AppUpdateSystemSettings': TypeInfo(TypeOf.Class, create:() => AppUpdateSystemSettings()),
});
Dart AppUpdateSystemSettings DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /portal/system-settings HTTP/1.1
Host: team.evovoice.io
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"accountId":"String","customerId":"String","customerTimeZoneId":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"endpointFields":[{"showInSearch":false,"showInLists":false,"endpointType":"PhoneNumber","isCallerId":false,"isKnob":false,"id":"String","name":"String","type":"NotSpecified","uiHint":"None","uiTab":"String","isAsync":false,"disableBinding":false,"description":"String","possibleValues":["String"],"isOutput":false,"customFieldValuesUrl":"String","defaultValue":{"boolValue":false,"stringValue":"String","numberValue":0,"listValue":[null]},"transitionNameFormat":"String","uniqueness":"NotUnique","voiceOnly":false,"conditionalVisibilityField":"String","conditionalVisibilityValue":"String","noEvalTemplate":false,"userMode":"Hidden","anyValueType":false}],"isHostedSuiteCustomer":false,"customerTimeZoneId":"String"}