getFunctions method
Is every serverless function the caller's org has published, each with its real 7-day rollup.
Is every serverless function the caller's org has published, each with its real 7-day rollup. A row carries the function's runtime, resource limits, deployment target and its invoke endpoint, plus envCount — how many secrets it mounts. The rollup fields are ABSENT rather than zero when the function has not run in the window, so a console renders "—" instead of a fabricated 0. Requires a validated principal; the listing is scoped to its org.
Implementation
Future<FnList?> getFunctions() async {
final response = await getFunctionsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'FnList',) as FnList;
}
return null;
}