Skip to content

Commit 93f2c94

Browse files
committed
docs: add clarification for set cart's customer API route
1 parent 21c6e86 commit 93f2c94

34 files changed

Lines changed: 270 additions & 134 deletions

File tree

www/apps/api-reference/specs/store/code_samples/JavaScript/store_carts_{id}_customer/post.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to set the cart's customer
1516
sdk.store.cart.transferCart("cart_123")
1617
.then(({ cart }) => {
1718
console.log(cart)

www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/get.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to retrieve their details
1516
sdk.store.customer.retrieve()
1617
.then(({ customer }) => {
1718
console.log(customer)

www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me/post.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to update their details
1516
sdk.store.customer.update({
1617
first_name: "John"
1718
})

www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses/get.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to list their addresses
1516
sdk.store.customer.listAddress()
1617
.then(({ addresses, count, offset, limit }) => {
1718
console.log(addresses)

www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses/post.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to create an address
1516
sdk.store.customer.createAddress({
1617
country_code: "us"
1718
})

www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/delete.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to delete their address
1516
sdk.store.customer.deleteAddress("caddr_123")
1617
.then(({ deleted, parent: customer }) => {
1718
console.log(customer)

www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/get.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to retrieve their address
1516
sdk.store.customer.retrieveAddress(
1617
"caddr_123"
1718
)

www/apps/api-reference/specs/store/code_samples/JavaScript/store_customers_me_addresses_{address_id}/post.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to update their address
1516
sdk.store.customer.updateAddress(
1617
"caddr_123",
1718
{

www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders/get.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to list their orders
1516
sdk.store.order.list()
1617
.then(({ orders, count, offset, limit }) => {
1718
console.log(orders)

www/apps/api-reference/specs/store/code_samples/JavaScript/store_orders_{id}_transfer_cancel/post.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export const sdk = new Medusa({
1212
publishableKey: process.env.NEXT_PUBLIC_MEDUSA_PUBLISHABLE_KEY,
1313
})
1414

15+
// TODO must be authenticated as the customer to cancel the order transfer
1516
sdk.store.order.cancelTransfer(
1617
"order_123",
1718
{},

0 commit comments

Comments
 (0)