feat(dashboard): shipping management (#6995)

**What**
- shipping flow
- shipping profile pages
- delete fulfillment set endpoint
- delete shipping profile endpoint
This commit is contained in:
Frane Polić
2024-04-16 13:42:56 +00:00
committed by GitHub
parent c3260a2c5a
commit 0a9b9b073d
62 changed files with 2501 additions and 12 deletions
+2 -2
View File
@@ -250,7 +250,7 @@ export type PaginatedResponse<T = unknown> = {
/**
* The fields returned in the response of a DELETE request.
*/
export type DeleteResponse = {
export type DeleteResponse<T = string> = {
/**
* The ID of the item that was deleted.
*/
@@ -259,7 +259,7 @@ export type DeleteResponse = {
/**
* The type of the item that was deleted.
*/
object: string
object: T
/**
* Whether the item was deleted successfully.
@@ -1,7 +1,7 @@
/**
* The fields returned in the response of a DELETE request.
*/
export type DeleteResponse = {
export type DeleteResponse<T = string> = {
/**
* The ID of the item that was deleted.
*/
@@ -2,6 +2,7 @@ import { AdminFulfillmentAddressResponse } from "./fulfillment-address"
import { AdminFulfillmentProviderResponse } from "./fulfillment-provider"
import { AdminFulfillmentItemResponse } from "./fulfillment-item"
import { AdminFulfillmentLabelResponse } from "./fulfillment-label"
import { DeleteResponse } from "../../../common"
/**
* @experimental
@@ -25,3 +26,9 @@ export interface AdminFulfillmentResponse {
updated_at: Date
deleted_at: Date | null
}
/**
* @experimental
*/
export interface AdminFulfillmentSetsDeleteResponse
extends DeleteResponse<"fulfillment_set"> {}
@@ -48,4 +48,5 @@ export interface AdminShippingOptionListResponse extends PaginatedResponse {
/**
* @experimental
*/
export interface AdminShippingOptionDeleteResponse extends DeleteResponse {}
export interface AdminShippingOptionDeleteResponse
extends DeleteResponse<"shipping_option"> {}
@@ -1,4 +1,4 @@
import { PaginatedResponse } from "../../../common"
import { DeleteResponse, PaginatedResponse } from "../../../common"
/**
* @experimental
@@ -20,3 +20,9 @@ export interface AdminShippingProfileResponse {
export interface AdminShippingProfilesResponse extends PaginatedResponse {
shipping_profiles: ShippingProfileResponse[]
}
/**
* @experimental
*/
export interface AdminShippingProfileDeleteResponse
extends DeleteResponse<"shipping_profile"> {}
@@ -1,6 +1,7 @@
import { BaseFilterable, OperatorMap } from "../dal"
import { StringComparisonOperator } from "../common/common"
import { FulfillmentSetDTO } from "../fulfillment"
/**
* @schema StockLocationAddressDTO
@@ -205,6 +206,11 @@ export type StockLocationDTO = {
*/
address?: StockLocationAddressDTO
/**
* Fulfillment sets for the location
*/
fulfillment_sets: FulfillmentSetDTO[]
/**
* The creation date of the stock location.
*/