MCPcopy Create free account
hub / github.com/firebase/firebase-tools / listAllRulesets

Function listAllRulesets

src/database/metadata.ts:36–45  ·  view source on GitHub ↗
(databaseName: string)

Source from the content-addressed store, hash-verified

34const apiClient = new Client({ urlPrefix: rtdbMetadataOrigin() });
35
36export async function listAllRulesets(databaseName: string): Promise<Ruleset[]> {
37 const response = await apiClient.get<{ rulesets: Ruleset[] }>(
38 `/namespaces/${databaseName}/rulesets`,
39 { resolveOnHTTPError: true },
40 );
41 if (response.status === 200) {
42 return response.body.rulesets;
43 }
44 return handleErrorResponse(response);
45}
46
47export async function getRuleset(databaseName: string, rulesetId: string): Promise<Ruleset> {
48 const response = await apiClient.get<Ruleset>(

Callers

nothing calls this directly

Calls 1

handleErrorResponseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…