feat(medusa): Convert SwapService to TypeScript (#2000)

**What**
- refactor swap service to typescript
- reimplement legacy methods
- use enums instead of magic strings

RESOLVES CORE-396

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Frane Polić
2022-09-05 13:37:47 +00:00
committed by GitHub
co-authored by Oliver Windall Juhl
parent 546a963f7b
commit ba6416f095
14 changed files with 609 additions and 599 deletions
+2 -1
View File
@@ -25,6 +25,7 @@ export enum SwapFulfillmentStatus {
NOT_FULFILLED = "not_fulfilled",
FULFILLED = "fulfilled",
SHIPPED = "shipped",
PARTIALLY_SHIPPED = "partially_shipped",
CANCELED = "canceled",
REQUIRES_ACTION = "requires_action",
}
@@ -190,7 +191,7 @@ export class Swap extends SoftDeletableEntity {
* description: Available if the relation `shipping_address` is expanded.
* $ref: "#/components/schemas/address"
* shipping_methods:
* description: The Shipping Methods used to fulfill the addtional items purchased. Available if the relation `shipping_methods` is expanded.
* description: The Shipping Methods used to fulfill the additional items purchased. Available if the relation `shipping_methods` is expanded.
* type: array
* items:
* $ref: "#/components/schemas/shipping_method"