publishDocuments
The publishDocuments method is responsible for publishing documents in the underlying content source.
Netlify Create calls this method when the user selects and publishes documents using the Netlify Create UI.
Parameters
This method receives an options
object with the following properties:
document: Document[]
: A list ofDocument
objects from the Netlify Create cache to publish.assets: Asset[]
: A list ofAsset
objects from the Netlify Create cache to publish.userContext?: UserContext
: An object that contains the user'semail
,name
, and optional OAuth access tokens defined by theUserContext
generic type.
Return Value
This method should return a Promise
that resolves with a void
, indicating that the documents have been successfully published.
Example
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