( baseUrl: string, userApiKey: string, name: string, description?: string, )
| 222 | } |
| 223 | |
| 224 | export async function createCollection( |
| 225 | baseUrl: string, |
| 226 | userApiKey: string, |
| 227 | name: string, |
| 228 | description?: string, |
| 229 | ) { |
| 230 | const client = getGraphqlClient(baseUrl); |
| 231 | const response = await client.request( |
| 232 | CreateOrUpdateCollectionDocument, |
| 233 | { input: { name, description } }, |
| 234 | { Authorization: `Bearer ${userApiKey}` }, |
| 235 | ); |
| 236 | return response.createOrUpdateCollection; |
| 237 | } |
| 238 | |
| 239 | export async function registerAdminUser(baseUrl: string) { |
| 240 | const client = getGraphqlClient(baseUrl); |
no test coverage detected