-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
31 lines (28 loc) · 956 Bytes
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import { makeClient } from './client'
export { StarlightError } from './errors'
export * from './types'
export * from './utils'
/**
* This is the default object exported by the SDK module, which is a
* pre-created {@link StarlightClient}. In the docs, this is called the "global
* SDK client". If your application only requests data from a single Starlight
* workspace, using this client is easier than creating
* a new one using {@link makeStarlightClient}.
*
* Using the default client is as easy as importing the SDK:
*
* ```ts
* // "Starlight" below is the default client.
* import Starlight from '@starlightcms/js-sdk'
*
* const response = await Starlight.posts.entries.list()
* ```
*
* You need to configure the default workspace before using it.
* See {@apilink StarlightClient.configure} to learn more.
*
* @group Client
*/
const Starlight = makeClient()
export { makeClient as makeStarlightClient }
export default Starlight