| GET | /v1/forms/{FormUID}/automations |
|---|
import 'package:servicestack/servicestack.dart';
class FormAutomationRule implements IConvertible
{
int? WorkflowId;
String? Name;
String? Sentence;
String? State;
String? StateText;
String? Numbers;
String? Warn;
bool? AnyApplication;
bool? AlsoOthers;
String? SharedText;
bool? FromStarter;
String? EngineLink;
FormAutomationRule({this.WorkflowId,this.Name,this.Sentence,this.State,this.StateText,this.Numbers,this.Warn,this.AnyApplication,this.AlsoOthers,this.SharedText,this.FromStarter,this.EngineLink});
FormAutomationRule.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
WorkflowId = json['WorkflowId'];
Name = json['Name'];
Sentence = json['Sentence'];
State = json['State'];
StateText = json['StateText'];
Numbers = json['Numbers'];
Warn = json['Warn'];
AnyApplication = json['AnyApplication'];
AlsoOthers = json['AlsoOthers'];
SharedText = json['SharedText'];
FromStarter = json['FromStarter'];
EngineLink = json['EngineLink'];
return this;
}
Map<String, dynamic> toJson() => {
'WorkflowId': WorkflowId,
'Name': Name,
'Sentence': Sentence,
'State': State,
'StateText': StateText,
'Numbers': Numbers,
'Warn': Warn,
'AnyApplication': AnyApplication,
'AlsoOthers': AlsoOthers,
'SharedText': SharedText,
'FromStarter': FromStarter,
'EngineLink': EngineLink
};
getTypeName() => "FormAutomationRule";
TypeContext? context = _ctx;
}
class FormAutomationStarter implements IConvertible
{
String? Key;
String? Name;
String? Text;
bool? Added;
FormAutomationStarter({this.Key,this.Name,this.Text,this.Added});
FormAutomationStarter.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Name = json['Name'];
Text = json['Text'];
Added = json['Added'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Name': Name,
'Text': Text,
'Added': Added
};
getTypeName() => "FormAutomationStarter";
TypeContext? context = _ctx;
}
class FormMappingRow implements IConvertible
{
String? Field;
String? FieldKey;
String? Target;
String? Tone;
String? Note;
FormMappingRow({this.Field,this.FieldKey,this.Target,this.Tone,this.Note});
FormMappingRow.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Field = json['Field'];
FieldKey = json['FieldKey'];
Target = json['Target'];
Tone = json['Tone'];
Note = json['Note'];
return this;
}
Map<String, dynamic> toJson() => {
'Field': Field,
'FieldKey': FieldKey,
'Target': Target,
'Tone': Tone,
'Note': Note
};
getTypeName() => "FormMappingRow";
TypeContext? context = _ctx;
}
class FormAutomationsResponse implements IConvertible
{
List<FormAutomationRule>? Rules = [];
List<FormAutomationStarter>? Starters = [];
List<FormMappingRow>? Mapping = [];
String? MapSummary;
bool? CanAdd;
String? AddRefusal;
bool? CanToggle;
bool? CanRemove;
bool? CanOpenEngine;
List<String>? ReservedKeys = [];
List<String>? TestableFields = [];
ResponseStatus? ResponseStatus;
FormAutomationsResponse({this.Rules,this.Starters,this.Mapping,this.MapSummary,this.CanAdd,this.AddRefusal,this.CanToggle,this.CanRemove,this.CanOpenEngine,this.ReservedKeys,this.TestableFields,this.ResponseStatus});
FormAutomationsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Rules = JsonConverters.fromJson(json['Rules'],'List<FormAutomationRule>',context!);
Starters = JsonConverters.fromJson(json['Starters'],'List<FormAutomationStarter>',context!);
Mapping = JsonConverters.fromJson(json['Mapping'],'List<FormMappingRow>',context!);
MapSummary = json['MapSummary'];
CanAdd = json['CanAdd'];
AddRefusal = json['AddRefusal'];
CanToggle = json['CanToggle'];
CanRemove = json['CanRemove'];
CanOpenEngine = json['CanOpenEngine'];
ReservedKeys = JsonConverters.fromJson(json['ReservedKeys'],'List<String>',context!);
TestableFields = JsonConverters.fromJson(json['TestableFields'],'List<String>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Rules': JsonConverters.toJson(Rules,'List<FormAutomationRule>',context!),
'Starters': JsonConverters.toJson(Starters,'List<FormAutomationStarter>',context!),
'Mapping': JsonConverters.toJson(Mapping,'List<FormMappingRow>',context!),
'MapSummary': MapSummary,
'CanAdd': CanAdd,
'AddRefusal': AddRefusal,
'CanToggle': CanToggle,
'CanRemove': CanRemove,
'CanOpenEngine': CanOpenEngine,
'ReservedKeys': JsonConverters.toJson(ReservedKeys,'List<String>',context!),
'TestableFields': JsonConverters.toJson(TestableFields,'List<String>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormAutomationsResponse";
TypeContext? context = _ctx;
}
class FormAutomationsRequest implements IConvertible
{
String? FormUID;
FormAutomationsRequest({this.FormUID});
FormAutomationsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID
};
getTypeName() => "FormAutomationsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormAutomationRule': TypeInfo(TypeOf.Class, create:() => FormAutomationRule()),
'FormAutomationStarter': TypeInfo(TypeOf.Class, create:() => FormAutomationStarter()),
'FormMappingRow': TypeInfo(TypeOf.Class, create:() => FormMappingRow()),
'FormAutomationsResponse': TypeInfo(TypeOf.Class, create:() => FormAutomationsResponse()),
'List<FormAutomationRule>': TypeInfo(TypeOf.Class, create:() => <FormAutomationRule>[]),
'List<FormAutomationStarter>': TypeInfo(TypeOf.Class, create:() => <FormAutomationStarter>[]),
'List<FormMappingRow>': TypeInfo(TypeOf.Class, create:() => <FormMappingRow>[]),
'FormAutomationsRequest': TypeInfo(TypeOf.Class, create:() => FormAutomationsRequest()),
});
Dart FormAutomationsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/forms/{FormUID}/automations HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<FormAutomationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<AddRefusal>String</AddRefusal>
<CanAdd>false</CanAdd>
<CanOpenEngine>false</CanOpenEngine>
<CanRemove>false</CanRemove>
<CanToggle>false</CanToggle>
<MapSummary>String</MapSummary>
<Mapping>
<FormMappingRow>
<Field>String</Field>
<FieldKey>String</FieldKey>
<Note>String</Note>
<Target>String</Target>
<Tone>String</Tone>
</FormMappingRow>
</Mapping>
<ReservedKeys xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</ReservedKeys>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Rules>
<FormAutomationRule>
<AlsoOthers>false</AlsoOthers>
<AnyApplication>false</AnyApplication>
<EngineLink>String</EngineLink>
<FromStarter>false</FromStarter>
<Name>String</Name>
<Numbers>String</Numbers>
<Sentence>String</Sentence>
<SharedText>String</SharedText>
<State>String</State>
<StateText>String</StateText>
<Warn>String</Warn>
<WorkflowId>0</WorkflowId>
</FormAutomationRule>
</Rules>
<Starters>
<FormAutomationStarter>
<Added>false</Added>
<Key>String</Key>
<Name>String</Name>
<Text>String</Text>
</FormAutomationStarter>
</Starters>
<TestableFields xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TestableFields>
</FormAutomationsResponse>