Repository: medusajs/medusa
File: packages/core/types/src/http/shipping-option/admin/payloads.ts (TypeScript)

Code before:
   */
  shipping_profile_id: string
  /**
   * Additional data that is useful for third-party fulfillment providers
   * that process fulfillments for the shipping option.
   *
   * Learn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property)
   * documentation.
   */
  data?: Record<string, unknown>
  /**
   * The type of shipping option's price.
   */
  price_type: ShippingOptionPriceType
  /**
   * The ID of the fulfillment provider that the shipping option belongs to.
   */
  provider_id: string
  /**
   * The type of shipping option.
   *
   * Learn more in the [Shipping Option](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)
   * documentation.
   */
  type?: AdminCreateShippingOptionType
  /**
   * The ID of the type of shipping option.
   *
   * Learn more in the [Shipping Option](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)
   * documentation.
   */
  type_id?: string
  /**
   * The prices of the shipping option.
   */
  prices: (
    | AdminCreateShippingOptionPriceWithCurrency
    | AdminCreateShippingOptionPriceWithRegion
  )[]
  /**
   * The rules of the shipping option.
   *
   * Learn more in the [Shipping Option Rules](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-option-rules)
   * documentation.
   */
  rules?: AdminCreateShippingOptionRule[]
  /**
   * Custom key-value pairs that can be added to the shipping option.
   */
  metadata?: Record<string, unknown>
}

Review comment (suggestion):
This reflects what we have [here](https://github.com/medusajs/medusa/blob/3f1e92dfb2507131f5fab6501a38c02d0d4d5335/packages/core/types/src/workflow/fulfillment/create-shipping-options.ts#L90-L112) more accurately

Code after:
   *
   * Learn more in the [Shipping Option](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)
   * documentation.
   */
  type?: AdminCreateShippingOptionType
  /**
   * The ID of the type of shipping option.
   *
   * Learn more in the [Shipping Option](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)
   * documentation.
   */
  type_id?: string
  /**
   * The rules of the shipping option.
   *
   * Learn more in the [Shipping Option Rules](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-option-rules)
   * documentation.
   */
  rules?: AdminCreateShippingOptionRule[]
  /**
   * Custom key-value pairs that can be added to the shipping option.
   */
  metadata?: Record<string, unknown>
}

/**
 * Flat rate shipping option creation input.
 */
export interface AdminCreateFlatRateShippingOption
  extends AdminCreateShippingOptionBase {
  price_type: "flat"
  prices: (
    | AdminCreateShippingOptionPriceWithCurrency
    | AdminCreateShippingOptionPriceWithRegion
  )[]
}

/**
 * Calculated shipping option creation input.
 */
export interface AdminCreateCalculatedShippingOption
  extends AdminCreateShippingOptionBase {
  price_type: "calculated"
}

export type AdminCreateShippingOption =
  | AdminCreateFlatRateShippingOption
  | AdminCreateCalculatedShippingOption

export interface AdminUpdateShippingOptionRule
  extends AdminCreateShippingOptionRule {