chore(docs): Generated API Reference (#2143)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
4961aece1c
commit
a1350bfaec
@@ -0,0 +1,7 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.notes.list()
|
||||
.then(({ notes, limit, offset, count }) => {
|
||||
console.log(notes.length);
|
||||
});
|
||||
11
docs/api/admin/code_samples/JavaScript/notes/postundefined
Normal file
11
docs/api/admin/code_samples/JavaScript/notes/postundefined
Normal file
@@ -0,0 +1,11 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.notes.create({
|
||||
resource_id,
|
||||
resource_type: 'order',
|
||||
value: 'We delivered this order'
|
||||
})
|
||||
.then(({ note }) => {
|
||||
console.log(note.id);
|
||||
});
|
||||
Reference in New Issue
Block a user