|
| 1 | +{ |
| 2 | + "name": "07_simple_return", |
| 3 | + "description": "This Flow tries to test the control flow function `return`", |
| 4 | + "inputs": [ |
| 5 | + { |
| 6 | + "input": { |
| 7 | + "http_method": "GET", |
| 8 | + "headers": { |
| 9 | + "Content-Type": "text/plain" |
| 10 | + }, |
| 11 | + "payload": { |
| 12 | + "user": { |
| 13 | + "age": 42, |
| 14 | + "email": "joe@text.com", |
| 15 | + "username": "joe doe" |
| 16 | + } |
| 17 | + } |
| 18 | + }, |
| 19 | + "expected_result": { |
| 20 | + "http_status_code": 200, |
| 21 | + "headers": {}, |
| 22 | + "payload": [null, null, "username"] |
| 23 | + } |
| 24 | + } |
| 25 | + ], |
| 26 | + "flow": { |
| 27 | + "flowId": "4", |
| 28 | + "projectId": "1", |
| 29 | + "type": "REST", |
| 30 | + "settings": [ |
| 31 | + { |
| 32 | + "databaseId": "10", |
| 33 | + "flowSettingId": "httpURL", |
| 34 | + "value": { |
| 35 | + "stringValue": "/test4" |
| 36 | + } |
| 37 | + }, |
| 38 | + { |
| 39 | + "databaseId": "11", |
| 40 | + "flowSettingId": "httpMethod", |
| 41 | + "value": { |
| 42 | + "stringValue": "POST" |
| 43 | + } |
| 44 | + } |
| 45 | + ], |
| 46 | + "startingNodeId": "11", |
| 47 | + "nodeFunctions": [ |
| 48 | + { |
| 49 | + "databaseId": "11", |
| 50 | + "runtimeFunctionId": "std::object::keys", |
| 51 | + "parameters": [ |
| 52 | + { |
| 53 | + "databaseId": "21", |
| 54 | + "runtimeParameterId": "object", |
| 55 | + "value": { |
| 56 | + "referenceValue": { |
| 57 | + "paths": [ |
| 58 | + { |
| 59 | + "path": "payload" |
| 60 | + }, |
| 61 | + { |
| 62 | + "path": "user" |
| 63 | + } |
| 64 | + ], |
| 65 | + "flowInput": {} |
| 66 | + } |
| 67 | + } |
| 68 | + } |
| 69 | + ], |
| 70 | + "nextNodeId": "9" |
| 71 | + }, |
| 72 | + { |
| 73 | + "databaseId": "9", |
| 74 | + "runtimeFunctionId": "std::list::map", |
| 75 | + "parameters": [ |
| 76 | + { |
| 77 | + "databaseId": "22", |
| 78 | + "runtimeParameterId": "list", |
| 79 | + "value": { |
| 80 | + "referenceValue": { |
| 81 | + "nodeId": "11" |
| 82 | + } |
| 83 | + } |
| 84 | + }, |
| 85 | + { |
| 86 | + "databaseId": "31", |
| 87 | + "runtimeParameterId": "transform", |
| 88 | + "value": { |
| 89 | + "nodeFunctionId": "10" |
| 90 | + } |
| 91 | + } |
| 92 | + ], |
| 93 | + "nextNodeId": "8" |
| 94 | + }, |
| 95 | + { |
| 96 | + "databaseId": "10", |
| 97 | + "runtimeFunctionId": "std::text::is_equal", |
| 98 | + "parameters": [ |
| 99 | + { |
| 100 | + "databaseId": "19", |
| 101 | + "runtimeParameterId": "first", |
| 102 | + "value": { |
| 103 | + "referenceValue": { |
| 104 | + "inputType": { |
| 105 | + "nodeId": "9", |
| 106 | + "parameterIndex": "1" |
| 107 | + } |
| 108 | + } |
| 109 | + } |
| 110 | + }, |
| 111 | + { |
| 112 | + "databaseId": "34", |
| 113 | + "runtimeParameterId": "second", |
| 114 | + "value": { |
| 115 | + "literalValue": { |
| 116 | + "stringValue": "username" |
| 117 | + } |
| 118 | + } |
| 119 | + } |
| 120 | + ], |
| 121 | + "nextNodeId": "14" |
| 122 | + }, |
| 123 | + { |
| 124 | + "databaseId": "14", |
| 125 | + "runtimeFunctionId": "std::control::if", |
| 126 | + "parameters": [ |
| 127 | + { |
| 128 | + "databaseId": "28", |
| 129 | + "runtimeParameterId": "condition", |
| 130 | + "value": { |
| 131 | + "referenceValue": { |
| 132 | + "nodeId": "10" |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + { |
| 137 | + "databaseId": "35", |
| 138 | + "runtimeParameterId": "runnable", |
| 139 | + "value": { |
| 140 | + "nodeFunctionId": "7" |
| 141 | + } |
| 142 | + } |
| 143 | + ], |
| 144 | + "nextNodeId": "12" |
| 145 | + }, |
| 146 | + { |
| 147 | + "databaseId": "7", |
| 148 | + "runtimeFunctionId": "std::control::return", |
| 149 | + "parameters": [ |
| 150 | + { |
| 151 | + "databaseId": "15", |
| 152 | + "runtimeParameterId": "value", |
| 153 | + "value": { |
| 154 | + "referenceValue": { |
| 155 | + "inputType": { |
| 156 | + "nodeId": "9", |
| 157 | + "parameterIndex": "1" |
| 158 | + } |
| 159 | + } |
| 160 | + } |
| 161 | + } |
| 162 | + ] |
| 163 | + }, |
| 164 | + { |
| 165 | + "databaseId": "12", |
| 166 | + "runtimeFunctionId": "std::control::return", |
| 167 | + "parameters": [ |
| 168 | + { |
| 169 | + "databaseId": "24", |
| 170 | + "runtimeParameterId": "value", |
| 171 | + "value": { |
| 172 | + "literalValue": { |
| 173 | + "nullValue": "NULL_VALUE" |
| 174 | + } |
| 175 | + } |
| 176 | + } |
| 177 | + ] |
| 178 | + }, |
| 179 | + { |
| 180 | + "databaseId": "13", |
| 181 | + "runtimeFunctionId": "rest::control::respond", |
| 182 | + "parameters": [ |
| 183 | + { |
| 184 | + "databaseId": "25", |
| 185 | + "runtimeParameterId": "http_response", |
| 186 | + "value": { |
| 187 | + "referenceValue": { |
| 188 | + "nodeId": "8" |
| 189 | + } |
| 190 | + } |
| 191 | + } |
| 192 | + ] |
| 193 | + }, |
| 194 | + { |
| 195 | + "databaseId": "8", |
| 196 | + "runtimeFunctionId": "http::response::create", |
| 197 | + "parameters": [ |
| 198 | + { |
| 199 | + "databaseId": "16", |
| 200 | + "runtimeParameterId": "http_status_code", |
| 201 | + "value": { |
| 202 | + "literalValue": { |
| 203 | + "numberValue": { |
| 204 | + "integer": "200" |
| 205 | + } |
| 206 | + } |
| 207 | + } |
| 208 | + }, |
| 209 | + { |
| 210 | + "databaseId": "36", |
| 211 | + "runtimeParameterId": "headers", |
| 212 | + "value": { |
| 213 | + "literalValue": { |
| 214 | + "structValue": {} |
| 215 | + } |
| 216 | + } |
| 217 | + }, |
| 218 | + { |
| 219 | + "databaseId": "37", |
| 220 | + "runtimeParameterId": "payload", |
| 221 | + "value": { |
| 222 | + "referenceValue": { |
| 223 | + "nodeId": "9" |
| 224 | + } |
| 225 | + } |
| 226 | + } |
| 227 | + ], |
| 228 | + "nextNodeId": "13" |
| 229 | + } |
| 230 | + ], |
| 231 | + "projectSlug": "codezero-project", |
| 232 | + "signature": "(httpURL: HTTP_URL, httpMethod: HTTP_METHOD): { payload: { user: { username: TEXT, email: TEXT } }, headers: I }" |
| 233 | + } |
| 234 | +} |
0 commit comments