chore: update links to v2 docs in source code and comments (#9732)

This commit is contained in:
Shahed Nasser
2024-10-24 15:18:38 +03:00
committed by GitHub
parent 6617f81640
commit 92bbd7953b
39 changed files with 225 additions and 229 deletions
+8 -8
View File
@@ -16,7 +16,7 @@ export class ApiKey {
/**
* This methods retrieves a paginated list of API keys. It sends a request to the
* [List API Keys](https://docs.medusajs.com/v2/api/admin#api-keys_getapikeys) API route.
* [List API Keys](https://docs.medusajs.com/api/admin#api-keys_getapikeys) API route.
*
* @param queryParams - Filters and pagination configurations.
* @param headers - Headers to pass in the request.
@@ -58,7 +58,7 @@ export class ApiKey {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
queryParams?: HttpTypes.AdminGetApiKeysParams,
@@ -73,7 +73,7 @@ export class ApiKey {
}
/**
* This method creates an API key. It sends a request to the [Create API Key](https://docs.medusajs.com/v2/api/admin#api-keys_postapikeys)
* This method creates an API key. It sends a request to the [Create API Key](https://docs.medusajs.com/api/admin#api-keys_postapikeys)
* API route.
*
* @param body - The API key's details.
@@ -108,7 +108,7 @@ export class ApiKey {
/**
* This method revokes an API key. It sends a request to the
* [Revoke API Key](https://docs.medusajs.com/v2/api/admin#api-keys_postapikeysidrevoke) API route.
* [Revoke API Key](https://docs.medusajs.com/api/admin#api-keys_postapikeysidrevoke) API route.
*
* @param id - The API key's ID.
* @param headers - Headers to pass in the request.
@@ -132,7 +132,7 @@ export class ApiKey {
/**
* This method retrieves an API key's details. It sends a request to the
* [Get API key](https://docs.medusajs.com/v2/api/admin#api-keys_getapikeysid) API route.
* [Get API key](https://docs.medusajs.com/api/admin#api-keys_getapikeysid) API route.
*
* @param id - The API key's ID.
* @param headers - Headers to pass in the request.
@@ -155,7 +155,7 @@ export class ApiKey {
/**
* This method updates an API key's details. It sends a request to the
* [Update API Key](https://docs.medusajs.com/v2/api/admin#api-keys_postapikeysid) API route.
* [Update API Key](https://docs.medusajs.com/api/admin#api-keys_postapikeysid) API route.
*
* @param id - The API key's ID.
* @param body - The data to update in the API key.
@@ -190,7 +190,7 @@ export class ApiKey {
/**
* This method deletes an API key by its ID. It sends a request to the
* [Delete API Key](https://docs.medusajs.com/v2/api/admin#api-keys_deleteapikeysid) API route.
* [Delete API Key](https://docs.medusajs.com/api/admin#api-keys_deleteapikeysid) API route.
*
* @param id - The API key's ID.
* @param headers - Headers to pass in the request.
@@ -214,7 +214,7 @@ export class ApiKey {
/**
* This method manages the sales channels associated with a publishable API key to either add
* or remove associations. It sends a request to the [Manage Sales Channels](https://docs.medusajs.com/v2/api/admin#api-keys_postapikeysidsaleschannels)
* or remove associations. It sends a request to the [Manage Sales Channels](https://docs.medusajs.com/api/admin#api-keys_postapikeysidsaleschannels)
* API route.
*
* @param id - The API key's ID.
+8 -8
View File
@@ -16,7 +16,7 @@ export class Campaign {
/**
* This method retrieves a campaign by its ID. It sends a request to the
* [Get Campaign](https://docs.medusajs.com/v2/api/admin#campaigns_getcampaignsid) API route.
* [Get Campaign](https://docs.medusajs.com/api/admin#campaigns_getcampaignsid) API route.
*
* @param id - The campaign's ID.
* @param query - Configure the fields to retrieve in the campaign.
@@ -44,7 +44,7 @@ export class Campaign {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(
id: string,
@@ -62,7 +62,7 @@ export class Campaign {
/**
* This method retrieves a paginated list of campaigns. It sends a request to the
* [List Campaigns](https://docs.medusajs.com/v2/api/admin#campaigns_getcampaigns) API route.
* [List Campaigns](https://docs.medusajs.com/api/admin#campaigns_getcampaigns) API route.
*
* @param query - Filters and pagination configurations.
* @param headers - Headers to pass in the request.
@@ -104,7 +104,7 @@ export class Campaign {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
query?: HttpTypes.AdminGetCampaignsParams,
@@ -121,7 +121,7 @@ export class Campaign {
/**
* This method creates a campaign. It sends a request to the
* [Create Campaign](https://docs.medusajs.com/v2/api/admin#campaigns_postcampaigns) API route.
* [Create Campaign](https://docs.medusajs.com/api/admin#campaigns_postcampaigns) API route.
*
* @param payload - The details of the campaign to create.
* @param headers - Headers to pass in the request
@@ -151,7 +151,7 @@ export class Campaign {
/**
* This method updates a campaign. It sends a request to the
* [Update Campaign](https://docs.medusajs.com/v2/api/admin#campaigns_postcampaignsid) API route.
* [Update Campaign](https://docs.medusajs.com/api/admin#campaigns_postcampaignsid) API route.
*
* @param id - The campaign's ID.
* @param payload - The data to update in the campaign.
@@ -183,7 +183,7 @@ export class Campaign {
/**
* This method deletes a campaign by its ID. It sends a request to the
* [Delete Campaign](https://docs.medusajs.com/v2/api/admin#campaigns_deletecampaignsid) API route.
* [Delete Campaign](https://docs.medusajs.com/api/admin#campaigns_deletecampaignsid) API route.
*
* @param id - The campaign's ID.
* @param headers - Headers to pass in the request
@@ -207,7 +207,7 @@ export class Campaign {
/**
* This method manages the promotions of a campaign to either add or remove the association between them.
* It sends a request to the [Manage Promotions](https://docs.medusajs.com/v2/api/admin#campaigns_postcampaignsidpromotions)
* It sends a request to the [Manage Promotions](https://docs.medusajs.com/api/admin#campaigns_postcampaignsidpromotions)
* API route.
*
* @param id - The campaign's ID.
+22 -22
View File
@@ -17,7 +17,7 @@ export class Claim {
/**
* This method retrieves a paginated list of claims. It sends a request to the
* [List Claims](https://docs.medusajs.com/v2/api/admin#claims_getclaims) API route.
* [List Claims](https://docs.medusajs.com/api/admin#claims_getclaims) API route.
*
* @param query - Filters and pagination configurations.
* @param headers - Headers to pass in the request.
@@ -59,7 +59,7 @@ export class Claim {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(query?: HttpTypes.AdminClaimListParams, headers?: ClientHeaders) {
return await this.client.fetch<HttpTypes.AdminClaimListResponse>(
@@ -73,7 +73,7 @@ export class Claim {
/**
* This method retrieves a claim. It sends a request to the
* [Get Claim](https://docs.medusajs.com/v2/api/admin#claims_getclaimsid) API route.
* [Get Claim](https://docs.medusajs.com/api/admin#claims_getclaimsid) API route.
*
* @param id - The claim's ID.
* @param query - Configure the fields to retrieve in the claim.
@@ -101,7 +101,7 @@ export class Claim {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(
id: string,
@@ -119,7 +119,7 @@ export class Claim {
/**
* This method creates a claim. It sends a request to the
* [Create Claim](https://docs.medusajs.com/v2/api/admin#claims_postclaims) API route.
* [Create Claim](https://docs.medusajs.com/api/admin#claims_postclaims) API route.
*
* @param body - The claim's details.
* @param query - Configure the fields to retrieve in the claim.
@@ -153,7 +153,7 @@ export class Claim {
/**
* This method cancels a claim. It sends a request to the
* [Cancel Claim](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidcancel) API route.
* [Cancel Claim](https://docs.medusajs.com/api/admin#claims_postclaimsidcancel) API route.
*
* @param id - The claim's ID.
* @param query - Configure the fields to retrieve in the claim.
@@ -183,7 +183,7 @@ export class Claim {
/**
* This method adds items to the claim. It sends a request to the
* [Add Items](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidclaimitems) API route.
* [Add Items](https://docs.medusajs.com/api/admin#claims_postclaimsidclaimitems) API route.
*
* @param id - The ID of the claim to add the items to.
* @param body - The items' details.
@@ -223,7 +223,7 @@ export class Claim {
/**
* This method updates a claim item by the ID of the item's `WRITE_OFF_ITEM` action. It
* sends a request to the [Update Claim Item](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidclaimitemsaction_id) API route.
* sends a request to the [Update Claim Item](https://docs.medusajs.com/api/admin#claims_postclaimsidclaimitemsaction_id) API route.
*
* Every item has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
@@ -267,7 +267,7 @@ export class Claim {
/**
* This method removes a claim item from a claim by the ID of the item's `WRITE_OFF_ITEM` action.
* It sends a request to the [Remove Claim Item](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidclaimitemsaction_id)
* It sends a request to the [Remove Claim Item](https://docs.medusajs.com/api/admin#claims_deleteclaimsidclaimitemsaction_id)
* API route.
*
* Every item has an `actions` property, whose value is an array of actions.
@@ -307,7 +307,7 @@ export class Claim {
/**
* This method adds inbound (or return) items to the claim. These inbound items will have a `RETURN_ITEM` action.
*
* This method sends a request to the [Add Inbound Items](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinbounditems)
* This method sends a request to the [Add Inbound Items](https://docs.medusajs.com/api/admin#claims_postclaimsidinbounditems)
* API route.
*
* @param id - The ID of the claim to add the inbound items to.
@@ -351,7 +351,7 @@ export class Claim {
/**
* This method updates an inbound (or return) item of a claim using the ID of the item's `RETURN_ITEM` action.
* It sends a request to the [Update Inbound Item](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinbounditemsaction_id)
* It sends a request to the [Update Inbound Item](https://docs.medusajs.com/api/admin#claims_postclaimsidinbounditemsaction_id)
* API route.
*
* Every item has an `actions` property, whose value is an array of actions.
@@ -396,7 +396,7 @@ export class Claim {
/**
* This method removes an inbound (or return) item from a claim using the ID of the item's `RETURN_ITEM` action.
* It sends a request to the [Remove Inbound Item](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidinbounditemsaction_id)
* It sends a request to the [Remove Inbound Item](https://docs.medusajs.com/api/admin#claims_deleteclaimsidinbounditemsaction_id)
* API route.
*
* Every item has an `actions` property, whose value is an array of actions.
@@ -437,7 +437,7 @@ export class Claim {
* This method adds an inbound (or return) shipping method to a claim.
* The inbound shipping method will have a `SHIPPING_ADD` action.
*
* This method sends a request to the [Add Inbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinboundshippingmethod)
* This method sends a request to the [Add Inbound Shipping](https://docs.medusajs.com/api/admin#claims_postclaimsidinboundshippingmethod)
* API route.
*
* @param id - The claim's ID.
@@ -477,7 +477,7 @@ export class Claim {
/**
* This method updates a shipping method for returning items in the claim using the ID of the method's `SHIPPING_ADD` action.
* It sends a request to the [Update Inbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidinboundshippingmethodaction_id)
* It sends a request to the [Update Inbound Shipping](https://docs.medusajs.com/api/admin#claims_postclaimsidinboundshippingmethodaction_id)
* API route.
*
* Every shipping method has an `actions` property, whose value is an array of actions.
@@ -522,7 +522,7 @@ export class Claim {
/**
* This method deletes a shipping method for returning items in the claim using the ID of the method's `SHIPPING_ADD` action.
* It sends a request to the [Remove Inbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidinboundshippingmethodaction_id)
* It sends a request to the [Remove Inbound Shipping](https://docs.medusajs.com/api/admin#claims_deleteclaimsidinboundshippingmethodaction_id)
* API route.
*
* Every shipping method has an `actions` property, whose value is an array of actions.
@@ -561,7 +561,7 @@ export class Claim {
/**
* This method adds outbound (or new) items to a claim. These outbound items will have an `ITEM_ADD` action.
* It sends a request to the [Add Outbound Items](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutbounditems)
* It sends a request to the [Add Outbound Items](https://docs.medusajs.com/api/admin#claims_postclaimsidoutbounditems)
* API route.
*
* @param id - The ID of the claim to add the outbound items to.
@@ -603,7 +603,7 @@ export class Claim {
/**
* This method updates an outbound (or new) item of a claim using the ID of the item's `ITEM_ADD` action.
* It sends a request to the [Update Outbound Item](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutbounditemsaction_id)
* It sends a request to the [Update Outbound Item](https://docs.medusajs.com/api/admin#claims_postclaimsidoutbounditemsaction_id)
* API route.
*
* Every item has an `actions` property, whose value is an array of actions.
@@ -648,7 +648,7 @@ export class Claim {
/**
* This method removes an outbound (or new) item from a claim using the ID of the item's `ITEM_ADD` action.
* It sends a request to the [Remove Outbound Item](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidoutbounditemsaction_id)
* It sends a request to the [Remove Outbound Item](https://docs.medusajs.com/api/admin#claims_deleteclaimsidoutbounditemsaction_id)
* API route.
*
* Every item has an `actions` property, whose value is an array of actions.
@@ -690,7 +690,7 @@ export class Claim {
* The outbound shipping method will have a `SHIPPING_ADD` action.
*
* This method sends a request to the
* [Add Outbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutboundshippingmethod)
* [Add Outbound Shipping](https://docs.medusajs.com/api/admin#claims_postclaimsidoutboundshippingmethod)
* API route.
*
* @param id - The claim's ID.
@@ -730,7 +730,7 @@ export class Claim {
/**
* This method updates the shipping method for delivering outbound items in a claim using the ID of the method's `SHIPPING_ADD` action.
* It sends a request to the [Update Outbound Shipping](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidoutboundshippingmethodaction_id)
* It sends a request to the [Update Outbound Shipping](https://docs.medusajs.com/api/admin#claims_postclaimsidoutboundshippingmethodaction_id)
* API route.
*
* Every shipping method has an `actions` property, whose value is an array of actions.
@@ -812,7 +812,7 @@ export class Claim {
/**
* This method confirms a claim request, applying its changes on the associated order.
* It sends a request to the [Confirm Claim Request](https://docs.medusajs.com/v2/api/admin#claims_postclaimsidrequest)
* It sends a request to the [Confirm Claim Request](https://docs.medusajs.com/api/admin#claims_postclaimsidrequest)
* API route.
*
* @param id - The claim's ID.
@@ -849,7 +849,7 @@ export class Claim {
/**
* This method cancels a requested claim. It sends a request to the
* [Cancel Claim Request](https://docs.medusajs.com/v2/api/admin#claims_deleteclaimsidrequest)
* [Cancel Claim Request](https://docs.medusajs.com/api/admin#claims_deleteclaimsidrequest)
* API route.
*
* @param id - The claim's ID.
+4 -4
View File
@@ -16,7 +16,7 @@ export class Currency {
/**
* This method retrieves a paginated list of currencies. It sends a request to the
* [List Currencies](https://docs.medusajs.com/v2/api/admin#currencies_getcurrencies)
* [List Currencies](https://docs.medusajs.com/api/admin#currencies_getcurrencies)
* API route.
*
* @param query - Filters and pagination configurations.
@@ -59,7 +59,7 @@ export class Currency {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
query?: HttpTypes.AdminCurrencyListParams,
@@ -76,7 +76,7 @@ export class Currency {
/**
* This method retrieves a currency by its code. It sends a request to the
* [Get Currency](https://docs.medusajs.com/v2/api/admin#currencies_getcurrenciescode) API route.
* [Get Currency](https://docs.medusajs.com/api/admin#currencies_getcurrenciescode) API route.
*
* @param code - The currency's code.
* @param query - Configure the fields to retrieve in the currency.
@@ -104,7 +104,7 @@ export class Currency {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(
code: string,
@@ -16,7 +16,7 @@ export class CustomerGroup {
/**
* This method retrieves a customer group by its ID. It sends a request to the
* [Get Customer Group](https://docs.medusajs.com/v2/api/admin#customer-groups_getcustomergroupsid) API route.
* [Get Customer Group](https://docs.medusajs.com/api/admin#customer-groups_getcustomergroupsid) API route.
*
* @param id - The customer group's ID.
* @param query - Configure the fields to retrieve in the customer group.
@@ -44,7 +44,7 @@ export class CustomerGroup {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(
id: string,
@@ -63,7 +63,7 @@ export class CustomerGroup {
/**
* This method retrieves a paginated list of customer groups. It sends a request to the
* [List Customer Groups](https://docs.medusajs.com/v2/api/admin#customer-groups_getcustomergroups)
* [List Customer Groups](https://docs.medusajs.com/api/admin#customer-groups_getcustomergroups)
* API route.
*
* @param query - Filters and pagination configurations.
@@ -106,7 +106,7 @@ export class CustomerGroup {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
query?: HttpTypes.AdminGetCustomerGroupsParams,
@@ -124,7 +124,7 @@ export class CustomerGroup {
/**
* This method creates a customer group. It sends a request to the
* [Create Customer Group](https://docs.medusajs.com/v2/api/admin#customer-groups_postcustomergroups)
* [Create Customer Group](https://docs.medusajs.com/api/admin#customer-groups_postcustomergroups)
* API route.
*
* @param body - The customer group's details.
@@ -158,7 +158,7 @@ export class CustomerGroup {
/**
* This method updates a customer group's details. It sends a request to the
* [Update Customer](https://docs.medusajs.com/v2/api/admin#customer-groups_postcustomergroupsid)
* [Update Customer](https://docs.medusajs.com/api/admin#customer-groups_postcustomergroupsid)
* API route.
*
* @param id - The customer group's ID.
@@ -194,7 +194,7 @@ export class CustomerGroup {
/**
* This method deletes a customer group. This method sends a request to the
* [Delete Customer Group](https://docs.medusajs.com/v2/api/admin#customer-groups_deletecustomergroupsid)
* [Delete Customer Group](https://docs.medusajs.com/api/admin#customer-groups_deletecustomergroupsid)
* API route.
*
* @param id - The customer group's ID.
@@ -219,7 +219,7 @@ export class CustomerGroup {
/**
* This method manages customers of a group to add or remove them from the group.
* It sends a request to the [Manage Customers](https://docs.medusajs.com/v2/api/admin#customer-groups_postcustomergroupsidcustomers)
* It sends a request to the [Manage Customers](https://docs.medusajs.com/api/admin#customer-groups_postcustomergroupsidcustomers)
* API route.
*
* @param id - The group's ID.
+7 -7
View File
@@ -19,7 +19,7 @@ export class Customer {
/**
* This method creates a customer. It sends a request to the
* [Create Customer](https://docs.medusajs.com/v2/api/admin#customers_postcustomers) API route.
* [Create Customer](https://docs.medusajs.com/api/admin#customers_postcustomers) API route.
*
* @param body - The customer's details.
* @param query - Configure the fields to retrieve in the customer.
@@ -51,7 +51,7 @@ export class Customer {
/**
* This method updates a customer's details. It sends a request to the
* [Update Customer](https://docs.medusajs.com/v2/api/admin#customers_postcustomersid) API route.
* [Update Customer](https://docs.medusajs.com/api/admin#customers_postcustomersid) API route.
*
* @param id - The customer's ID.
* @param body - The details to update of the customer.
@@ -86,7 +86,7 @@ export class Customer {
/**
* This method retrieves a paginated list of customers. It sends a request to the
* [List Customers](https://docs.medusajs.com/v2/api/admin#customers_getcustomers)
* [List Customers](https://docs.medusajs.com/api/admin#customers_getcustomers)
* API route.
*
* @param queryParams - Filters and pagination configurations.
@@ -129,7 +129,7 @@ export class Customer {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
queryParams?: HttpTypes.AdminCustomerFilters,
@@ -145,7 +145,7 @@ export class Customer {
/**
* This method retrieves a customer by its ID. It sends a request to the
* [Get Customer](https://docs.medusajs.com/v2/api/admin#customers_getcustomersid)
* [Get Customer](https://docs.medusajs.com/api/admin#customers_getcustomersid)
* API route.
*
* @param id - The customer's ID.
@@ -174,7 +174,7 @@ export class Customer {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(id: string, query?: SelectParams, headers?: ClientHeaders) {
return this.client.fetch<HttpTypes.AdminCustomerResponse>(
@@ -188,7 +188,7 @@ export class Customer {
/**
* This method deletes a customer by its ID. It sends a request to the
* [Delete Customer](https://docs.medusajs.com/v2/api/admin#customers_deletecustomersid)
* [Delete Customer](https://docs.medusajs.com/api/admin#customers_deletecustomersid)
* API route.
*
* @param id - The customer's ID.
+21 -21
View File
@@ -17,7 +17,7 @@ export class Exchange {
/**
* This method retrieves a paginated list of exchanges. It sends a request to the
* [List Exchanges](https://docs.medusajs.com/v2/api/admin#exchanges_getexchanges)
* [List Exchanges](https://docs.medusajs.com/api/admin#exchanges_getexchanges)
* API route.
*
* @param query - Filters and pagination configurations.
@@ -60,7 +60,7 @@ export class Exchange {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
query?: HttpTypes.AdminExchangeListParams,
@@ -77,7 +77,7 @@ export class Exchange {
/**
* This method retrieves an exchange by its ID. It sends a request to the
* [Get Exchange](https://docs.medusajs.com/v2/api/admin#exchanges_getexchangesid)
* [Get Exchange](https://docs.medusajs.com/api/admin#exchanges_getexchangesid)
* API route.
*
* @param id - The exchange's ID.
@@ -106,7 +106,7 @@ export class Exchange {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(
id: string,
@@ -124,7 +124,7 @@ export class Exchange {
/**
* This method creates an admin exchange. It sends a request to the
* [Create Exchange](https://docs.medusajs.com/v2/api/admin#exchanges_postexchanges) API route.
* [Create Exchange](https://docs.medusajs.com/api/admin#exchanges_postexchanges) API route.
*
* @param body - The exchange's details.
* @param query - Configure the fields to retrieve in the exchange.
@@ -157,7 +157,7 @@ export class Exchange {
/**
* This method cancels an exchange. It sends a request to the
* [Cancel Exchange](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidcancel) API route.
* [Cancel Exchange](https://docs.medusajs.com/api/admin#exchanges_postexchangesidcancel) API route.
*
* @param id - The exchange's ID.
* @param query - Configure the fields to retrieve in the exchange.
@@ -189,7 +189,7 @@ export class Exchange {
* This method adds inbound (or return) items to an exchange. These inbound items will
* have the action `RETURN_ITEM`.
*
* This method sends a request to the [Add Inbound Items](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidinbounditems)
* This method sends a request to the [Add Inbound Items](https://docs.medusajs.com/api/admin#exchanges_postexchangesidinbounditems)
* API route.
*
* @param id - The exchange's ID.
@@ -233,7 +233,7 @@ export class Exchange {
* Every item has an `actions` property, whose value is an array of actions. You can
* check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Update Inbound Item](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidinbounditemsaction_id)
* This method sends a request to the [Update Inbound Item](https://docs.medusajs.com/api/admin#exchanges_postexchangesidinbounditemsaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -280,7 +280,7 @@ export class Exchange {
* Every item has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Remove Inbound Item](https://docs.medusajs.com/v2/api/admin#exchanges_deleteexchangesidinbounditemsaction_id)
* This method sends a request to the [Remove Inbound Item](https://docs.medusajs.com/api/admin#exchanges_deleteexchangesidinbounditemsaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -318,10 +318,10 @@ export class Exchange {
* This method adds an inbound (or return) shipping method to an exchange.
* The inbound shipping method will have a `SHIPPING_ADD` action.
*
* This method sends a request to the [Add Inbound Shipping](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidinboundshippingmethod)
* This method sends a request to the [Add Inbound Shipping](https://docs.medusajs.com/api/admin#exchanges_postexchangesidinboundshippingmethod)
* API route.
*
* This method sends a request to the [Add Inbound Shipping](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidinboundshippingmethod)
* This method sends a request to the [Add Inbound Shipping](https://docs.medusajs.com/api/admin#exchanges_postexchangesidinboundshippingmethod)
* API route.
*
* @param id - The exchange's ID.
@@ -362,7 +362,7 @@ export class Exchange {
* Every shipping method has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Update Inbound Shipping](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidinboundshippingmethodaction_id)
* This method sends a request to the [Update Inbound Shipping](https://docs.medusajs.com/api/admin#exchanges_postexchangesidinboundshippingmethodaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -409,7 +409,7 @@ export class Exchange {
* Every shipping method has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Remove Inbound Shipping](https://docs.medusajs.com/v2/api/admin#exchanges_deleteexchangesidinboundshippingmethodaction_id)
* This method sends a request to the [Remove Inbound Shipping](https://docs.medusajs.com/api/admin#exchanges_deleteexchangesidinboundshippingmethodaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -447,7 +447,7 @@ export class Exchange {
* This method adds outbound (or new) items to an exchange.
* These outbound items will have the action `ITEM_ADD`.
*
* This method sends a request to the [Add Outbound Items](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidoutbounditems)
* This method sends a request to the [Add Outbound Items](https://docs.medusajs.com/api/admin#exchanges_postexchangesidoutbounditems)
* API route.
*
* @param id - The exchange's ID.
@@ -491,7 +491,7 @@ export class Exchange {
* Every item has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Update Inbound Item](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidoutbounditemsaction_id)
* This method sends a request to the [Update Inbound Item](https://docs.medusajs.com/api/admin#exchanges_postexchangesidoutbounditemsaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -538,7 +538,7 @@ export class Exchange {
* Every item has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Update Outbound Item](https://docs.medusajs.com/v2/api/admin#exchanges_deleteexchangesidoutbounditemsaction_id)
* This method sends a request to the [Update Outbound Item](https://docs.medusajs.com/api/admin#exchanges_deleteexchangesidoutbounditemsaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -576,7 +576,7 @@ export class Exchange {
* This method adds an outbound shipping method to an exchange. The outbound shipping method
* will have a `SHIPPING_ADD` action.
*
* This method sends a request to the [Add Outbound Shipping](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidoutboundshippingmethod)
* This method sends a request to the [Add Outbound Shipping](https://docs.medusajs.com/api/admin#exchanges_postexchangesidoutboundshippingmethod)
* API route.
*
* @param id - The exchange's ID.
@@ -617,7 +617,7 @@ export class Exchange {
* Every shipping method has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Update Outbound Shipping](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidoutboundshippingmethodaction_id)
* This method sends a request to the [Update Outbound Shipping](https://docs.medusajs.com/api/admin#exchanges_postexchangesidoutboundshippingmethodaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -664,7 +664,7 @@ export class Exchange {
* Every shipping method has an `actions` property, whose value is an array of actions.
* You can check the action's name using its `action` property, and use the value of the `id` property.
*
* This method sends a request to the [Remove Outbound Shipping](https://docs.medusajs.com/v2/api/admin#exchanges_deleteexchangesidoutboundshippingmethodaction_id)
* This method sends a request to the [Remove Outbound Shipping](https://docs.medusajs.com/api/admin#exchanges_deleteexchangesidoutboundshippingmethodaction_id)
* API route.
*
* @param id - The exchange's ID.
@@ -701,7 +701,7 @@ export class Exchange {
/**
* This method confirms an exchange request, applying its changes on the associated order.
*
* This method sends a request to the [Confirm Exchange](https://docs.medusajs.com/v2/api/admin#exchanges_postexchangesidrequest)
* This method sends a request to the [Confirm Exchange](https://docs.medusajs.com/api/admin#exchanges_postexchangesidrequest)
* API route.
*
* @param id - The exchange's ID.
@@ -735,7 +735,7 @@ export class Exchange {
/**
* This method cancels an exchange request. It sends a request to the
* [Cancel Exchange Request](https://docs.medusajs.com/v2/api/admin#exchanges_deleteexchangesidrequest)
* [Cancel Exchange Request](https://docs.medusajs.com/api/admin#exchanges_deleteexchangesidrequest)
* API route.
*
* @param id - The exchange's ID.
@@ -16,7 +16,7 @@ export class FulfillmentProvider {
/**
* This method retrieves a paginated list of fulfillment providers. It sends a request to the
* [List Fulfillment Providers](https://docs.medusajs.com/v2/api/admin#fulfillment-providers_getfulfillmentproviders)
* [List Fulfillment Providers](https://docs.medusajs.com/api/admin#fulfillment-providers_getfulfillmentproviders)
* API route.
*
* @param query - Filters and pagination configurations.
@@ -59,7 +59,7 @@ export class FulfillmentProvider {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
query?: HttpTypes.AdminFulfillmentProviderListParams,
@@ -16,7 +16,7 @@ export class FulfillmentSet {
/**
* This method deletes a fulfillment set. It sends a request to the
* [Delete Fulfillment Set](https://docs.medusajs.com/v2/api/admin#fulfillment-sets_deletefulfillmentsetsid)
* [Delete Fulfillment Set](https://docs.medusajs.com/api/admin#fulfillment-sets_deletefulfillmentsetsid)
* API route.
*
* @param id - The fulfillment set's ID.
@@ -41,7 +41,7 @@ export class FulfillmentSet {
/**
* This method adds a service zone to a fulfillment set. It uses the
* [Add Service Zone](https://docs.medusajs.com/v2/api/admin#fulfillment-sets_postfulfillmentsetsidservicezones)
* [Add Service Zone](https://docs.medusajs.com/api/admin#fulfillment-sets_postfulfillmentsetsidservicezones)
* API route.
*
* @param id - The fulfillment set's ID.
@@ -81,7 +81,7 @@ export class FulfillmentSet {
/**
* This method retrieves a fulfillment set's service zone's details. It sends a request to the
* [Get Service Zone](https://docs.medusajs.com/v2/api/admin#fulfillment-sets_getfulfillmentsetsidservicezoneszone_id)
* [Get Service Zone](https://docs.medusajs.com/api/admin#fulfillment-sets_getfulfillmentsetsidservicezoneszone_id)
* API route.
*
* @param fulfillmentSetId - The fulfillment set's ID.
@@ -118,7 +118,7 @@ export class FulfillmentSet {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieveServiceZone(
fulfillmentSetId: string,
@@ -138,7 +138,7 @@ export class FulfillmentSet {
/**
* This method updates a service zone in a fulfillment set. It sends a request to the
* [Update Service Zone](https://docs.medusajs.com/v2/api/admin#fulfillment-sets_postfulfillmentsetsidservicezoneszone_id)
* [Update Service Zone](https://docs.medusajs.com/api/admin#fulfillment-sets_postfulfillmentsetsidservicezoneszone_id)
* API route.
*
* @param fulfillmentSetId - The fulfillment set's ID.
@@ -180,7 +180,7 @@ export class FulfillmentSet {
/**
* This method deletes a service zone in a fulfillment set. It sends a request to the
* [Remove Service Zone](https://docs.medusajs.com/v2/api/admin#fulfillment-sets_deletefulfillmentsetsidservicezoneszone_id)
* [Remove Service Zone](https://docs.medusajs.com/api/admin#fulfillment-sets_deletefulfillmentsetsidservicezoneszone_id)
* API route.
*
* @param fulfillmentSetId - The fulfullment set's ID.
@@ -16,7 +16,7 @@ export class Fulfillment {
/**
* This method creates a fulfillment. It sends a request to the
* [Create Fulfillment](https://docs.medusajs.com/v2/api/admin#fulfillments_postfulfillments)
* [Create Fulfillment](https://docs.medusajs.com/api/admin#fulfillments_postfulfillments)
* API route.
*
* @param body - The fulfillment's details.
@@ -65,7 +65,7 @@ export class Fulfillment {
/**
* This method cancels a fulfillment. It sends a request to the
* [Cancel Fulfillment](https://docs.medusajs.com/v2/api/admin#fulfillments_postfulfillmentsidcancel)
* [Cancel Fulfillment](https://docs.medusajs.com/api/admin#fulfillments_postfulfillmentsidcancel)
* API route.
*
* @param id - The fulfillment's ID.
@@ -97,7 +97,7 @@ export class Fulfillment {
/**
* This method creates a shipment for a fulfillment. It sends a request to the
* [Create Shipment](https://docs.medusajs.com/v2/api/admin#fulfillments_postfulfillmentsidshipment)
* [Create Shipment](https://docs.medusajs.com/api/admin#fulfillments_postfulfillmentsidshipment)
* API route.
*
* @param id - The fulfillment's ID.
@@ -16,7 +16,7 @@ export class InventoryItem {
/**
* This method creates an inventory item. It sends a request to the
* [Create Inventory Item](https://docs.medusajs.com/v2/api/admin#inventory-items_postinventoryitems)
* [Create Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitems)
* API route.
*
* @param body - The inventory item's details.
@@ -50,7 +50,7 @@ export class InventoryItem {
/**
* This method updates an inventory level. It sends a request to the
* [Update Inventory Item](https://docs.medusajs.com/v2/api/admin#inventory-items_postinventoryitemsid)
* [Update Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsid)
* API route.
*
* @param id - The inventory item's ID.
@@ -86,7 +86,7 @@ export class InventoryItem {
/**
* This method retrieves a paginated list of inventory items. It sends a request to the
* [List Inventory Items](https://docs.medusajs.com/v2/api/admin#inventory-items_getinventoryitems)
* [List Inventory Items](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitems)
* API route.
*
* @param query - Filters and pagination configurations.
@@ -129,7 +129,7 @@ export class InventoryItem {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(
query?: HttpTypes.AdminInventoryItemParams,
@@ -146,7 +146,7 @@ export class InventoryItem {
/**
* This method retrieves an inventory item by its ID. It sends a request to the
* [Get Inventory Item](https://docs.medusajs.com/v2/api/admin#inventory-items_getinventoryitemsid) API route.
* [Get Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitemsid) API route.
*
* @param id - The inventory item's ID.
* @param query - Configure the fields to retrieve in the inventory item.
@@ -174,7 +174,7 @@ export class InventoryItem {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(id: string, query?: SelectParams, headers?: ClientHeaders) {
return await this.client.fetch<HttpTypes.AdminInventoryItemResponse>(
@@ -188,7 +188,7 @@ export class InventoryItem {
/**
* This method deletes an inventory item. This sends a request to the
* [Delete Inventory Item](https://docs.medusajs.com/v2/api/admin#inventory-items_deleteinventoryitemsid)
* [Delete Inventory Item](https://docs.medusajs.com/api/admin#inventory-items_deleteinventoryitemsid)
* API route.
*
* @param id - The inventory item's ID.
@@ -213,7 +213,7 @@ export class InventoryItem {
/**
* This method retrieves a paginated list of inventory levels that belong to an inventory item.
* It sends a request to the [List Inventory Items](https://docs.medusajs.com/v2/api/admin#inventory-items_getinventoryitems)
* It sends a request to the [List Inventory Items](https://docs.medusajs.com/api/admin#inventory-items_getinventoryitems)
* API route.
*
* @param id - The inventory item's ID.
@@ -257,7 +257,7 @@ export class InventoryItem {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async listLevels(
id: string,
@@ -278,7 +278,7 @@ export class InventoryItem {
* stock location.
*
* This method sends a request to the
* [Update Inventory Level](https://docs.medusajs.com/v2/api/admin#inventory-items_postinventoryitemsidlocationlevelslocation_id)
* [Update Inventory Level](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsidlocationlevelslocation_id)
* API route.
*
* @param id - The inventory item's ID.
@@ -323,7 +323,7 @@ export class InventoryItem {
* and a stock location.
*
* This method sends a request to the
* [Remove Inventory Level](https://docs.medusajs.com/v2/api/admin#inventory-items_deleteinventoryitemsidlocationlevelslocation_id)
* [Remove Inventory Level](https://docs.medusajs.com/api/admin#inventory-items_deleteinventoryitemsidlocationlevelslocation_id)
* API route.
*
* @param id - The inventory item's ID.
@@ -352,7 +352,7 @@ export class InventoryItem {
/**
* This method manages the inventory levels of an inventory item. It sends a request to the
* [Manage Inventory Levels](https://docs.medusajs.com/v2/api/admin#inventory-items_postinventoryitemsidlocationlevelsbatch)
* [Manage Inventory Levels](https://docs.medusajs.com/api/admin#inventory-items_postinventoryitemsidlocationlevelsbatch)
* API route.
*
* @param id - The inventory item's ID.
+8 -8
View File
@@ -23,7 +23,7 @@ export class Invite {
* the {@link Auth.register}.
*
* This method sends a request to the [Accept Invite]
* (https://docs.medusajs.com/v2/api/admin#invites_postinvitesaccept)
* (https://docs.medusajs.com/api/admin#invites_postinvitesaccept)
* API route.
*
* @param input - The details of the user to create.
@@ -76,7 +76,7 @@ export class Invite {
/**
* This method creates an invite. It sends a request to the
* [Create Invite](https://docs.medusajs.com/v2/api/admin#invites_postinvites)
* [Create Invite](https://docs.medusajs.com/api/admin#invites_postinvites)
* API route.
*
* @param body - The invite's details.
@@ -110,7 +110,7 @@ export class Invite {
/**
* This method retrieves an invite by its ID. It sends a request to the
* [Get Invite](https://docs.medusajs.com/v2/api/admin#invites_getinvitesid)
* [Get Invite](https://docs.medusajs.com/api/admin#invites_getinvitesid)
* API route.
*
* @param id - The invite's ID.
@@ -139,7 +139,7 @@ export class Invite {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async retrieve(id: string, query?: SelectParams, headers?: ClientHeaders) {
return await this.client.fetch<HttpTypes.AdminInviteResponse>(
@@ -153,7 +153,7 @@ export class Invite {
/**
* This method retrieves a paginated list of invites. It sends a request to the
* [List Invites](https://docs.medusajs.com/v2/api/admin#invites_getinvites)
* [List Invites](https://docs.medusajs.com/api/admin#invites_getinvites)
* API route.
*
* @param queryParams - Filters and pagination configurations.
@@ -196,7 +196,7 @@ export class Invite {
* })
* ```
*
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/v2/api/store#select-fields-and-relations).
* Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).
*/
async list(queryParams?: FindParams, headers?: ClientHeaders) {
return await this.client.fetch<
@@ -209,7 +209,7 @@ export class Invite {
/**
* This method refreshes the token of an invite. It sends a request to the
* [Refresh Invite Token](https://docs.medusajs.com/v2/api/admin#invites_postinvitesidresend)
* [Refresh Invite Token](https://docs.medusajs.com/api/admin#invites_postinvitesidresend)
* API route.
*
* @param id - The invite's ID.
@@ -234,7 +234,7 @@ export class Invite {
/**
* This method deletes an invite. It sends a request to the
* [Delete Invite](https://docs.medusajs.com/v2/api/admin#invites_deleteinvitesid)
* [Delete Invite](https://docs.medusajs.com/api/admin#invites_deleteinvitesid)
* API route.
*
* @param id - The invite's ID.