MCPcopy Create free account
hub / github.com/BuilderIO/builder / createAdminApiClient

Function createAdminApiClient

packages/admin-sdk/src/index.ts:8–19  ·  view source on GitHub ↗
(privateKey: string)

Source from the content-addressed store, hash-verified

6const root = 'https://cdn.builder.io';
7
8export const createAdminApiClient = (privateKey: string) =>
9 createClient({
10 fetcher: ({ query, variables }, fetch) =>
11 fetch(`${root}/api/v2/admin`, {
12 method: 'POST',
13 body: JSON.stringify({ query, variables }),
14 headers: {
15 'Content-Type': 'application/json',
16 Authorization: `Bearer ${privateKey}`,
17 },
18 }).then(r => r.json()),
19 });

Callers 5

getAttributesFunction · 0.90
createNewSpaceFunction · 0.90
configureSSOFunction · 0.90
generateEmbedTokenFunction · 0.90
addNewModelFunction · 0.90

Calls 3

stringifyMethod · 0.80
thenMethod · 0.65
fetchFunction · 0.50

Tested by

no test coverage detected