chore: fixes to tsdocs + docs-util related to providers
This commit is contained in:
@@ -20,7 +20,7 @@ import {
|
||||
*
|
||||
* #### Example
|
||||
*
|
||||
* ```ts
|
||||
* ```ts title="src/modules/my-fulfillment/service.ts"
|
||||
* import { AbstractFulfillmentProviderService } from "@medusajs/framework/utils"
|
||||
* import { Logger } from "@medusajs/framework/types"
|
||||
*
|
||||
@@ -56,13 +56,11 @@ export class AbstractFulfillmentProviderService
|
||||
implements IFulfillmentProvider
|
||||
{
|
||||
/**
|
||||
* The `identifier` property holds a unique identifier of the fulfillment module provider.
|
||||
* Each fulfillment provider has a unique identifier defined in its class. The provider's ID
|
||||
* will be stored as `fp_{identifier}_{id}`, where `{id}` is the provider's `id`
|
||||
* property in the `medusa-config.ts`.
|
||||
*
|
||||
* You can use the kebab-case name of the provider as its value.
|
||||
*
|
||||
* For example:
|
||||
*
|
||||
* ```ts
|
||||
* @example
|
||||
* class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
|
||||
* static identifier = "my-fulfillment"
|
||||
*
|
||||
|
||||
@@ -12,6 +12,9 @@ import {
|
||||
export abstract class AbstractPaymentProvider<TConfig = Record<string, unknown>>
|
||||
implements IPaymentProvider
|
||||
{
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
protected readonly container: Record<string, unknown>
|
||||
/**
|
||||
* This method validates the options of the provider set in `medusa-config.ts`.
|
||||
@@ -44,7 +47,7 @@ export abstract class AbstractPaymentProvider<TConfig = Record<string, unknown>>
|
||||
* The provider can also access the module's options as a second parameter.
|
||||
*
|
||||
* @param {Record<string, unknown>} cradle - The module's container cradle used to resolve resources.
|
||||
* @param {Record<string, unknown>} config - The options passed to the payment module provider.
|
||||
* @param {Record<string, unknown>} config - The options passed to the Payment Module provider.
|
||||
*
|
||||
* @example
|
||||
* ```ts
|
||||
@@ -93,6 +96,9 @@ export abstract class AbstractPaymentProvider<TConfig = Record<string, unknown>>
|
||||
*/
|
||||
protected constructor(
|
||||
cradle: Record<string, unknown>,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
protected readonly config: TConfig = {} as TConfig // eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
) {
|
||||
this.container = cradle
|
||||
@@ -122,7 +128,6 @@ export abstract class AbstractPaymentProvider<TConfig = Record<string, unknown>>
|
||||
* static identifier = "my-payment"
|
||||
* // ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
public static identifier: string
|
||||
|
||||
|
||||
Reference in New Issue
Block a user