chore(docs): Generated API Reference (#4706)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
github-actions[bot]
2023-08-07 16:54:48 +03:00
committed by GitHub
parent efdea04963
commit 658339767b
1138 changed files with 11740 additions and 7043 deletions

View File

@@ -1,8 +1,8 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.auth.authenticate({
email: 'user@example.com',
password: 'user@example.com'
email: "user@example.com",
password: "user@example.com"
})
.then(({ customer }) => {
console.log(customer.id);

View File

@@ -1,3 +1,3 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.auth.exists('user@example.com')
medusa.auth.exists("user@example.com")

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.retrieve(cart_id)
medusa.carts.retrieve(cartId)
.then(({ cart }) => {
console.log(cart.id);
});

View File

@@ -1,7 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.update(cart_id, {
email: 'user@example.com'
medusa.carts.update(cartId, {
email: "user@example.com"
})
.then(({ cart }) => {
console.log(cart.id);

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.complete(cart_id)
medusa.carts.complete(cartId)
.then(({ cart }) => {
console.log(cart.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.deleteDiscount(cart_id, code)
medusa.carts.deleteDiscount(cartId, code)
.then(({ cart }) => {
console.log(cart.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.lineItems.delete(cart_id, line_id)
medusa.carts.lineItems.delete(cartId, lineId)
.then(({ cart }) => {
console.log(cart.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.lineItems.update(cart_id, line_id, {
medusa.carts.lineItems.update(cartId, lineId, {
quantity: 1
})
.then(({ cart }) => {

View File

@@ -1,7 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.setPaymentSession(cart_id, {
provider_id: 'manual'
medusa.carts.setPaymentSession(cartId, {
provider_id: "manual"
})
.then(({ cart }) => {
console.log(cart.id);

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.createPaymentSessions(cart_id)
medusa.carts.createPaymentSessions(cartId)
.then(({ cart }) => {
console.log(cart.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.deletePaymentSession(cart_id, 'manual')
medusa.carts.deletePaymentSession(cartId, "manual")
.then(({ cart }) => {
console.log(cart.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.updatePaymentSession(cart_id, 'manual', {
medusa.carts.updatePaymentSession(cartId, "manual", {
data: {
}

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.refreshPaymentSession(cart_id, 'manual')
medusa.carts.refreshPaymentSession(cartId, "manual")
.then(({ cart }) => {
console.log(cart.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.addShippingMethod(cart_id, {
medusa.carts.addShippingMethod(cartId, {
option_id
})
.then(({ cart }) => {

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.collections.retrieve(collection_id)
medusa.collections.retrieve(collectionId)
.then(({ collection }) => {
console.log(collection.id);
});

View File

@@ -1,10 +1,10 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.customers.create({
first_name: 'Alec',
last_name: 'Reynolds',
email: 'user@example.com',
password: 'supersecret'
first_name: "Alec",
last_name: "Reynolds",
email: "user@example.com",
password: "supersecret"
})
.then(({ customer }) => {
console.log(customer.id);

View File

@@ -2,7 +2,7 @@ import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.update({
first_name: 'Laury'
first_name: "Laury"
})
.then(({ customer }) => {
console.log(customer.id);

View File

@@ -3,17 +3,15 @@ const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.addresses.addAddress({
address: {
first_name: 'Celia',
last_name: 'Schumm',
address_1: '225 Bednar Curve',
city: 'Danielville',
country_code: 'US',
postal_code: '85137',
phone: '981-596-6748 x90188',
company: 'Wyman LLC',
address_2: '',
province: 'Georgia',
metadata: {}
first_name: "Celia",
last_name: "Schumm",
address_1: "225 Bednar Curve",
city: "Danielville",
country_code: "US",
postal_code: "85137",
phone: "981-596-6748 x90188",
company: "Wyman LLC",
province: "Georgia",
}
})
.then(({ customer }) => {

View File

@@ -1,7 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.addresses.deleteAddress(address_id)
medusa.customers.addresses.deleteAddress(addressId)
.then(({ customer }) => {
console.log(customer.id);
});

View File

@@ -1,8 +1,8 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.addresses.updateAddress(address_id, {
first_name: 'Gina'
medusa.customers.addresses.updateAddress(addressId, {
first_name: "Gina"
})
.then(({ customer }) => {
console.log(customer.id);

View File

@@ -1,9 +1,9 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.customers.resetPassword({
email: 'user@example.com',
password: 'supersecret',
token: 'supersecrettoken'
email: "user@example.com",
password: "supersecret",
token: "supersecrettoken"
})
.then(({ customer }) => {
console.log(customer.id);

View File

@@ -1,7 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.customers.generatePasswordToken({
email: 'user@example.com'
email: "user@example.com"
})
.then(() => {
// successful

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.orderEdits.retrieve(order_edit_id)
medusa.orderEdits.retrieve(orderEditId)
.then(({ order_edit }) => {
console.log(order_edit.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.orderEdits.complete(order_edit_id)
medusa.orderEdits.complete(orderEditId)
.then(({ order_edit }) => {
console.log(order_edit.id)
})

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.orderEdits.decline(order_edit_id)
medusa.orderEdits.decline(orderEditId)
.then(({ order_edit }) => {
console.log(order_edit.id);
})

View File

@@ -2,7 +2,7 @@ import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.orders.lookupOrder({
display_id: 1,
email: 'user@example.com'
email: "user@example.com"
})
.then(({ order }) => {
console.log(order.id);

View File

@@ -1,8 +1,8 @@
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.orders.claimOrders({
display_ids,
medusa.orders.requestCustomerOrders({
order_ids,
})
.then(() => {
// successful

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.orders.retrieveByCartId(cart_id)
medusa.orders.retrieveByCartId(cartId)
.then(({ order }) => {
console.log(order.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.orders.retrieve(order_id)
medusa.orders.retrieve(orderId)
.then(({ order }) => {
console.log(order.id);
});

View File

@@ -1,10 +1,6 @@
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
// Total amount = 10000
// Adding a payment session
medusa.paymentCollections.managePaymentSession(payment_id, { provider_id: "stripe" })
.then(({ payment_collection }) => {
console.log(payment_collection.id);

View File

@@ -4,29 +4,33 @@ const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// Total amount = 10000
// Adding two new sessions
medusa.paymentCollections.managePaymentSessionsBatch(payment_id, [
{
provider_id: "stripe",
amount: 5000,
},
{
provider_id: "manual",
amount: 5000,
},
])
// Example 1: Adding two new sessions
medusa.paymentCollections.managePaymentSessionsBatch(paymentId, {
sessions: [
{
provider_id: "stripe",
amount: 5000,
},
{
provider_id: "manual",
amount: 5000,
},
]
})
.then(({ payment_collection }) => {
console.log(payment_collection.id);
});
// Updating one session and removing the other
medusa.paymentCollections.managePaymentSessionsBatch(payment_id, [
{
provider_id: "stripe",
amount: 10000,
session_id: "ps_123456"
},
])
// Example 2: Updating one session and removing the other
medusa.paymentCollections.managePaymentSessionsBatch(paymentId, {
sessions: [
{
provider_id: "stripe",
amount: 10000,
session_id: "ps_123456"
},
]
})
.then(({ payment_collection }) => {
console.log(payment_collection.id);
});

View File

@@ -1,7 +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.paymentCollections.authorize(payment_id)
medusa.paymentCollections.authorize(paymentId)
.then(({ payment_collection }) => {
console.log(payment_collection.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.paymentCollections.refreshPaymentSession(payment_collection_id, session_id)
medusa.paymentCollections.refreshPaymentSession(paymentCollectionId, sessionId)
.then(({ payment_session }) => {
console.log(payment_session.id);
});

View File

@@ -1,7 +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.paymentCollections.authorize(payment_id, session_id)
medusa.paymentCollections.authorize(paymentId, sessionId)
.then(({ payment_collection }) => {
console.log(payment_collection.id);
});

View File

@@ -1,7 +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.productCategories.retrieve(product_category_id)
medusa.productCategories.retrieve(productCategoryId)
.then(({ product_category }) => {
console.log(product_category.id);
});

View File

@@ -1,7 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.products.search({
q: 'Shirt'
q: "Shirt"
})
.then(({ hits }) => {
console.log(hits.length);

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.products.retrieve(product_id)
medusa.products.retrieve(productId)
.then(({ product }) => {
console.log(product.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.regions.retrieve(region_id)
medusa.regions.retrieve(regionId)
.then(({ region }) => {
console.log(region.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.returnReasons.retrieve(reason_id)
medusa.returnReasons.retrieve(reasonId)
.then(({ return_reason }) => {
console.log(return_reason.id);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.shippingOptions.listCartOptions(cart_id)
medusa.shippingOptions.listCartOptions(cartId)
.then(({ shipping_options }) => {
console.log(shipping_options.length);
});

View File

@@ -1,6 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.swaps.retrieveByCartId(cart_id)
medusa.swaps.retrieveByCartId(cartId)
.then(({ swap }) => {
console.log(swap.id);
});

View File

@@ -1,2 +1,2 @@
curl --location --request DELETE 'https://medusa-url.com/store/auth' \
--header 'Cookie: connect.sid={sid}'
curl -X DELETE 'https://medusa-url.com/store/auth' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -1,2 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/auth' \
--header 'Cookie: connect.sid={sid}'
curl 'https://medusa-url.com/store/auth' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/auth' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/auth' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"password": "supersecret"

View File

@@ -1,2 +1 @@
curl --location --request GET 'https://medusa-url.com/store/auth/user@example.com' \
--header 'Cookie: connect.sid={sid}'
curl 'https://medusa-url.com/store/auth/user@example.com'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/carts'
curl -X POST 'https://medusa-url.com/store/carts'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/carts/{id}'
curl 'https://medusa-url.com/store/carts/{id}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/carts/{id}' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com"
}'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/complete'
curl -X POST 'https://medusa-url.com/store/carts/{id}/complete'

View File

@@ -1 +1 @@
curl --location --request DELETE 'https://medusa-url.com/store/carts/{id}/discounts/{code}'
curl -X DELETE 'https://medusa-url.com/store/carts/{id}/discounts/{code}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/line-items' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/carts/{id}/line-items' \
-H 'Content-Type: application/json' \
--data-raw '{
"variant_id": "{variant_id}",
"quantity": 1

View File

@@ -1 +1 @@
curl --location --request DELETE 'https://medusa-url.com/store/carts/{id}/line-items/{line_id}'
curl -X DELETE 'https://medusa-url.com/store/carts/{id}/line-items/{line_id}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/line-items/{line_id}' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/carts/{id}/line-items/{line_id}' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 1
}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/carts/{id}/payment-sessions' \
-H 'Content-Type: application/json' \
--data-raw '{
"provider_id": "manual"
}'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions'
curl -X POST 'https://medusa-url.com/store/carts/{id}/payment-sessions'

View File

@@ -1 +1 @@
curl --location --request DELETE 'https://medusa-url.com/store/carts/{id}/payment-sessions/manual'
curl -X DELETE 'https://medusa-url.com/store/carts/{id}/payment-sessions/{provider_id}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions/manual' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/carts/{id}/payment-sessions/manual' \
-H 'Content-Type: application/json' \
--data-raw '{
"data": {}
}'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/payment-sessions/manual/refresh'
curl -X POST 'https://medusa-url.com/store/carts/{id}/payment-sessions/{provider_id}/refresh'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/shipping-methods' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/carts/{id}/shipping-methods' \
-H 'Content-Type: application/json' \
--data-raw '{
"option_id": "{option_id}",
}'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/carts/{id}/taxes'
curl -X POST 'https://medusa-url.com/store/carts/{id}/taxes'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/collections'
curl 'https://medusa-url.com/store/collections'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/collections/{id}'
curl 'https://medusa-url.com/store/collections/{id}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/customers' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/customers' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Alec",
"last_name": "Reynolds",

View File

@@ -1,2 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/customers/me' \
--header 'Cookie: connect.sid={sid}'
curl 'https://medusa-url.com/store/customers/me' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -1,6 +1,6 @@
curl --location --request POST 'https://medusa-url.com/store/customers/me' \
--header 'Cookie: connect.sid={sid}' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/customers/me' \
-H 'Cookie: connect.sid={sid}' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Laury"
}'

View File

@@ -1,6 +1,6 @@
curl --location --request POST 'https://medusa-url.com/store/customers/me/addresses' \
--header 'Cookie: connect.sid={sid}' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/customers/me/addresses' \
-H 'Cookie: connect.sid={sid}' \
-H 'Content-Type: application/json' \
--data-raw '{
"address": {
"first_name": "Celia",

View File

@@ -1,2 +1,2 @@
curl --location --request DELETE 'https://medusa-url.com/store/customers/me/addresses/{address_id}' \
--header 'Cookie: connect.sid={sid}'
curl -X DELETE 'https://medusa-url.com/store/customers/me/addresses/{address_id}' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -1,6 +1,6 @@
curl --location --request POST 'https://medusa-url.com/store/customers/me/addresses/{address_id}' \
--header 'Cookie: connect.sid={sid}' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/customers/me/addresses/{address_id}' \
-H 'Cookie: connect.sid={sid}' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Gina"
}'

View File

@@ -1,2 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/customers/me/orders' \
--header 'Cookie: connect.sid={sid}'
curl 'https://medusa-url.com/store/customers/me/orders' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -1,2 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/customers/me/payment-methods' \
--header 'Cookie: connect.sid={sid}'
curl 'https://medusa-url.com/store/customers/me/payment-methods' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/customers/password-reset' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/customers/password-reset' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"password": "supersecret",

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/customers/password-token' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/customers/password-token' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com"
}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/gift-cards/{code}'
curl 'https://medusa-url.com/store/gift-cards/{code}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/order-edits/{id}'
curl 'https://medusa-url.com/store/order-edits/{id}'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/order-edits/{id}/complete'
curl -X POST 'https://medusa-url.com/store/order-edits/{id}/complete'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/order-edits/{id}/decline'
curl -X POST 'https://medusa-url.com/store/order-edits/{id}/decline'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/orders?display_id=1&email=user@example.com'
curl 'https://medusa-url.com/store/orders?display_id=1&email=user@example.com'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/batch/customer/token' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/batch/customer/token' \
-H 'Content-Type: application/json' \
--data-raw '{
"display_ids": ["id"],
"order_ids": ["id"],
}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/orders/cart/{id}'
curl 'https://medusa-url.com/store/orders/cart/{cart_id}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/orders/customer/confirm' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/orders/customer/confirm' \
-H 'Content-Type: application/json' \
--data-raw '{
"token": "{token}",
}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/orders/{id}'
curl 'https://medusa-url.com/store/orders/{id}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/payment-collections/{id}'
curl 'https://medusa-url.com/store/payment-collections/{id}'

View File

@@ -1 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/payment-collections/{id}/sessions'
curl -X POST 'https://medusa-url.com/store/payment-collections/{id}/sessions' \
-H 'Content-Type: application/json' \
--data-raw '{
"provider_id": "stripe"
}'

View File

@@ -1 +1,14 @@
curl --location --request POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/batch'
curl -X POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/batch' \
-H 'Content-Type: application/json' \
--data-raw '{
"sessions": [
{
"provider_id": "stripe",
"amount": 5000
},
{
"provider_id": "manual",
"amount": 5000
}
]
}'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/batch/authorize'
curl -X POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/batch/authorize'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/{session_id}'
curl -X POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/{session_id}'

View File

@@ -1 +1 @@
curl --location --request POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/{session_id}/authorize'
curl -X POST 'https://medusa-url.com/store/payment-collections/{id}/sessions/{session_id}/authorize'

View File

@@ -1,2 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/product-categories' \
--header 'Authorization: Bearer {api_token}'
curl 'https://medusa-url.com/store/product-categories' \
-H 'Authorization: Bearer {api_token}'

View File

@@ -1,2 +1,2 @@
curl --location --request GET 'https://medusa-url.com/store/product-categories/{id}' \
--header 'Authorization: Bearer {api_token}'
curl 'https://medusa-url.com/store/product-categories/{id}' \
-H 'Authorization: Bearer {api_token}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/product-tags'
curl 'https://medusa-url.com/store/product-tags'

View File

@@ -1,2 +1 @@
curl --location --request GET 'https://medusa-url.com/store/product-types' \
--header 'Authorization: Bearer {api_token}'
curl 'https://medusa-url.com/store/product-types'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/products'
curl 'https://medusa-url.com/store/products'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/products/search' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/products/search' \
-H 'Content-Type: application/json' \
--data-raw '{
"q": "Shirt"
}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/products/{id}'
curl 'https://medusa-url.com/store/products/{id}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/regions'
curl 'https://medusa-url.com/store/regions'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/regions/{id}'
curl 'https://medusa-url.com/store/regions/{id}'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/return-reasons'
curl 'https://medusa-url.com/store/return-reasons'

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/return-reasons/{id}'
curl 'https://medusa-url.com/store/return-reasons/{id}'

View File

@@ -1,5 +1,5 @@
curl --location --request POST 'https://medusa-url.com/store/returns' \
--header 'Content-Type: application/json' \
curl -X POST 'https://medusa-url.com/store/returns' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_id": "asfasf",
"items": [

View File

@@ -1 +1 @@
curl --location --request GET 'https://medusa-url.com/store/shipping-options'
curl 'https://medusa-url.com/store/shipping-options'

Some files were not shown because too many files have changed in this diff Show More