Skip to content

Commit fa9e264

Browse files
shahednasserBalu-Varanasi
authored andcommitted
docs: generate API reference for 2.12.3 (medusajs#14341)
1 parent 6617f1d commit fa9e264

134 files changed

Lines changed: 8100 additions & 406 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

www/apps/api-reference/generated/generated-admin-sidebar.mjs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,24 @@ const generatedgeneratedAdminSidebarSidebar = {
344344
"loaded": false,
345345
"showLoadingIfEmpty": true
346346
},
347+
{
348+
"type": "category",
349+
"title": "Locales",
350+
"children": [
351+
{
352+
"type": "link",
353+
"path": "locales_locale_schema",
354+
"title": "Locale Object",
355+
"loaded": true,
356+
"badge": {
357+
"variant": "neutral",
358+
"text": "Schema"
359+
}
360+
}
361+
],
362+
"loaded": false,
363+
"showLoadingIfEmpty": true
364+
},
347365
{
348366
"type": "category",
349367
"title": "Notifications",
@@ -891,6 +909,24 @@ const generatedgeneratedAdminSidebarSidebar = {
891909
"loaded": false,
892910
"showLoadingIfEmpty": true
893911
},
912+
{
913+
"type": "category",
914+
"title": "Translations",
915+
"children": [
916+
{
917+
"type": "link",
918+
"path": "translations_translation_schema",
919+
"title": "Translation Object",
920+
"loaded": true,
921+
"badge": {
922+
"variant": "neutral",
923+
"text": "Schema"
924+
}
925+
}
926+
],
927+
"loaded": false,
928+
"showLoadingIfEmpty": true
929+
},
894930
{
895931
"type": "category",
896932
"title": "Uploads",

www/apps/api-reference/generated/generated-store-sidebar.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,24 @@ const generatedgeneratedStoreSidebarSidebar = {
162162
"loaded": false,
163163
"showLoadingIfEmpty": true
164164
},
165+
{
166+
"type": "category",
167+
"title": "Locales",
168+
"children": [
169+
{
170+
"type": "link",
171+
"path": "locales_locale_schema",
172+
"title": "Locale Object",
173+
"loaded": true,
174+
"badge": {
175+
"variant": "neutral",
176+
"text": "Schema"
177+
}
178+
}
179+
],
180+
"loaded": false,
181+
"showLoadingIfEmpty": true
182+
},
165183
{
166184
"type": "category",
167185
"title": "Orders",
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.locale.list()
12+
.then(({ locales, count, limit, offset }) => {
13+
console.log(locales)
14+
})
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.locale.retrieve("en-US")
12+
.then(({ locale }) => {
13+
console.log(locale)
14+
})
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.order.export()
12+
.then(({ transaction_id }) => {
13+
console.log(transaction_id)
14+
})
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.priceList.prices("plist_123")
12+
.then(({ prices }) => {
13+
console.log(prices)
14+
})
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.translation.list()
12+
.then(({ translations, count, limit, offset }) => {
13+
console.log(translations)
14+
})
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.translation.batch({
12+
create: [
13+
{
14+
reference_id: "prod_123",
15+
reference: "product",
16+
locale_code: "en-US",
17+
translations: { title: "Shirt" }
18+
}
19+
],
20+
update: [
21+
{
22+
id: "trans_123",
23+
translations: { title: "Pants" }
24+
}
25+
],
26+
delete: ["trans_321"]
27+
})
28+
.then(({ created, updated, deleted }) => {
29+
console.log(created, updated, deleted)
30+
})
31+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.translation.settings({
12+
entity_type: "product"
13+
})
14+
.then(({ translatable_fields }) => {
15+
console.log(translatable_fields)
16+
})
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import Medusa from "@medusajs/js-sdk"
2+
3+
export const sdk = new Medusa({
4+
baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
5+
debug: import.meta.env.DEV,
6+
auth: {
7+
type: "session",
8+
},
9+
})
10+
11+
sdk.admin.translation.statistics({
12+
entity_type: "product"
13+
})
14+
.then(({ statistics }) => {
15+
console.log(statistics)
16+
})

0 commit comments

Comments
 (0)