From 78f603e4f18c9d16f4b58a2189c959026453d8b2 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Tue, 9 Apr 2024 17:56:14 +0300 Subject: [PATCH] docs: fix typedoc errors and warnings (#7006) * docs: fix typedoc errors and warnings * added missing quotations --- .changeset/four-beds-smile.md | 5 ++++ .../src/interfaces/fulfillment-service.ts | 2 +- packages/types/src/api-key/common/api-key.ts | 2 -- packages/types/src/customer/mutations.ts | 23 ++----------------- .../src/fulfillment/mutations/geo-zone.ts | 4 ---- .../promotion/common/application-method.ts | 6 ----- .../src/promotion/common/campaign-budget.ts | 2 -- .../src/promotion/common/compute-actions.ts | 4 ---- .../src/promotion/common/promotion-rule.ts | 2 -- .../types/src/promotion/common/promotion.ts | 2 -- packages/types/src/tax/provider.ts | 2 ++ 11 files changed, 10 insertions(+), 44 deletions(-) create mode 100644 .changeset/four-beds-smile.md diff --git a/.changeset/four-beds-smile.md b/.changeset/four-beds-smile.md new file mode 100644 index 0000000000..b51889fa1b --- /dev/null +++ b/.changeset/four-beds-smile.md @@ -0,0 +1,5 @@ +--- +"@medusajs/types": patch +--- + +fix(types): remove duplicate CreateCustomerGroupDTO interface diff --git a/packages/medusa/src/interfaces/fulfillment-service.ts b/packages/medusa/src/interfaces/fulfillment-service.ts index a8879b2bf3..d0ac6adee7 100644 --- a/packages/medusa/src/interfaces/fulfillment-service.ts +++ b/packages/medusa/src/interfaces/fulfillment-service.ts @@ -17,7 +17,7 @@ type ShippingMethodData = Record * A fulfillment provider is a service that extends the `AbstractFulfillmentService` and implements its methods. So, adding a fulfillment provider is as simple as creating a service file in `src/services`. * The file's name is the fulfillment provider's class name as a slug and without the word `Service`. For example, if you're creating a `MyFulfillmentService` class, the file name is `src/services/my-fulfillment.ts`. * - * ```ts title=src/services/my-fulfillment.ts + * ```ts title="src/services/my-fulfillment.ts" * import { AbstractFulfillmentService } from "@medusajs/medusa" * * class MyFulfillmentService extends AbstractFulfillmentService { diff --git a/packages/types/src/api-key/common/api-key.ts b/packages/types/src/api-key/common/api-key.ts index 9ecf041092..86b9bbe40c 100644 --- a/packages/types/src/api-key/common/api-key.ts +++ b/packages/types/src/api-key/common/api-key.ts @@ -1,8 +1,6 @@ import { BaseFilterable } from "../../dal" /** - * @interface - * * An API key's type. */ export type ApiKeyType = "secret" | "publishable" diff --git a/packages/types/src/customer/mutations.ts b/packages/types/src/customer/mutations.ts index a5fb70d6ed..5da9937a6c 100644 --- a/packages/types/src/customer/mutations.ts +++ b/packages/types/src/customer/mutations.ts @@ -283,26 +283,6 @@ export interface CustomerUpdatableFields { metadata?: Record | null } -/** - * The customer group to be created. - */ -export interface CreateCustomerGroupDTO { - /** - * The name of the customer group. - */ - name: string - - /** - * Holds custom data in key-value pairs. - */ - metadata?: Record | null - - /** - * Who the customer group. - */ - created_by?: string -} - /** * The updatable fields of a customer group. */ @@ -358,7 +338,8 @@ export interface CreateCustomerGroupDTO { metadata?: Record | null /** - * Who created the customer group. + * Who created the customer group. For example, + * the ID of the user that created the customer group. */ created_by?: string } diff --git a/packages/types/src/fulfillment/mutations/geo-zone.ts b/packages/types/src/fulfillment/mutations/geo-zone.ts index e908179fe5..af33d65358 100644 --- a/packages/types/src/fulfillment/mutations/geo-zone.ts +++ b/packages/types/src/fulfillment/mutations/geo-zone.ts @@ -100,8 +100,6 @@ export interface CreateZipGeoZoneDTO extends CreateGeoZoneBaseDTO { } /** - * @interface - * * The geo zone to be created. The value of the `type` attributes allows for passing more attributes. */ export type CreateGeoZoneDTO = @@ -195,8 +193,6 @@ export interface UpdateZipGeoZoneDTO extends UpdateGeoZoneBaseDTO { } /** - * @interface - * * The attributes to update in the geo zone. The value of the `type` attributes allows for passing more attributes. */ export type UpdateGeoZoneDTO = diff --git a/packages/types/src/promotion/common/application-method.ts b/packages/types/src/promotion/common/application-method.ts index a3f6d66142..69c1abf798 100644 --- a/packages/types/src/promotion/common/application-method.ts +++ b/packages/types/src/promotion/common/application-method.ts @@ -3,15 +3,11 @@ import { PromotionDTO } from "./promotion" import { CreatePromotionRuleDTO, PromotionRuleDTO } from "./promotion-rule" /** - * @interface - * * The application method's possible types. */ export type ApplicationMethodTypeValues = "fixed" | "percentage" /** - * @interface - * * The application method's possible target types. */ export type ApplicationMethodTargetTypeValues = @@ -20,8 +16,6 @@ export type ApplicationMethodTargetTypeValues = | "items" /** - * @interface - * * The application method's possible allocation values. */ export type ApplicationMethodAllocationValues = "each" | "across" diff --git a/packages/types/src/promotion/common/campaign-budget.ts b/packages/types/src/promotion/common/campaign-budget.ts index 0840e98666..a5dd48d5fd 100644 --- a/packages/types/src/promotion/common/campaign-budget.ts +++ b/packages/types/src/promotion/common/campaign-budget.ts @@ -1,8 +1,6 @@ import { BaseFilterable } from "../../dal" /** - * @interface - * * The campaign budget's possible types. */ export type CampaignBudgetTypeValues = "spend" | "usage" diff --git a/packages/types/src/promotion/common/compute-actions.ts b/packages/types/src/promotion/common/compute-actions.ts index bb8fc08597..c602b34945 100644 --- a/packages/types/src/promotion/common/compute-actions.ts +++ b/packages/types/src/promotion/common/compute-actions.ts @@ -1,6 +1,4 @@ /** - * @interface - * * A compute action informs you what adjustment must be made to a cart item or shipping method. */ export type ComputeActions = @@ -11,8 +9,6 @@ export type ComputeActions = | CampaignBudgetExceededAction /** - * @interface - * * These computed action types can affect a campaign's budget. */ export type UsageComputedActions = diff --git a/packages/types/src/promotion/common/promotion-rule.ts b/packages/types/src/promotion/common/promotion-rule.ts index 86ec12b3c1..abad7b6935 100644 --- a/packages/types/src/promotion/common/promotion-rule.ts +++ b/packages/types/src/promotion/common/promotion-rule.ts @@ -2,8 +2,6 @@ import { BaseFilterable } from "../../dal" import { PromotionRuleValueDTO } from "./promotion-rule-value" /** - * @interface - * * The possible operators to use in a promotion rule. */ export type PromotionRuleOperatorValues = diff --git a/packages/types/src/promotion/common/promotion.ts b/packages/types/src/promotion/common/promotion.ts index cd67cca670..6bc0cec185 100644 --- a/packages/types/src/promotion/common/promotion.ts +++ b/packages/types/src/promotion/common/promotion.ts @@ -9,8 +9,6 @@ import { CampaignDTO } from "./campaign" import { CreatePromotionRuleDTO, PromotionRuleDTO } from "./promotion-rule" /** - * @interface - * * The promotion's possible types. */ export type PromotionTypeValues = "standard" | "buyget" diff --git a/packages/types/src/tax/provider.ts b/packages/types/src/tax/provider.ts index 40c678c450..302418799e 100644 --- a/packages/types/src/tax/provider.ts +++ b/packages/types/src/tax/provider.ts @@ -90,6 +90,7 @@ export type ItemTaxCalculationLine = { * * For example: * + * ```ts * export default class MyTaxProvider implements ITaxProvider { * // ... * constructor(container, options) { @@ -100,6 +101,7 @@ export type ItemTaxCalculationLine = { * this.client = new Client(options) * } * } + * ``` * * --- */