chore(js-sdk): add tags to js-sdk (#10739)
This commit is contained in:
1 parent
ebca8fed28
commit
688e1e60a5
3 files changed
+163
No files matched your search
@@ -42,46 +42,169 @@ import { User } from "./user"
|
|||||||
import { WorkflowExecution } from "./workflow-execution"
|
import { WorkflowExecution } from "./workflow-execution"
|
||||||
|
|
||||||
export class Admin {
|
export class Admin {
|
||||||
|
/**
|
||||||
|
* @tags user
|
||||||
|
*/
|
||||||
public invite: Invite
|
public invite: Invite
|
||||||
|
/**
|
||||||
|
* @tags customer
|
||||||
|
*/
|
||||||
public customer: Customer
|
public customer: Customer
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public productCollection: ProductCollection
|
public productCollection: ProductCollection
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public productCategory: ProductCategory
|
public productCategory: ProductCategory
|
||||||
|
/**
|
||||||
|
* @tags pricing
|
||||||
|
*/
|
||||||
public priceList: PriceList
|
public priceList: PriceList
|
||||||
|
/**
|
||||||
|
* @tags pricing
|
||||||
|
*/
|
||||||
public pricePreference: PricePreference
|
public pricePreference: PricePreference
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public product: Product
|
public product: Product
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public productType: ProductType
|
public productType: ProductType
|
||||||
|
/**
|
||||||
|
* @tags file
|
||||||
|
*/
|
||||||
public upload: Upload
|
public upload: Upload
|
||||||
|
/**
|
||||||
|
* @tags region
|
||||||
|
*/
|
||||||
public region: Region
|
public region: Region
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public returnReason: ReturnReason
|
public returnReason: ReturnReason
|
||||||
|
/**
|
||||||
|
* @tags stock location
|
||||||
|
*/
|
||||||
public stockLocation: StockLocation
|
public stockLocation: StockLocation
|
||||||
|
/**
|
||||||
|
* @tags sales channel
|
||||||
|
*/
|
||||||
public salesChannel: SalesChannel
|
public salesChannel: SalesChannel
|
||||||
|
/**
|
||||||
|
* @tags fulfillment
|
||||||
|
*/
|
||||||
public fulfillmentSet: FulfillmentSet
|
public fulfillmentSet: FulfillmentSet
|
||||||
|
/**
|
||||||
|
* @tags fulfillment
|
||||||
|
*/
|
||||||
public fulfillment: Fulfillment
|
public fulfillment: Fulfillment
|
||||||
|
/**
|
||||||
|
* @tags fulfillment
|
||||||
|
*/
|
||||||
public fulfillmentProvider: FulfillmentProvider
|
public fulfillmentProvider: FulfillmentProvider
|
||||||
|
/**
|
||||||
|
* @tags fulfillment
|
||||||
|
*/
|
||||||
public shippingOption: ShippingOption
|
public shippingOption: ShippingOption
|
||||||
|
/**
|
||||||
|
* @tags fulfillment
|
||||||
|
*/
|
||||||
public shippingProfile: ShippingProfile
|
public shippingProfile: ShippingProfile
|
||||||
|
/**
|
||||||
|
* @tags inventory
|
||||||
|
*/
|
||||||
public inventoryItem: InventoryItem
|
public inventoryItem: InventoryItem
|
||||||
|
/**
|
||||||
|
* @tags notification
|
||||||
|
*/
|
||||||
public notification: Notification
|
public notification: Notification
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public order: Order
|
public order: Order
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public orderEdit: OrderEdit
|
public orderEdit: OrderEdit
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public return: Return
|
public return: Return
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public claim: Claim
|
public claim: Claim
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public exchange: Exchange
|
public exchange: Exchange
|
||||||
|
/**
|
||||||
|
* @tags tax
|
||||||
|
*/
|
||||||
public taxRate: TaxRate
|
public taxRate: TaxRate
|
||||||
|
/**
|
||||||
|
* @tags tax
|
||||||
|
*/
|
||||||
public taxRegion: TaxRegion
|
public taxRegion: TaxRegion
|
||||||
|
/**
|
||||||
|
* @tags store
|
||||||
|
*/
|
||||||
public store: Store
|
public store: Store
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public productTag: ProductTag
|
public productTag: ProductTag
|
||||||
|
/**
|
||||||
|
* @tags user
|
||||||
|
*/
|
||||||
public user: User
|
public user: User
|
||||||
|
/**
|
||||||
|
* @tags currency
|
||||||
|
*/
|
||||||
public currency: Currency
|
public currency: Currency
|
||||||
|
/**
|
||||||
|
* @tags payment
|
||||||
|
*/
|
||||||
public payment: Payment
|
public payment: Payment
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public productVariant: ProductVariant
|
public productVariant: ProductVariant
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public refundReason: RefundReason
|
public refundReason: RefundReason
|
||||||
|
/**
|
||||||
|
* @tags payment
|
||||||
|
*/
|
||||||
public paymentCollection: PaymentCollection
|
public paymentCollection: PaymentCollection
|
||||||
|
/**
|
||||||
|
* @tags api key
|
||||||
|
*/
|
||||||
public apiKey: ApiKey
|
public apiKey: ApiKey
|
||||||
|
/**
|
||||||
|
* @tags workflow
|
||||||
|
*/
|
||||||
public workflowExecution: WorkflowExecution
|
public workflowExecution: WorkflowExecution
|
||||||
|
/**
|
||||||
|
* @tags inventory
|
||||||
|
*/
|
||||||
public reservation: Reservation
|
public reservation: Reservation
|
||||||
|
/**
|
||||||
|
* @tags customer
|
||||||
|
*/
|
||||||
public customerGroup: CustomerGroup
|
public customerGroup: CustomerGroup
|
||||||
|
/**
|
||||||
|
* @tags promotion
|
||||||
|
*/
|
||||||
public promotion: Promotion
|
public promotion: Promotion
|
||||||
|
/**
|
||||||
|
* @tags promotion
|
||||||
|
*/
|
||||||
public campaign: Campaign
|
public campaign: Campaign
|
||||||
|
|
||||||
constructor(client: Client) {
|
constructor(client: Client) {
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ export class Auth {
|
|||||||
* @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
|
* @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
|
||||||
* you pass the email and password.
|
* you pass the email and password.
|
||||||
* @returns The JWT token used for registration later.
|
* @returns The JWT token used for registration later.
|
||||||
|
*
|
||||||
|
* @tags auth
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* sdk.auth.register(
|
* sdk.auth.register(
|
||||||
@@ -66,6 +68,8 @@ export class Auth {
|
|||||||
* @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
|
* @param payload - The data to pass in the request's body for authentication. When using the `emailpass` provider,
|
||||||
* you pass the email and password.
|
* you pass the email and password.
|
||||||
* @returns The authentication JWT token
|
* @returns The authentication JWT token
|
||||||
|
*
|
||||||
|
* @tags auth
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* sdk.auth.login(
|
* sdk.auth.login(
|
||||||
@@ -111,6 +115,8 @@ export class Auth {
|
|||||||
* @param method - The authentication provider to use. For example, `google`.
|
* @param method - The authentication provider to use. For example, `google`.
|
||||||
* @param query - The query parameters from the Oauth callback, which should be passed to the API route.
|
* @param query - The query parameters from the Oauth callback, which should be passed to the API route.
|
||||||
* @returns The authentication JWT token
|
* @returns The authentication JWT token
|
||||||
|
*
|
||||||
|
* @tags auth
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* sdk.auth.callback(
|
* sdk.auth.callback(
|
||||||
@@ -150,6 +156,8 @@ export class Auth {
|
|||||||
* with {@link callback}. It sends a request to the [Refresh Authentication Token API route](https://docs.medusajs.com/api/admin#auth_postadminauthtokenrefresh).
|
* with {@link callback}. It sends a request to the [Refresh Authentication Token API route](https://docs.medusajs.com/api/admin#auth_postadminauthtokenrefresh).
|
||||||
*
|
*
|
||||||
* @returns The refreshed JWT authentication token.
|
* @returns The refreshed JWT authentication token.
|
||||||
|
*
|
||||||
|
* @tags auth
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* sdk.auth.refresh()
|
* sdk.auth.refresh()
|
||||||
@@ -174,6 +182,8 @@ export class Auth {
|
|||||||
/**
|
/**
|
||||||
* This method deletes the authentication session of the currently logged-in user to log them out.
|
* This method deletes the authentication session of the currently logged-in user to log them out.
|
||||||
* It sends a request to the [Delete Authentication Session API route](https://docs.medusajs.com/api/admin#auth_deletesession).
|
* It sends a request to the [Delete Authentication Session API route](https://docs.medusajs.com/api/admin#auth_deletesession).
|
||||||
|
*
|
||||||
|
* @tags auth
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* sdk.auth.logout()
|
* sdk.auth.logout()
|
||||||
@@ -202,6 +212,8 @@ export class Auth {
|
|||||||
* @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
|
* @param actor - The actor type. For example, `user` for admin user, or `customer` for customer.
|
||||||
* @param provider - The authentication provider to use. For example, `emailpass`.
|
* @param provider - The authentication provider to use. For example, `emailpass`.
|
||||||
* @param body - The data required to identify the user.
|
* @param body - The data required to identify the user.
|
||||||
|
*
|
||||||
|
* @tags auth
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* sdk.auth.resetPassword(
|
* sdk.auth.resetPassword(
|
||||||
@@ -247,6 +259,8 @@ export class Auth {
|
|||||||
* @param provider - The authentication provider to use. For example, `emailpass`.
|
* @param provider - The authentication provider to use. For example, `emailpass`.
|
||||||
* @param body - The data necessary to update the user's authentication data. When resetting the user's password,
|
* @param body - The data necessary to update the user's authentication data. When resetting the user's password,
|
||||||
* send the `password` property.
|
* send the `password` property.
|
||||||
|
*
|
||||||
|
* @tags auth
|
||||||
*
|
*
|
||||||
* @example
|
* @example
|
||||||
* sdk.auth.updateProvider(
|
* sdk.auth.updateProvider(
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ export class Store {
|
|||||||
this.client = client
|
this.client = client
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags region
|
||||||
|
*/
|
||||||
public region = {
|
public region = {
|
||||||
/**
|
/**
|
||||||
* This method retrieves the paginated list of regions in the store. It sends a request to the
|
* This method retrieves the paginated list of regions in the store. It sends a request to the
|
||||||
@@ -128,6 +131,9 @@ export class Store {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public collection = {
|
public collection = {
|
||||||
/**
|
/**
|
||||||
* This method retrieves a paginated list of product collections. It sends a request to the
|
* This method retrieves a paginated list of product collections. It sends a request to the
|
||||||
@@ -238,6 +244,9 @@ export class Store {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public category = {
|
public category = {
|
||||||
/**
|
/**
|
||||||
* This method retrieves a paginated list of product categories. It sends a request to the
|
* This method retrieves a paginated list of product categories. It sends a request to the
|
||||||
@@ -348,6 +357,9 @@ export class Store {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags product
|
||||||
|
*/
|
||||||
public product = {
|
public product = {
|
||||||
/**
|
/**
|
||||||
* This method retrieves a list of products. It sends a request to the
|
* This method retrieves a list of products. It sends a request to the
|
||||||
@@ -466,6 +478,8 @@ export class Store {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Related guides: [How to implement carts in the storefront](https://docs.medusajs.com/resources/storefront-development/cart).
|
* Related guides: [How to implement carts in the storefront](https://docs.medusajs.com/resources/storefront-development/cart).
|
||||||
|
*
|
||||||
|
* @tags cart
|
||||||
*/
|
*/
|
||||||
public cart = {
|
public cart = {
|
||||||
/**
|
/**
|
||||||
@@ -802,6 +816,9 @@ export class Store {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags fulfillment
|
||||||
|
*/
|
||||||
public fulfillment = {
|
public fulfillment = {
|
||||||
/**
|
/**
|
||||||
* This method retrieves the list of shipping options for a cart. It sends a request to
|
* This method retrieves the list of shipping options for a cart. It sends a request to
|
||||||
@@ -853,6 +870,9 @@ export class Store {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags payment
|
||||||
|
*/
|
||||||
public payment = {
|
public payment = {
|
||||||
/**
|
/**
|
||||||
* This method retrieves the payment providers available in a region, which is useful during checkout.
|
* This method retrieves the payment providers available in a region, which is useful during checkout.
|
||||||
@@ -989,6 +1009,9 @@ export class Store {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags order
|
||||||
|
*/
|
||||||
public order = {
|
public order = {
|
||||||
/**
|
/**
|
||||||
* This method retrieves a paginated list of orders matching the specified filters. It
|
* This method retrieves a paginated list of orders matching the specified filters. It
|
||||||
@@ -1252,6 +1275,9 @@ export class Store {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @tags customer
|
||||||
|
*/
|
||||||
public customer = {
|
public customer = {
|
||||||
/**
|
/**
|
||||||
* This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/api/store#customers_postcustomers)
|
* This method registers a customer. It sends a request to the [Register Customer](https://docs.medusajs.com/api/store#customers_postcustomers)
|
||||||
|
|||||||
Reference in new issue
Block a user