docs: create docs workspace (#5174)

* docs: migrate ui docs to docs universe

* created yarn workspace

* added eslint and tsconfig configurations

* fix eslint configurations

* fixed eslint configurations

* shared tailwind configurations

* added shared ui package

* added more shared components

* migrating more components

* made details components shared

* move InlineCode component

* moved InputText

* moved Loading component

* Moved Modal component

* moved Select components

* Moved Tooltip component

* moved Search components

* moved ColorMode provider

* Moved Notification components and providers

* used icons package

* use UI colors in api-reference

* moved Navbar component

* used Navbar and Search in UI docs

* added Feedback to UI docs

* general enhancements

* fix color mode

* added copy colors file from ui-preset

* added features and enhancements to UI docs

* move Sidebar component and provider

* general fixes and preparations for deployment

* update docusaurus version

* adjusted versions

* fix output directory

* remove rootDirectory property

* fix yarn.lock

* moved code component

* added vale for all docs MD and MDX

* fix tests

* fix vale error

* fix deployment errors

* change ignore commands

* add output directory

* fix docs test

* general fixes

* content fixes

* fix announcement script

* added changeset

* fix vale checks

* added nofilter option

* fix vale error
This commit is contained in:
Shahed Nasser
2023-09-21 20:57:15 +03:00
committed by GitHub
parent 19c5d5ba36
commit fa7c94b4cc
3209 changed files with 32188 additions and 31018 deletions

View File

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

View File

@@ -0,0 +1,9 @@
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"
})
.then(({ customer }) => {
console.log(customer.id);
});

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,9 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.carts.lineItems.create(cart_id, {
variant_id,
quantity: 1
})
.then(({ cart }) => {
console.log(cart.id);
});

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.collections.list()
.then(({ collections, limit, offset, count }) => {
console.log(collections.length);
});

View File

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

View File

@@ -0,0 +1,11 @@
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"
})
.then(({ customer }) => {
console.log(customer.id);
});

View File

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

View File

@@ -0,0 +1,9 @@
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"
})
.then(({ customer }) => {
console.log(customer.id);
});

View File

@@ -0,0 +1,19 @@
import Medusa from "@medusajs/medusa-js"
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",
province: "Georgia",
}
})
.then(({ customer }) => {
console.log(customer.id);
});

View File

@@ -0,0 +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(addressId)
.then(({ customer }) => {
console.log(customer.id);
});

View File

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

View File

@@ -0,0 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.listOrders()
.then(({ orders, limit, offset, count }) => {
console.log(orders);
});

View File

@@ -0,0 +1,7 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
// must be previously logged
medusa.customers.paymentMethods.list()
.then(({ payment_methods }) => {
console.log(payment_methods.length);
});

View File

@@ -0,0 +1,10 @@
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"
})
.then(({ customer }) => {
console.log(customer.id);
});

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,9 @@
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"
})
.then(({ order }) => {
console.log(order.id);
});

View File

@@ -0,0 +1,12 @@
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.requestCustomerOrders({
order_ids,
})
.then(() => {
// successful
})
.catch(() => {
// an error occurred
});

View File

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

View File

@@ -0,0 +1,12 @@
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.confirmRequest(
token,
)
.then(() => {
// successful
})
.catch(() => {
// an error occurred
});

View File

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

View File

@@ -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.paymentCollections.retrieve(paymentCollectionId)
.then(({ payment_collection }) => {
console.log(payment_collection.id)
})

View File

@@ -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.paymentCollections.managePaymentSession(payment_id, { provider_id: "stripe" })
.then(({ payment_collection }) => {
console.log(payment_collection.id);
});

View File

@@ -0,0 +1,36 @@
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
// 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);
});
// 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

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

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.productCategories.list()
.then(({ product_categories, limit, offset, count }) => {
console.log(product_categories.length);
});

View File

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

View File

@@ -0,0 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.productTags.list()
.then(({ product_tags }) => {
console.log(product_tags.length);
});

View File

@@ -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.productTypes.list()
.then(({ product_types }) => {
console.log(product_types.length);
});

View File

@@ -0,0 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.products.list()
.then(({ products, limit, offset, count }) => {
console.log(products.length);
});

View File

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,6 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.returnReasons.list()
.then(({ return_reasons }) => {
console.log(return_reasons.length);
});

View File

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

View File

@@ -0,0 +1,14 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.returns.create({
order_id,
items: [
{
item_id,
quantity: 1
}
]
})
.then((data) => {
console.log(data.return.id);
});

View File

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

View File

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

View File

@@ -0,0 +1,20 @@
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.swaps.create({
order_id,
return_items: [
{
item_id,
quantity: 1
}
],
additional_items: [
{
variant_id,
quantity: 1
}
]
})
.then(({ swap }) => {
console.log(swap.id);
});

View File

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

View File

@@ -0,0 +1,2 @@
curl -X DELETE '{backend_url}/store/auth' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/store/auth' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/store/auth' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"password": "supersecret"
}'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/auth/user@example.com'

View File

@@ -0,0 +1 @@
curl -X POST '{backend_url}/store/carts'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/carts/{id}'

View File

@@ -0,0 +1,5 @@
curl -X POST '{backend_url}/store/carts/{id}' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com"
}'

View File

@@ -0,0 +1 @@
curl -X POST '{backend_url}/store/carts/{id}/complete'

View File

@@ -0,0 +1 @@
curl -X DELETE '{backend_url}/store/carts/{id}/discounts/{code}'

View File

@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/store/carts/{id}/line-items' \
-H 'Content-Type: application/json' \
--data-raw '{
"variant_id": "{variant_id}",
"quantity": 1
}'

View File

@@ -0,0 +1 @@
curl -X DELETE '{backend_url}/store/carts/{id}/line-items/{line_id}'

View File

@@ -0,0 +1,5 @@
curl -X POST '{backend_url}/store/carts/{id}/line-items/{line_id}' \
-H 'Content-Type: application/json' \
--data-raw '{
"quantity": 1
}'

View File

@@ -0,0 +1,5 @@
curl -X POST '{backend_url}/store/carts/{id}/payment-sessions' \
-H 'Content-Type: application/json' \
--data-raw '{
"provider_id": "manual"
}'

View File

@@ -0,0 +1 @@
curl -X POST '{backend_url}/store/carts/{id}/payment-sessions'

View File

@@ -0,0 +1 @@
curl -X DELETE '{backend_url}/store/carts/{id}/payment-sessions/{provider_id}'

View File

@@ -0,0 +1,5 @@
curl -X POST '{backend_url}/store/carts/{id}/payment-sessions/manual' \
-H 'Content-Type: application/json' \
--data-raw '{
"data": {}
}'

View File

@@ -0,0 +1 @@
curl -X POST '{backend_url}/store/carts/{id}/payment-sessions/{provider_id}/refresh'

View File

@@ -0,0 +1,5 @@
curl -X POST '{backend_url}/store/carts/{id}/shipping-methods' \
-H 'Content-Type: application/json' \
--data-raw '{
"option_id": "{option_id}",
}'

View File

@@ -0,0 +1 @@
curl -X POST '{backend_url}/store/carts/{id}/taxes'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/collections'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/collections/{id}'

View File

@@ -0,0 +1,8 @@
curl -X POST '{backend_url}/store/customers' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Alec",
"last_name": "Reynolds",
"email": "user@example.com",
"password": "supersecret"
}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/store/customers/me' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/store/customers/me' \
-H 'Cookie: connect.sid={sid}' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Laury"
}'

View File

@@ -0,0 +1,13 @@
curl -X POST '{backend_url}/store/customers/me/addresses' \
-H 'Cookie: connect.sid={sid}' \
-H 'Content-Type: application/json' \
--data-raw '{
"address": {
"first_name": "Celia",
"last_name": "Schumm",
"address_1": "225 Bednar Curve",
"city": "Danielville",
"country_code": "US",
"postal_code": "85137"
}
}'

View File

@@ -0,0 +1,2 @@
curl -X DELETE '{backend_url}/store/customers/me/addresses/{address_id}' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -0,0 +1,6 @@
curl -X POST '{backend_url}/store/customers/me/addresses/{address_id}' \
-H 'Cookie: connect.sid={sid}' \
-H 'Content-Type: application/json' \
--data-raw '{
"first_name": "Gina"
}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/store/customers/me/orders' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -0,0 +1,2 @@
curl '{backend_url}/store/customers/me/payment-methods' \
-H 'Cookie: connect.sid={sid}'

View File

@@ -0,0 +1,7 @@
curl -X POST '{backend_url}/store/customers/password-reset' \
-H 'Content-Type: application/json' \
--data-raw '{
"email": "user@example.com",
"password": "supersecret",
"token": "supersecrettoken"
}'

View File

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

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/gift-cards/{code}'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/order-edits/{id}'

View File

@@ -0,0 +1 @@
curl -X POST '{backend_url}/store/order-edits/{id}/complete'

View File

@@ -0,0 +1 @@
curl -X POST '{backend_url}/store/order-edits/{id}/decline'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/orders?display_id=1&email=user@example.com'

View File

@@ -0,0 +1,5 @@
curl -X POST '{backend_url}/store/batch/customer/token' \
-H 'Content-Type: application/json' \
--data-raw '{
"order_ids": ["id"],
}'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/orders/cart/{cart_id}'

View File

@@ -0,0 +1,5 @@
curl -X POST '{backend_url}/store/orders/customer/confirm' \
-H 'Content-Type: application/json' \
--data-raw '{
"token": "{token}",
}'

View File

@@ -0,0 +1 @@
curl '{backend_url}/store/orders/{id}'

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