[
{
// The unique ID of the approval workflow.
// It must be unique within the app and not exceed 64 characters in length.
"operation_id": "25cbb115-82a1-4474-9993-538bb439ad33",
// The name of the approval workflow that will be displayed on the UI.
"operation_name": "Make Batch Payout",
// The details of the approval workflow. The maximum length of this field is 10,000 characters.
"default_approval_policies": [
{
// The approval actions triggered once the conditions are met.
"action": {
// The action type. Possible values include:
// `Accept`: Automatically approve the operation.
// `Reject`: Automatically reject the operation.
// `Quorum`: Need at least a specific user role to approve.
"type": "Quorum",
// The details of the `Quorum` action.
// This field is applicable only when `type` is `Quorum`.
// - roles: The user roles that can approve. It must be lowercase.
// - threshold: Approval threshold. Applicable only when `type` is `PART_APPROVAL`.
// If the threshold is not met, the operation will remain in a pending state until the required approvals are obtained.
// - type: Approval type. Possible values include:
// - `PART_APPROVAL`: Need part of user roles to approve.
// - `FULL_APPROVAL`: Need all user roles to approve.
"content": "{\"roles\": [\"admin\"], \"threshold\": 2, \"type\": \"PART_APPROVAL\"}"
},
// Conditions that will trigger the approval actions.
"conditions": [
{
// The field value serves as the key of the field.
"field": "amount",
// The field value type. Possible values include:
// `INT`: Integer
// `FLOAT2`: Floating-point number with two decimal places
"value_type": "INT",
// The value of the field.
// If `value_type` is `FLOAT2`, set the value as `100.00`.
"value": "100",
// The operator type. Possible values include `>`, `>=`, `=`, `<`, and `<=`.
"operator": ">"
}
]
},
// Please keep this structure.
{
"action": {
"type": "Accept",
"content": ""
},
"conditions": null
}
],
// The text of the `condition` fields that will be displayed on the UI.
// The `descriptions` fields must contain the elements in the `conditions` field.
"descriptions": [
{
// The field value that must be the same as the `field` in `conditions`.
"field": "amount",
// The description of the field on the UI.
"description": "Total USD amount",
// The value of the field that must be the same as the `value_type` in `conditions`.
"value_type": "INT",
// Display name of the field on the UI.
"display_name": "Total Amount(USD)"
}
]
},
{
// Create more approval workflows with the same structure as above.
...
}
]