feat(medusa): Improve exported medusa API (#1335)

* feat(medusa): Improve exported medusa API
Avoid to always have to import from @medusajs/medusa/dist/*

* feat(medusa): The Model loaders should ignore the index file

* fix(medusa): swap model typo
This commit is contained in:
Adrien de Peretti
2022-04-14 16:01:10 +02:00
committed by GitHub
parent d3104bf6ac
commit 6830a12b46
4 changed files with 88 additions and 92 deletions
+66
View File
@@ -0,0 +1,66 @@
export * from "./shipping-tax-rate"
export * from "./product-tax-rate"
export * from "./product-type-tax-rate"
export * from "./tax-rate"
export * from "./shipping-method-tax-line"
export * from "./line-item-tax-line"
export * from "./line-item-adjustment"
export * from "./address"
export * from "./cart"
export * from "./claim-image"
export * from "./claim-item"
export * from "./claim-order"
export * from "./claim-tag"
export * from "./country"
export * from "./currency"
export * from "./custom-shipping-option"
export * from "./customer"
export * from "./customer-group"
export * from "./discount"
export * from "./discount-condition-customer-group"
export * from "./discount-condition-product-collection"
export * from "./discount-condition-product-tag"
export * from "./discount-condition-product-type"
export * from "./discount-condition-product"
export * from "./discount-condition"
export * from "./discount-rule"
export * from "./draft-order"
export * from "./fulfillment"
export * from "./fulfillment-item"
export * from "./fulfillment-provider"
export * from "./gift-card"
export * from "./gift-card-transaction"
export * from "./idempotency-key"
export * from "./image"
export * from "./invite"
export * from "./line-item"
export * from "./money-amount"
export * from "./note"
export * from "./notification"
export * from "./oauth"
export * from "./order"
export * from "./payment"
export * from "./payment-provider"
export * from "./payment-session"
export * from "./price-list"
export * from "./product"
export * from "./product-collection"
export * from "./product-option"
export * from "./product-option-value"
export * from "./product-tag"
export * from "./product-type"
export * from "./product-variant"
export * from "./refund"
export * from "./region"
export * from "./return"
export * from "./return-item"
export * from "./return-reason"
export * from "./shipping-method"
export * from "./shipping-option"
export * from "./shipping-option-requirement"
export * from "./shipping-profile"
export * from "./staged-job"
export * from "./store"
export * from "./swap"
export * from "./user"
export * from "./tax-provider"
+6 -6
View File
@@ -26,7 +26,7 @@ import { Cart } from "./cart"
import { Payment } from "./payment"
import { ShippingMethod } from "./shipping-method"
export enum FulfillmentStatus {
export enum SwapFulfillmentStatus {
NOT_FULFILLED = "not_fulfilled",
FULFILLED = "fulfilled",
SHIPPED = "shipped",
@@ -34,7 +34,7 @@ export enum FulfillmentStatus {
REQUIRES_ACTION = "requires_action",
}
export enum PaymentStatus {
export enum SwapPaymentStatus {
NOT_PAID = "not_paid",
AWAITING = "awaiting",
CAPTURED = "captured",
@@ -51,11 +51,11 @@ export class Swap {
@PrimaryColumn()
id: string
@DbAwareColumn({ type: "enum", enum: FulfillmentStatus })
fulfillment_status: FulfillmentStatus
@DbAwareColumn({ type: "enum", enum: SwapFulfillmentStatus })
fulfillment_status: SwapFulfillmentStatus
@DbAwareColumn({ type: "enum", enum: PaymentStatus })
payment_status: PaymentStatus
@DbAwareColumn({ type: "enum", enum: SwapPaymentStatus })
payment_status: SwapPaymentStatus
@Index()
@Column({ type: "string" })