diff --git a/docs/api/admin-spec3.json b/docs/api/admin-spec3.json index 7cfd5c96e6..5da7fcc4b6 100644 --- a/docs/api/admin-spec3.json +++ b/docs/api/admin-spec3.json @@ -71,8 +71,6 @@ } ], "paths": { -<<<<<<< HEAD -======= "/auth": { "post": { "operationId": "PostAuth", @@ -147,7 +145,6 @@ } } }, ->>>>>>> origin/master "/collections": { "post": { "operationId": "PostCollections", @@ -360,80 +357,6 @@ } } }, - "/auth": { - "post": { - "operationId": "PostAuth", - "summary": "Authenticate a User", - "description": "Logs a User in and authorizes them to manage Store settings.", - "parameters": [], - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/user" - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "email", - "password" - ], - "properties": { - "email": { - "type": "string", - "description": "The User's email." - }, - "password": { - "type": "string", - "description": "The User's password." - } - } - } - } - } - } - }, - "get": { - "operationId": "GetAuth", - "summary": "Get Session", - "description": "Gets the currently logged in User.", - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/user" - } - } - } - } - } - } - } - } - }, "/customers": { "post": { "operationId": "PostCustomers", @@ -611,1945 +534,6 @@ } } }, - "/gift-cards": { - "post": { - "operationId": "PostGiftCards", - "summary": "Create a Gift Card", - "description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "value": { - "type": "integer", - "description": "The value (excluding VAT) that the Gift Card should represent." - }, - "is_disabled": { - "type": "boolean", - "description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers." - }, - "ends_at": { - "type": "string", - "format": "date-time", - "description": "The time at which the Gift Card should no longer be available." - }, - "region_id": { - "description": "The id of the Region in which the Gift Card can be used.", - "type": "array", - "items": { - "type": "string" - } - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_card": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - }, - "get": { - "operationId": "GetGiftCards", - "summary": "List Gift Cards", - "description": "Retrieves a list of Gift Cards.", - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_cards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - } - } - }, - "/gift-cards/{id}": { - "delete": { - "operationId": "DeleteGiftCardsGiftCard", - "summary": "Delete a Gift Card", - "description": "Deletes a Gift Card", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Gift Card to delete.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "type": "string", - "description": "The id of the deleted Gift Card" - }, - "object": { - "type": "string", - "description": "The type of the object that was deleted." - }, - "deleted": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "get": { - "operationId": "GetGiftCardsGiftCard", - "summary": "Retrieve a Gift Card", - "description": "Retrieves a Gift Card.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Gift Card.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_card": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - }, - "post": { - "operationId": "PostGiftCardsGiftCard", - "summary": "Create a Gift Card", - "description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Gift Card.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "balance": { - "type": "integer", - "description": "The value (excluding VAT) that the Gift Card should represent." - }, - "is_disabled": { - "type": "boolean", - "description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers." - }, - "ends_at": { - "type": "string", - "format": "date-time", - "description": "The time at which the Gift Card should no longer be available." - }, - "region_id": { - "description": "The id of the Region in which the Gift Card can be used.", - "type": "array", - "items": { - "type": "string" - } - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_card": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - } - }, - "/gift-cards": { - "post": { - "operationId": "PostGiftCards", - "summary": "Create a Gift Card", - "description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.", - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "value": { - "type": "integer", - "description": "The value (excluding VAT) that the Gift Card should represent." - }, - "is_disabled": { - "type": "boolean", - "description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers." - }, - "ends_at": { - "type": "string", - "format": "date-time", - "description": "The time at which the Gift Card should no longer be available." - }, - "region_id": { - "description": "The id of the Region in which the Gift Card can be used.", - "type": "array", - "items": { - "type": "string" - } - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_card": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - }, - "get": { - "operationId": "GetGiftCards", - "summary": "List Gift Cards", - "description": "Retrieves a list of Gift Cards.", - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_cards": { - "type": "array", - "items": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - } - } - }, - "/gift-cards/{id}": { - "delete": { - "operationId": "DeleteGiftCardsGiftCard", - "summary": "Delete a Gift Card", - "description": "Deletes a Gift Card", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Gift Card to delete.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "id": { - "type": "string", - "description": "The id of the deleted Gift Card" - }, - "object": { - "type": "string", - "description": "The type of the object that was deleted." - }, - "deleted": { - "type": "boolean" - } - } - } - } - } - } - } - }, - "get": { - "operationId": "GetGiftCardsGiftCard", - "summary": "Retrieve a Gift Card", - "description": "Retrieves a Gift Card.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Gift Card.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_card": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - }, - "post": { - "operationId": "PostGiftCardsGiftCard", - "summary": "Create a Gift Card", - "description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Gift Card.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "balance": { - "type": "integer", - "description": "The value (excluding VAT) that the Gift Card should represent." - }, - "is_disabled": { - "type": "boolean", - "description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers." - }, - "ends_at": { - "type": "string", - "format": "date-time", - "description": "The time at which the Gift Card should no longer be available." - }, - "region_id": { - "description": "The id of the Region in which the Gift Card can be used.", - "type": "array", - "items": { - "type": "string" - } - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Gift Card" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "gift_card": { - "$ref": "#/components/schemas/gift_card" - } - } - } - } - } - } - } - } - }, - "/notifications": { - "get": { - "operationId": "GetNotifications", - "summary": "List Notifications", - "description": "Retrieves a list of Notifications.", - "tags": [ - "Notification" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "notifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/notification" - } - } - } - } - } - } - } - } - } - }, - "/notifications/{id}/resend": { - "post": { - "operationId": "PostNotificationsNotificationResend", - "summary": "Resend Notification", - "description": "Resends a previously sent notifications, with the same data but optionally to a different address", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Notification", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Notification" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "notification": { - "$ref": "#/components/schemas/notification" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/shipping-methods": { - "post": { - "operationId": "PostOrdersOrderShippingMethods", - "summary": "Add a Shipping Method", - "description": "Adds a Shipping Method to an Order. If another Shipping Method exists with the same Shipping Profile, the previous Shipping Method will be replaced.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "price", - "option_id", - "data" - ], - "properties": { - "price": { - "type": "integer", - "description": "The price (excluding VAT) that should be charged for the Shipping Method" - }, - "option_id": { - "type": "string", - "description": "The id of the Shipping Option to create the Shipping Method from." - }, - "data": { - "type": "object", - "description": "The data required for the Shipping Option to create a Shipping Method. This will depend on the Fulfillment Provider." - } - } - } - } - } - } - } - }, - "/orders/{id}/cancel": { - "post": { - "operationId": "PostOrdersOrderCancel", - "summary": "Cancel an Order", - "description": "Registers an Order as canceled. This triggers a flow that will cancel any created Fulfillments and Payments, may fail if the Payment or Fulfillment Provider is unable to cancel the Payment/Fulfillment.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/capture": { - "post": { - "operationId": "PostOrdersOrderCapture", - "summary": "Capture an Order", - "description": "Captures all the Payments associated with an Order.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/claims/{claim_id}/shipments": { - "post": { - "operationId": "PostOrdersOrderClaimsClaimShipments", - "summary": "Create Claim Shipment", - "description": "Registers a Claim Fulfillment as shipped.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "claim_id", - "required": true, - "description": "The id of the Claim.", - "schema": { - "type": "string" - } - } - ], -<<<<<<< HEAD - "tags": [ - "Discount" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "discount": { - "$ref": "#/components/schemas/discount" -======= - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "fulfillment_id": { - "description": "The id of the Fulfillment.", - "type": "string" - }, - "tracking_numbers": { - "description": "The tracking numbers for the shipment.", - "type": "array", - "items": { - "type": "string" ->>>>>>> origin/master - } - } - } - } - } - } -<<<<<<< HEAD - } - } - }, - "/notifications": { - "get": { - "operationId": "GetNotifications", - "summary": "List Notifications", - "description": "Retrieves a list of Notifications.", - "tags": [ - "Notification" -======= - }, - "tags": [ - "Order" ->>>>>>> origin/master - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { -<<<<<<< HEAD - "notifications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/notification" - } -======= - "order": { - "$ref": "#/components/schemas/order" ->>>>>>> origin/master - } - } - } - } - } - } - } - } - }, -<<<<<<< HEAD - "/notifications/{id}/resend": { - "post": { - "operationId": "PostNotificationsNotificationResend", - "summary": "Resend Notification", - "description": "Resends a previously sent notifications, with the same data but optionally to a different address", -======= - "/order/{id}/claims": { - "post": { - "operationId": "PostOrdersOrderClaims", - "summary": "Create a Claim", - "description": "Creates a Claim.", ->>>>>>> origin/master - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, -<<<<<<< HEAD - "description": "The id of the Notification", -======= - "description": "The id of the Order.", ->>>>>>> origin/master - "schema": { - "type": "string" - } - } - ], -<<<<<<< HEAD - "tags": [ - "Notification" -======= - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "type": { - "description": "The type of the Claim. This will determine how the Claim is treated: `replace` Claims will result in a Fulfillment with new items being created, while a `refund` Claim will refund the amount paid for the claimed items.", - "type": "string", - "enum": [ - "replace", - "refund" - ] - }, - "claim_items": { - "description": "The Claim Items that the Claim will consist of.", - "type": "array", - "items": { - "properties": { - "item_id": { - "description": "The id of the Line Item that will be claimed.", - "type": "string" - }, - "quantity": { - "description": "The number of items that will be returned", - "type": "integer" - }, - "note": { - "description": "Short text describing the Claim Item in further detail.", - "type": "string" - }, - "reason": { - "description": "The reason for the Claim", - "type": "string", - "enum": [ - "missing_item", - "wrong_item", - "production_failure", - "other" - ] - }, - "tags": { - "description": "A list o tags to add to the Claim Item", - "type": "array", - "items": { - "type": "string" - } - }, - "images": { - "description": "A list of image URL's that will be associated with the Claim", - "items": { - "type": "string" - } - } - } - } - }, - "return_shipping": { - "description": "Optional details for the Return Shipping Method, if the items are to be sent back.", - "type": "object", - "properties": { - "option_id": { - "type": "string", - "description": "The id of the Shipping Option to create the Shipping Method from." - }, - "price": { - "type": "integer", - "description": "The price to charge for the Shipping Method." - } - } - }, - "additional_items": { - "description": "The new items to send to the Customer when the Claim type is Replace.", - "type": "array", - "items": { - "properties": { - "variant_id": { - "description": "The id of the Product Variant to ship.", - "type": "string" - }, - "quantity": { - "description": "The quantity of the Product Variant to ship.", - "type": "integer" - } - } - } - }, - "shipping_methods": { - "description": "The Shipping Methods to send the additional Line Items with.", - "type": "array", - "items": { - "properties": { - "id": { - "description": "The id of an existing Shipping Method", - "type": "string" - }, - "option_id": { - "description": "The id of the Shipping Option to create a Shipping Method from", - "type": "string" - }, - "price": { - "description": "The price to charge for the Shipping Method", - "type": "integer" - } - } - } - }, - "refund_amount": { - "description": "The amount to refund the Customer when the Claim type is `refund`.", - "type": "integer" - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Order" ->>>>>>> origin/master - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/fulfillments": { - "post": { - "operationId": "PostOrdersOrderFulfillments", - "summary": "Create a Fulfillment", - "description": "Creates a Fulfillment of an Order - will notify Fulfillment Providers to prepare a shipment.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "items": { - "description": "The Line Items to include in the Fulfillment.", - "type": "array", - "items": { - "properties": { - "item_id": { - "description": "The id of Line Item to fulfill.", - "type": "string" - }, - "quantity": { - "description": "The quantity of the Line Item to fulfill.", - "type": "integer" - } - } - } - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/shipment": { - "post": { - "operationId": "PostOrdersOrderShipment", - "summary": "Create a Shipment", - "description": "Registers a Fulfillment as shipped.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "fulfillment_id": { - "description": "The id of the Fulfillment.", - "type": "string" - }, - "tracking_numbers": { - "description": "The tracking numbers for the shipment.", - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/swaps/{swap_id}/shipments": { - "post": { - "operationId": "PostOrdersOrderSwapsSwapShipments", - "summary": "Create Swap Shipment", - "description": "Registers a Swap Fulfillment as shipped.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "swap_id", - "required": true, - "description": "The id of the Swap.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "fulfillment_id": { - "description": "The id of the Fulfillment.", - "type": "string" - }, - "tracking_numbers": { - "description": "The tracking numbers for the shipment.", - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/order/{id}/swaps": { - "post": { - "operationId": "PostOrdersOrderSwaps", - "summary": "Create a Swap", - "description": "Creates a Swap. Swaps are used to handle Return of previously purchased goods and Fulfillment of replacements simultaneously.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Swap.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "return_items": { - "description": "The Line Items to return as part of the Swap.", - "type": "array", - "items": { - "properties": { - "item_id": { - "description": "The id of the Line Item that will be claimed.", - "type": "string" - }, - "quantity": { - "description": "The number of items that will be returned", - "type": "integer" - } - } - } - }, - "return_shipping": { - "description": "How the Swap will be returned.", - "type": "object", - "properties": { - "option_id": { - "type": "string", - "description": "The id of the Shipping Option to create the Shipping Method from." - }, - "price": { - "type": "integer", - "description": "The price to charge for the Shipping Method." - } - } - }, - "additional_items": { - "description": "The new items to send to the Customer.", - "type": "array", - "items": { - "properties": { - "variant_id": { - "description": "The id of the Product Variant to ship.", - "type": "string" - }, - "quantity": { - "description": "The quantity of the Product Variant to ship.", - "type": "integer" - } - } - } - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/order/{id}/metadata/{key}": { - "delete": { - "operationId": "DeleteOrdersOrderMetadataKey", - "summary": "Delete Metadata", - "description": "Deletes a metadata key.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "key", - "required": true, - "description": "The metadata key.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/claims/{claim_id}/fulfillments": { - "post": { - "operationId": "PostOrdersOrderClaimsClaimFulfillments", - "summary": "Create a Claim Fulfillment", - "description": "Creates a Fulfillment for a Claim.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "claim_id", - "required": true, - "description": "The id of the Claim.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/swaps/{swap_id}/fulfillments": { - "post": { - "operationId": "PostOrdersOrderSwapsSwapFulfillments", - "summary": "Create a Swap Fulfillment", - "description": "Creates a Fulfillment for a Swap.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "swap_id", - "required": true, - "description": "The id of the Swap.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}": { - "get": { - "operationId": "GetOrdersOrder", - "summary": "Retrieve an Order", - "description": "Retrieves an Order", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders": { - "get": { - "operationId": "GetOrders", - "summary": "List Orders", - "description": "Retrieves an list of Orders", - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "orders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - } - }, - "/orders/{id}/swaps/{swap_id}/process-payment": { - "post": { - "operationId": "PostOrdersOrderSwapsSwapProcessPayment", - "summary": "Process a Swap difference", - "description": "When there are differences between the returned and shipped Products in a Swap, the difference must be processed. Either a Refund will be issued or a Payment will be captured.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "swap_id", - "required": true, - "description": "The id of the Swap.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/returns/{return_id}/receive": { - "post": { - "operationId": "PostOrdersOrderReturnsReturnReceive", - "summary": "Receive a Return", - "description": "Registers a Return as received.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "return_id", - "required": true, - "description": "The id of the Return.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "items": { - "description": "The Line Items that have been received.", - "type": "array", - "items": { - "properties": { - "item_id": { - "description": "The id of the Line Item.", - "type": "string" - }, - "quantity": { - "description": "The quantity of the Line Item.", - "type": "integer" - } - } - } - }, - "refund": { - "description": "The amount to refund.", - "type": "integer" - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/swaps/{swap_id}/receive": { - "post": { - "operationId": "PostOrdersOrderSwapsSwapReceive", - "summary": "Receive a Swap", - "description": "Registers a Swap as received.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "swap_id", - "required": true, - "description": "The id of the Swap.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "items": { - "description": "The Line Items that have been received.", - "type": "array", - "items": { - "properties": { - "item_id": { - "description": "The id of the Line Item.", - "type": "string" - }, - "quantity": { - "description": "The quantity of the Line Item.", - "type": "integer" - } - } - } - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/refunds": { - "post": { - "operationId": "PostOrdersOrderRefunds", - "summary": "Create a Refund", - "description": "Issues a Refund.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "required": [ - "amount", - "reason" - ], - "properties": { - "amount": { - "description": "The amount to refund.", - "type": "integer" - }, - "reason": { - "description": "The reason for the Refund.", - "type": "string" - }, - "note": { - "description": "A not with additional details about the Refund.", - "type": "string" - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}/returns": { - "post": { - "operationId": "PostOrdersOrderReturns", - "summary": "Request a Return", - "description": "Requests a Return. If applicable a return label will be created and other plugins notified.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "items": { - "description": "The Line Items that will be returned.", - "type": "array", - "items": { - "properties": { - "item_id": { - "description": "The id of the Line Item.", - "type": "string" - }, - "quantity": { - "description": "The quantity of the Line Item.", - "type": "integer" - } - } - } - }, - "return_shipping": { - "description": "The Shipping Method to be used to handle the return shipment.", - "type": "object", - "properties": { - "option_id": { - "type": "string", - "description": "The id of the Shipping Option to create the Shipping Method from." - }, - "price": { - "type": "integer", - "description": "The price to charge for the Shipping Method." - } - } - }, - "receive_now": { - "description": "A flag to indicate if the Return should be registerd as received immediately.", - "type": "boolean" - }, - "refund": { - "description": "The amount to refund.", - "type": "integer" - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/order/{id}/claims/{claim_id}": { - "post": { - "operationId": "PostOrdersOrderClaimsClaim", - "summary": "Update a Claim", - "description": "Updates a Claim.", - "parameters": [ - { - "in": "path", - "name": "id", - "required": true, - "description": "The id of the Order.", - "schema": { - "type": "string" - } - }, - { - "in": "path", - "name": "claim_id", - "required": true, - "description": "The id of the Claim.", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "properties": { - "claim_items": { - "description": "The Claim Items that the Claim will consist of.", - "type": "array", - "items": { - "properties": { - "id": { - "description": "The id of the Claim Item.", - "type": "string" - }, - "item_id": { - "description": "The id of the Line Item that will be claimed.", - "type": "string" - }, - "quantity": { - "description": "The number of items that will be returned", - "type": "integer" - }, - "note": { - "description": "Short text describing the Claim Item in further detail.", - "type": "string" - }, - "reason": { - "description": "The reason for the Claim", - "type": "string", - "enum": [ - "missing_item", - "wrong_item", - "production_failure", - "other" - ] - }, - "tags": { - "description": "A list o tags to add to the Claim Item", - "type": "array", - "items": { - "type": "string" - } - }, - "images": { - "description": "A list of image URL's that will be associated with the Claim", - "items": { - "type": "string" - } - } - } - } - }, - "shipping_methods": { - "description": "The Shipping Methods to send the additional Line Items with.", - "type": "array", - "items": { - "properties": { - "id": { - "description": "The id of an existing Shipping Method", - "type": "string" - }, - "option_id": { - "description": "The id of the Shipping Option to create a Shipping Method from", - "type": "string" - }, - "price": { - "description": "The price to charge for the Shipping Method", - "type": "integer" - } - } - } - }, - "metadata": { - "description": "An optional set of key-value pairs to hold additional information.", - "type": "object" - } - } - } - } - } - }, - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, "/discounts/{id}/regions/{region_id}": { "post": { "operationId": "PostDiscountsDiscountRegionsRegion", @@ -3054,6 +1038,1664 @@ } } }, + "/gift-cards": { + "post": { + "operationId": "PostGiftCards", + "summary": "Create a Gift Card", + "description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "value": { + "type": "integer", + "description": "The value (excluding VAT) that the Gift Card should represent." + }, + "is_disabled": { + "type": "boolean", + "description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers." + }, + "ends_at": { + "type": "string", + "format": "date-time", + "description": "The time at which the Gift Card should no longer be available." + }, + "region_id": { + "description": "The id of the Region in which the Gift Card can be used.", + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Gift Card" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "gift_card": { + "$ref": "#/components/schemas/gift_card" + } + } + } + } + } + } + } + }, + "get": { + "operationId": "GetGiftCards", + "summary": "List Gift Cards", + "description": "Retrieves a list of Gift Cards.", + "tags": [ + "Gift Card" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "gift_cards": { + "type": "array", + "items": { + "$ref": "#/components/schemas/gift_card" + } + } + } + } + } + } + } + } + } + }, + "/gift-cards/{id}": { + "delete": { + "operationId": "DeleteGiftCardsGiftCard", + "summary": "Delete a Gift Card", + "description": "Deletes a Gift Card", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Gift Card to delete.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Gift Card" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "id": { + "type": "string", + "description": "The id of the deleted Gift Card" + }, + "object": { + "type": "string", + "description": "The type of the object that was deleted." + }, + "deleted": { + "type": "boolean" + } + } + } + } + } + } + } + }, + "get": { + "operationId": "GetGiftCardsGiftCard", + "summary": "Retrieve a Gift Card", + "description": "Retrieves a Gift Card.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Gift Card.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Gift Card" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "gift_card": { + "$ref": "#/components/schemas/gift_card" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "PostGiftCardsGiftCard", + "summary": "Create a Gift Card", + "description": "Creates a Gift Card that can redeemed by its unique code. The Gift Card is only valid within 1 region.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Gift Card.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "balance": { + "type": "integer", + "description": "The value (excluding VAT) that the Gift Card should represent." + }, + "is_disabled": { + "type": "boolean", + "description": "Whether the Gift Card is disabled on creation. You will have to enable it later to make it available to Customers." + }, + "ends_at": { + "type": "string", + "format": "date-time", + "description": "The time at which the Gift Card should no longer be available." + }, + "region_id": { + "description": "The id of the Region in which the Gift Card can be used.", + "type": "array", + "items": { + "type": "string" + } + }, + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Gift Card" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "gift_card": { + "$ref": "#/components/schemas/gift_card" + } + } + } + } + } + } + } + } + }, + "/notifications": { + "get": { + "operationId": "GetNotifications", + "summary": "List Notifications", + "description": "Retrieves a list of Notifications.", + "tags": [ + "Notification" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "notifications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/notification" + } + } + } + } + } + } + } + } + } + }, + "/notifications/{id}/resend": { + "post": { + "operationId": "PostNotificationsNotificationResend", + "summary": "Resend Notification", + "description": "Resends a previously sent notifications, with the same data but optionally to a different address", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Notification", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Notification" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "notification": { + "$ref": "#/components/schemas/notification" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/shipping-methods": { + "post": { + "operationId": "PostOrdersOrderShippingMethods", + "summary": "Add a Shipping Method", + "description": "Adds a Shipping Method to an Order. If another Shipping Method exists with the same Shipping Profile, the previous Shipping Method will be replaced.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "price", + "option_id", + "data" + ], + "properties": { + "price": { + "type": "integer", + "description": "The price (excluding VAT) that should be charged for the Shipping Method" + }, + "option_id": { + "type": "string", + "description": "The id of the Shipping Option to create the Shipping Method from." + }, + "data": { + "type": "object", + "description": "The data required for the Shipping Option to create a Shipping Method. This will depend on the Fulfillment Provider." + } + } + } + } + } + } + } + }, + "/orders/{id}/cancel": { + "post": { + "operationId": "PostOrdersOrderCancel", + "summary": "Cancel an Order", + "description": "Registers an Order as canceled. This triggers a flow that will cancel any created Fulfillments and Payments, may fail if the Payment or Fulfillment Provider is unable to cancel the Payment/Fulfillment.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/capture": { + "post": { + "operationId": "PostOrdersOrderCapture", + "summary": "Capture an Order", + "description": "Captures all the Payments associated with an Order.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/claims/{claim_id}/shipments": { + "post": { + "operationId": "PostOrdersOrderClaimsClaimShipments", + "summary": "Create Claim Shipment", + "description": "Registers a Claim Fulfillment as shipped.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "claim_id", + "required": true, + "description": "The id of the Claim.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "fulfillment_id": { + "description": "The id of the Fulfillment.", + "type": "string" + }, + "tracking_numbers": { + "description": "The tracking numbers for the shipment.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/order/{id}/claims": { + "post": { + "operationId": "PostOrdersOrderClaims", + "summary": "Create a Claim", + "description": "Creates a Claim.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "type": { + "description": "The type of the Claim. This will determine how the Claim is treated: `replace` Claims will result in a Fulfillment with new items being created, while a `refund` Claim will refund the amount paid for the claimed items.", + "type": "string", + "enum": [ + "replace", + "refund" + ] + }, + "claim_items": { + "description": "The Claim Items that the Claim will consist of.", + "type": "array", + "items": { + "properties": { + "item_id": { + "description": "The id of the Line Item that will be claimed.", + "type": "string" + }, + "quantity": { + "description": "The number of items that will be returned", + "type": "integer" + }, + "note": { + "description": "Short text describing the Claim Item in further detail.", + "type": "string" + }, + "reason": { + "description": "The reason for the Claim", + "type": "string", + "enum": [ + "missing_item", + "wrong_item", + "production_failure", + "other" + ] + }, + "tags": { + "description": "A list o tags to add to the Claim Item", + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "description": "A list of image URL's that will be associated with the Claim", + "items": { + "type": "string" + } + } + } + } + }, + "return_shipping": { + "description": "Optional details for the Return Shipping Method, if the items are to be sent back.", + "type": "object", + "properties": { + "option_id": { + "type": "string", + "description": "The id of the Shipping Option to create the Shipping Method from." + }, + "price": { + "type": "integer", + "description": "The price to charge for the Shipping Method." + } + } + }, + "additional_items": { + "description": "The new items to send to the Customer when the Claim type is Replace.", + "type": "array", + "items": { + "properties": { + "variant_id": { + "description": "The id of the Product Variant to ship.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the Product Variant to ship.", + "type": "integer" + } + } + } + }, + "shipping_methods": { + "description": "The Shipping Methods to send the additional Line Items with.", + "type": "array", + "items": { + "properties": { + "id": { + "description": "The id of an existing Shipping Method", + "type": "string" + }, + "option_id": { + "description": "The id of the Shipping Option to create a Shipping Method from", + "type": "string" + }, + "price": { + "description": "The price to charge for the Shipping Method", + "type": "integer" + } + } + } + }, + "refund_amount": { + "description": "The amount to refund the Customer when the Claim type is `refund`.", + "type": "integer" + }, + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/fulfillments": { + "post": { + "operationId": "PostOrdersOrderFulfillments", + "summary": "Create a Fulfillment", + "description": "Creates a Fulfillment of an Order - will notify Fulfillment Providers to prepare a shipment.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "items": { + "description": "The Line Items to include in the Fulfillment.", + "type": "array", + "items": { + "properties": { + "item_id": { + "description": "The id of Line Item to fulfill.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the Line Item to fulfill.", + "type": "integer" + } + } + } + }, + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/shipment": { + "post": { + "operationId": "PostOrdersOrderShipment", + "summary": "Create a Shipment", + "description": "Registers a Fulfillment as shipped.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "fulfillment_id": { + "description": "The id of the Fulfillment.", + "type": "string" + }, + "tracking_numbers": { + "description": "The tracking numbers for the shipment.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/swaps/{swap_id}/shipments": { + "post": { + "operationId": "PostOrdersOrderSwapsSwapShipments", + "summary": "Create Swap Shipment", + "description": "Registers a Swap Fulfillment as shipped.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "swap_id", + "required": true, + "description": "The id of the Swap.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "fulfillment_id": { + "description": "The id of the Fulfillment.", + "type": "string" + }, + "tracking_numbers": { + "description": "The tracking numbers for the shipment.", + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/order/{id}/swaps": { + "post": { + "operationId": "PostOrdersOrderSwaps", + "summary": "Create a Swap", + "description": "Creates a Swap. Swaps are used to handle Return of previously purchased goods and Fulfillment of replacements simultaneously.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "return_items": { + "description": "The Line Items to return as part of the Swap.", + "type": "array", + "items": { + "properties": { + "item_id": { + "description": "The id of the Line Item that will be claimed.", + "type": "string" + }, + "quantity": { + "description": "The number of items that will be returned", + "type": "integer" + } + } + } + }, + "return_shipping": { + "description": "How the Swap will be returned.", + "type": "object", + "properties": { + "option_id": { + "type": "string", + "description": "The id of the Shipping Option to create the Shipping Method from." + }, + "price": { + "type": "integer", + "description": "The price to charge for the Shipping Method." + } + } + }, + "additional_items": { + "description": "The new items to send to the Customer.", + "type": "array", + "items": { + "properties": { + "variant_id": { + "description": "The id of the Product Variant to ship.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the Product Variant to ship.", + "type": "integer" + } + } + } + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/order/{id}/metadata/{key}": { + "delete": { + "operationId": "DeleteOrdersOrderMetadataKey", + "summary": "Delete Metadata", + "description": "Deletes a metadata key.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "key", + "required": true, + "description": "The metadata key.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/claims/{claim_id}/fulfillments": { + "post": { + "operationId": "PostOrdersOrderClaimsClaimFulfillments", + "summary": "Create a Claim Fulfillment", + "description": "Creates a Fulfillment for a Claim.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "claim_id", + "required": true, + "description": "The id of the Claim.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/swaps/{swap_id}/fulfillments": { + "post": { + "operationId": "PostOrdersOrderSwapsSwapFulfillments", + "summary": "Create a Swap Fulfillment", + "description": "Creates a Fulfillment for a Swap.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "swap_id", + "required": true, + "description": "The id of the Swap.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}": { + "get": { + "operationId": "GetOrdersOrder", + "summary": "Retrieve an Order", + "description": "Retrieves an Order", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders": { + "get": { + "operationId": "GetOrders", + "summary": "List Orders", + "description": "Retrieves a list of Orders", + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "orders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + } + }, + "/orders/{id}/swaps/{swap_id}/process-payment": { + "post": { + "operationId": "PostOrdersOrderSwapsSwapProcessPayment", + "summary": "Process a Swap difference", + "description": "When there are differences between the returned and shipped Products in a Swap, the difference must be processed. Either a Refund will be issued or a Payment will be captured.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "swap_id", + "required": true, + "description": "The id of the Swap.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/returns/{return_id}/receive": { + "post": { + "operationId": "PostOrdersOrderReturnsReturnReceive", + "summary": "Receive a Return", + "description": "Registers a Return as received.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "return_id", + "required": true, + "description": "The id of the Return.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "items": { + "description": "The Line Items that have been received.", + "type": "array", + "items": { + "properties": { + "item_id": { + "description": "The id of the Line Item.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the Line Item.", + "type": "integer" + } + } + } + }, + "refund": { + "description": "The amount to refund.", + "type": "integer" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/swaps/{swap_id}/receive": { + "post": { + "operationId": "PostOrdersOrderSwapsSwapReceive", + "summary": "Receive a Swap", + "description": "Registers a Swap as received.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "swap_id", + "required": true, + "description": "The id of the Swap.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "items": { + "description": "The Line Items that have been received.", + "type": "array", + "items": { + "properties": { + "item_id": { + "description": "The id of the Line Item.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the Line Item.", + "type": "integer" + } + } + } + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/refunds": { + "post": { + "operationId": "PostOrdersOrderRefunds", + "summary": "Create a Refund", + "description": "Issues a Refund.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "required": [ + "amount", + "reason" + ], + "properties": { + "amount": { + "description": "The amount to refund.", + "type": "integer" + }, + "reason": { + "description": "The reason for the Refund.", + "type": "string" + }, + "note": { + "description": "A not with additional details about the Refund.", + "type": "string" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}/returns": { + "post": { + "operationId": "PostOrdersOrderReturns", + "summary": "Request a Return", + "description": "Requests a Return. If applicable a return label will be created and other plugins notified.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "items": { + "description": "The Line Items that will be returned.", + "type": "array", + "items": { + "properties": { + "item_id": { + "description": "The id of the Line Item.", + "type": "string" + }, + "reason_id": { + "description": "The id of the Return Reason to use.", + "type": "string" + }, + "note": { + "description": "An optional note with information about the Return.", + "type": "string" + }, + "quantity": { + "description": "The quantity of the Line Item.", + "type": "integer" + } + } + } + }, + "return_shipping": { + "description": "The Shipping Method to be used to handle the return shipment.", + "type": "object", + "properties": { + "option_id": { + "type": "string", + "description": "The id of the Shipping Option to create the Shipping Method from." + }, + "price": { + "type": "integer", + "description": "The price to charge for the Shipping Method." + } + } + }, + "receive_now": { + "description": "A flag to indicate if the Return should be registerd as received immediately.", + "type": "boolean" + }, + "refund": { + "description": "The amount to refund.", + "type": "integer" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/order/{id}/claims/{claim_id}": { + "post": { + "operationId": "PostOrdersOrderClaimsClaim", + "summary": "Update a Claim", + "description": "Updates a Claim.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + }, + { + "in": "path", + "name": "claim_id", + "required": true, + "description": "The id of the Claim.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "claim_items": { + "description": "The Claim Items that the Claim will consist of.", + "type": "array", + "items": { + "properties": { + "id": { + "description": "The id of the Claim Item.", + "type": "string" + }, + "item_id": { + "description": "The id of the Line Item that will be claimed.", + "type": "string" + }, + "quantity": { + "description": "The number of items that will be returned", + "type": "integer" + }, + "note": { + "description": "Short text describing the Claim Item in further detail.", + "type": "string" + }, + "reason": { + "description": "The reason for the Claim", + "type": "string", + "enum": [ + "missing_item", + "wrong_item", + "production_failure", + "other" + ] + }, + "tags": { + "description": "A list o tags to add to the Claim Item", + "type": "array", + "items": { + "type": "string" + } + }, + "images": { + "description": "A list of image URL's that will be associated with the Claim", + "items": { + "type": "string" + } + } + } + } + }, + "shipping_methods": { + "description": "The Shipping Methods to send the additional Line Items with.", + "type": "array", + "items": { + "properties": { + "id": { + "description": "The id of an existing Shipping Method", + "type": "string" + }, + "option_id": { + "description": "The id of the Shipping Option to create a Shipping Method from", + "type": "string" + }, + "price": { + "description": "The price to charge for the Shipping Method", + "type": "integer" + } + } + } + }, + "metadata": { + "description": "An optional set of key-value pairs to hold additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, "/products/{id}/options": { "post": { "operationId": "PostProductsProductOptions", @@ -4923,6 +4565,183 @@ } } }, + "/return-reasons": { + "post": { + "operationId": "PostReturnReasons", + "summary": "Create a Return Reason", + "description": "Creates a Return Reason", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "label": { + "description": "The label to display to the Customer.", + "type": "string" + }, + "value": { + "description": "The value that the Return Reason will be identified by. Must be unique.", + "type": "string" + }, + "description": { + "description": "An optional description to for the Reason.", + "type": "string" + }, + "metadata": { + "description": "An optional set of key-value pairs with additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Return Reason" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return_reason": { + "$ref": "#/components/schemas/return_reason" + } + } + } + } + } + } + } + }, + "get": { + "operationId": "GetReturnReasons", + "summary": "List Return Reasons", + "description": "Retrieves a list of Return Reasons.", + "tags": [ + "Return Reason" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/return_reason" + } + } + } + } + } + } + } + } + } + }, + "/return-reasons/{id}": { + "get": { + "operationId": "GetReturnReasonsReason", + "summary": "Retrieve a Return Reason", + "description": "Retrieves a Return Reason.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Return Reason.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Return Reason" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return_reason": { + "$ref": "#/components/schemas/return_reason" + } + } + } + } + } + } + } + }, + "post": { + "operationId": "PostReturnReasonsReason", + "summary": "Update a Return Reason", + "description": "Updates a Return Reason", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Return Reason.", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "label": { + "description": "The label to display to the Customer.", + "type": "string" + }, + "value": { + "description": "The value that the Return Reason will be identified by. Must be unique.", + "type": "string" + }, + "description": { + "description": "An optional description to for the Reason.", + "type": "string" + }, + "metadata": { + "description": "An optional set of key-value pairs with additional information.", + "type": "object" + } + } + } + } + } + }, + "tags": [ + "Return Reason" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return_reason": { + "$ref": "#/components/schemas/return_reason" + } + } + } + } + } + } + } + } + }, "/returns": { "get": { "operationId": "GetReturns", @@ -7781,6 +7600,60 @@ "description": "The quantity that was received in the warehouse.", "type": "integer" }, + "reason": { + "description": "The reason for returning the item.", + "anyOf": [ + { + "$ref": "#/components/schemas/return_reason" + } + ] + }, + "note": { + "description": "An optional note with additional details about the Return.", + "type": "string" + }, + "metadata": { + "description": "An optional key-value map with additional information.", + "type": "object" + } + } + }, + "return_reason": { + "title": "Return Reason", + "description": "A Reason for why a given product is returned. A Return Reason can be used on Return Items in order to indicate why a Line Item was returned.", + "x-resourceId": "return_reason", + "properties": { + "id": { + "description": "The id of the Return Reason will start with `rr_`.", + "type": "string" + }, + "description": { + "description": "A description of the Reason.", + "type": "string" + }, + "label": { + "description": "A text that can be displayed to the Customer as a reason.", + "type": "string" + }, + "value": { + "description": "The value to identify the reason by.", + "type": "string" + }, + "created_at": { + "description": "The date with timezone at which the resource was created.", + "type": "string", + "format": "date-time" + }, + "updated_at": { + "description": "The date with timezone at which the resource was last updated.", + "type": "string", + "format": "date-time" + }, + "deleted_at": { + "description": "The date with timezone at which the resource was deleted.", + "type": "string", + "format": "date-time" + }, "metadata": { "description": "An optional key-value map with additional information.", "type": "object" diff --git a/docs/api/admin-spec3.yaml b/docs/api/admin-spec3.yaml index 2fbb911126..048de24094 100644 --- a/docs/api/admin-spec3.yaml +++ b/docs/api/admin-spec3.yaml @@ -695,49 +695,6 @@ paths: properties: discount: $ref: '#/components/schemas/discount' - /notifications: - get: - operationId: GetNotifications - summary: List Notifications - description: Retrieves a list of Notifications. - tags: - - Notification - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - notifications: - type: array - items: - $ref: '#/components/schemas/notification' - '/notifications/{id}/resend': - post: - operationId: PostNotificationsNotificationResend - summary: Resend Notification - description: >- - Resends a previously sent notifications, with the same data but - optionally to a different address - parameters: - - in: path - name: id - required: true - description: The id of the Notification - schema: - type: string - tags: - - Notification - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - notification: - $ref: '#/components/schemas/notification' /gift-cards: post: operationId: PostGiftCards @@ -910,6 +867,49 @@ paths: properties: gift_card: $ref: '#/components/schemas/gift_card' + /notifications: + get: + operationId: GetNotifications + summary: List Notifications + description: Retrieves a list of Notifications. + tags: + - Notification + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + notifications: + type: array + items: + $ref: '#/components/schemas/notification' + '/notifications/{id}/resend': + post: + operationId: PostNotificationsNotificationResend + summary: Resend Notification + description: >- + Resends a previously sent notifications, with the same data but + optionally to a different address + parameters: + - in: path + name: id + required: true + description: The id of the Notification + schema: + type: string + tags: + - Notification + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + notification: + $ref: '#/components/schemas/notification' '/orders/{id}/shipping-methods': post: operationId: PostOrdersOrderShippingMethods @@ -1314,7 +1314,7 @@ paths: - in: path name: id required: true - description: The id of the Swap. + description: The id of the Order. schema: type: string requestBody: @@ -1501,7 +1501,7 @@ paths: get: operationId: GetOrders summary: List Orders - description: Retrieves an list of Orders + description: Retrieves a list of Orders tags: - Order responses: @@ -1707,6 +1707,12 @@ paths: item_id: description: The id of the Line Item. type: string + reason_id: + description: The id of the Return Reason to use. + type: string + note: + description: An optional note with information about the Return. + type: string quantity: description: The quantity of the Line Item. type: integer @@ -3153,6 +3159,126 @@ paths: properties: region: $ref: '#/components/schemas/region' + /return-reasons: + post: + operationId: PostReturnReasons + summary: Create a Return Reason + description: Creates a Return Reason + requestBody: + content: + application/json: + schema: + properties: + label: + description: The label to display to the Customer. + type: string + value: + description: >- + The value that the Return Reason will be identified by. Must + be unique. + type: string + description: + description: An optional description to for the Reason. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + tags: + - Return Reason + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + return_reason: + $ref: '#/components/schemas/return_reason' + get: + operationId: GetReturnReasons + summary: List Return Reasons + description: Retrieves a list of Return Reasons. + tags: + - Return Reason + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + return_reasons: + type: array + items: + $ref: '#/components/schemas/return_reason' + '/return-reasons/{id}': + get: + operationId: GetReturnReasonsReason + summary: Retrieve a Return Reason + description: Retrieves a Return Reason. + parameters: + - in: path + name: id + required: true + description: The id of the Return Reason. + schema: + type: string + tags: + - Return Reason + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + return_reason: + $ref: '#/components/schemas/return_reason' + post: + operationId: PostReturnReasonsReason + summary: Update a Return Reason + description: Updates a Return Reason + parameters: + - in: path + name: id + required: true + description: The id of the Return Reason. + schema: + type: string + requestBody: + content: + application/json: + schema: + properties: + label: + description: The label to display to the Customer. + type: string + value: + description: >- + The value that the Return Reason will be identified by. Must + be unique. + type: string + description: + description: An optional description to for the Reason. + type: string + metadata: + description: >- + An optional set of key-value pairs with additional + information. + type: object + tags: + - Return Reason + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + return_reason: + $ref: '#/components/schemas/return_reason' /returns: get: operationId: GetReturns @@ -3482,24 +3608,6 @@ paths: properties: shipping_profiles: $ref: '#/components/schemas/shipping_profile' - /swaps: - get: - operationId: GetSwaps - summary: List Swaps - description: Retrieves a list of Swaps. - tags: - - Swap - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - swaps: - type: array - items: - $ref: '#/components/schemas/swap' '/store/currencies/{code}': post: operationId: PostStoreCurrenciesCode @@ -3610,6 +3718,24 @@ paths: type: array items: $ref: '#/components/schemas/store' + /swaps: + get: + operationId: GetSwaps + summary: List Swaps + description: Retrieves a list of Swaps. + tags: + - Swap + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + swaps: + type: array + items: + $ref: '#/components/schemas/swap' /variants: get: operationId: GetVariants @@ -5443,6 +5569,47 @@ components: recieved_quantity: description: The quantity that was received in the warehouse. type: integer + reason: + description: The reason for returning the item. + anyOf: + - $ref: '#/components/schemas/return_reason' + note: + description: An optional note with additional details about the Return. + type: string + metadata: + description: An optional key-value map with additional information. + type: object + return_reason: + title: Return Reason + description: >- + A Reason for why a given product is returned. A Return Reason can be + used on Return Items in order to indicate why a Line Item was returned. + x-resourceId: return_reason + properties: + id: + description: The id of the Return Reason will start with `rr_`. + type: string + description: + description: A description of the Reason. + type: string + label: + description: A text that can be displayed to the Customer as a reason. + type: string + value: + description: The value to identify the reason by. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time metadata: description: An optional key-value map with additional information. type: object diff --git a/docs/api/store-spec3.json b/docs/api/store-spec3.json index 9dd93b937e..5727ac1234 100644 --- a/docs/api/store-spec3.json +++ b/docs/api/store-spec3.json @@ -75,6 +75,130 @@ } ], "paths": { + "/auth": { + "post": { + "operationId": "PostAuth", + "summary": "Authenticate Customer", + "description": "Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.", + "parameters": [], + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "email", + "password" + ], + "properties": { + "email": { + "type": "string", + "description": "The Customer's email." + }, + "password": { + "type": "string", + "description": "The Customer's password." + } + } + } + } + } + } + }, + "delete": { + "operationId": "DeleteAuth", + "summary": "Log out", + "description": "Destroys a Customer's authenticated session.", + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK" + } + } + }, + "get": { + "operationId": "GetAuth", + "summary": "Get Session", + "description": "Gets the currently logged in Customer.", + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + } + }, + "/auth/{email}": { + "get": { + "operationId": "GetAuthEmail", + "summary": "Check if email has account", + "description": "Checks if a Customer with the given email has signed up.", + "parameters": [ + { + "in": "path", + "name": "email", + "required": true, + "description": "The Customer's email.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Auth" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "exists": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, "/carts/{id}/shipping-methods": { "post": { "operationId": "PostCartsCartShippingMethod", @@ -217,6 +341,10 @@ } } } + }, + "context": { + "description": "An optional object to provide context to the Cart. The `context` field is automatically populated with `ip` and `user_agent`", + "type": "object" } } } @@ -754,15 +882,13 @@ } } }, -<<<<<<< HEAD - "context": { - "description": "An optional object to provide context to the Cart. The `context` field is automatically populated with `ip` and `user_agent`", - "type": "object" -======= "customer_id": { "description": "The id of the Customer to associate the Cart with.", "type": "string" ->>>>>>> origin/master + }, + "context": { + "description": "An optional object to provide context to the Cart.", + "type": "object" } } } @@ -1355,148 +1481,24 @@ } } }, - "/auth": { - "post": { - "operationId": "PostAuth", - "summary": "Authenticate Customer", - "description": "Logs a Customer in and authorizes them to view their details. Successful authentication will set a session cookie in the Customer's browser.", - "parameters": [], - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } -<<<<<<< HEAD - }, - "customer_id": { - "description": "The id of the Customer to associate the Cart with.", - "type": "string" - }, - "context": { - "description": "An optional object to provide context to the Cart.", - "type": "object" -======= ->>>>>>> origin/master - } - } - } - } - } - }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "email", - "password" - ], - "properties": { - "email": { - "type": "string", - "description": "The Customer's email." - }, - "password": { - "type": "string", - "description": "The Customer's password." - } - } - } - } - } - } - }, - "delete": { - "operationId": "DeleteAuth", - "summary": "Log out", - "description": "Destroys a Customer's authenticated session.", - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK" - } - } - }, + "/gift-cards/{code}": { "get": { - "operationId": "GetAuth", - "summary": "Get Session", - "description": "Gets the currently logged in Customer.", - "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "customer": { - "$ref": "#/components/schemas/customer" - } - } - } - } - } - } - } - } - }, - "/auth/{email}": { - "get": { - "operationId": "GetAuthEmail", - "summary": "Check if email has account", - "description": "Checks if a Customer with the given email has signed up.", + "operationId": "GetGiftCardsCode", + "summary": "Retrieve Gift Card by Code", + "description": "Retrieves a Gift Card by its associated unqiue code.", "parameters": [ { "in": "path", - "name": "email", + "name": "code", "required": true, - "description": "The Customer's email.", + "description": "The unique Gift Card code.", "schema": { "type": "string" } } ], "tags": [ - "Auth" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "exists": { - "type": "boolean" - } - } - } - } - } - } - } - } - }, - "/gift-cards/{code}": { - "get": { - "operationId": "GetGiftCardsCode", - "summary": "Retrieve Gift Card by Code", - "description": "Retrieves a Gift Card by its associated unqiue code.", - "tags": [ - "Region" + "Gift Card" ], "responses": { "200": { @@ -1516,6 +1518,9 @@ }, "balance": { "description": "The current balanace of the Gift Card" + }, + "region": { + "$ref": "#/components/schemas/region" } } } @@ -1525,61 +1530,24 @@ } } }, - "/orders/cart/{cart_id}": { + "/products/{id}": { "get": { - "operationId": "GetOrdersOrderCartId", - "summary": "Retrieves Order by Cart id", - "description": "Retrieves an Order by the id of the Cart that was used to create the Order.", - "parameters": [ - { - "in": "path", - "name": "cart_id", - "required": true, - "description": "The id of Cart.", - "schema": { - "type": "string" - } - } - ], - "tags": [ - "Order" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "order": { - "$ref": "#/components/schemas/order" - } - } - } - } - } - } - } - } - }, - "/orders/{id}": { - "get": { - "operationId": "GetOrdersOrder", - "summary": "Retrieves an Order", - "description": "Retrieves an Order", + "operationId": "GetProductsProduct", + "summary": "Retrieves a Product", + "description": "Retrieves a Product.", "parameters": [ { "in": "path", "name": "id", "required": true, - "description": "The id of the Order.", + "description": "The id of the Product.", "schema": { "type": "string" } } ], "tags": [ - "Order" + "Product" ], "responses": { "200": { @@ -1588,8 +1556,115 @@ "application/json": { "schema": { "properties": { - "customer": { - "$ref": "#/components/schemas/customer" + "product": { + "$ref": "#/components/schemas/product" + } + } + } + } + } + } + } + } + }, + "/products": { + "get": { + "operationId": "GetProducts", + "summary": "List Products", + "description": "Retrieves a list of Products.", + "tags": [ + "Product" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "count": { + "description": "The total number of Products.", + "type": "integer" + }, + "offset": { + "description": "The offset for pagination.", + "type": "integer" + }, + "limit": { + "description": "The maxmimum number of Products to return,", + "type": "integer" + }, + "products": { + "type": "array", + "items": { + "$ref": "#/components/schemas/product" + } + } + } + } + } + } + } + } + } + }, + "/return-reasons/{id}": { + "get": { + "operationId": "GetReturnReasonsReason", + "summary": "Retrieve a Return Reason", + "description": "Retrieves a Return Reason.", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Return Reason.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Return Reason" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return_reason": { + "$ref": "#/components/schemas/return_reason" + } + } + } + } + } + } + } + } + }, + "/return-reasons": { + "get": { + "operationId": "GetReturnReasons", + "summary": "List Return Reasons", + "description": "Retrieves a list of Return Reasons.", + "tags": [ + "Return Reason" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return_reasons": { + "type": "array", + "items": { + "$ref": "#/components/schemas/return_reason" + } } } } @@ -1677,24 +1752,24 @@ } } }, - "/swaps/{cart_id}": { + "/orders/cart/{cart_id}": { "get": { - "operationId": "GetSwapsSwapCartId", - "summary": "Retrieve Swap by Cart id", - "description": "Retrieves a Swap by the id of the Cart used to confirm the Swap.", + "operationId": "GetOrdersOrderCartId", + "summary": "Retrieves Order by Cart id", + "description": "Retrieves an Order by the id of the Cart that was used to create the Order.", "parameters": [ { "in": "path", "name": "cart_id", "required": true, - "description": "The id of the Cart", + "description": "The id of Cart.", "schema": { "type": "string" } } ], "tags": [ - "Swap" + "Order" ], "responses": { "200": { @@ -1703,8 +1778,157 @@ "application/json": { "schema": { "properties": { - "swap": { - "$ref": "#/components/schemas/swap" + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/orders/{id}": { + "get": { + "operationId": "GetOrdersOrder", + "summary": "Retrieves an Order", + "description": "Retrieves an Order", + "parameters": [ + { + "in": "path", + "name": "id", + "required": true, + "description": "The id of the Order.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "customer": { + "$ref": "#/components/schemas/customer" + } + } + } + } + } + } + } + } + }, + "/orders": { + "get": { + "operationId": "GetOrders", + "summary": "Look Up an Order", + "description": "Looks for an Order with a given `display_id`, `email` pair. The `display_id`, `email` pair must match in order for the Order to be returned.", + "parameters": [ + { + "in": "query", + "name": "display_id", + "required": true, + "description": "The display id given to the Order.", + "schema": { + "type": "number" + } + }, + { + "in": "query", + "name": "email", + "required": true, + "description": "The email of the Order with the given display_id.", + "schema": { + "type": "string" + } + } + ], + "tags": [ + "Order" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "order": { + "$ref": "#/components/schemas/order" + } + } + } + } + } + } + } + } + }, + "/returns": { + "post": { + "operationId": "PostReturns", + "summary": "Create Return", + "description": "Creates a Return for an Order.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "properties": { + "order_id": { + "type": "string", + "description": "The id of the Order to create the Return from." + }, + "items": { + "description": "The items to include in the Return.", + "type": "array", + "items": { + "properties": { + "item_id": { + "description": "The id of the Line Item from the Order.", + "type": "string" + }, + "quantity": { + "description": "The quantity to return.", + "type": "integer" + } + } + } + }, + "return_shipping": { + "description": "If the Return is to be handled by the store operator the Customer can choose a Return Shipping Method. Alternatvely the Customer can handle the Return themselves.", + "type": "object", + "properties": { + "option_id": { + "type": "string", + "description": "The id of the Shipping Option to create the Shipping Method from." + } + } + } + } + } + } + } + }, + "tags": [ + "Return" + ], + "responses": { + "200": { + "description": "OK", + "content": { + "application/json": { + "schema": { + "properties": { + "return": { + "$ref": "#/components/schemas/return" } } } @@ -1809,24 +2033,24 @@ } } }, - "/products/{id}": { + "/swaps/{cart_id}": { "get": { - "operationId": "GetProductsProduct", - "summary": "Retrieves a Product", - "description": "Retrieves a Product.", + "operationId": "GetSwapsSwapCartId", + "summary": "Retrieve Swap by Cart id", + "description": "Retrieves a Swap by the id of the Cart used to confirm the Swap.", "parameters": [ { "in": "path", - "name": "id", + "name": "cart_id", "required": true, - "description": "The id of the Product.", + "description": "The id of the Cart", "schema": { "type": "string" } } ], "tags": [ - "Product" + "Swap" ], "responses": { "200": { @@ -1835,49 +2059,8 @@ "application/json": { "schema": { "properties": { - "product": { - "$ref": "#/components/schemas/product" - } - } - } - } - } - } - } - } - }, - "/products": { - "get": { - "operationId": "GetProducts", - "summary": "List Products", - "description": "Retrieves a list of Products.", - "tags": [ - "Product" - ], - "responses": { - "200": { - "description": "OK", - "content": { - "application/json": { - "schema": { - "properties": { - "count": { - "description": "The total number of Products.", - "type": "integer" - }, - "offset": { - "description": "The offset for pagination.", - "type": "integer" - }, - "limit": { - "description": "The maxmimum number of Products to return,", - "type": "integer" - }, - "products": { - "type": "array", - "items": { - "$ref": "#/components/schemas/product" - } + "swap": { + "$ref": "#/components/schemas/swap" } } } @@ -4093,6 +4276,60 @@ "description": "The quantity that was received in the warehouse.", "type": "integer" }, + "reason": { + "description": "The reason for returning the item.", + "anyOf": [ + { + "$ref": "#/components/schemas/return_reason" + } + ] + }, + "note": { + "description": "An optional note with additional details about the Return.", + "type": "string" + }, + "metadata": { + "description": "An optional key-value map with additional information.", + "type": "object" + } + } + }, + "return_reason": { + "title": "Return Reason", + "description": "A Reason for why a given product is returned. A Return Reason can be used on Return Items in order to indicate why a Line Item was returned.", + "x-resourceId": "return_reason", + "properties": { + "id": { + "description": "The id of the Return Reason will start with `rr_`.", + "type": "string" + }, + "description": { + "description": "A description of the Reason.", + "type": "string" + }, + "label": { + "description": "A text that can be displayed to the Customer as a reason.", + "type": "string" + }, + "value": { + "description": "The value to identify the reason by.", + "type": "string" + }, + "created_at": { + "description": "The date with timezone at which the resource was created.", + "type": "string", + "format": "date-time" + }, + "updated_at": { + "description": "The date with timezone at which the resource was last updated.", + "type": "string", + "format": "date-time" + }, + "deleted_at": { + "description": "The date with timezone at which the resource was deleted.", + "type": "string", + "format": "date-time" + }, "metadata": { "description": "An optional key-value map with additional information.", "type": "object" diff --git a/docs/api/store-spec3.yaml b/docs/api/store-spec3.yaml index f1fa995615..43e7a49d17 100644 --- a/docs/api/store-spec3.yaml +++ b/docs/api/store-spec3.yaml @@ -991,8 +991,15 @@ paths: operationId: GetGiftCardsCode summary: Retrieve Gift Card by Code description: Retrieves a Gift Card by its associated unqiue code. + parameters: + - in: path + name: code + required: true + description: The unique Gift Card code. + schema: + type: string tags: - - Region + - Gift Card responses: '200': description: OK @@ -1000,7 +1007,6 @@ paths: application/json: schema: properties: -<<<<<<< HEAD id: description: The id of the Gift Card code: @@ -1009,6 +1015,88 @@ paths: description: The original value of the Gift Card. balance: description: The current balanace of the Gift Card + region: + $ref: '#/components/schemas/region' + '/orders/cart/{cart_id}': + get: + operationId: GetOrdersOrderCartId + summary: Retrieves Order by Cart id + description: >- + Retrieves an Order by the id of the Cart that was used to create the + Order. + parameters: + - in: path + name: cart_id + required: true + description: The id of Cart. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' + '/orders/{id}': + get: + operationId: GetOrdersOrder + summary: Retrieves an Order + description: Retrieves an Order + parameters: + - in: path + name: id + required: true + description: The id of the Order. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + customer: + $ref: '#/components/schemas/customer' + /orders: + get: + operationId: GetOrders + summary: Look Up an Order + description: >- + Looks for an Order with a given `display_id`, `email` pair. The + `display_id`, `email` pair must match in order for the Order to be + returned. + parameters: + - in: query + name: display_id + required: true + description: The display id given to the Order. + schema: + type: number + - in: query + name: email + required: true + description: The email of the Order with the given display_id. + schema: + type: string + tags: + - Order + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + order: + $ref: '#/components/schemas/order' '/products/{id}': get: operationId: GetProductsProduct @@ -1059,45 +1147,20 @@ paths: type: array items: $ref: '#/components/schemas/product' - '/orders/cart/{cart_id}': + '/return-reasons/{id}': get: - operationId: GetOrdersOrderCartId - summary: Retrieves Order by Cart id - description: >- - Retrieves an Order by the id of the Cart that was used to create the - Order. - parameters: - - in: path - name: cart_id - required: true - description: The id of Cart. - schema: - type: string - tags: - - Order - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - order: - $ref: '#/components/schemas/order' - '/orders/{id}': - get: - operationId: GetOrdersOrder - summary: Retrieves an Order - description: Retrieves an Order + operationId: GetReturnReasonsReason + summary: Retrieve a Return Reason + description: Retrieves a Return Reason. parameters: - in: path name: id required: true - description: The id of the Order. + description: The id of the Return Reason. schema: type: string tags: - - Order + - Return Reason responses: '200': description: OK @@ -1105,10 +1168,26 @@ paths: application/json: schema: properties: -======= ->>>>>>> origin/master - customer: - $ref: '#/components/schemas/customer' + return_reason: + $ref: '#/components/schemas/return_reason' + /return-reasons: + get: + operationId: GetReturnReasons + summary: List Return Reasons + description: Retrieves a list of Return Reasons. + tags: + - Return Reason + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + return_reasons: + type: array + items: + $ref: '#/components/schemas/return_reason' '/regions/{id}': get: operationId: GetRegionsRegion @@ -1159,21 +1238,44 @@ paths: type: array items: $ref: '#/components/schemas/region' -<<<<<<< HEAD - '/swaps/{cart_id}': - get: - operationId: GetSwapsSwapCartId - summary: Retrieve Swap by Cart id - description: Retrieves a Swap by the id of the Cart used to confirm the Swap. - parameters: - - in: path - name: cart_id - required: true - description: The id of the Cart - schema: - type: string + /returns: + post: + operationId: PostReturns + summary: Create Return + description: Creates a Return for an Order. + requestBody: + content: + application/json: + schema: + properties: + order_id: + type: string + description: The id of the Order to create the Return from. + items: + description: The items to include in the Return. + type: array + items: + properties: + item_id: + description: The id of the Line Item from the Order. + type: string + quantity: + description: The quantity to return. + type: integer + return_shipping: + description: >- + If the Return is to be handled by the store operator the + Customer can choose a Return Shipping Method. Alternatvely + the Customer can handle the Return themselves. + type: object + properties: + option_id: + type: string + description: >- + The id of the Shipping Option to create the Shipping + Method from. tags: - - Swap + - Return responses: '200': description: OK @@ -1181,18 +1283,14 @@ paths: application/json: schema: properties: - swap: - $ref: '#/components/schemas/swap' + return: + $ref: '#/components/schemas/return' /shipping-options: -======= - '/products/{id}': ->>>>>>> origin/master get: - operationId: GetProductsProduct - summary: Retrieves a Product - description: Retrieves a Product. + operationId: GetShippingOptions + summary: Retrieve Shipping Options + description: Retrieves a list of Shipping Options. parameters: -<<<<<<< HEAD - in: query name: is_return description: >- @@ -1208,140 +1306,6 @@ paths: - in: query name: region_id description: the Region to retrieve Shipping Options from. -======= - - in: path - name: id - required: true - description: The id of the Product. ->>>>>>> origin/master - schema: - type: string - tags: - - Product - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - product: - $ref: '#/components/schemas/product' - /products: - get: - operationId: GetProducts - summary: List Products - description: Retrieves a list of Products. - tags: - - Product - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - count: - description: The total number of Products. - type: integer - offset: - description: The offset for pagination. - type: integer - limit: - description: 'The maxmimum number of Products to return,' - type: integer - products: - type: array - items: -<<<<<<< HEAD - $ref: '#/components/schemas/shipping_option' -======= - $ref: '#/components/schemas/product' - '/swaps/{cart_id}': - get: - operationId: GetSwapsSwapCartId - summary: Retrieve Swap by Cart id - description: Retrieves a Swap by the id of the Cart used to confirm the Swap. - parameters: - - in: path - name: cart_id - required: true - description: The id of the Cart - schema: - type: string - tags: - - Swap - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - swap: - $ref: '#/components/schemas/swap' ->>>>>>> origin/master - '/variants/{variant_id}': - get: - operationId: GetVariantsVariant - summary: Retrieve a Product Variant - description: Retrieves a Product Variant by id - parameters: - - in: path - name: variant_id - required: true - description: The id of the Product Variant. - schema: - type: string - tags: - - Product Variant - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - variant: - $ref: '#/components/schemas/product_variant' - /variants: - get: - operationId: GetVariants - summary: Retrieve Product Variants - description: Retrieves a list of Product Variants - parameters: - - in: query - name: ids - description: A comma separated list of Product Variant ids to filter by. - schema: - type: string - tags: - - Product Variant - responses: - '200': - description: OK - content: - application/json: - schema: - properties: - variants: - type: array - items: - $ref: '#/components/schemas/product_variant' - /shipping-options: - get: - operationId: GetShippingOptions - summary: Retrieve Shipping Options - description: Retrieves a list of Shipping Options. - parameters: - - in: query - name: product_ids - description: A comma separated list of Product ids to filter Shipping Options by. - schema: - type: string - - in: query - name: region_id - description: the Region to retrieve Shipping Options from. schema: type: string tags: @@ -1382,6 +1346,76 @@ paths: type: array items: $ref: '#/components/schemas/shipping_option' + '/swaps/{cart_id}': + get: + operationId: GetSwapsSwapCartId + summary: Retrieve Swap by Cart id + description: Retrieves a Swap by the id of the Cart used to confirm the Swap. + parameters: + - in: path + name: cart_id + required: true + description: The id of the Cart + schema: + type: string + tags: + - Swap + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + swap: + $ref: '#/components/schemas/swap' + '/variants/{variant_id}': + get: + operationId: GetVariantsVariant + summary: Retrieve a Product Variant + description: Retrieves a Product Variant by id + parameters: + - in: path + name: variant_id + required: true + description: The id of the Product Variant. + schema: + type: string + tags: + - Product Variant + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + variant: + $ref: '#/components/schemas/product_variant' + /variants: + get: + operationId: GetVariants + summary: Retrieve Product Variants + description: Retrieves a list of Product Variants + parameters: + - in: query + name: ids + description: A comma separated list of Product Variant ids to filter by. + schema: + type: string + tags: + - Product Variant + responses: + '200': + description: OK + content: + application/json: + schema: + properties: + variants: + type: array + items: + $ref: '#/components/schemas/product_variant' components: schemas: address: @@ -3197,6 +3231,47 @@ components: recieved_quantity: description: The quantity that was received in the warehouse. type: integer + reason: + description: The reason for returning the item. + anyOf: + - $ref: '#/components/schemas/return_reason' + note: + description: An optional note with additional details about the Return. + type: string + metadata: + description: An optional key-value map with additional information. + type: object + return_reason: + title: Return Reason + description: >- + A Reason for why a given product is returned. A Return Reason can be + used on Return Items in order to indicate why a Line Item was returned. + x-resourceId: return_reason + properties: + id: + description: The id of the Return Reason will start with `rr_`. + type: string + description: + description: A description of the Reason. + type: string + label: + description: A text that can be displayed to the Customer as a reason. + type: string + value: + description: The value to identify the reason by. + type: string + created_at: + description: The date with timezone at which the resource was created. + type: string + format: date-time + updated_at: + description: The date with timezone at which the resource was last updated. + type: string + format: date-time + deleted_at: + description: The date with timezone at which the resource was deleted. + type: string + format: date-time metadata: description: An optional key-value map with additional information. type: object diff --git a/integration-tests/api/__tests__/store/gift-cards.js b/integration-tests/api/__tests__/store/gift-cards.js index 8a75021e14..4be1a147ec 100644 --- a/integration-tests/api/__tests__/store/gift-cards.js +++ b/integration-tests/api/__tests__/store/gift-cards.js @@ -59,6 +59,7 @@ describe("/store/gift-cards", () => { code: "GC_TEST", value: 200, balance: 120, + region: expect.any(Object), }); }); }); diff --git a/integration-tests/api/package.json b/integration-tests/api/package.json index 611aaa2247..8931993ee6 100644 --- a/integration-tests/api/package.json +++ b/integration-tests/api/package.json @@ -8,15 +8,15 @@ "build": "babel src -d dist --extensions \".ts,.js\"" }, "dependencies": { - "@medusajs/medusa": "1.1.11-dev-1615882960610", - "medusa-interfaces": "1.1.1-dev-1615882960610", + "@medusajs/medusa": "1.1.13-dev-1615987548667", + "medusa-interfaces": "1.1.3-dev-1615987548667", "typeorm": "^0.2.31" }, "devDependencies": { "@babel/cli": "^7.12.10", "@babel/core": "^7.12.10", "@babel/node": "^7.12.10", - "babel-preset-medusa-package": "1.1.0-dev-1615882960610", + "babel-preset-medusa-package": "1.1.0-dev-1615987548667", "jest": "^26.6.3" } } diff --git a/integration-tests/api/yarn.lock b/integration-tests/api/yarn.lock index 14745c90d7..cc3dcb2a7b 100644 --- a/integration-tests/api/yarn.lock +++ b/integration-tests/api/yarn.lock @@ -1173,10 +1173,10 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@medusajs/medusa@1.1.11-dev-1615882960610": - version "1.1.11" - resolved "https://registry.yarnpkg.com/@medusajs/medusa/-/medusa-1.1.11.tgz#4852880a461ef641ae50f35ddc8a28a8a0905f9c" - integrity sha512-yXeJ7NpeRzHIo1TNQpKpQoIT/4SGsteaHgnDKt5OUqM3rT8Y0ikZ8ezH9wnOqB7P0NR7V2buYXGlUnP3juvfFQ== +"@medusajs/medusa@1.1.13-dev-1615987548667": + version "1.1.13" + resolved "https://registry.yarnpkg.com/@medusajs/medusa/-/medusa-1.1.13.tgz#1aad18445c062e298bfea2ac362ad2740a53fde6" + integrity sha512-yPQ+uA9qQsJiqME7nR8ggeg/qi2Kypqi6iNsFrdXbA99djjm3Cpkl3kmkTorRvzQ6jbKZ1QMLS+Dx5FwbKuiTw== dependencies: "@babel/plugin-transform-classes" "^7.9.5" "@hapi/joi" "^16.1.8" @@ -1198,8 +1198,8 @@ joi "^17.3.0" joi-objectid "^3.0.1" jsonwebtoken "^8.5.1" - medusa-core-utils "^1.1.0" - medusa-test-utils "^1.1.3" + medusa-core-utils "^1.1.2" + medusa-test-utils "^1.1.5" morgan "^1.9.1" multer "^1.4.2" passport "^0.4.0" @@ -1213,7 +1213,6 @@ request-ip "^2.1.3" resolve-cwd "^3.0.0" scrypt-kdf "^2.0.1" - typeorm "^0.2.29" ulid "^2.3.0" uuid "^8.3.1" winston "^3.2.1" @@ -1713,7 +1712,7 @@ babel-preset-jest@^26.6.2: babel-plugin-jest-hoist "^26.6.2" babel-preset-current-node-syntax "^1.0.0" -babel-preset-medusa-package@1.1.0-dev-1615882960610: +babel-preset-medusa-package@1.1.0-dev-1615987548667: version "1.1.1-alpha.57" resolved "https://registry.yarnpkg.com/babel-preset-medusa-package/-/babel-preset-medusa-package-1.1.1-alpha.57.tgz#3e19607f963febea2d24c5f44468e2903af2d9da" integrity sha512-OzXPNscchkBVLRdBGqY64uGktgktol5zR0LA8tbpKxv38Fa3FR9dJLF6gqjOQQIgUnrZkgk5p6HZ2OmNXF7FcQ== @@ -4315,36 +4314,28 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -medusa-core-utils@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/medusa-core-utils/-/medusa-core-utils-1.1.0.tgz#0641b365b769dbf99856025d935eef5cf5d81f2c" - integrity sha512-zocRthKhLK3eSjrXbAhZZkIMBRxyvU7GcAMFh5UCEgfe7f935vjE7r5lGTr5jTEwgwaoTUk9ep0VBekz0SEdyw== +medusa-core-utils@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/medusa-core-utils/-/medusa-core-utils-1.1.2.tgz#3d9ccd37b052bc4701040fbf0618210f075f459a" + integrity sha512-YAGkLkS5DqCSHWlMz2Bfh0nKJQ8n35IfH/39q6J9DXfFUPYU+d5i8lSvIS8PNsXuSs9Es0dzY2ZS/sOIFKWzxw== dependencies: joi "^17.3.0" joi-objectid "^3.0.1" -medusa-core-utils@^1.1.1-next.64+6ad2b0e6: - version "1.1.1-next.64" - resolved "https://registry.yarnpkg.com/medusa-core-utils/-/medusa-core-utils-1.1.1-next.64.tgz#62174fcc6a73394b75a5206470585ee2d73aefb7" - integrity sha512-Vi2NHf25hwaIABPanvq81QJxmsBHt/Y1NHzriSaq50D3tsiDjTrR9DdYe0aLfep5/MaTClCm1cjXSI/tYZgOjQ== - dependencies: - joi "^17.3.0" - joi-objectid "^3.0.1" - -medusa-interfaces@1.1.1-dev-1615882960610: - version "1.1.2-next.23" - resolved "https://registry.yarnpkg.com/medusa-interfaces/-/medusa-interfaces-1.1.2-next.23.tgz#57ba339bd7f72e111d9307a4fd9acdc503c94bd0" - integrity sha512-rjObAO2j2TpuOvjgx5y1twz78yyAlEL/ZB4ulbMqvSSxoxvTiqAiOeCVuFdcYTvq3GD32GWNz5oeJxQgo54Tbw== - dependencies: - medusa-core-utils "^1.1.1-next.64+6ad2b0e6" - -medusa-test-utils@^1.1.3: +medusa-interfaces@1.1.3-dev-1615987548667: version "1.1.3" - resolved "https://registry.yarnpkg.com/medusa-test-utils/-/medusa-test-utils-1.1.3.tgz#c2b45d44b9567fa2255e936d7bed73a31dfb42dd" - integrity sha512-0saYG5BhEjc4BZP76/2IJL7CyqIdbCasAci+EYXzwnwgS+nCUhKDjzzNAnC+PZMK/teD3M7x4n7isFtjgNSIDQ== + resolved "https://registry.yarnpkg.com/medusa-interfaces/-/medusa-interfaces-1.1.3.tgz#b1fb889c321433d31e6d998dbd7d47eb71a27589" + integrity sha512-6WNzOfcHDM7CaRFOerZBt5eRqje97gMbTcoEiFOxJy8a5B7OIq/wt7UBI1Et3C9lYFKpb5fSUwfDwRWY/yO3UA== + dependencies: + medusa-core-utils "^1.1.2" + +medusa-test-utils@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/medusa-test-utils/-/medusa-test-utils-1.1.5.tgz#5a93c52117c7a8659058512abf939e2aaed619b7" + integrity sha512-oM6lIRdnq6T3VRi702hYOQ9m3T9Zy2IwZAp2nBnJRlXpXbWlNnIS3y0E638m5wsGbFzSKKxrDNdGtEpujxwzyQ== dependencies: "@babel/plugin-transform-classes" "^7.9.5" - medusa-core-utils "^1.1.0" + medusa-core-utils "^1.1.2" randomatic "^3.1.1" merge-descriptors@1.0.1: @@ -6112,7 +6103,7 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typeorm@^0.2.29, typeorm@^0.2.31: +typeorm@^0.2.31: version "0.2.31" resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.31.tgz#82b8a1b233224f81c738f53b0380386ccf360917" integrity sha512-dVvCEVHH48DG0QPXAKfo0l6ecQrl3A8ucGP4Yw4myz4YEDMProebTQo8as83uyES+nrwCbu3qdkL4ncC2+qcMA== diff --git a/lerna.json b/lerna.json index accb9fa1cf..1dcf1cfdba 100644 --- a/lerna.json +++ b/lerna.json @@ -5,7 +5,7 @@ ], "command": { "publish": { - "allowBranch": "release/*", + "allowBranch": ["master", "release/*"], "bump": "patch", "conventionalCommits": true, "message": "chore(release): Publish" diff --git a/packages/medusa-cli/CHANGELOG.md b/packages/medusa-cli/CHANGELOG.md index eb1853fde5..9cd3fde232 100644 --- a/packages/medusa-cli/CHANGELOG.md +++ b/packages/medusa-cli/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.3](https://github.com/medusajs/medusa/compare/@medusajs/medusa-cli@1.1.0...@medusajs/medusa-cli@1.1.3) (2021-03-17) + + +### Features + +* dev cli ([#203](https://github.com/medusajs/medusa/issues/203)) ([695b1fd](https://github.com/medusajs/medusa/commit/695b1fd0a54a247502cb48ffb73d060356293b76)), closes [#199](https://github.com/medusajs/medusa/issues/199) + + + + + +## [1.1.2](https://github.com/medusajs/medusa/compare/@medusajs/medusa-cli@1.1.0...@medusajs/medusa-cli@1.1.2) (2021-03-17) + + +### Features + +* dev cli ([#203](https://github.com/medusajs/medusa/issues/203)) ([695b1fd](https://github.com/medusajs/medusa/commit/695b1fd0a54a247502cb48ffb73d060356293b76)), closes [#199](https://github.com/medusajs/medusa/issues/199) + + + + + # [1.1.0](https://github.com/medusajs/medusa/compare/@medusajs/medusa-cli@1.0.11...@medusajs/medusa-cli@1.1.0) (2021-01-26) **Note:** Version bump only for package @medusajs/medusa-cli diff --git a/packages/medusa-cli/package-lock.json b/packages/medusa-cli/package-lock.json index a53f369e36..be85cc0846 100644 --- a/packages/medusa-cli/package-lock.json +++ b/packages/medusa-cli/package-lock.json @@ -1,6 +1,6 @@ { "name": "medusa-cli", - "version": "1.1.0", + "version": "1.1.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/medusa-cli/package.json b/packages/medusa-cli/package.json index c4d496465e..de084e568b 100644 --- a/packages/medusa-cli/package.json +++ b/packages/medusa-cli/package.json @@ -1,6 +1,6 @@ { "name": "@medusajs/medusa-cli", - "version": "1.1.0", + "version": "1.1.3", "description": "Command Line interface for Medusa Commerce", "main": "dist/index.js", "bin": { diff --git a/packages/medusa-core-utils/CHANGELOG.md b/packages/medusa-core-utils/CHANGELOG.md index 1b0a69c869..189c682a0d 100644 --- a/packages/medusa-core-utils/CHANGELOG.md +++ b/packages/medusa-core-utils/CHANGELOG.md @@ -3,6 +3,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.2](https://github.com/medusajs/medusa/compare/medusa-core-utils@1.1.0...medusa-core-utils@1.1.2) (2021-03-17) + + +### Features + +* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580)) +* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f)) + + + + + +## [1.1.1](https://github.com/medusajs/medusa/compare/medusa-core-utils@1.1.0...medusa-core-utils@1.1.1) (2021-03-17) + + +### Features + +* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580)) +* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f)) + + + + + # [1.1.0](https://github.com/medusajs/medusa/compare/medusa-core-utils@1.0.11...medusa-core-utils@1.1.0) (2021-01-26) **Note:** Version bump only for package medusa-core-utils diff --git a/packages/medusa-core-utils/package.json b/packages/medusa-core-utils/package.json index 00c00f5c9d..b10fb1c808 100644 --- a/packages/medusa-core-utils/package.json +++ b/packages/medusa-core-utils/package.json @@ -1,6 +1,6 @@ { "name": "medusa-core-utils", - "version": "1.1.0", + "version": "1.1.2", "description": "Core utils for Medusa", "main": "dist/index.js", "repository": { diff --git a/packages/medusa-dev-cli/CHANGELOG.md b/packages/medusa-dev-cli/CHANGELOG.md new file mode 100644 index 0000000000..cbf350f9ad --- /dev/null +++ b/packages/medusa-dev-cli/CHANGELOG.md @@ -0,0 +1,22 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +## 0.0.3 (2021-03-17) + + +### Features + +* dev cli ([#203](https://github.com/medusajs/medusa/issues/203)) ([695b1fd](https://github.com/medusajs/medusa/commit/695b1fd0a54a247502cb48ffb73d060356293b76)), closes [#199](https://github.com/medusajs/medusa/issues/199) + + + + + +## 0.0.2 (2021-03-17) + + +### Features + +* dev cli ([#203](https://github.com/medusajs/medusa/issues/203)) ([695b1fd](https://github.com/medusajs/medusa/commit/695b1fd0a54a247502cb48ffb73d060356293b76)), closes [#199](https://github.com/medusajs/medusa/issues/199) diff --git a/packages/medusa-dev-cli/package.json b/packages/medusa-dev-cli/package.json index 7dfdbcb91a..6e6e8f277d 100644 --- a/packages/medusa-dev-cli/package.json +++ b/packages/medusa-dev-cli/package.json @@ -1,7 +1,7 @@ { "name": "medusa-dev-cli", "description": "CLI helpers for contributors working on Medusa", - "version": "0.0.2-alpha.641+d9faeee4", + "version": "0.0.3", "author": "Sebastian Rindom ", "bin": { "medusa-dev": "./dist/index.js" diff --git a/packages/medusa-file-spaces/CHANGELOG.md b/packages/medusa-file-spaces/CHANGELOG.md index a6e79364fa..f9de6b37cf 100644 --- a/packages/medusa-file-spaces/CHANGELOG.md +++ b/packages/medusa-file-spaces/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-file-spaces@1.1.3...medusa-file-spaces@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-file-spaces + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-file-spaces@1.1.3...medusa-file-spaces@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-file-spaces + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-file-spaces@1.1.2...medusa-file-spaces@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-file-spaces diff --git a/packages/medusa-file-spaces/package.json b/packages/medusa-file-spaces/package.json index 00c7eaac60..2e1f3d508a 100644 --- a/packages/medusa-file-spaces/package.json +++ b/packages/medusa-file-spaces/package.json @@ -1,6 +1,6 @@ { "name": "medusa-file-spaces", - "version": "1.1.3", + "version": "1.1.5", "description": "Digital Ocean Spaces file connector for Medusa", "main": "index.js", "repository": { @@ -40,8 +40,8 @@ "aws-sdk": "^2.710.0", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3", + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5", "stripe": "^8.50.0" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-fulfillment-manual/CHANGELOG.md b/packages/medusa-fulfillment-manual/CHANGELOG.md index 633497dfc4..ff3ede821d 100644 --- a/packages/medusa-fulfillment-manual/CHANGELOG.md +++ b/packages/medusa-fulfillment-manual/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.2](https://github.com/medusajs/medusa/compare/medusa-fulfillment-manual@1.1.0...medusa-fulfillment-manual@1.1.2) (2021-03-17) + +**Note:** Version bump only for package medusa-fulfillment-manual + + + + + +## [1.1.1](https://github.com/medusajs/medusa/compare/medusa-fulfillment-manual@1.1.0...medusa-fulfillment-manual@1.1.1) (2021-03-17) + +**Note:** Version bump only for package medusa-fulfillment-manual + + + + + # [1.1.0](https://github.com/medusajs/medusa/compare/medusa-fulfillment-manual@1.0.12...medusa-fulfillment-manual@1.1.0) (2021-01-26) **Note:** Version bump only for package medusa-fulfillment-manual diff --git a/packages/medusa-fulfillment-manual/package.json b/packages/medusa-fulfillment-manual/package.json index cb47f9686c..e0ed189f94 100644 --- a/packages/medusa-fulfillment-manual/package.json +++ b/packages/medusa-fulfillment-manual/package.json @@ -1,6 +1,6 @@ { "name": "medusa-fulfillment-manual", - "version": "1.1.0", + "version": "1.1.2", "description": "A manual fulfillment provider for Medusa", "main": "index.js", "repository": { @@ -36,7 +36,7 @@ "@babel/plugin-transform-instanceof": "^7.8.3", "@babel/runtime": "^7.7.6", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0" + "medusa-core-utils": "^1.1.2" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-fulfillment-webshipper/CHANGELOG.md b/packages/medusa-fulfillment-webshipper/CHANGELOG.md index 2faa0faa67..64d29a6ade 100644 --- a/packages/medusa-fulfillment-webshipper/CHANGELOG.md +++ b/packages/medusa-fulfillment-webshipper/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-fulfillment-webshipper@1.1.3...medusa-fulfillment-webshipper@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-fulfillment-webshipper + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-fulfillment-webshipper@1.1.3...medusa-fulfillment-webshipper@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-fulfillment-webshipper + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-fulfillment-webshipper@1.1.3-next.0...medusa-fulfillment-webshipper@1.1.3) (2021-02-25) **Note:** Version bump only for package medusa-fulfillment-webshipper diff --git a/packages/medusa-fulfillment-webshipper/package.json b/packages/medusa-fulfillment-webshipper/package.json index 0d644f4859..e1035c2f65 100644 --- a/packages/medusa-fulfillment-webshipper/package.json +++ b/packages/medusa-fulfillment-webshipper/package.json @@ -1,6 +1,6 @@ { "name": "medusa-fulfillment-webshipper", - "version": "1.1.3", + "version": "1.1.5", "description": "Webshipper Fulfillment provider for Medusa", "main": "index.js", "repository": { @@ -36,7 +36,7 @@ "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0" + "medusa-core-utils": "^1.1.2" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-interfaces/CHANGELOG.md b/packages/medusa-interfaces/CHANGELOG.md index e8ac914912..43b3a71e91 100644 --- a/packages/medusa-interfaces/CHANGELOG.md +++ b/packages/medusa-interfaces/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-interfaces@1.1.1...medusa-interfaces@1.1.3) (2021-03-17) + + +### Features + +* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580)) + + + + + +## [1.1.2](https://github.com/medusajs/medusa/compare/medusa-interfaces@1.1.1...medusa-interfaces@1.1.2) (2021-03-17) + + +### Features + +* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580)) + + + + + ## [1.1.1](https://github.com/medusajs/medusa/compare/medusa-interfaces@1.1.0...medusa-interfaces@1.1.1) (2021-02-17) diff --git a/packages/medusa-interfaces/package.json b/packages/medusa-interfaces/package.json index 199e015e5c..9ff33c4395 100644 --- a/packages/medusa-interfaces/package.json +++ b/packages/medusa-interfaces/package.json @@ -1,6 +1,6 @@ { "name": "medusa-interfaces", - "version": "1.1.1", + "version": "1.1.3", "description": "Core interfaces for Medusa", "main": "dist/index.js", "repository": { @@ -35,7 +35,7 @@ "typeorm": "0.x" }, "dependencies": { - "medusa-core-utils": "^1.1.0" + "medusa-core-utils": "^1.1.2" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-payment-adyen/CHANGELOG.md b/packages/medusa-payment-adyen/CHANGELOG.md index e7a0adc5ac..2ba9fc6931 100644 --- a/packages/medusa-payment-adyen/CHANGELOG.md +++ b/packages/medusa-payment-adyen/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.3...medusa-payment-adyen@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-payment-adyen + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.3...medusa-payment-adyen@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-payment-adyen + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-payment-adyen@1.1.2...medusa-payment-adyen@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-payment-adyen diff --git a/packages/medusa-payment-adyen/package.json b/packages/medusa-payment-adyen/package.json index 536a5b11cd..f43b81d9c3 100644 --- a/packages/medusa-payment-adyen/package.json +++ b/packages/medusa-payment-adyen/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-adyen", - "version": "1.1.3", + "version": "1.1.5", "description": "Adyen Payment provider for Medusa Commerce", "main": "index.js", "repository": { @@ -24,7 +24,7 @@ "cross-env": "^7.0.2", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.3" + "medusa-test-utils": "^1.1.5" }, "scripts": { "build": "babel src -d .", @@ -42,7 +42,7 @@ "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0" + "medusa-core-utils": "^1.1.2" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-payment-klarna/CHANGELOG.md b/packages/medusa-payment-klarna/CHANGELOG.md index 0783452ccb..97741b8274 100644 --- a/packages/medusa-payment-klarna/CHANGELOG.md +++ b/packages/medusa-payment-klarna/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.6](https://github.com/medusajs/medusa/compare/medusa-payment-klarna@1.1.4...medusa-payment-klarna@1.1.6) (2021-03-17) + +**Note:** Version bump only for package medusa-payment-klarna + + + + + +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-payment-klarna@1.1.4...medusa-payment-klarna@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-payment-klarna + + + + + ## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-payment-klarna@1.1.3...medusa-payment-klarna@1.1.4) (2021-02-17) **Note:** Version bump only for package medusa-payment-klarna diff --git a/packages/medusa-payment-klarna/package.json b/packages/medusa-payment-klarna/package.json index 144c28f2e3..a8be9b8b3f 100644 --- a/packages/medusa-payment-klarna/package.json +++ b/packages/medusa-payment-klarna/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-klarna", - "version": "1.1.4", + "version": "1.1.6", "description": "Klarna Payment provider for Medusa Commerce", "main": "index.js", "repository": { @@ -40,8 +40,8 @@ "axios": "^0.21.0", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3" + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-payment-paypal/CHANGELOG.md b/packages/medusa-payment-paypal/CHANGELOG.md index 3363174692..6379f679cb 100644 --- a/packages/medusa-payment-paypal/CHANGELOG.md +++ b/packages/medusa-payment-paypal/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.0.5](https://github.com/medusajs/medusa/compare/medusa-payment-paypal@1.0.3...medusa-payment-paypal@1.0.5) (2021-03-17) + +**Note:** Version bump only for package medusa-payment-paypal + + + + + +## [1.0.4](https://github.com/medusajs/medusa/compare/medusa-payment-paypal@1.0.3...medusa-payment-paypal@1.0.4) (2021-03-17) + +**Note:** Version bump only for package medusa-payment-paypal + + + + + ## [1.0.3](https://github.com/medusajs/medusa/compare/medusa-payment-paypal@1.0.2...medusa-payment-paypal@1.0.3) (2021-02-17) **Note:** Version bump only for package medusa-payment-paypal diff --git a/packages/medusa-payment-paypal/package.json b/packages/medusa-payment-paypal/package.json index 5f27e29b4b..93099e8554 100644 --- a/packages/medusa-payment-paypal/package.json +++ b/packages/medusa-payment-paypal/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-paypal", - "version": "1.0.3", + "version": "1.0.5", "description": "Paypal Payment provider for Meduas Commerce", "main": "index.js", "repository": { @@ -26,7 +26,7 @@ "cross-env": "^5.2.1", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.3" + "medusa-test-utils": "^1.1.5" }, "scripts": { "build": "babel src -d . --ignore **/__tests__", @@ -41,7 +41,7 @@ "@paypal/checkout-server-sdk": "^1.0.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0" + "medusa-core-utils": "^1.1.2" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-payment-stripe/CHANGELOG.md b/packages/medusa-payment-stripe/CHANGELOG.md index 2018a180d5..22a55ee5de 100644 --- a/packages/medusa-payment-stripe/CHANGELOG.md +++ b/packages/medusa-payment-stripe/CHANGELOG.md @@ -3,6 +3,30 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-payment-stripe@1.1.3...medusa-payment-stripe@1.1.5) (2021-03-17) + + +### Bug Fixes + +* floor amounts ([5e2f550](https://github.com/medusajs/medusa/commit/5e2f550ae10a3eb7636edf6bf99197517a1fa7b3)) +* round instead of floor ([74a6b67](https://github.com/medusajs/medusa/commit/74a6b67f9db0a66fdf3cf69be6db62ae0deea635)) + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-payment-stripe@1.1.3...medusa-payment-stripe@1.1.4) (2021-03-17) + + +### Bug Fixes + +* floor amounts ([5e2f550](https://github.com/medusajs/medusa/commit/5e2f550ae10a3eb7636edf6bf99197517a1fa7b3)) +* round instead of floor ([74a6b67](https://github.com/medusajs/medusa/commit/74a6b67f9db0a66fdf3cf69be6db62ae0deea635)) + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-payment-stripe@1.1.2...medusa-payment-stripe@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-payment-stripe diff --git a/packages/medusa-payment-stripe/package.json b/packages/medusa-payment-stripe/package.json index 529d24bc3f..60e4f7abf6 100644 --- a/packages/medusa-payment-stripe/package.json +++ b/packages/medusa-payment-stripe/package.json @@ -1,6 +1,6 @@ { "name": "medusa-payment-stripe", - "version": "1.1.3", + "version": "1.1.5", "description": "Stripe Payment provider for Meduas Commerce", "main": "index.js", "repository": { @@ -26,7 +26,7 @@ "cross-env": "^5.2.1", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.3" + "medusa-test-utils": "^1.1.5" }, "scripts": { "build": "babel src -d . --ignore **/__tests__", @@ -40,7 +40,7 @@ "dependencies": { "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", + "medusa-core-utils": "^1.1.2", "stripe": "^8.50.0" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-plugin-add-ons/CHANGELOG.md b/packages/medusa-plugin-add-ons/CHANGELOG.md index 2cc39b1d32..bd5025952b 100644 --- a/packages/medusa-plugin-add-ons/CHANGELOG.md +++ b/packages/medusa-plugin-add-ons/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-add-ons@1.1.3...medusa-plugin-add-ons@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-add-ons + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-add-ons@1.1.3...medusa-plugin-add-ons@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-add-ons + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-plugin-add-ons@1.1.2...medusa-plugin-add-ons@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-plugin-add-ons diff --git a/packages/medusa-plugin-add-ons/package.json b/packages/medusa-plugin-add-ons/package.json index 2e80ce479c..8b02379d00 100644 --- a/packages/medusa-plugin-add-ons/package.json +++ b/packages/medusa-plugin-add-ons/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-add-ons", - "version": "1.1.3", + "version": "1.1.5", "description": "Add-on plugin for Medusa Commerce", "main": "index.js", "repository": { @@ -25,7 +25,7 @@ "cross-env": "^7.0.2", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.3" + "medusa-test-utils": "^1.1.5" }, "scripts": { "build": "babel src -d . --ignore **/__tests__", @@ -37,7 +37,7 @@ "body-parser": "^1.19.0", "cors": "^2.8.5", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", + "medusa-core-utils": "^1.1.2", "redis": "^3.0.2" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-plugin-brightpearl/CHANGELOG.md b/packages/medusa-plugin-brightpearl/CHANGELOG.md index 6ee2fb71aa..c66d06e67a 100644 --- a/packages/medusa-plugin-brightpearl/CHANGELOG.md +++ b/packages/medusa-plugin-brightpearl/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.7](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.5...medusa-plugin-brightpearl@1.1.7) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-brightpearl + + + + + +## [1.1.6](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.5...medusa-plugin-brightpearl@1.1.6) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-brightpearl + + + + + ## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-brightpearl@1.1.4...medusa-plugin-brightpearl@1.1.5) (2021-02-25) **Note:** Version bump only for package medusa-plugin-brightpearl diff --git a/packages/medusa-plugin-brightpearl/package.json b/packages/medusa-plugin-brightpearl/package.json index bdd3b8470f..69028950b4 100644 --- a/packages/medusa-plugin-brightpearl/package.json +++ b/packages/medusa-plugin-brightpearl/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-brightpearl", - "version": "1.1.5", + "version": "1.1.7", "description": "Brightpearl plugin for Medusa Commerce", "main": "index.js", "repository": { @@ -27,7 +27,7 @@ "cross-env": "^7.0.2", "eslint": "^6.8.0", "jest": "^25.5.2", - "medusa-test-utils": "^1.1.3", + "medusa-test-utils": "^1.1.5", "prettier": "^2.0.5" }, "scripts": { @@ -43,7 +43,7 @@ "axios": "^0.19.2", "axios-rate-limit": "^1.2.1", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", + "medusa-core-utils": "^1.1.2", "randomatic": "^3.1.1" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-plugin-contentful/CHANGELOG.md b/packages/medusa-plugin-contentful/CHANGELOG.md index 0fa6c1d8bc..625e3f6c0a 100644 --- a/packages/medusa-plugin-contentful/CHANGELOG.md +++ b/packages/medusa-plugin-contentful/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.6](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.4...medusa-plugin-contentful@1.1.6) (2021-03-17) + + +### Bug Fixes + +* contentful sync ([#206](https://github.com/medusajs/medusa/issues/206)) ([227cdb6](https://github.com/medusajs/medusa/commit/227cdb622234126df6087992203ce82ff9446974)) + + + + + +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.4...medusa-plugin-contentful@1.1.5) (2021-03-17) + + +### Bug Fixes + +* contentful sync ([#206](https://github.com/medusajs/medusa/issues/206)) ([227cdb6](https://github.com/medusajs/medusa/commit/227cdb622234126df6087992203ce82ff9446974)) + + + + + ## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-contentful@1.1.3...medusa-plugin-contentful@1.1.4) (2021-02-25) diff --git a/packages/medusa-plugin-contentful/package.json b/packages/medusa-plugin-contentful/package.json index ff6a5a79eb..e96c274883 100644 --- a/packages/medusa-plugin-contentful/package.json +++ b/packages/medusa-plugin-contentful/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-contentful", - "version": "1.1.4-alpha.7+739b7b3c", + "version": "1.1.6", "description": "Contentful plugin for Medusa Commerce", "main": "index.js", "repository": { @@ -39,8 +39,8 @@ "body-parser": "^1.19.0", "contentful-management": "^5.27.1", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3", + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5", "redis": "^3.0.2" }, "gitHead": "739b7b3cc5ff31aa7a15637db2000e645c7597b1" diff --git a/packages/medusa-plugin-economic/CHANGELOG.md b/packages/medusa-plugin-economic/CHANGELOG.md index f926fc9549..dcbb624143 100644 --- a/packages/medusa-plugin-economic/CHANGELOG.md +++ b/packages/medusa-plugin-economic/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-economic@1.1.3...medusa-plugin-economic@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-economic + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-economic@1.1.3...medusa-plugin-economic@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-economic + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-plugin-economic@1.1.2...medusa-plugin-economic@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-plugin-economic diff --git a/packages/medusa-plugin-economic/package-lock.json b/packages/medusa-plugin-economic/package-lock.json index 036904e809..37ee21ada8 100644 --- a/packages/medusa-plugin-economic/package-lock.json +++ b/packages/medusa-plugin-economic/package-lock.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-economic", - "version": "1.1.3", + "version": "1.1.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/medusa-plugin-economic/package.json b/packages/medusa-plugin-economic/package.json index 583dcd4ec6..881e8116a5 100644 --- a/packages/medusa-plugin-economic/package.json +++ b/packages/medusa-plugin-economic/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-economic", - "version": "1.1.3", + "version": "1.1.5", "description": "E-conomic financial reporting", "main": "index.js", "repository": { @@ -39,8 +39,8 @@ "axios": "^0.19.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3", + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5", "moment": "^2.27.0" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-plugin-mailchimp/CHANGELOG.md b/packages/medusa-plugin-mailchimp/CHANGELOG.md index 820c30b609..aa3117a683 100644 --- a/packages/medusa-plugin-mailchimp/CHANGELOG.md +++ b/packages/medusa-plugin-mailchimp/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-mailchimp@1.1.3...medusa-plugin-mailchimp@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-mailchimp + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-mailchimp@1.1.3...medusa-plugin-mailchimp@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-mailchimp + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-plugin-mailchimp@1.1.2...medusa-plugin-mailchimp@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-plugin-mailchimp diff --git a/packages/medusa-plugin-mailchimp/package.json b/packages/medusa-plugin-mailchimp/package.json index eca50e2001..8c54db3354 100644 --- a/packages/medusa-plugin-mailchimp/package.json +++ b/packages/medusa-plugin-mailchimp/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-mailchimp", - "version": "1.1.3", + "version": "1.1.5", "description": "Mailchimp newsletter subscriptions", "main": "index.js", "repository": { @@ -40,8 +40,8 @@ "cors": "^2.8.5", "express": "^4.17.1", "mailchimp-api-v3": "^1.14.0", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3" + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-plugin-permissions/CHANGELOG.md b/packages/medusa-plugin-permissions/CHANGELOG.md index dbd41ecfee..b80e305ed0 100644 --- a/packages/medusa-plugin-permissions/CHANGELOG.md +++ b/packages/medusa-plugin-permissions/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-permissions@1.1.3...medusa-plugin-permissions@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-permissions + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-permissions@1.1.3...medusa-plugin-permissions@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-permissions + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-plugin-permissions@1.1.2...medusa-plugin-permissions@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-plugin-permissions diff --git a/packages/medusa-plugin-permissions/package.json b/packages/medusa-plugin-permissions/package.json index 544dd92e45..437b723ac4 100644 --- a/packages/medusa-plugin-permissions/package.json +++ b/packages/medusa-plugin-permissions/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-permissions", - "version": "1.1.3", + "version": "1.1.5", "description": "Role permission for Medusa core", "main": "dist/index.js", "repository": { @@ -32,8 +32,8 @@ "medusa-interfaces": "1.x" }, "dependencies": { - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3", + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5", "mongoose": "^5.8.0" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-plugin-segment/CHANGELOG.md b/packages/medusa-plugin-segment/CHANGELOG.md index 87f9ecc0bc..527500a7cf 100644 --- a/packages/medusa-plugin-segment/CHANGELOG.md +++ b/packages/medusa-plugin-segment/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.7](https://github.com/medusajs/medusa/compare/medusa-plugin-segment@1.1.5...medusa-plugin-segment@1.1.7) (2021-03-17) + + +### Features + +* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f)) + + + + + +## [1.1.6](https://github.com/medusajs/medusa/compare/medusa-plugin-segment@1.1.5...medusa-plugin-segment@1.1.6) (2021-03-17) + + +### Features + +* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f)) + + + + + ## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-segment@1.1.5-next.3...medusa-plugin-segment@1.1.5) (2021-02-25) **Note:** Version bump only for package medusa-plugin-segment diff --git a/packages/medusa-plugin-segment/package.json b/packages/medusa-plugin-segment/package.json index e3167bb4b4..e483ee128d 100644 --- a/packages/medusa-plugin-segment/package.json +++ b/packages/medusa-plugin-segment/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-segment", - "version": "1.1.5", + "version": "1.1.7", "description": "Segment Analytics", "main": "index.js", "repository": { @@ -39,8 +39,8 @@ "axios": "^0.19.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3" + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5" }, "gitHead": "0c294b7b3acbc1b873aab7e90a8e596bdac48899" } diff --git a/packages/medusa-plugin-sendgrid/CHANGELOG.md b/packages/medusa-plugin-sendgrid/CHANGELOG.md index 1b7107ad42..79d6490792 100644 --- a/packages/medusa-plugin-sendgrid/CHANGELOG.md +++ b/packages/medusa-plugin-sendgrid/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.6](https://github.com/medusajs/medusa/compare/medusa-plugin-sendgrid@1.1.4...medusa-plugin-sendgrid@1.1.6) (2021-03-17) + + +### Bug Fixes + +* enable gift-card creation without order_id ([9ce935a](https://github.com/medusajs/medusa/commit/9ce935a779aec90ff1ad301c73114ab69ce51b36)) + + + + + +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-sendgrid@1.1.4...medusa-plugin-sendgrid@1.1.5) (2021-03-17) + + +### Bug Fixes + +* enable gift-card creation without order_id ([9ce935a](https://github.com/medusajs/medusa/commit/9ce935a779aec90ff1ad301c73114ab69ce51b36)) + + + + + ## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-sendgrid@1.1.3...medusa-plugin-sendgrid@1.1.4) (2021-02-25) diff --git a/packages/medusa-plugin-sendgrid/package.json b/packages/medusa-plugin-sendgrid/package.json index 7df27324ba..4debe3edab 100644 --- a/packages/medusa-plugin-sendgrid/package.json +++ b/packages/medusa-plugin-sendgrid/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-sendgrid", - "version": "1.1.4", + "version": "1.1.6", "description": "SendGrid transactional emails", "main": "index.js", "repository": { @@ -39,8 +39,8 @@ "@sendgrid/mail": "^7.1.1", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3" + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-plugin-slack-notification/CHANGELOG.md b/packages/medusa-plugin-slack-notification/CHANGELOG.md index 5a6ae9161b..06921b2757 100644 --- a/packages/medusa-plugin-slack-notification/CHANGELOG.md +++ b/packages/medusa-plugin-slack-notification/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-slack-notification@1.1.3...medusa-plugin-slack-notification@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-slack-notification + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-slack-notification@1.1.3...medusa-plugin-slack-notification@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-slack-notification + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-plugin-slack-notification@1.1.2...medusa-plugin-slack-notification@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-plugin-slack-notification diff --git a/packages/medusa-plugin-slack-notification/package-lock.json b/packages/medusa-plugin-slack-notification/package-lock.json index 036904e809..37ee21ada8 100644 --- a/packages/medusa-plugin-slack-notification/package-lock.json +++ b/packages/medusa-plugin-slack-notification/package-lock.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-economic", - "version": "1.1.3", + "version": "1.1.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/medusa-plugin-slack-notification/package.json b/packages/medusa-plugin-slack-notification/package.json index 32460ea480..cdbc473d90 100644 --- a/packages/medusa-plugin-slack-notification/package.json +++ b/packages/medusa-plugin-slack-notification/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-slack-notification", - "version": "1.1.3", + "version": "1.1.5", "description": "Slack notifications", "main": "index.js", "repository": { @@ -39,8 +39,8 @@ "axios": "^0.19.2", "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3", + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5", "moment": "^2.27.0" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-plugin-twilio-sms/CHANGELOG.md b/packages/medusa-plugin-twilio-sms/CHANGELOG.md index 75235a2fd0..1166677da3 100644 --- a/packages/medusa-plugin-twilio-sms/CHANGELOG.md +++ b/packages/medusa-plugin-twilio-sms/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-twilio-sms@1.1.3...medusa-plugin-twilio-sms@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-twilio-sms + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-twilio-sms@1.1.3...medusa-plugin-twilio-sms@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-twilio-sms + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-plugin-twilio-sms@1.1.2...medusa-plugin-twilio-sms@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-plugin-twilio-sms diff --git a/packages/medusa-plugin-twilio-sms/package.json b/packages/medusa-plugin-twilio-sms/package.json index 6b6d96e5f5..79f7ff3942 100644 --- a/packages/medusa-plugin-twilio-sms/package.json +++ b/packages/medusa-plugin-twilio-sms/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-twilio-sms", - "version": "1.1.3", + "version": "1.1.5", "main": "index.js", "repository": { "type": "git", @@ -35,8 +35,8 @@ "dependencies": { "@babel/plugin-transform-classes": "^7.9.5", "body-parser": "^1.19.0", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3", + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5", "twilio": "^3.49.1" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa-plugin-wishlist/CHANGELOG.md b/packages/medusa-plugin-wishlist/CHANGELOG.md index 28a739790a..304cd5599f 100644 --- a/packages/medusa-plugin-wishlist/CHANGELOG.md +++ b/packages/medusa-plugin-wishlist/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.3...medusa-plugin-wishlist@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-wishlist + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.3...medusa-plugin-wishlist@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-plugin-wishlist + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-plugin-wishlist@1.1.2...medusa-plugin-wishlist@1.1.3) (2021-02-17) **Note:** Version bump only for package medusa-plugin-wishlist diff --git a/packages/medusa-plugin-wishlist/package.json b/packages/medusa-plugin-wishlist/package.json index d550df04e5..91f76c9b0b 100644 --- a/packages/medusa-plugin-wishlist/package.json +++ b/packages/medusa-plugin-wishlist/package.json @@ -1,6 +1,6 @@ { "name": "medusa-plugin-wishlist", - "version": "1.1.3", + "version": "1.1.5", "description": "Provides /customers/:id/wishlist to add items to a customr's wishlist", "main": "index.js", "repository": { @@ -37,8 +37,8 @@ "dependencies": { "body-parser": "^1.19.0", "express": "^4.17.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3" + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" } diff --git a/packages/medusa-test-utils/CHANGELOG.md b/packages/medusa-test-utils/CHANGELOG.md index 87dd8948f1..9c8b1962f9 100644 --- a/packages/medusa-test-utils/CHANGELOG.md +++ b/packages/medusa-test-utils/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.5](https://github.com/medusajs/medusa/compare/medusa-test-utils@1.1.3...medusa-test-utils@1.1.5) (2021-03-17) + +**Note:** Version bump only for package medusa-test-utils + + + + + +## [1.1.4](https://github.com/medusajs/medusa/compare/medusa-test-utils@1.1.3...medusa-test-utils@1.1.4) (2021-03-17) + +**Note:** Version bump only for package medusa-test-utils + + + + + ## [1.1.3](https://github.com/medusajs/medusa/compare/medusa-test-utils@1.1.2...medusa-test-utils@1.1.3) (2021-02-17) diff --git a/packages/medusa-test-utils/package.json b/packages/medusa-test-utils/package.json index 86343b742c..8c3f0dc581 100644 --- a/packages/medusa-test-utils/package.json +++ b/packages/medusa-test-utils/package.json @@ -1,6 +1,6 @@ { "name": "medusa-test-utils", - "version": "1.1.3", + "version": "1.1.5", "description": "Test utils for Medusa", "main": "dist/index.js", "repository": { @@ -29,7 +29,7 @@ }, "dependencies": { "@babel/plugin-transform-classes": "^7.9.5", - "medusa-core-utils": "^1.1.0", + "medusa-core-utils": "^1.1.2", "randomatic": "^3.1.1" }, "gitHead": "0646bd395a6056657cb0aa93c13699c4a9dbbcdd" diff --git a/packages/medusa/CHANGELOG.md b/packages/medusa/CHANGELOG.md index 890c4e0c76..73c0e88747 100644 --- a/packages/medusa/CHANGELOG.md +++ b/packages/medusa/CHANGELOG.md @@ -3,6 +3,66 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.1.13](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.11...@medusajs/medusa@1.1.13) (2021-03-17) + + +### Bug Fixes + +* add region to gift-cards ([ffac0d3](https://github.com/medusajs/medusa/commit/ffac0d3a3de876a5fe5b6b75910ef02f249fae4c)) +* adds integration test to create endpoint ([521d306](https://github.com/medusajs/medusa/commit/521d306b7126a820297d7374b9c16bea465fa643)) +* allows shipping option filters in return ([#202](https://github.com/medusajs/medusa/issues/202)) ([7c7f86e](https://github.com/medusajs/medusa/commit/7c7f86e8e8be20173e774ea86b53e75c98e72e9a)) +* contentful sync ([#206](https://github.com/medusajs/medusa/issues/206)) ([227cdb6](https://github.com/medusajs/medusa/commit/227cdb622234126df6087992203ce82ff9446974)) +* enable gift-card creation without order_id ([9ce935a](https://github.com/medusajs/medusa/commit/9ce935a779aec90ff1ad301c73114ab69ce51b36)) +* enable gift-card creation without order_id ([#195](https://github.com/medusajs/medusa/issues/195)) ([1263d24](https://github.com/medusajs/medusa/commit/1263d24ca380918345c844c1793f2706a49f85c6)) +* merge ([49f1d0f](https://github.com/medusajs/medusa/commit/49f1d0f67a3eb285397d8b7c8e9033fcf42589ff)) +* merge ([31d5bb0](https://github.com/medusajs/medusa/commit/31d5bb017d3028beb5325185ccec80cd1772165e)) +* **medusa:** expose items.refundable ([3fbf38f](https://github.com/medusajs/medusa/commit/3fbf38ffc93b969adbb5033e5b7cb31aeff36896)) +* merge api ([6ad2b0e](https://github.com/medusajs/medusa/commit/6ad2b0e6e9f339f60a3cc9d8674e5055121685b4)) +* **medusa:** Upsert product images ([#200](https://github.com/medusajs/medusa/issues/200)) ([a031f1f](https://github.com/medusajs/medusa/commit/a031f1f33873dddd0246e668c5b98c12bbaa108b)) +* round totals ([a1ba2e8](https://github.com/medusajs/medusa/commit/a1ba2e8b5cdf586ac2d646f2334e46ceae96bc8f)) +* test ([caf1ecf](https://github.com/medusajs/medusa/commit/caf1ecfd5af58559d035d6c17a4993bdd6a5cc0b)) + + +### Features + +* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580)) +* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f)) +* **medusa:** storefront return ([#194](https://github.com/medusajs/medusa/issues/194)) ([252db5e](https://github.com/medusajs/medusa/commit/252db5ef7e09e844fac72bbb8e2b2de34a541d25)) + + + + + +## [1.1.12](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.11...@medusajs/medusa@1.1.12) (2021-03-17) + + +### Bug Fixes + +* add region to gift-cards ([ffac0d3](https://github.com/medusajs/medusa/commit/ffac0d3a3de876a5fe5b6b75910ef02f249fae4c)) +* adds integration test to create endpoint ([521d306](https://github.com/medusajs/medusa/commit/521d306b7126a820297d7374b9c16bea465fa643)) +* allows shipping option filters in return ([#202](https://github.com/medusajs/medusa/issues/202)) ([7c7f86e](https://github.com/medusajs/medusa/commit/7c7f86e8e8be20173e774ea86b53e75c98e72e9a)) +* contentful sync ([#206](https://github.com/medusajs/medusa/issues/206)) ([227cdb6](https://github.com/medusajs/medusa/commit/227cdb622234126df6087992203ce82ff9446974)) +* enable gift-card creation without order_id ([9ce935a](https://github.com/medusajs/medusa/commit/9ce935a779aec90ff1ad301c73114ab69ce51b36)) +* enable gift-card creation without order_id ([#195](https://github.com/medusajs/medusa/issues/195)) ([1263d24](https://github.com/medusajs/medusa/commit/1263d24ca380918345c844c1793f2706a49f85c6)) +* merge ([49f1d0f](https://github.com/medusajs/medusa/commit/49f1d0f67a3eb285397d8b7c8e9033fcf42589ff)) +* merge ([31d5bb0](https://github.com/medusajs/medusa/commit/31d5bb017d3028beb5325185ccec80cd1772165e)) +* **medusa:** expose items.refundable ([3fbf38f](https://github.com/medusajs/medusa/commit/3fbf38ffc93b969adbb5033e5b7cb31aeff36896)) +* merge api ([6ad2b0e](https://github.com/medusajs/medusa/commit/6ad2b0e6e9f339f60a3cc9d8674e5055121685b4)) +* **medusa:** Upsert product images ([#200](https://github.com/medusajs/medusa/issues/200)) ([a031f1f](https://github.com/medusajs/medusa/commit/a031f1f33873dddd0246e668c5b98c12bbaa108b)) +* round totals ([a1ba2e8](https://github.com/medusajs/medusa/commit/a1ba2e8b5cdf586ac2d646f2334e46ceae96bc8f)) +* test ([caf1ecf](https://github.com/medusajs/medusa/commit/caf1ecfd5af58559d035d6c17a4993bdd6a5cc0b)) + + +### Features + +* **medusa:** Add support for filtering with gt, lt, gte and lte ([#190](https://github.com/medusajs/medusa/issues/190)) ([dd0491f](https://github.com/medusajs/medusa/commit/dd0491f52132aed24f642589b12fcf636b719580)) +* **medusa:** cart context ([#201](https://github.com/medusajs/medusa/issues/201)) ([dd7b306](https://github.com/medusajs/medusa/commit/dd7b306333fbe1042f5cf2bed614bce84ea9475f)) +* **medusa:** storefront return ([#194](https://github.com/medusajs/medusa/issues/194)) ([252db5e](https://github.com/medusajs/medusa/commit/252db5ef7e09e844fac72bbb8e2b2de34a541d25)) + + + + + ## [1.1.11](https://github.com/medusajs/medusa/compare/@medusajs/medusa@1.1.10...@medusajs/medusa@1.1.11) (2021-02-25) diff --git a/packages/medusa/package.json b/packages/medusa/package.json index 0728c807ce..79e47ef3de 100644 --- a/packages/medusa/package.json +++ b/packages/medusa/package.json @@ -1,6 +1,6 @@ { "name": "@medusajs/medusa", - "version": "1.1.11", + "version": "1.1.13", "description": "E-commerce for JAMstack", "main": "dist/index.js", "repository": { @@ -67,8 +67,8 @@ "joi": "^17.3.0", "joi-objectid": "^3.0.1", "jsonwebtoken": "^8.5.1", - "medusa-core-utils": "^1.1.0", - "medusa-test-utils": "^1.1.3", + "medusa-core-utils": "^1.1.2", + "medusa-test-utils": "^1.1.5", "morgan": "^1.9.1", "multer": "^1.4.2", "passport": "^0.4.0", diff --git a/packages/medusa/src/api/routes/admin/return-reasons/update-reason.js b/packages/medusa/src/api/routes/admin/return-reasons/update-reason.js index e756533dda..82d933c406 100644 --- a/packages/medusa/src/api/routes/admin/return-reasons/update-reason.js +++ b/packages/medusa/src/api/routes/admin/return-reasons/update-reason.js @@ -2,7 +2,7 @@ import { MedusaError, Validator } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./" /** - * @oas [post] /return-reasons/:id + * @oas [post] /return-reasons/{id} * operationId: "PostReturnReasonsReason" * summary: "Update a Return Reason" * description: "Updates a Return Reason" diff --git a/packages/medusa/src/api/routes/store/gift-cards/get-gift-card.js b/packages/medusa/src/api/routes/store/gift-cards/get-gift-card.js index 7a60875ab8..05a6ac1ea0 100644 --- a/packages/medusa/src/api/routes/store/gift-cards/get-gift-card.js +++ b/packages/medusa/src/api/routes/store/gift-cards/get-gift-card.js @@ -5,8 +5,10 @@ import { defaultRelations, defaultFields } from "./" * operationId: "GetGiftCardsCode" * summary: "Retrieve Gift Card by Code" * description: "Retrieves a Gift Card by its associated unqiue code." + * parameters: + * - (path) code=* {string} The unique Gift Card code. * tags: - * - Region + * - Gift Card * responses: * 200: * description: OK @@ -22,6 +24,8 @@ import { defaultRelations, defaultFields } from "./" * description: The original value of the Gift Card. * balance: * description: The current balanace of the Gift Card + * region: + * $ref: "#/components/schemas/region" */ export default async (req, res) => { const { code } = req.params diff --git a/packages/medusa/src/api/routes/store/gift-cards/index.js b/packages/medusa/src/api/routes/store/gift-cards/index.js index cbd8b6c3c4..a00c8f3bb1 100644 --- a/packages/medusa/src/api/routes/store/gift-cards/index.js +++ b/packages/medusa/src/api/routes/store/gift-cards/index.js @@ -11,10 +11,10 @@ export default app => { return app } -export const defaultRelations = [] +export const defaultRelations = ["region"] export const defaultFields = ["id", "code", "value", "balance"] -export const allowedRelations = [] +export const allowedRelations = ["region"] export const allowedFields = ["id", "code", "value", "balance"] diff --git a/packages/medusa/src/api/routes/store/orders/index.js b/packages/medusa/src/api/routes/store/orders/index.js index 47b5f8d36a..4405a86ba7 100644 --- a/packages/medusa/src/api/routes/store/orders/index.js +++ b/packages/medusa/src/api/routes/store/orders/index.js @@ -6,9 +6,19 @@ const route = Router() export default app => { app.use("/orders", route) + /** + * Lookup + */ route.get("/", middlewares.wrap(require("./lookup-order").default)) + + /** + * Retrieve Order + */ route.get("/:id", middlewares.wrap(require("./get-order").default)) + /** + * Retrieve by Cart Id + */ route.get( "/cart/:cart_id", middlewares.wrap(require("./get-order-by-cart").default) @@ -32,6 +42,9 @@ export const defaultRelations = [ export const defaultFields = [ "id", + "status", + "fulfillment_status", + "payment_status", "display_id", "cart_id", "customer_id", @@ -43,6 +56,7 @@ export const defaultFields = [ "shipping_total", "discount_total", "tax_total", + "items.refundable", "refunded_total", "gift_card_total", "subtotal", @@ -65,12 +79,16 @@ export const allowedRelations = [ export const allowedFields = [ "id", + "status", + "fulfillment_status", + "payment_status", "display_id", "cart_id", "customer_id", "email", "region_id", "currency_code", + "items.refundable", "tax_rate", "created_at", "shipping_total", diff --git a/packages/medusa/src/api/routes/store/orders/lookup-order.js b/packages/medusa/src/api/routes/store/orders/lookup-order.js index 5498a04adc..bbd8d99bdf 100644 --- a/packages/medusa/src/api/routes/store/orders/lookup-order.js +++ b/packages/medusa/src/api/routes/store/orders/lookup-order.js @@ -1,6 +1,26 @@ import { Validator, MedusaError } from "medusa-core-utils" import { defaultRelations, defaultFields } from "./index" +/** + * @oas [get] /orders + * operationId: "GetOrders" + * summary: "Look Up an Order" + * description: "Looks for an Order with a given `display_id`, `email` pair. The `display_id`, `email` pair must match in order for the Order to be returned." + * parameters: + * - (query) display_id=* {number} The display id given to the Order. + * - (query) email=* {string} The email of the Order with the given display_id. + * tags: + * - Order + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * order: + * $ref: "#/components/schemas/order" + */ export default async (req, res) => { const schema = Validator.object().keys({ display_id: Validator.number().required(), diff --git a/packages/medusa/src/api/routes/store/returns/create-return.js b/packages/medusa/src/api/routes/store/returns/create-return.js index 3fb61ec8d7..e04bf44037 100644 --- a/packages/medusa/src/api/routes/store/returns/create-return.js +++ b/packages/medusa/src/api/routes/store/returns/create-return.js @@ -1,6 +1,48 @@ import { MedusaError, Validator } from "medusa-core-utils" -import { defaultRelations, defaultFields } from "./" +/** + * @oas [post] /returns + * operationId: "PostReturns" + * summary: "Create Return" + * description: "Creates a Return for an Order." + * requestBody: + * content: + * application/json: + * schema: + * properties: + * order_id: + * type: string + * description: The id of the Order to create the Return from. + * items: + * description: "The items to include in the Return." + * type: array + * items: + * properties: + * item_id: + * description: The id of the Line Item from the Order. + * type: string + * quantity: + * description: The quantity to return. + * type: integer + * return_shipping: + * description: If the Return is to be handled by the store operator the Customer can choose a Return Shipping Method. Alternatvely the Customer can handle the Return themselves. + * type: object + * properties: + * option_id: + * type: string + * description: The id of the Shipping Option to create the Shipping Method from. + * tags: + * - Return + * responses: + * 200: + * description: OK + * content: + * application/json: + * schema: + * properties: + * return: + * $ref: "#/components/schemas/return" + */ export default async (req, res) => { const schema = Validator.object().keys({ order_id: Validator.string().required(),