( query: unknown, issues: TaskNotesRuntimeQueryIssue[], warnings: TaskNotesRuntimeQueryWarning[] )
| 1224 | } |
| 1225 | |
| 1226 | private normalizeRuntimeTaskQuery( |
| 1227 | query: unknown, |
| 1228 | issues: TaskNotesRuntimeQueryIssue[], |
| 1229 | warnings: TaskNotesRuntimeQueryWarning[] |
| 1230 | ): TaskNotesRuntimeNormalizedTaskQuery { |
| 1231 | if (query == null) return emptyRuntimeTaskQuery(); |
| 1232 | if (!isRecord(query)) { |
| 1233 | issues.push({ |
| 1234 | path: "$", |
| 1235 | code: "query_not_object", |
| 1236 | message: "Runtime task query must be an object.", |
| 1237 | }); |
| 1238 | return emptyRuntimeTaskQuery(); |
| 1239 | } |
| 1240 | |
| 1241 | const where = |
| 1242 | typeof query["where"] === "undefined" |
| 1243 | ? undefined |
| 1244 | : this.normalizeRuntimePredicate(query["where"], "$.where", issues); |
| 1245 | const sort = this.normalizeRuntimeSorts(query["sort"], issues, warnings); |
| 1246 | const group = this.normalizeRuntimeGroups(query["group"], issues, warnings); |
| 1247 | const limit = normalizeRuntimeLimit(query["limit"], "$.limit", issues); |
| 1248 | const offset = normalizeRuntimeOffset(query["offset"], "$.offset", issues); |
| 1249 | const scope = normalizeRuntimeScope(query["scope"], issues); |
| 1250 | |
| 1251 | return { where, sort, limit, offset, group, scope }; |
| 1252 | } |
| 1253 | |
| 1254 | private normalizeRuntimePredicate( |
| 1255 | predicate: unknown, |
no test coverage detected