Requires any of the roles: | SystemAdministrator, Manager, Customer |
GET | /flows |
---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
enum SortOrders
{
Ascend,
Descend,
}
abstract class ListRequest<T> implements IGet
{
/**
* The page of data to retrieve
*/
// @ApiMember(Description="The page of data to retrieve")
int? page;
/**
* If you want all objects to be returned. This should be used with care
*/
// @ApiMember(Description="If you want all objects to be returned. This should be used with care")
bool? all;
/**
* The number per page to retrieve
*/
// @ApiMember(Description="The number per page to retrieve")
int? countPerPage;
/**
* Specific IDs
*/
// @ApiMember(Description="Specific IDs")
List<String>? specificIds;
/**
* Specify a sort field
*/
// @ApiMember(Description="Specify a sort field")
String? sortField;
/**
* Specify a sort order
*/
// @ApiMember(Description="Specify a sort order")
SortOrders? sortOrder;
/**
* Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array
*/
// @ApiMember(Description="Disables total / page counts - improves performance. Returns only data. If there is no more data, Items will be empty array")
bool? simplifiedPaging;
ListRequest({this.page,this.all,this.countPerPage,this.specificIds,this.sortField,this.sortOrder,this.simplifiedPaging});
ListRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
page = json['page'];
all = json['all'];
countPerPage = json['countPerPage'];
specificIds = JsonConverters.fromJson(json['specificIds'],'List<String>',context!);
sortField = json['sortField'];
sortOrder = JsonConverters.fromJson(json['sortOrder'],'SortOrders',context!);
simplifiedPaging = json['simplifiedPaging'];
return this;
}
Map<String, dynamic> toJson() => {
'page': page,
'all': all,
'countPerPage': countPerPage,
'specificIds': JsonConverters.toJson(specificIds,'List<String>',context!),
'sortField': sortField,
'sortOrder': JsonConverters.toJson(sortOrder,'SortOrders',context!),
'simplifiedPaging': simplifiedPaging
};
getTypeName() => "ListRequest<$T>";
TypeContext? context = _ctx;
}
abstract class EntityInfo
{
/**
* The ID of the object
*/
// @ApiMember(Description="The ID of the object")
String? id;
/**
* The date the object was created
*/
// @ApiMember(Description="The date the object was created")
String? dateCreated;
/**
* The date the object was last modified
*/
// @ApiMember(Description="The date the object was last modified")
String? dateLastModified;
/**
* The user that created this object
*/
// @ApiMember(Description="The user that created this object")
String? createdBy;
/**
* The user that last modified this object
*/
// @ApiMember(Description="The user that last modified this object")
String? lastModifiedBy;
EntityInfo({this.id,this.dateCreated,this.dateLastModified,this.createdBy,this.lastModifiedBy});
EntityInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
dateCreated = json['dateCreated'];
dateLastModified = json['dateLastModified'];
createdBy = json['createdBy'];
lastModifiedBy = json['lastModifiedBy'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'dateCreated': dateCreated,
'dateLastModified': dateLastModified,
'createdBy': createdBy,
'lastModifiedBy': lastModifiedBy
};
getTypeName() => "EntityInfo";
TypeContext? context = _ctx;
}
enum FlowRoles
{
UI,
Reference,
PhoneNumberRouting,
UserDialOut,
FaxNumberRouting,
}
class CustomerBreadcrumb implements IConvertible
{
String? id;
String? name;
CustomerBreadcrumb({this.id,this.name});
CustomerBreadcrumb.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name
};
getTypeName() => "CustomerBreadcrumb";
TypeContext? context = _ctx;
}
enum FlowNodeCategories
{
General,
Voice,
Logic,
DateAndTime,
Audio,
Messaging,
Assistant,
Flows,
Fax,
Network,
Cookies,
CallCenter,
Intelligence,
}
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 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;
}
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;
}
enum FlowChannels
{
Voice,
Chat,
Fax,
}
class FlowNodeSpec implements IConvertible
{
/**
* The name of this node
*/
// @ApiMember(Description="The name of this node")
String? name;
/**
* A description of this node
*/
// @ApiMember(Description="A description of this node")
String? description;
/**
* Icon class for this node (FontAwesome)
*/
// @ApiMember(Description="Icon class for this node (FontAwesome)")
String? iconClass;
/**
* The type name for this node
*/
// @ApiMember(Description="The type name for this node")
String? typeName;
/**
* The category this node should be grouped under
*/
// @ApiMember(Description="The category this node should be grouped under")
FlowNodeCategories? category;
/**
* The URL where this node is located
*/
// @ApiMember(Description="The URL where this node is located")
String? url;
/**
* The data type for this node
*/
// @ApiMember(Description="The data type for this node")
DataType? dataType;
/**
* URL for documentation for this node
*/
// @ApiMember(Description="URL for documentation for this node")
String? documentationUrl;
/**
* The channels that this node is restricted to
*/
// @ApiMember(Description="The channels that this node is restricted to")
List<FlowChannels>? restrictToChannels;
FlowNodeSpec({this.name,this.description,this.iconClass,this.typeName,this.category,this.url,this.dataType,this.documentationUrl,this.restrictToChannels});
FlowNodeSpec.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
name = json['name'];
description = json['description'];
iconClass = json['iconClass'];
typeName = json['typeName'];
category = JsonConverters.fromJson(json['category'],'FlowNodeCategories',context!);
url = json['url'];
dataType = JsonConverters.fromJson(json['dataType'],'DataType',context!);
documentationUrl = json['documentationUrl'];
restrictToChannels = JsonConverters.fromJson(json['restrictToChannels'],'List<FlowChannels>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'name': name,
'description': description,
'iconClass': iconClass,
'typeName': typeName,
'category': JsonConverters.toJson(category,'FlowNodeCategories',context!),
'url': url,
'dataType': JsonConverters.toJson(dataType,'DataType',context!),
'documentationUrl': documentationUrl,
'restrictToChannels': JsonConverters.toJson(restrictToChannels,'List<FlowChannels>',context!)
};
getTypeName() => "FlowNodeSpec";
TypeContext? context = _ctx;
}
class FlowNodeUI implements IConvertible
{
/**
* The X position of the node
*/
// @ApiMember(Description="The X position of the node")
double? x;
/**
* The Y position of the node
*/
// @ApiMember(Description="The Y position of the node")
double? y;
/**
* Notes for this node
*/
// @ApiMember(Description="Notes for this node")
String? notes;
FlowNodeUI({this.x,this.y,this.notes});
FlowNodeUI.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
x = JsonConverters.toDouble(json['x']);
y = JsonConverters.toDouble(json['y']);
notes = json['notes'];
return this;
}
Map<String, dynamic> toJson() => {
'x': x,
'y': y,
'notes': notes
};
getTypeName() => "FlowNodeUI";
TypeContext? context = _ctx;
}
enum ValueSources
{
Value,
Flow,
System,
Customer,
Session,
Endpoint,
Expression,
User,
}
class NodeParameter implements IConvertible
{
String? id;
ValueTypes? type;
ValueSources? source;
bool? isAsync;
String? referenceId;
Value? value;
bool? noEvalTemplate;
List<NodeParameterMap>? listParameters;
NodeParameterMap? structParameters;
bool? isOutput;
String? expression;
DataType? listType;
NodeParameter({this.id,this.type,this.source,this.isAsync,this.referenceId,this.value,this.noEvalTemplate,this.listParameters,this.structParameters,this.isOutput,this.expression,this.listType});
NodeParameter.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
type = JsonConverters.fromJson(json['type'],'ValueTypes',context!);
source = JsonConverters.fromJson(json['source'],'ValueSources',context!);
isAsync = json['isAsync'];
referenceId = json['referenceId'];
value = JsonConverters.fromJson(json['value'],'Value',context!);
noEvalTemplate = json['noEvalTemplate'];
listParameters = JsonConverters.fromJson(json['listParameters'],'List<NodeParameterMap>',context!);
structParameters = JsonConverters.fromJson(json['structParameters'],'NodeParameterMap',context!);
isOutput = json['isOutput'];
expression = json['expression'];
listType = JsonConverters.fromJson(json['listType'],'DataType',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'type': JsonConverters.toJson(type,'ValueTypes',context!),
'source': JsonConverters.toJson(source,'ValueSources',context!),
'isAsync': isAsync,
'referenceId': referenceId,
'value': JsonConverters.toJson(value,'Value',context!),
'noEvalTemplate': noEvalTemplate,
'listParameters': JsonConverters.toJson(listParameters,'List<NodeParameterMap>',context!),
'structParameters': JsonConverters.toJson(structParameters,'NodeParameterMap',context!),
'isOutput': isOutput,
'expression': expression,
'listType': JsonConverters.toJson(listType,'DataType',context!)
};
getTypeName() => "NodeParameter";
TypeContext? context = _ctx;
}
class NodeParameterMap extends Map<String,NodeParameter?> implements IConvertible
{
NodeParameterMap();
NodeParameterMap.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() => "NodeParameterMap";
TypeContext? context = _ctx;
}
class FlowNode implements IConvertible
{
/**
* The ID of this node. Must be unique within the flow but can be anything
*/
// @ApiMember(Description="The ID of this node. Must be unique within the flow but can be anything")
String? id;
/**
* Is this the starting node for the flow. Only one node can have this set
*/
// @ApiMember(Description="Is this the starting node for the flow. Only one node can have this set")
bool? isStartNode;
/**
* The name of the node, descriptive to be used as a reminder in the GUI
*/
// @ApiMember(Description="The name of the node, descriptive to be used as a reminder in the GUI")
String? name;
/**
* The specification for the node
*/
// @ApiMember(Description="The specification for the node")
FlowNodeSpec? spec;
/**
* The UI data for the node
*/
// @ApiMember(Description="The UI data for the node")
FlowNodeUI? ui;
/**
* The data for this node. These will be POST'd to the endpoint when it is called.
*/
// @ApiMember(Description="The data for this node. These will be POST'd to the endpoint when it is called.")
NodeParameterMap? parameters;
FlowNode({this.id,this.isStartNode,this.name,this.spec,this.ui,this.parameters});
FlowNode.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
isStartNode = json['isStartNode'];
name = json['name'];
spec = JsonConverters.fromJson(json['spec'],'FlowNodeSpec',context!);
ui = JsonConverters.fromJson(json['ui'],'FlowNodeUI',context!);
parameters = JsonConverters.fromJson(json['parameters'],'NodeParameterMap',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'isStartNode': isStartNode,
'name': name,
'spec': JsonConverters.toJson(spec,'FlowNodeSpec',context!),
'ui': JsonConverters.toJson(ui,'FlowNodeUI',context!),
'parameters': JsonConverters.toJson(parameters,'NodeParameterMap',context!)
};
getTypeName() => "FlowNode";
TypeContext? context = _ctx;
}
class FlowParameter extends DataField implements IConvertible
{
bool? isPublic;
bool? isKnob;
FlowParameter({this.isPublic,this.isKnob});
FlowParameter.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
isPublic = json['isPublic'];
isKnob = json['isKnob'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'isPublic': isPublic,
'isKnob': isKnob
});
getTypeName() => "FlowParameter";
TypeContext? context = _ctx;
}
class FlowExit implements IConvertible
{
/**
* The unique ID for this exit
*/
// @ApiMember(Description="The unique ID for this exit")
String? id;
/**
* The name of this exit
*/
// @ApiMember(Description="The name of this exit")
String? name;
/**
* The UI for the exit
*/
// @ApiMember(Description="The UI for the exit")
FlowNodeUI? ui;
FlowExit({this.id,this.name,this.ui});
FlowExit.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
ui = JsonConverters.fromJson(json['ui'],'FlowNodeUI',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'ui': JsonConverters.toJson(ui,'FlowNodeUI',context!)
};
getTypeName() => "FlowExit";
TypeContext? context = _ctx;
}
class FlowUI implements IConvertible
{
String? selectedNode;
double? canvasX;
double? canvasY;
double? canvasZoom;
FlowUI({this.selectedNode,this.canvasX,this.canvasY,this.canvasZoom});
FlowUI.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
selectedNode = json['selectedNode'];
canvasX = JsonConverters.toDouble(json['canvasX']);
canvasY = JsonConverters.toDouble(json['canvasY']);
canvasZoom = JsonConverters.toDouble(json['canvasZoom']);
return this;
}
Map<String, dynamic> toJson() => {
'selectedNode': selectedNode,
'canvasX': canvasX,
'canvasY': canvasY,
'canvasZoom': canvasZoom
};
getTypeName() => "FlowUI";
TypeContext? context = _ctx;
}
enum TagColors
{
Magenta,
Red,
Volcano,
Orange,
Gold,
Lime,
Green,
Cyan,
Blue,
GeekBlue,
Purple,
}
class Tag implements IConvertible
{
String? id;
String? name;
TagColors? color;
Tag({this.id,this.name,this.color});
Tag.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
color = JsonConverters.fromJson(json['color'],'TagColors',context!);
return this;
}
Map<String, dynamic> toJson() => {
'id': id,
'name': name,
'color': JsonConverters.toJson(color,'TagColors',context!)
};
getTypeName() => "Tag";
TypeContext? context = _ctx;
}
class FlowInfo extends EntityInfo implements IConvertible
{
/**
* The name of this flow
*/
// @ApiMember(Description="The name of this flow")
String? name;
/**
* The roles that this flow has
*/
// @ApiMember(Description="The roles that this flow has")
List<FlowRoles>? roles;
/**
* What this flow does
*/
// @ApiMember(Description="What this flow does")
String? description;
/**
* Any notes for this flow
*/
// @ApiMember(Description="Any notes for this flow")
String? notes;
/**
* The ID of the account associated with the flow
*/
// @ApiMember(Description="The ID of the account associated with the flow")
String? accountId;
/**
* The name of the account associated with the flow
*/
// @ApiMember(Description="The name of the account associated with the flow")
String? accountName;
/**
* The ID of the customer this flow is associated with
*/
// @ApiMember(Description="The ID of the customer this flow is associated with")
String? customerId;
/**
* The name of the customer this flow is associated with
*/
// @ApiMember(Description="The name of the customer this flow is associated with")
String? customerName;
/**
* The breadcrumb to the flow for this endpoint
*/
// @ApiMember(Description="The breadcrumb to the flow for this endpoint")
List<CustomerBreadcrumb>? customerBreadcrumb;
/**
* The nodes in this flow
*/
// @ApiMember(Description="The nodes in this flow")
List<FlowNode>? nodes;
/**
* The flow's parameters
*/
// @ApiMember(Description="The flow's parameters")
List<FlowParameter>? parameters;
/**
* The flow's exits
*/
// @ApiMember(Description="The flow's exits")
List<FlowExit>? exits;
/**
* The UI data for the flow
*/
// @ApiMember(Description="The UI data for the flow")
FlowUI? ui;
/**
* The list of tags for this flow
*/
// @ApiMember(Description="The list of tags for this flow")
List<Tag>? tags;
/**
* The number of nodes in this flow
*/
// @ApiMember(Description="The number of nodes in this flow")
int? nodeCount;
FlowInfo({this.name,this.roles,this.description,this.notes,this.accountId,this.accountName,this.customerId,this.customerName,this.customerBreadcrumb,this.nodes,this.parameters,this.exits,this.ui,this.tags,this.nodeCount});
FlowInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
name = json['name'];
roles = JsonConverters.fromJson(json['roles'],'List<FlowRoles>',context!);
description = json['description'];
notes = json['notes'];
accountId = json['accountId'];
accountName = json['accountName'];
customerId = json['customerId'];
customerName = json['customerName'];
customerBreadcrumb = JsonConverters.fromJson(json['customerBreadcrumb'],'List<CustomerBreadcrumb>',context!);
nodes = JsonConverters.fromJson(json['nodes'],'List<FlowNode>',context!);
parameters = JsonConverters.fromJson(json['parameters'],'List<FlowParameter>',context!);
exits = JsonConverters.fromJson(json['exits'],'List<FlowExit>',context!);
ui = JsonConverters.fromJson(json['ui'],'FlowUI',context!);
tags = JsonConverters.fromJson(json['tags'],'List<Tag>',context!);
nodeCount = json['nodeCount'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'name': name,
'roles': JsonConverters.toJson(roles,'List<FlowRoles>',context!),
'description': description,
'notes': notes,
'accountId': accountId,
'accountName': accountName,
'customerId': customerId,
'customerName': customerName,
'customerBreadcrumb': JsonConverters.toJson(customerBreadcrumb,'List<CustomerBreadcrumb>',context!),
'nodes': JsonConverters.toJson(nodes,'List<FlowNode>',context!),
'parameters': JsonConverters.toJson(parameters,'List<FlowParameter>',context!),
'exits': JsonConverters.toJson(exits,'List<FlowExit>',context!),
'ui': JsonConverters.toJson(ui,'FlowUI',context!),
'tags': JsonConverters.toJson(tags,'List<Tag>',context!),
'nodeCount': nodeCount
});
getTypeName() => "FlowInfo";
TypeContext? context = _ctx;
}
/**
* Lists all the flows
*/
// @Api(Description="Lists all the flows")
class ListFlows extends ListRequest<FlowInfo> implements IConvertible
{
/**
* Filter by accounts
*/
// @ApiMember(Description="Filter by accounts")
List<String>? accountIds;
/**
* The IDs of the customers whose flows you want to retrieve
*/
// @ApiMember(Description="The IDs of the customers whose flows you want to retrieve")
List<String>? customerIds;
/**
* Filter by name
*/
// @ApiMember(Description="Filter by name")
String? nameFilter;
/**
* The list of tag IDs to filter by (must contain all)
*/
// @ApiMember(Description="The list of tag IDs to filter by (must contain all)")
List<String>? tagIds;
/**
* List flows by specific role
*/
// @ApiMember(Description="List flows by specific role")
FlowRoles? role;
/**
* Exclude nodes
*/
// @ApiMember(Description="Exclude nodes")
bool? includeNodes;
/**
* Node Type Filter
*/
// @ApiMember(Description="Node Type Filter")
String? nodeTypeFilter;
ListFlows({this.accountIds,this.customerIds,this.nameFilter,this.tagIds,this.role,this.includeNodes,this.nodeTypeFilter});
ListFlows.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
accountIds = JsonConverters.fromJson(json['accountIds'],'List<String>',context!);
customerIds = JsonConverters.fromJson(json['customerIds'],'List<String>',context!);
nameFilter = json['nameFilter'];
tagIds = JsonConverters.fromJson(json['tagIds'],'List<String>',context!);
role = JsonConverters.fromJson(json['role'],'FlowRoles',context!);
includeNodes = json['includeNodes'];
nodeTypeFilter = json['nodeTypeFilter'];
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'accountIds': JsonConverters.toJson(accountIds,'List<String>',context!),
'customerIds': JsonConverters.toJson(customerIds,'List<String>',context!),
'nameFilter': nameFilter,
'tagIds': JsonConverters.toJson(tagIds,'List<String>',context!),
'role': JsonConverters.toJson(role,'FlowRoles',context!),
'includeNodes': includeNodes,
'nodeTypeFilter': nodeTypeFilter
});
getTypeName() => "ListFlows";
TypeContext? context = _ctx;
}
class BillingItem implements IConvertible
{
double? baseCost;
double? rawUnitMultiplier;
double? unitCost;
int? allowance;
BillingItem({this.baseCost,this.rawUnitMultiplier,this.unitCost,this.allowance});
BillingItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
baseCost = JsonConverters.toDouble(json['baseCost']);
rawUnitMultiplier = JsonConverters.toDouble(json['rawUnitMultiplier']);
unitCost = JsonConverters.toDouble(json['unitCost']);
allowance = json['allowance'];
return this;
}
Map<String, dynamic> toJson() => {
'baseCost': baseCost,
'rawUnitMultiplier': rawUnitMultiplier,
'unitCost': unitCost,
'allowance': allowance
};
getTypeName() => "BillingItem";
TypeContext? context = _ctx;
}
class BillingSettings implements IConvertible
{
BillingItem? base;
BillingItem? localNumbers;
BillingItem? tollFreeNumbers;
BillingItem? inboundVoiceCalls;
BillingItem? outboundVoiceCalls;
BillingItem? inboundFaxes;
BillingItem? outboundFaxes;
BillingItem? inboundSmsMessages;
BillingItem? outboundSmsMessages;
BillingItem? aiInsights;
BillingItem? aiLiveMinutes;
BillingSettings({this.base,this.localNumbers,this.tollFreeNumbers,this.inboundVoiceCalls,this.outboundVoiceCalls,this.inboundFaxes,this.outboundFaxes,this.inboundSmsMessages,this.outboundSmsMessages,this.aiInsights,this.aiLiveMinutes});
BillingSettings.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
base = JsonConverters.fromJson(json['base'],'BillingItem',context!);
localNumbers = JsonConverters.fromJson(json['localNumbers'],'BillingItem',context!);
tollFreeNumbers = JsonConverters.fromJson(json['tollFreeNumbers'],'BillingItem',context!);
inboundVoiceCalls = JsonConverters.fromJson(json['inboundVoiceCalls'],'BillingItem',context!);
outboundVoiceCalls = JsonConverters.fromJson(json['outboundVoiceCalls'],'BillingItem',context!);
inboundFaxes = JsonConverters.fromJson(json['inboundFaxes'],'BillingItem',context!);
outboundFaxes = JsonConverters.fromJson(json['outboundFaxes'],'BillingItem',context!);
inboundSmsMessages = JsonConverters.fromJson(json['inboundSmsMessages'],'BillingItem',context!);
outboundSmsMessages = JsonConverters.fromJson(json['outboundSmsMessages'],'BillingItem',context!);
aiInsights = JsonConverters.fromJson(json['aiInsights'],'BillingItem',context!);
aiLiveMinutes = JsonConverters.fromJson(json['aiLiveMinutes'],'BillingItem',context!);
return this;
}
Map<String, dynamic> toJson() => {
'base': JsonConverters.toJson(base,'BillingItem',context!),
'localNumbers': JsonConverters.toJson(localNumbers,'BillingItem',context!),
'tollFreeNumbers': JsonConverters.toJson(tollFreeNumbers,'BillingItem',context!),
'inboundVoiceCalls': JsonConverters.toJson(inboundVoiceCalls,'BillingItem',context!),
'outboundVoiceCalls': JsonConverters.toJson(outboundVoiceCalls,'BillingItem',context!),
'inboundFaxes': JsonConverters.toJson(inboundFaxes,'BillingItem',context!),
'outboundFaxes': JsonConverters.toJson(outboundFaxes,'BillingItem',context!),
'inboundSmsMessages': JsonConverters.toJson(inboundSmsMessages,'BillingItem',context!),
'outboundSmsMessages': JsonConverters.toJson(outboundSmsMessages,'BillingItem',context!),
'aiInsights': JsonConverters.toJson(aiInsights,'BillingItem',context!),
'aiLiveMinutes': JsonConverters.toJson(aiLiveMinutes,'BillingItem',context!)
};
getTypeName() => "BillingSettings";
TypeContext? context = _ctx;
}
class AccountInfo extends EntityInfo implements IConvertible
{
/**
* The name of this account
*/
// @ApiMember(Description="The name of this account")
String? name;
/**
* The ID of this account's parent
*/
// @ApiMember(Description="The ID of this account's parent")
String? parentAccountId;
/**
* The twilio account SID
*/
// @ApiMember(Description="The twilio account SID")
String? twilioAccountSid;
/**
* The ancestors of this account. Useful for breadcrumbs
*/
// @ApiMember(Description="The ancestors of this account. Useful for breadcrumbs")
List<String>? ancestorIds;
/**
* The max number of phone numbers this account can have
*/
// @ApiMember(Description="The max number of phone numbers this account can have")
int? maxPhoneNumbers;
/**
* This account is BYOA
*/
// @ApiMember(Description="This account is BYOA")
bool? isBYOA;
/**
* TrustHub Profile Sid
*/
// @ApiMember(Description="TrustHub Profile Sid")
String? trustHubProfileSid;
/**
* The ID of the logo file
*/
// @ApiMember(Description="The ID of the logo file")
String? logoId;
/**
* The URI of the logo file
*/
// @ApiMember(Description="The URI of the logo file")
String? logoUri;
/**
* The billing settings for this account
*/
// @ApiMember(Description="The billing settings for this account")
BillingSettings? billingSettings;
AccountInfo({this.name,this.parentAccountId,this.twilioAccountSid,this.ancestorIds,this.maxPhoneNumbers,this.isBYOA,this.trustHubProfileSid,this.logoId,this.logoUri,this.billingSettings});
AccountInfo.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
super.fromMap(json);
name = json['name'];
parentAccountId = json['parentAccountId'];
twilioAccountSid = json['twilioAccountSid'];
ancestorIds = JsonConverters.fromJson(json['ancestorIds'],'List<String>',context!);
maxPhoneNumbers = json['maxPhoneNumbers'];
isBYOA = json['isBYOA'];
trustHubProfileSid = json['trustHubProfileSid'];
logoId = json['logoId'];
logoUri = json['logoUri'];
billingSettings = JsonConverters.fromJson(json['billingSettings'],'BillingSettings',context!);
return this;
}
Map<String, dynamic> toJson() => super.toJson()..addAll({
'name': name,
'parentAccountId': parentAccountId,
'twilioAccountSid': twilioAccountSid,
'ancestorIds': JsonConverters.toJson(ancestorIds,'List<String>',context!),
'maxPhoneNumbers': maxPhoneNumbers,
'isBYOA': isBYOA,
'trustHubProfileSid': trustHubProfileSid,
'logoId': logoId,
'logoUri': logoUri,
'billingSettings': JsonConverters.toJson(billingSettings,'BillingSettings',context!)
});
getTypeName() => "AccountInfo";
TypeContext? context = _ctx;
}
class ListResponse<T> implements IConvertible
{
/**
* The items
*/
// @ApiMember(Description="The items")
List<AccountInfo>? items;
/**
* The total number of items
*/
// @ApiMember(Description="The total number of items")
int? totalCount;
/**
* The total number of pages
*/
// @ApiMember(Description="The total number of pages")
int? totalPages;
/**
* Are there more pages of items? Used with simplified paging
*/
// @ApiMember(Description="Are there more pages of items? Used with simplified paging")
bool? hasMorePages;
ListResponse({this.items,this.totalCount,this.totalPages,this.hasMorePages});
ListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
items = JsonConverters.fromJson(json['items'],'List<AccountInfo>',context!);
totalCount = json['totalCount'];
totalPages = json['totalPages'];
hasMorePages = json['hasMorePages'];
return this;
}
Map<String, dynamic> toJson() => {
'items': JsonConverters.toJson(items,'List<AccountInfo>',context!),
'totalCount': totalCount,
'totalPages': totalPages,
'hasMorePages': hasMorePages
};
getTypeName() => "ListResponse<$T>";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'team.evovoice.io', types: <String, TypeInfo> {
'SortOrders': TypeInfo(TypeOf.Enum, enumValues:SortOrders.values),
'ListRequest<T>': TypeInfo(TypeOf.GenericDef,create:() => ListRequest()),
'EntityInfo': TypeInfo(TypeOf.AbstractClass),
'FlowRoles': TypeInfo(TypeOf.Enum, enumValues:FlowRoles.values),
'CustomerBreadcrumb': TypeInfo(TypeOf.Class, create:() => CustomerBreadcrumb()),
'FlowNodeCategories': TypeInfo(TypeOf.Enum, enumValues:FlowNodeCategories.values),
'ValueTypes': TypeInfo(TypeOf.Enum, enumValues:ValueTypes.values),
'UIHints': TypeInfo(TypeOf.Enum, enumValues:UIHints.values),
'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),
'DataField': TypeInfo(TypeOf.Class, create:() => DataField()),
'DataType': TypeInfo(TypeOf.Class, create:() => DataType()),
'List<DataField>': TypeInfo(TypeOf.Class, create:() => <DataField>[]),
'FlowChannels': TypeInfo(TypeOf.Enum, enumValues:FlowChannels.values),
'FlowNodeSpec': TypeInfo(TypeOf.Class, create:() => FlowNodeSpec()),
'List<FlowChannels>': TypeInfo(TypeOf.Class, create:() => <FlowChannels>[]),
'FlowNodeUI': TypeInfo(TypeOf.Class, create:() => FlowNodeUI()),
'ValueSources': TypeInfo(TypeOf.Enum, enumValues:ValueSources.values),
'NodeParameter': TypeInfo(TypeOf.Class, create:() => NodeParameter()),
'List<NodeParameterMap>': TypeInfo(TypeOf.Class, create:() => <NodeParameterMap>[]),
'NodeParameterMap': TypeInfo(TypeOf.Class, create:() => NodeParameterMap()),
'FlowNode': TypeInfo(TypeOf.Class, create:() => FlowNode()),
'FlowParameter': TypeInfo(TypeOf.Class, create:() => FlowParameter()),
'FlowExit': TypeInfo(TypeOf.Class, create:() => FlowExit()),
'FlowUI': TypeInfo(TypeOf.Class, create:() => FlowUI()),
'TagColors': TypeInfo(TypeOf.Enum, enumValues:TagColors.values),
'Tag': TypeInfo(TypeOf.Class, create:() => Tag()),
'FlowInfo': TypeInfo(TypeOf.Class, create:() => FlowInfo()),
'List<FlowRoles>': TypeInfo(TypeOf.Class, create:() => <FlowRoles>[]),
'List<CustomerBreadcrumb>': TypeInfo(TypeOf.Class, create:() => <CustomerBreadcrumb>[]),
'List<FlowNode>': TypeInfo(TypeOf.Class, create:() => <FlowNode>[]),
'List<FlowParameter>': TypeInfo(TypeOf.Class, create:() => <FlowParameter>[]),
'List<FlowExit>': TypeInfo(TypeOf.Class, create:() => <FlowExit>[]),
'List<Tag>': TypeInfo(TypeOf.Class, create:() => <Tag>[]),
'ListFlows': TypeInfo(TypeOf.Class, create:() => ListFlows()),
'BillingItem': TypeInfo(TypeOf.Class, create:() => BillingItem()),
'BillingSettings': TypeInfo(TypeOf.Class, create:() => BillingSettings()),
'AccountInfo': TypeInfo(TypeOf.Class, create:() => AccountInfo()),
'ListResponse<T>': TypeInfo(TypeOf.Class, create:() => ListResponse<T>()),
'List<AccountInfo>': TypeInfo(TypeOf.Class, create:() => <AccountInfo>[]),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /flows HTTP/1.1 Host: team.evovoice.io Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { items: [ { name: String, roles: [ UI ], description: String, notes: String, accountId: String, accountName: String, customerId: String, customerName: String, customerBreadcrumb: [ { id: String, name: String } ], nodes: [ { id: String, isStartNode: False, name: String, spec: { name: String, description: String, iconClass: String, typeName: String, category: General, url: String, documentationUrl: String, restrictToChannels: [ Voice ] }, ui: { x: 0, y: 0, notes: String }, parameters: {} } ], parameters: [ { isPublic: 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 } ], exits: [ { id: String, name: String, ui: { x: 0, y: 0, notes: String } } ], ui: { selectedNode: String, canvasX: 0, canvasY: 0, canvasZoom: 0 }, tags: [ { id: String, name: String, color: Magenta } ], nodeCount: 0, id: String, dateCreated: String, dateLastModified: String, createdBy: String, lastModifiedBy: String } ], totalCount: 0, totalPages: 0, hasMorePages: False }