| POST | /v1/forms/submissions/{SubmissionUID}/decide/preview |
|---|
"use strict";
export class FormDecisionChoice {
/** @param {{Id?:string,Label?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Label;
}
export class FormDecisionEffect {
/** @param {{Kind?:string,Text?:string,Tone?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Kind;
/** @type {string} */
Text;
/** @type {string} */
Tone;
}
export class FormDecisionPlan {
/** @param {{Who?:string,Stage?:string,Choices?:FormDecisionChoice[],Outcome?:string,Reasons?:string[],Reason?:string,NeedSig?:boolean,SignerName?:string,SignerRefusal?:string,Effects?:FormDecisionEffect[],Block?:string,GoLabel?:string,GoCls?:string,CanDecide?:boolean,Refusal?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Who;
/** @type {string} */
Stage;
/** @type {FormDecisionChoice[]} */
Choices = [];
/** @type {string} */
Outcome;
/** @type {string[]} */
Reasons = [];
/** @type {string} */
Reason;
/** @type {boolean} */
NeedSig;
/** @type {string} */
SignerName;
/** @type {string} */
SignerRefusal;
/** @type {FormDecisionEffect[]} */
Effects = [];
/** @type {string} */
Block;
/** @type {string} */
GoLabel;
/** @type {string} */
GoCls;
/** @type {boolean} */
CanDecide;
/** @type {string} */
Refusal;
}
export class FormSubmissionDecidePreviewResponse {
/** @param {{Plan?:FormDecisionPlan,ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {FormDecisionPlan} */
Plan;
/** @type {ResponseStatus} */
ResponseStatus;
}
export class FormSubmissionDecidePreviewRequest {
/** @param {{SubmissionUID?:string,Outcome?:string,Reason?:string,Note?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
SubmissionUID;
/** @type {string} */
Outcome;
/** @type {string} */
Reason;
/** @type {string} */
Note;
}
JavaScript FormSubmissionDecidePreviewRequest 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.
POST /v1/forms/submissions/{SubmissionUID}/decide/preview HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
SubmissionUID: 00000000000000000000000000000000,
Outcome: String,
Reason: String,
Note: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Plan:
{
Who: String,
Stage: String,
Choices:
[
{
Id: String,
Label: String
}
],
Outcome: String,
Reasons:
[
String
],
Reason: String,
NeedSig: False,
SignerName: String,
SignerRefusal: String,
Effects:
[
{
Kind: String,
Text: String,
Tone: String
}
],
Block: String,
GoLabel: String,
GoCls: String,
CanDecide: False,
Refusal: String
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}