( baseUrl: string, userApiKey: string, collectionId: string, )
| 169 | } |
| 170 | |
| 171 | export async function getCollectionContents( |
| 172 | baseUrl: string, |
| 173 | userApiKey: string, |
| 174 | collectionId: string, |
| 175 | ) { |
| 176 | const client = getGraphqlClient(baseUrl); |
| 177 | const { collectionContents } = await client.request( |
| 178 | CollectionContentsDocument, |
| 179 | { |
| 180 | input: { |
| 181 | collectionId, |
| 182 | sort: { |
| 183 | order: GraphqlSortOrder.Desc, |
| 184 | by: CollectionContentsSortBy.LastUpdatedOn, |
| 185 | }, |
| 186 | }, |
| 187 | }, |
| 188 | { Authorization: `Bearer ${userApiKey}` }, |
| 189 | ); |
| 190 | return collectionContents.response.results.items; |
| 191 | } |
| 192 | |
| 193 | export async function progressUpdate( |
| 194 | baseUrl: string, |
no test coverage detected