fix(types): fixes to HTTP types (#9189)

* fix(types): fixes to HTTP types

* more fixes

* remove incorrect fields for tax regions
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-09-19 18:35:53 +02:00
1 parent 07f25de153
commit 230a16ac5c
6 files changed
+25 -12

No files matched your search

@@ -50,9 +50,22 @@ export interface BaseRuleAttributeOptions {
id: string id: string
value: string value: string
label: string label: string
/**
* @ignore
*/
field_type: string field_type: string
/**
* @ignore
*/
required: boolean required: boolean
disguised: boolean /**
* @ignore
*/
disguised?: boolean
/**
* @ignore
*/
hydrate?: boolean
operators: BaseRuleOperatorOptions[] operators: BaseRuleOperatorOptions[]
} }
@@ -63,7 +76,6 @@ export interface BaseRuleOperatorOptions {
} }
export interface BaseRuleValueOptions { export interface BaseRuleValueOptions {
id: string
value: string value: string
label: string label: string
} }
@@ -3,5 +3,7 @@ import {
BaseRegionCountry, BaseRegionCountry,
} from "../common" } from "../common"
export interface AdminRegion extends BaseRegion {} export interface AdminRegion extends Omit<BaseRegion, "countries"> {
countries?: AdminRegionCountry[]
}
export interface AdminRegionCountry extends BaseRegionCountry {} export interface AdminRegionCountry extends BaseRegionCountry {}
@@ -1,3 +1,5 @@
import { AdminInventoryItem } from "../../inventory"
export interface AdminReservation { export interface AdminReservation {
id: string id: string
line_item_id: string | null line_item_id: string | null
@@ -6,7 +8,7 @@ export interface AdminReservation {
external_id: string | null external_id: string | null
description: string | null description: string | null
inventory_item_id: string inventory_item_id: string
inventory_item: Record<string, unknown> // TODO: add InventoryItemResponse inventory_item?: AdminInventoryItem
metadata?: Record<string, unknown> metadata?: Record<string, unknown>
created_by?: string | null created_by?: string | null
deleted_at?: Date | string | null deleted_at?: Date | string | null
@@ -1,3 +1,5 @@
import { ReturnStatus } from "../../order"
export interface BaseReturnItem { export interface BaseReturnItem {
id: string id: string
quantity: number quantity: number
@@ -13,7 +15,7 @@ export interface BaseReturnItem {
export interface BaseReturn { export interface BaseReturn {
id: string id: string
order_id: string order_id: string
status?: string status?: ReturnStatus
exchange_id?: string exchange_id?: string
location_id?: string location_id?: string
claim_id?: string claim_id?: string
@@ -1,3 +1,4 @@
import { RuleOperatorType } from "../../../common"
import { ShippingOptionPriceType } from "../../../fulfillment" import { ShippingOptionPriceType } from "../../../fulfillment"
import { AdminFulfillmentProvider } from "../../fulfillment-provider" import { AdminFulfillmentProvider } from "../../fulfillment-provider"
import { AdminServiceZone } from "../../fulfillment-set" import { AdminServiceZone } from "../../fulfillment-set"
@@ -18,7 +19,7 @@ export interface AdminShippingOptionType {
export interface AdminShippingOptionRule { export interface AdminShippingOptionRule {
id: string id: string
attribute: string attribute: string
operator: string operator: RuleOperatorType
value: string | string[] | null value: string | string[] | null
shipping_option_id: string shipping_option_id: string
created_at: string created_at: string
@@ -2,15 +2,9 @@ import { AdminTaxRate } from "../../tax-rate"
export interface AdminTaxRegion { export interface AdminTaxRegion {
id: string id: string
rate: number | null
code: string | null
country_code: string | null country_code: string | null
province_code: string | null province_code: string | null
name: string
metadata: Record<string, unknown> | null metadata: Record<string, unknown> | null
tax_region_id: string
is_combinable: boolean
is_default: boolean
parent_id: string | null parent_id: string | null
created_at: string created_at: string
updated_at: string updated_at: string