docs: add TSDoc for payment processor + generate docs (#5917)

* added tsdocs for payment processor

* generated reference for payment processor
This commit is contained in:
Shahed Nasser
2023-12-18 14:02:18 +02:00
committed by GitHub
parent e63f4e6c7a
commit ddc6cc13a0
73 changed files with 34162 additions and 17470 deletions

View File

@@ -193,7 +193,7 @@ medusa.admin.notifications.list({
{
"name": "count",
"type": "`number`",
"description": "",
"description": "The total number of notifications",
"optional": false,
"defaultValue": "",
"expandable": false,
@@ -202,7 +202,7 @@ medusa.admin.notifications.list({
{
"name": "limit",
"type": "`number`",
"description": "",
"description": "The number of notifications per page",
"optional": false,
"defaultValue": "",
"expandable": false,
@@ -211,7 +211,7 @@ medusa.admin.notifications.list({
{
"name": "offset",
"type": "`number`",
"description": "",
"description": "The number of notifications skipped when retrieving the notifications.",
"optional": false,
"defaultValue": "",
"expandable": false,

View File

@@ -3329,12 +3329,30 @@ medusa.admin.regions.list({
}
]
},
{
"name": "expand",
"type": "`string`",
"description": "Comma-separated relations that should be expanded in the returned data.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "fields",
"type": "`string`",
"description": "Comma-separated fields that should be included in the returned data.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "limit",
"type": "`number`",
"description": "Limit the number of items returned in the list.",
"optional": true,
"defaultValue": "50",
"defaultValue": "20",
"expandable": false,
"children": []
},

View File

@@ -73,7 +73,7 @@ medusa.admin.shippingOptions.create({
},
{
"name": "data",
"type": "`object`",
"type": "`Record<string, unknown>`",
"description": "The data needed for the Fulfillment Provider to handle shipping with this Shipping Option.",
"optional": false,
"defaultValue": "",
@@ -119,12 +119,31 @@ medusa.admin.shippingOptions.create({
},
{
"name": "price_type",
"type": "`string`",
"type": "[ShippingOptionPriceType](../../entities/enums/entities.ShippingOptionPriceType.mdx)",
"description": "The type of the Shipping Option price. `flat\\_rate` indicates fixed pricing, whereas `calculated` indicates that the price will be calculated each time by the fulfillment provider.",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
"children": [
{
"name": "CALCULATED",
"type": "`\"calculated\"`",
"description": "The shipping option's price is calculated. In this case, the `amount` field is typically `null`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "FLAT_RATE",
"type": "`\"flat_rate\"`",
"description": "The shipping option's price is a flat rate.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "profile_id",
@@ -172,12 +191,31 @@ medusa.admin.shippingOptions.create({
},
{
"name": "type",
"type": "`string`",
"type": "[RequirementType](../../entities/enums/entities.RequirementType.mdx)",
"description": "The type of the requirement",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
"children": [
{
"name": "MAX_SUBTOTAL",
"type": "`\"max_subtotal\"`",
"description": "The shipping option can only be applied if the subtotal is less than the requirement's amont.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "MIN_SUBTOTAL",
"type": "`\"min_subtotal\"`",
"description": "The shipping option can only be applied if the subtotal is greater than the requirement's amount.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
}
]
}
@@ -1804,6 +1842,34 @@ medusa.admin.shippingOptions.update(optionId, {
"expandable": false,
"children": []
},
{
"name": "price_type",
"type": "[ShippingOptionPriceType](../../entities/enums/entities.ShippingOptionPriceType.mdx)",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": [
{
"name": "CALCULATED",
"type": "`\"calculated\"`",
"description": "The shipping option's price is calculated. In this case, the `amount` field is typically `null`.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "FLAT_RATE",
"type": "`\"flat_rate\"`",
"description": "The shipping option's price is a flat rate.",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]
},
{
"name": "requirements",
"type": "[OptionRequirement](../../medusa/classes/medusa.OptionRequirement-1.mdx)[]",

View File

@@ -262,7 +262,7 @@ medusa.admin.stockLocations.delete(stockLocationId)
"type": "`boolean`",
"description": "Whether the item was deleted successfully.",
"optional": false,
"defaultValue": "",
"defaultValue": "true",
"expandable": false,
"children": []
},
@@ -280,7 +280,7 @@ medusa.admin.stockLocations.delete(stockLocationId)
"type": "`string`",
"description": "The type of the item that was deleted.",
"optional": false,
"defaultValue": "",
"defaultValue": "stock_location",
"expandable": false,
"children": []
}
@@ -457,7 +457,7 @@ medusa.admin.stockLocations.list({
{
"name": "count",
"type": "`number`",
"description": "",
"description": "The total number of notifications",
"optional": false,
"defaultValue": "",
"expandable": false,
@@ -466,7 +466,7 @@ medusa.admin.stockLocations.list({
{
"name": "limit",
"type": "`number`",
"description": "",
"description": "The number of notifications per page",
"optional": false,
"defaultValue": "",
"expandable": false,
@@ -475,7 +475,7 @@ medusa.admin.stockLocations.list({
{
"name": "offset",
"type": "`number`",
"description": "",
"description": "The number of notifications skipped when retrieving the notifications.",
"optional": false,
"defaultValue": "",
"expandable": false,

View File

@@ -68,7 +68,7 @@ medusa.regions.list()
{
"name": "count",
"type": "`number`",
"description": "",
"description": "The total number of notifications",
"optional": false,
"defaultValue": "",
"expandable": false,
@@ -77,7 +77,7 @@ medusa.regions.list()
{
"name": "limit",
"type": "`number`",
"description": "",
"description": "The number of notifications per page",
"optional": false,
"defaultValue": "",
"expandable": false,
@@ -86,7 +86,7 @@ medusa.regions.list()
{
"name": "offset",
"type": "`number`",
"description": "",
"description": "The number of notifications skipped when retrieving the notifications.",
"optional": false,
"defaultValue": "",
"expandable": false,