docs: generate JS SDK reference with fixes (#12161)

This commit is contained in:
Shahed Nasser
2025-04-11 16:42:09 +03:00
committed by GitHub
parent 90f9149735
commit 734f4fecbc
26 changed files with 6189 additions and 6130 deletions
@@ -7,8 +7,6 @@ This method adds items to a draft order. It sends a request to the
## Example
To add items to a draft order:
```ts
sdk.admin.draftOrder.addItems("order_123", {
items: [
@@ -7,8 +7,6 @@ This method adds promotions to a draft order. It sends a request to the
## Example
To add promotions to a draft order:
```ts
sdk.admin.draftOrder.addPromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
@@ -7,8 +7,6 @@ This method adds a shipping method to a draft order. It sends a request to the
## Example
To add a shipping method to a draft order:
```ts
sdk.admin.draftOrder.addShippingMethod("order_123", {
shipping_option_id: "shipping_option_123",
@@ -7,8 +7,6 @@ This method begins an edit to a draft order. It sends a request to the
## Example
To begin an edit to a draft order:
```ts
sdk.admin.draftOrder.beginEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method cancels an edit to a draft order. It sends a request to the
## Example
To cancel an edit to a draft order:
```ts
sdk.admin.draftOrder.cancelEdit("order_123")
.then(({ id, object, deleted }) => {
@@ -7,8 +7,6 @@ This method confirms an edit to a draft order. It sends a request to the
## Example
To confirm an edit to a draft order:
```ts
sdk.admin.draftOrder.confirmEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -7,13 +7,12 @@ This method converts a draft order to an order. It sends a request to the
## Example
To convert a draft order to an order:
```ts
sdk.admin.draftOrder.convertToOrder("order_123")
.then(({ order }) => {
console.log(order)
})
```
## Parameters
@@ -7,8 +7,6 @@ This method creates a draft order. It sends a request to the
## Example
To create a draft order:
```ts
sdk.admin.draftOrder.create({
email: "test@test.com",
@@ -7,8 +7,6 @@ This method removes an item that is part of an action in a draft order. It sends
## Example
To remove an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.removeActionItem("order_123", "action_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method removes a shipping method from a draft order. It sends a request to
## Example
To remove a shipping method from a draft order:
```ts
sdk.admin.draftOrder.removeShippingMethod("order_123", "action_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method removes promotions from a draft order. It sends a request to the
## Example
To remove promotions from a draft order:
```ts
sdk.admin.draftOrder.removePromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
@@ -7,8 +7,6 @@ This method requests an edit to a draft order. It sends a request to the
## Example
To request an edit to a draft order:
```ts
sdk.admin.draftOrder.requestEdit("order_123")
.then(({ draft_order_preview }) => {
@@ -7,8 +7,6 @@ This method updates a draft order. It sends a request to the
## Example
To update a draft order:
```ts
sdk.admin.draftOrder.update("order_123", {
email: "test@test.com",
@@ -7,8 +7,6 @@ This method updates an item that is part of an action in a draft order. It sends
## Example
To update an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.updateActionItem("order_123", "action_123", {
quantity: 2,
@@ -7,8 +7,6 @@ This method updates a shipping method in a draft order. It sends a request to th
## Example
To update a shipping method in a draft order:
```ts
sdk.admin.draftOrder.updateShippingMethod("order_123", "action_123", {
shipping_option_id: "shipping_option_123",
File diff suppressed because one or more lines are too long