| POST | /v1/forms/submissions/zip/preview |
|---|
import 'package:servicestack/servicestack.dart';
class FormZipJobView implements IConvertible
{
String? ZipUID;
String? FormUID;
String? FormName;
String? Status;
String? StatusText;
String? Message;
String? FileName;
int? Submissions;
int? Files;
int? Bytes;
int? LeftOut;
int? FilesIn;
int? BytesIn;
int? LeftOutIn;
int? ZipBytes;
String? SizeText;
DateTime? CreatedAt;
String? CreatedText;
DateTime? CompletedAt;
DateTime? ExpiresAt;
String? ExpiresText;
int? Downloads;
String? LastDownloadText;
FormZipJobView({this.ZipUID,this.FormUID,this.FormName,this.Status,this.StatusText,this.Message,this.FileName,this.Submissions,this.Files,this.Bytes,this.LeftOut,this.FilesIn,this.BytesIn,this.LeftOutIn,this.ZipBytes,this.SizeText,this.CreatedAt,this.CreatedText,this.CompletedAt,this.ExpiresAt,this.ExpiresText,this.Downloads,this.LastDownloadText});
FormZipJobView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ZipUID = json['ZipUID'];
FormUID = json['FormUID'];
FormName = json['FormName'];
Status = json['Status'];
StatusText = json['StatusText'];
Message = json['Message'];
FileName = json['FileName'];
Submissions = json['Submissions'];
Files = json['Files'];
Bytes = json['Bytes'];
LeftOut = json['LeftOut'];
FilesIn = json['FilesIn'];
BytesIn = json['BytesIn'];
LeftOutIn = json['LeftOutIn'];
ZipBytes = json['ZipBytes'];
SizeText = json['SizeText'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
CreatedText = json['CreatedText'];
CompletedAt = JsonConverters.fromJson(json['CompletedAt'],'DateTime',context!);
ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
ExpiresText = json['ExpiresText'];
Downloads = json['Downloads'];
LastDownloadText = json['LastDownloadText'];
return this;
}
Map<String, dynamic> toJson() => {
'ZipUID': ZipUID,
'FormUID': FormUID,
'FormName': FormName,
'Status': Status,
'StatusText': StatusText,
'Message': Message,
'FileName': FileName,
'Submissions': Submissions,
'Files': Files,
'Bytes': Bytes,
'LeftOut': LeftOut,
'FilesIn': FilesIn,
'BytesIn': BytesIn,
'LeftOutIn': LeftOutIn,
'ZipBytes': ZipBytes,
'SizeText': SizeText,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'CreatedText': CreatedText,
'CompletedAt': JsonConverters.toJson(CompletedAt,'DateTime',context!),
'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!),
'ExpiresText': ExpiresText,
'Downloads': Downloads,
'LastDownloadText': LastDownloadText
};
getTypeName() => "FormZipJobView";
TypeContext? context = _ctx;
}
class FormZipPreviewResponse implements IConvertible
{
bool? CanExport;
String? Message;
String? FormUID;
String? FormName;
int? Rows;
int? Submissions;
int? Files;
int? Bytes;
String? SizeText;
int? LeftOut;
int? SensitiveLeftOut;
int? KeepDays;
int? MaxFiles;
int? MaxBytes;
FormZipJobView? Existing;
ResponseStatus? ResponseStatus;
FormZipPreviewResponse({this.CanExport,this.Message,this.FormUID,this.FormName,this.Rows,this.Submissions,this.Files,this.Bytes,this.SizeText,this.LeftOut,this.SensitiveLeftOut,this.KeepDays,this.MaxFiles,this.MaxBytes,this.Existing,this.ResponseStatus});
FormZipPreviewResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CanExport = json['CanExport'];
Message = json['Message'];
FormUID = json['FormUID'];
FormName = json['FormName'];
Rows = json['Rows'];
Submissions = json['Submissions'];
Files = json['Files'];
Bytes = json['Bytes'];
SizeText = json['SizeText'];
LeftOut = json['LeftOut'];
SensitiveLeftOut = json['SensitiveLeftOut'];
KeepDays = json['KeepDays'];
MaxFiles = json['MaxFiles'];
MaxBytes = json['MaxBytes'];
Existing = JsonConverters.fromJson(json['Existing'],'FormZipJobView',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CanExport': CanExport,
'Message': Message,
'FormUID': FormUID,
'FormName': FormName,
'Rows': Rows,
'Submissions': Submissions,
'Files': Files,
'Bytes': Bytes,
'SizeText': SizeText,
'LeftOut': LeftOut,
'SensitiveLeftOut': SensitiveLeftOut,
'KeepDays': KeepDays,
'MaxFiles': MaxFiles,
'MaxBytes': MaxBytes,
'Existing': JsonConverters.toJson(Existing,'FormZipJobView',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormZipPreviewResponse";
TypeContext? context = _ctx;
}
class FormAnswerCond implements IConvertible
{
String? F;
String? Op;
String? V;
FormAnswerCond({this.F,this.Op,this.V});
FormAnswerCond.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
F = json['F'];
Op = json['Op'];
V = json['V'];
return this;
}
Map<String, dynamic> toJson() => {
'F': F,
'Op': Op,
'V': V
};
getTypeName() => "FormAnswerCond";
TypeContext? context = _ctx;
}
class FormSubmissionSearchRequest implements IConvertible
{
String? FormUID;
String? Mode;
List<String>? Forms = [];
List<String>? Stages = [];
List<int>? Assignees = [];
List<String>? Branches = [];
List<String>? Tags = [];
String? Search;
String? SortKey;
int? SortDir;
int? Skip;
int? Take;
List<FormAnswerCond>? Conds = [];
List<String>? Flags = [];
FormSubmissionSearchRequest({this.FormUID,this.Mode,this.Forms,this.Stages,this.Assignees,this.Branches,this.Tags,this.Search,this.SortKey,this.SortDir,this.Skip,this.Take,this.Conds,this.Flags});
FormSubmissionSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
Mode = json['Mode'];
Forms = JsonConverters.fromJson(json['Forms'],'List<String>',context!);
Stages = JsonConverters.fromJson(json['Stages'],'List<String>',context!);
Assignees = JsonConverters.fromJson(json['Assignees'],'List<int>',context!);
Branches = JsonConverters.fromJson(json['Branches'],'List<String>',context!);
Tags = JsonConverters.fromJson(json['Tags'],'List<String>',context!);
Search = json['Search'];
SortKey = json['SortKey'];
SortDir = json['SortDir'];
Skip = json['Skip'];
Take = json['Take'];
Conds = JsonConverters.fromJson(json['Conds'],'List<FormAnswerCond>',context!);
Flags = JsonConverters.fromJson(json['Flags'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID,
'Mode': Mode,
'Forms': JsonConverters.toJson(Forms,'List<String>',context!),
'Stages': JsonConverters.toJson(Stages,'List<String>',context!),
'Assignees': JsonConverters.toJson(Assignees,'List<int>',context!),
'Branches': JsonConverters.toJson(Branches,'List<String>',context!),
'Tags': JsonConverters.toJson(Tags,'List<String>',context!),
'Search': Search,
'SortKey': SortKey,
'SortDir': SortDir,
'Skip': Skip,
'Take': Take,
'Conds': JsonConverters.toJson(Conds,'List<FormAnswerCond>',context!),
'Flags': JsonConverters.toJson(Flags,'List<String>',context!)
};
getTypeName() => "FormSubmissionSearchRequest";
TypeContext? context = _ctx;
}
class FormZipPreviewRequest implements IConvertible
{
FormSubmissionSearchRequest? Query;
List<String>? SubmissionUIDs = [];
FormZipPreviewRequest({this.Query,this.SubmissionUIDs});
FormZipPreviewRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Query = JsonConverters.fromJson(json['Query'],'FormSubmissionSearchRequest',context!);
SubmissionUIDs = JsonConverters.fromJson(json['SubmissionUIDs'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Query': JsonConverters.toJson(Query,'FormSubmissionSearchRequest',context!),
'SubmissionUIDs': JsonConverters.toJson(SubmissionUIDs,'List<String>',context!)
};
getTypeName() => "FormZipPreviewRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormZipJobView': TypeInfo(TypeOf.Class, create:() => FormZipJobView()),
'FormZipPreviewResponse': TypeInfo(TypeOf.Class, create:() => FormZipPreviewResponse()),
'FormAnswerCond': TypeInfo(TypeOf.Class, create:() => FormAnswerCond()),
'FormSubmissionSearchRequest': TypeInfo(TypeOf.Class, create:() => FormSubmissionSearchRequest()),
'List<FormAnswerCond>': TypeInfo(TypeOf.Class, create:() => <FormAnswerCond>[]),
'FormZipPreviewRequest': TypeInfo(TypeOf.Class, create:() => FormZipPreviewRequest()),
});
Dart FormZipPreviewRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/forms/submissions/zip/preview HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Query":{"FormUID":"00000000000000000000000000000000","Mode":"String","Forms":["00000000000000000000000000000000"],"Stages":["String"],"Assignees":[0],"Branches":["String"],"Tags":["String"],"Search":"String","SortKey":"String","SortDir":0,"Skip":0,"Take":0,"Conds":[{"F":"String","Op":"String","V":"String"}],"Flags":["String"]},"SubmissionUIDs":["00000000000000000000000000000000"]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"CanExport":false,"Message":"String","FormUID":"00000000000000000000000000000000","FormName":"String","Rows":0,"Submissions":0,"Files":0,"Bytes":0,"SizeText":"String","LeftOut":0,"SensitiveLeftOut":0,"KeepDays":0,"MaxFiles":0,"MaxBytes":0,"Existing":{"ZipUID":"00000000000000000000000000000000","FormUID":"00000000000000000000000000000000","FormName":"String","Status":"String","StatusText":"String","Message":"String","FileName":"String","Submissions":0,"Files":0,"Bytes":0,"LeftOut":0,"FilesIn":0,"BytesIn":0,"LeftOutIn":0,"ZipBytes":0,"SizeText":"String","CreatedAt":"0001-01-01T00:00:00.0000000","CreatedText":"String","CompletedAt":"0001-01-01T00:00:00.0000000","ExpiresAt":"0001-01-01T00:00:00.0000000","ExpiresText":"String","Downloads":0,"LastDownloadText":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}