| GET,OPTIONS | /v1/engine/catalog |
|---|
import 'package:servicestack/servicestack.dart';
class WorkflowCatalogItemView implements IConvertible
{
String? Name;
String? Desc;
String? FieldsJson;
WorkflowCatalogItemView({this.Name,this.Desc,this.FieldsJson});
WorkflowCatalogItemView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Name = json['Name'];
Desc = json['Desc'];
FieldsJson = json['FieldsJson'];
return this;
}
Map<String, dynamic> toJson() => {
'Name': Name,
'Desc': Desc,
'FieldsJson': FieldsJson
};
getTypeName() => "WorkflowCatalogItemView";
TypeContext? context = _ctx;
}
class WorkflowCatalogGroupView implements IConvertible
{
String? Vertical;
String? Color;
String? Pack;
List<WorkflowCatalogItemView>? Triggers = [];
List<WorkflowCatalogItemView>? Actions = [];
WorkflowCatalogGroupView({this.Vertical,this.Color,this.Pack,this.Triggers,this.Actions});
WorkflowCatalogGroupView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Vertical = json['Vertical'];
Color = json['Color'];
Pack = json['Pack'];
Triggers = JsonConverters.fromJson(json['Triggers'],'List<WorkflowCatalogItemView>',context!);
Actions = JsonConverters.fromJson(json['Actions'],'List<WorkflowCatalogItemView>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Vertical': Vertical,
'Color': Color,
'Pack': Pack,
'Triggers': JsonConverters.toJson(Triggers,'List<WorkflowCatalogItemView>',context!),
'Actions': JsonConverters.toJson(Actions,'List<WorkflowCatalogItemView>',context!)
};
getTypeName() => "WorkflowCatalogGroupView";
TypeContext? context = _ctx;
}
class EngineCatalogResponse implements IConvertible
{
List<WorkflowCatalogGroupView>? Groups = [];
ResponseStatus? ResponseStatus;
EngineCatalogResponse({this.Groups,this.ResponseStatus});
EngineCatalogResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Groups = JsonConverters.fromJson(json['Groups'],'List<WorkflowCatalogGroupView>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Groups': JsonConverters.toJson(Groups,'List<WorkflowCatalogGroupView>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "EngineCatalogResponse";
TypeContext? context = _ctx;
}
class EngineCatalogRequest implements IConvertible
{
EngineCatalogRequest();
EngineCatalogRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "EngineCatalogRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'WorkflowCatalogItemView': TypeInfo(TypeOf.Class, create:() => WorkflowCatalogItemView()),
'WorkflowCatalogGroupView': TypeInfo(TypeOf.Class, create:() => WorkflowCatalogGroupView()),
'List<WorkflowCatalogItemView>': TypeInfo(TypeOf.Class, create:() => <WorkflowCatalogItemView>[]),
'EngineCatalogResponse': TypeInfo(TypeOf.Class, create:() => EngineCatalogResponse()),
'List<WorkflowCatalogGroupView>': TypeInfo(TypeOf.Class, create:() => <WorkflowCatalogGroupView>[]),
'EngineCatalogRequest': TypeInfo(TypeOf.Class, create:() => EngineCatalogRequest()),
});
Dart EngineCatalogRequest DTOs
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 /v1/engine/catalog HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Groups:
[
{
Vertical: String,
Color: String,
Pack: String,
Triggers:
[
{
Name: String,
Desc: String,
FieldsJson: String
}
],
Actions:
[
{
Name: String,
Desc: String,
FieldsJson: String
}
]
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}